jQuery(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	jQuery("a").click(function(){
		jQuery(this).blur();
	});
	
	jQuery(".n-we-did-this").mouseover(function(){
		jQuery(".subNav").stop().animate({height:'462px'},{queue:false, duration:600, easing: 'easeInQuint'})
	});

	jQuery(".n-we-did-this").mouseout(function(){
		jQuery(".subNav").stop().animate({height:'0px'},{queue:false, duration:600, easing: 'easeOutQuint'})
	});  
	
	  
	jQuery(".thumbPanel .item").each(function () {
		jQuery(this).mouseover(function () {
            jQuery(this).find(".thumbDescription.show").css({display:"block", "z-index": 9999, position: "absolute"});
			jQuery(this).find(".thumbDescription.show dl").stop().animate({opacity:'1'},{queue:false, duration:300, easing: 'easeInQuint'});
		});
		
		jQuery(this).mouseout(function () {
			jQuery(this).find(".thumbDescription dl").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'}); 
		});	
	});

	          
	
	jQuery("div.pagination .f1 a").click(function(){
		jQuery(".folioItem1").stop().animate({opacity:'0.9999'},{queue:false, duration:300, easing: 'easeInQuint'});
		jQuery(".folioItem2").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".folioItem3").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".f1 a").animate({ backgroundColor: '#a3001b' }, 'fast');
		jQuery(".f2 a").animate({ backgroundColor: '#9f9180' }, 'fast');  
		jQuery(".f3 a").animate({ backgroundColor: '#9f9180' }, 'fast') 
	});
	  
	jQuery("div.pagination .f2 a").click(function(){
		jQuery(".folioItem2").stop().animate({opacity:'0.9999'},{queue:false, duration:300, easing: 'easeInQuint'});
		jQuery(".folioItem1").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".folioItem3").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".f1 a").animate({ backgroundColor: '#9f9180' }, 'fast');
		jQuery(".f2 a").animate({ backgroundColor: '#a3001b' }, 'fast');   
		jQuery(".f3 a").animate({ backgroundColor: '#9f9180' }, 'fast') 
	});
	
	jQuery("div.pagination .f3 a").click(function(){
		jQuery(".folioItem3").stop().animate({opacity:'0.9999'},{queue:false, duration:300, easing: 'easeInQuint'});
		jQuery(".folioItem1").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".folioItem2").stop().animate({opacity:'0'},{queue:false, duration:1200, easing: 'easeOutQuint'});
		jQuery(".f1 a").animate({ backgroundColor: '#9f9180' }, 'fast');
		jQuery(".f2 a").animate({ backgroundColor: '#9f9180' }, 'fast');
		jQuery(".f3 a").animate({ backgroundColor: '#a3001b' }, 'fast')   
	});
	
});
