/*function printer() {
	$(".active p").animate({ 
				opacity: 1}, 
				{ queue:false, duration:300 }
			);
}*/
function callback(){
			setTimeout(function(){
				$("#header #name").fadeIn();
			}, 1000);
			setTimeout(function(){
				$("#index #content").fadeIn("slow");
			}, 3000);
			setTimeout(function(){
				$("#index .wrap-menu").fadeIn();
			}, 3000);
			setTimeout(function(){
				$("#english").fadeIn();
			}, 3000);
		};
		
function intro(){
			setTimeout(function(){
				$("#img-intro").fadeOut(3000);
				callback();
			}, 1000);
};


$(document).ready(
	function() {
		
		$("#index #content").fadeOut("fast");
		$("#index .wrap-menu").fadeOut("fast");
		$("#header #name").fadeOut("fast");
		$("#english").fadeOut("fast");
		
		intro();
		
		
		/*$("#lines").hide("clip", { direction: "horizontal" }, 1500, callback());
		$('#img-intro').click(function () { 
				$(this).fadeOut(3000);
				callback();
				
		    }); */
		
		$(".nation").fadeOut("fast");
		$(".nation-img").fadeOut("fast");
		$("#map #return").fadeOut("fast");
		
		$("#moroc").click(function () { 
				$("#moroc-img").fadeIn("slow");
				$("#moroc-list").fadeIn("slow");
				$("#return").fadeIn("slow");
				$("ul#world").fadeOut("slow"); 
		    });
		$("#egypte").click(function () { 
				$("#egypte-img").fadeIn("slow");
				$("#egypte-list").fadeIn("slow");
				$("#return").fadeIn("slow");
				$("ul#world").fadeOut("slow"); 
			   });
		$("#saintbarth").click(function () { 
				$("#saintbarth-img").fadeIn("slow");
				$("#saintbarth-list").fadeIn("slow");
				$("#return").fadeIn("slow");
				$("ul#world").fadeOut("slow"); 
		    });
		$("#eau").click(function () { 
				$("#eau-img").fadeIn("slow");
				$("#eau-list").fadeIn("slow");
				$("#return").fadeIn("slow");
				$("ul#world").fadeOut("slow"); 
		   });
		$("#map #return").click(function () { 
				$(".nation").fadeOut("slow");
				$(".nation-img").fadeOut("slow");
				$("ul#world").fadeIn("slow");
				$(this).fadeOut("fast"); 
		   });
		
		$("#navigation .projects ul").css("opacity","0");
		$("#navigation .projects ul").css("left","-999px");
		
		$("#navigation .projects").hover(function() {
				$(".wrap-submenu").animate({ 
						height: "60px"}, 
						{ queue:false, duration:400 }
					);
					$("#navigation .projects ul").css("left","585px");
					$("#navigation .projects ul").animate({ 
							opacity: 1}, 
							{ queue:false, duration:800 }
						);
				
			
			}, function () {
				$(".wrap-submenu").stop()
				$(".wrap-submenu").animate({ 
						height: "0"}, 
						{ queue:false, duration:400 }
					);
					$("#navigation .projects ul").stop()
					$("#navigation .projects ul").animate({ 
							opacity: 0}, 
							{ queue:false, duration:300 }
						);
					$("#navigation .projects ul").css("left","-999px");
			}
		);
		
		/*$("#clients li .colour").css("opacity","0");
		$("#clients li span").css("width","0");
		$("#clients li p").css("opacity","0");
		
		$("#clients li").hover(function() {
				$(this).toggleClass("active");
				//$(".active span, .active .colour").fadeIn();
				$(".active span").show();
				$(".active .colour").animate({ 
							opacity: 1}, 
							{ queue:false, duration:400 }
						);
				$(".active span").animate({ 
							width: "370px"}, 
							{ queue:false, duration:400 }
						);
				setTimeout("printer()",400);
				
				
				
			}, function () {
				$(".active .colour").animate({ 
							opacity: 0}, 
							{ queue:false, duration:400 }
						);
				$("#clients li p").css("opacity","0");
				$(".active span").animate({ 
							width: "0"}, 
							{ queue:false, duration:400 }
						);
				//$(".active span, .active .colour").fadeOut();
				$(this).toggleClass("active");
			}
		);*/
		
	}
);
