// JavaScript Document

$(document).ready(function() {
	$(".cover", this).stop().css('top','-250px');
	$(".cover", this).stop().css('display','block');
	$(".cover", this).stop().animate({top:'250px'},{queue:false,duration:980,easing:'swing'});
	
	$('.boxgrid.captionful').hover(function(){
		var height = 235 - $('.boxcaption', this).height();
		$(".cover", this).stop().animate({top:height+'px'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'250px'},{queue:false,duration:160});
	});
	
	setTimeout(function() {
		$('.shine').animate({marginLeft:'330px'},{queue:false,duration:1200,easing:'swing'});
	}, 1000);
	
	shine();
});

function shine() {
	setTimeout(function() {
		$('.shine').css('margin-left','-260px');
		$('.shine').animate({marginLeft:'330px'},{queue:false,duration:1200,easing:'swing'});
		shine();
	}, 6000);
}