Cufon.replace("article header h1, article header h2");

$(document).ready(function() {	
	
	$('.image ul').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500, //Slide transition speed
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //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...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:true, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	$('.image ul').data('nivo:vars').stop = true;
	$("section article:nth-child(even) .image, section article:nth-child(odd) .copy").addClass("fR");
	$("section article:nth-child(odd) .image, section article:nth-child(even) .copy").addClass("fL");
	
	$("section article:nth-child(even) header h1, section article:nth-child(even) header h2").css({'text-align': 'right'});
	$("section article:nth-child(odd) header h1, section article:nth-child(odd) header h2").css({'text-align': 'left'});
	
	$('footer a').click(function(){
		$('html, body').animate({scrollTop:0}, 800);
		return false;		
	});
		
});
