$(document).ready(function(){
	$("#boxes, #thirdNav, #footer").css({opacity:"0", filter: "alpha(opacity=0)", marginLeft: "-4000px"});
	$(".projectBox, #error").css({opacity:"0", filter: "alpha(opacity=0)"});
	$(".projectBox, #error").fadeTo("slow", .95);
	$("#closeW").css({display:"block"});
	$("#closeW").addClass("projectBack");
	
	$("ul.nextPro li a").click(function(){
		$(".projectBox").animate({
		opacity:"hide"
		},800);
	});
	
	$(".closeB, #closeW, .goThumb").click(function(){
		$('html, body').animate({
			scrollTop: $("#wrapper").offset().top
			}, 200);
		$(".projectBox, #error, .closeB").animate({
		opacity:"0",
		filter: "alpha(opacity = 0)"
		},800, function(){
		$(this).css({left: "-4000px"});
		$("#boxes, #thirdNav, #footer").animate({
			opacity:"1",
			filter: "alpha(opacity = 100)",
			marginLeft: "0"
			}, 800);
		$("#closeW").removeClass("projectBack");
		$("#closeW").css({display:"hidden"});
		});
	});
});
