$(document).ready(function() {
						   
	$(".sous_menu").hide();
	
	$(".menu_item").hover(
	  function () {
		var id=$(this).attr('id');
		if($("#sous_"+id).css("display")=="none"){
			$(".sous_menu").slideUp();
			$("#sous_"+id).slideDown("fast");
		}
	  },
	  function () {
		var id=$(this).attr('id');
		$("#sous_"+id).slideUp();
	  }
	);
});



$(document).ready(function() {
		//document.getElementById('NL_box').innerHTML="<span>Inscrivez-vous</span> à notre lettre d'information";
		$("a.thickbox, a[rel='lightbox']").fancybox({
			'hideOnContentClick': false,
			imageScale : true
		}); 
		$("a#box_ami").fancybox({
			frameWidth : 300,
			frameHeight : 200
		}); 
		$("a#box_ml").fancybox({
			frameWidth : 600
		});
		if(document.all){
			$("a#box_fav").click(function(){
				window.external.AddFavorite(location.href, document.title);
			});
		}else{
			$("a#box_fav").fancybox({ 
				'hideOnContentClick': true,
				frameWidth : 400,
				frameHeight : 100			 
			});
		}
		
	function effect(var1){
		if(var1==1){
			$("#sousMenu").stop(true).animate({'height':170+'px', 'opacity':0.95},300);
		}
		else{
			$("#sousMenu").stop(true).animate({'height':0+'px', 'opacity':0.1},300);
		}
	}
	
	$("#menu .element2 a").hover(
      function () {
		effect(1)
      }, function () {
		effect(0)
      }
    );	
	$("#sousMenu").hover(
      function () {
		effect(1)        
      }, function () {
		effect(0)
      }
    );
});


$(function(){
   $('#logo, .clic').hover(function() { //mouse in
   		$(this).stop().fadeTo (250, 0.6);
   }, function() { //mouse out
    	$(this).stop().fadeTo (250, 1 );
   });   
});

$(function(){
   $('#plan, #contact, #devis, #newsletter').hover(function() { //mouse in
   		$(this).stop().fadeTo (250, 0.7);
   }, function() { //mouse out
    	$(this).stop().fadeTo (250, 1 );
   });   
});

$(function(){
   $('.encart').hover(function() { //mouse in 
							   
   		$(this).find("a").css ({"color":"#F18E00"});
   }, function() { //mouse out
    $(this).find("a").css ({"color":"#646464"});
   });   
});