/***************************************************************/
/*
/*
/*
/*
/***************************************************************/

$(document).ready(function(){ //Définir la fonction de clic
 
	
	//Changer le comportement hover au survol
   $('.clic').hover(function() { //mouse in
		$(this).css({
			'cursor':'pointer'
		});
		if(!jQuery.support.opacity){
			$(this).css({'overflow':'visible'});
			
			$(this).fadeTo(200,0.6);
		}else{
			$(this).stop().animate({ 
				'opacity':0.6
			}, 200);
		}

   }, function() { //mouse out
   		if(!jQuery.support.opacity) {
			$(this).fadeTo(200,1);
		}
		else {
			$(this).stop().animate({ 
				'opacity':1
			}, 200);
		}
   });
   
   
   

	function effect(var1,height){
		if(var1==1){
			$(".sous_menu0").stop(true).animate({'height':height+'px', 'opacity':1},300);
			document.getElementById('menu0').style.backgroundImage='url(gifs/villetardO.jpg)';
		}else{
			$(".sous_menu0").stop(true).animate({'height':height+'px', 'opacity':0.1},300);
			document.getElementById('menu0').style.backgroundImage='url(gifs/villetard.jpg)';
		}
	}
 
	$("#menu0").hover(function(){
		effect(1,156)
	}, function(){
		effect(0,0)
		}
	); 
	
	$(".sous_menu0").hover(
		function(){
			effect(1,156)        
		},function(){
			effect(0,0)
		}
	);
 
 
	function effect1(var1,height){
		if(var1==1){
			$(".sous_menu1").stop(true).animate({'height':height+'px', 'opacity':1},300);
			document.getElementById('menu1').style.backgroundImage='url(gifs/torpilleursO.jpg)';
		}else{
			$(".sous_menu1").stop(true).animate({'height':height+'px', 'opacity':0.1},300);
			document.getElementById('menu1').style.backgroundImage='url(gifs/torpilleurs.jpg)';
		}
	}
 
	$("#menu1").hover(function(){
		effect1(1,208)
	}, function(){
		effect1(0,0)
		}
	); 
	
	$(".sous_menu1").hover(function(){
		effect1(1,208)        
	}, function(){
		effect1(0,0)
	}
	);
	
	$("#recherche").click(function(){
		if($(this).val()=="Recherche..."){
			$(this).val('');	
		}
	});
});




