$(document).ready(function(){
$("span.downer").hide();

//Larger thumbnail preview 

$('.thumb li').delay(300).fadeIn(1000);

$('.thumb li:nth-child(1)').delay(10).animate({"top": "-=160px"}, "slow");
$('.thumb li:nth-child(2)').delay(70).animate({"top": "-=160px"}, "slow");
$('.thumb li:nth-child(3)').delay(130).animate({"top": "-=160px"}, "slow");
$('.thumb li:nth-child(4)').delay(190).animate({"top": "-=160px"}, "slow");
$('.thumb li:nth-child(5)').delay(250).animate({"top": "-=160px"}, "slow");
$('.thumb li:nth-child(6)').delay(310).animate({"top": "-=160px"}, "slow");

$('.thumb li.lol').delay(310).animate({top: "+=50px"}, "slow");

$('#navGallery').hide().delay(2000).fadeIn(1000);

$(".thumb li").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-110px', 
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '174px', 
			height: '174px',
			padding: '20px' 
		}, 200);
	$(this).find('span').addClass("downer").stop()
		.animate({
			marginLeft: '40px'
		}, 300);
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '130px', 
			height: '130px', 
			padding: '5px'
		}, 400);
		$(this).find('span').removeClass("downer").stop()
		.animate({
			marginLeft: '0'
		}, 300);
});

});
