jQuery(document).ready(function() {
	     fermer();
		 fermerb();
		 fermer2();
		 fermer3();
         $.fn.formLabels();
		 $("#infos").hide(1);
		 $("#localisez a").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("#navtop li a.normal").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("#navtop li a.contact").click(function(event){
						window.location.href='#';
					window.contenuframe2.location.href=$(this).attr('href');
					ouvrir3();
					return false;
		});
		/*$("a.pop2").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});*/
		 $("#presentation h2 a").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		 $("#centreListe  a.lien").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("a.lien3").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		 $(".actu a").click(function(event){
						window.location.href='#';					
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		 $("#infoplus a").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		 $(".newsticker-jcarousellite ul li a").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("a.lien3").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("a.lien3b").click(function(event){
						window.location.href='#';
					window.contenuframe1b.location.href=$(this).attr('href');
					ouvrirb();
					return false;
		});
		
		 $("#applications #bt_annexe2 a").click(function(event){
						window.location.href='#';
					window.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("#applications #bt_annexe1 a").click(function(event){
						window.location.href='#';
					window.contenuframe2.location.href=$(this).attr('href');
					ouvrir3();
					return false;
		});
		
		$("a.popup").click(function(event){
			
					window.contenuframe2.location.href=$(this).attr('href');
					ouvrir3();
					return false;
		});
		
		$("#applications #bt_annexe3 a").click(function(event){
						window.location.href='#';
					window.contenuframe2.location.href=$(this).attr('href');
					ouvrir3();
					return false;
		});
		 $("a.plus").click(function(event){
						window.location.href='#';
					window.top.contenuframe1.location.href=$(this).attr('href');
					ouvrir();
					return false;
		});
		$("#titre a").click(function(event){
						window.location.href='#';
					window.contenuframe2.location.href=$(this).attr('href');
					ouvrir3();
					return false;
		});
		$("a.pop2").click(function(event){
			window.popupCont2.location.href=$(this).attr('href');
			ouvrir2();
			return false;	
	});	
	$("#fermer2").click(function(event){
			fermer2();
			return false;	
					
	});	
	$("#fermerInfo").click(function(event){
			fermerInfo();
			return false;	
					
	});	
	 
	     /*$("#nav").simplyScroll({
                    className: 'vert',
                    horizontal: false,
                    frameRate: 20,
                    speed: 5
                });*/
				
		$(".menu1").hide();
        var tabContainers = $('.menu1');
	   tabContainers.hide().filter(':first').show();
			
	    $('#menu area').click(function () {
			$("#nav").addClass('active');
					tabContainers.hide();
				tabContainers.filter(this.hash).show();
				window.contenuCentre.location.href='blank.html';
		
				return false;
			}).click();
			
			$("#menu area").click(function(event){
			$("#infos").show();
			$("#infos").animate({ 
			
			top:"40px"
			
		  }, 0 );
					
			});	

 			
			$('.menu1 a.top').click(function () {
				
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
			
				return false;
			}).click();
			
			//$("#menu12").hide();
	 
   });
   function fermer()
	{	
	$("#contenu1").animate({ 
			height: "0",
			top:"-1000px",
			opacity:100
		  }, 1000 );
	window.contenuframe1.location.href="blank.html";
	$("a.droite").fadeOut();
	document.getElementById('fond2').style.display="none";
	//$(".menu1").hide();
	}
	
	function ouvrir()
	{	
$("div#panel").slideUp("slow");	
	fermer3();
	$("#contenu1").animate({ 
			height: "345",
			top:"72",
			opacity:100}, 1000 );
	setTimeout("$('#contenuframe1').fadeIn()",1000);
	$("#contenu1 a.droite").fadeIn();
	/*document.getElementById('fond2').style.display="block";*/

	}
	
	function fermerb()
	{	
	$("#contenu1b").animate({ 
			height: "0",
			top:"-1000px",
			opacity:100
		  }, 1000 );
	window.contenuframe1.location.href="blank.html";
	$("a.droite").fadeOut();
	document.getElementById('fond2').style.display="none";
	//$(".menu1").hide();
	}
	
	function ouvrirb()
	{	

	fermer3();
	$("#contenu1b").animate({ 
			height: "345",
			top:"72",
			opacity:100}, 1000 );
	setTimeout("$('#contenuframe1b').fadeIn()",1000);
	$("#contenu1b a.droite").fadeIn();
	/*document.getElementById('fond2').style.display="block";*/

	}
	function fermer3()
	{	
	$("#contenu2").animate({ 
			height: "0",
			top:"-1000",
			opacity:100
		  }, 1000 );
	$("#contenuframe2").fadeOut();
	$("#contenu1 a.droite").fadeOut();
	document.getElementById('fond2').style.display="none";
	//$(".menu1").hide();
	
	}
	
	function ouvrir3()
	{	
	fermer();
	$("div#panel").slideUp("slow");	
	$("#contenu2").animate({ 
			height: "150",
			top:"32",
			opacity:100}, 1000 );
	setTimeout("$('#contenuframe2').fadeIn()",1000);
	$("#contenu2 a.droite").fadeIn();
	/*document.getElementById('fond2').style.display="block";*/
	}
	
	function ouvrir2()
	{
		fermer();
		fermer3();
	$("#popupAdmin").animate({ 
			width: "970px",
			top:"30px",
			opacity:100
		  }, 10 );
	document.getElementById('fond').style.display="block";
	}
	function fermer2()
	{	
	$("#popupAdmin").animate({ 
		   width: "970px",
			top:"-2000px",
			opacity:0
		  }, 10 );
	document.getElementById('fond').style.display="none";
	//$(".menu1").hide();
	}	
	
	function fermerInfo(){
		$("#infos").hide();	
		window.contenuCentre.location.href='blank.html';
	}
