$(document).ready(function() {	

	/*_________________________________________________________________________________________ TARGET BLANK*/
	
	$(".external").attr("target","_blank");
		

	/*_________________________________________________________________________________________ CUFON*/
	
	
	$('#photos>a').lightBox();
	
	//setInterval( "slideSwitch()", 5000 );
	$('#slider').nivoSlider({
					effect:'fade', /*Specify sets like: 'fold,fade,sliceDown,sliceDownLeft
					sliceUp sliceUpLeft sliceUpDown sliceUpDownLeft fold fade random
					slideInRight  slideInLeft boxRandom boxRain boxRainReverse boxRainGrow
					boxRainGrowReverse*/
					slices:12,
					animSpeed:500,
					pauseTime:4000,
					startSlide:0, //Set starting Slide (0 index)
					directionNav: true, //Next & Prev
					directionNavHide:true, //Only show on hover
					controlNav:true, //1,2,3...
					controlNavThumbs:false, //Use thumbnails for Control Nav
			      	controlNavThumbsFromRel:false, //Use image rel for thumbs
					controlNavThumbsSearch: '.jpg', //Replace this with...
					keyboardNav:true, //Use left & right arrows
					pauseOnHover:true, //Stop animation while hovering
					manualAdvance:false //Force manual transitions
				});

}); 


/** SIMPLE SLIDESHOW WITH CSS **/
function slideSwitch() {
    var $active = $('#slideshow .active');

    if ( $active.length == 0 ) $active = $('#slideshow div:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow div:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 2000, function() {
            $active.removeClass('active last-active');
        });
}

