/* Author: 

*/


$(document).ready(function(){

	$img = $('.featured img');
	full = $img.attr('data-full');
		
	docWidth = $(document).width();
	
	if(docWidth < 1100){
		$img.responsiveImgLoad({
			hitpoint : 500,
			fullAttr : 'data-medium'
		});
	}	
		
	if(docWidth < 1501){	
		$img.responsiveImgLoad({
			hitpoint : 1100,
			fullAttr : 'data-large'
		});
	}
		
	$img.responsiveImgLoad({
			hitpoint : 1501,
			fullAttr : 'data-full'
		});	
	
	$('.featured').animate({'height':(docWidth * .66)+'px'}, 300);
	
	$('.featured').waitForImages(function() {
		
		var width = $(this).width(),
			imgHeight = $img.height();	
		
			
		$(this).animate({height:imgHeight},200,function(){
			$img.fadeIn();
			$(this).css({'background':'none',height:''});
			
		});	

	});
	
		

});
















