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

//Appel du plugin jquery color
$.ajax({
	//url: "js/coloranimation.js",
	//dataType: "script",
	//async: false,
	//success: function(js){if(jQuery.browser.safari){eval(js);}}
});


$(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).stop();
			$(this).stop().animate(
				{ 
					
			}, 200);*/
			
			$(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).stop();
			$(this).stop().animate(
	  			{ 
				
				}, 200);*/
			$(this).fadeTo(200,1);
		}
		else {
			$(this).stop().animate(
				{ 
				
				'opacity':1
			}, 200);
		}
   });
   

	function effect(id, var1){
		if(var1==1){
			var lgth=$("#ss-menu"+ id+" .inside").height();
			/*var lgth = $("#sous_test"+id+" ul > li").length*30;*/
			$("#ss-menu"+id).stop(true).animate({'height':lgth+'px'},200);
		}
		else{
			$("#ss-menu"+id).stop(true).animate({'height':0+'px'},100);
		}
	}
	
	$(".MenuHorizontal li").hover(
      function () {
	  	var id=$(this).attr('id');
		effect(	id.substr(4,2),1)
      }, function () {
        var id=$(this).attr('id');
		effect(id.substr(4,2),0)
      }
    );	
	$(".sous_menu").hover(
      function () {
	  	var id=$(this).attr('id');
		effect(id.substr(7,2),1)
        
      }, function () {
		var id=$(this).attr('id');
		effect(id.substr(7,2),0)
      }
    );

});




