$(document).ready(function() {
	
	//hide everything to avoid flashing shit
	$(".fixflashing").hide();
	
	$("#credits").fadeOut(0);
	$(".phasser").fadeOut(0);
	$(".detail_btn").fadeOut(0);
	$("#lookbook").fadeOut(0);
	$(".phasser").fadeIn(800);
	$("#credits").delay(1000).fadeIn(200);
	$(".detail_btn").delay(1000).fadeIn(150);
	$("#lookbook").delay(200).fadeIn(500);
	
	$("a.transition").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$(".detail_btn").fadeOut(50);	
		$("#lookbook").delay(100).fadeOut(200);
		$("#credits").fadeOut(150);
		$(".phasser").delay(50).fadeOut(400, redirectPage);	

	});

	function redirectPage() {
		window.location = linkLocation;
	};
	
	$("a.zoomit").fancybox({
		"transitionIn"	: "fade",
		"transitionOut"	: "fade",
		"speedIn"		: 150,
		"speedOut"		: 300,
		"overlayShow"	: true,
		"overlayColor"	: "#fff",
		"overlayOpacity": 0.8,
		"padding"		: 15,
		"cyclic"		: true,
		"titleShow"		: true,
		"titlePosition"	: "inside"   
	});
});


