$(document).ready(function() {
	$("#front-page-wrap").css("display", "none");
	$("#front-page-wrap").css("margin-left", "-1500px");
	$("#front-page-wrap").css("display","block");

	$("#front-page-wrap").animate({'marginLeft':'0px'},600);


	
	
	$("#header a").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("#front-page-wrap").animate({"marginLeft":"-1500px"},600, redirectPage);
		
	});
	
	$("#page .content p a.internal").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("#front-page-wrap").animate({"marginLeft":"-1500px"},600, redirectPage);
	});
	
	$("#right-sidebar a").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("#front-page-wrap").animate({"marginLeft":"-1500px"},600, redirectPage);
	});

	$("#footer .block-menu a").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("#front-page-wrap").animate({"marginLeft":"-1500px"},600, redirectPage);
	});

	function redirectPage() {
		window.location = linkLocation;
	}
});
