jQuery().ready(function(){

	// fade
	$(document.body).hide();
	$(document.body).fadeIn(1500);

	// header
	function init() {
		$("#header img").hide();
		$("#header img:first").slideDown();
	}
	function slideshow() {
		var $top = $("#header img:visible");
		var $next;
		if ($top.next("img").length > 0) {
			$next = $top.next();
		} else {
			$next = $("#header img:first");
		}
		$top.slideUp();
		$next.slideDown();
	}
	init();
	setInterval(slideshow,9000);

	// menu
	//$(".menu ul").hide();
	//$(".menu ul:eq(0)").pause(1000).slideDown();
	//$(".menu ul:eq(1)").pause(2000).slideDown();
	//$(".menu ul:eq(2)").pause(3000).slideDown();
	//$(".menu ul:eq(3)").pause(4000).slideDown();
	//$("h3").click(function(){
		//if($(this).next("ul").is(":visible")){
			//$(this).next("ul").slideUp();
		//}
		//if($(this).next("ul").is(":hidden")){
			//$(this).next("ul").slideDown();
		//}
	//});

	// div deroulante
	$(".div_deroulante p").slideUp();
	$(".div_deroulante h4").click(function(){
		$(".div_deroulante p").slideUp();
		if($(this).next("p").is(":hidden")){
			$(this).next("p").slideDown();
		}
	});

	// scroll haut de page
	$("#haut_de_page").click(function(){
		$("html, body").animate({scrollTop:0}, "slow");
		return false;
	});

	// admin
	$("#etatserveurs").click(function(){
		$(this).slideUp();
	});

});
