
$(document).ready(
	function() {
		var fadein_speed  = 350; /* Vitesse de transition (show) en ms (350 = 0.350s) */
		var fadeout_speed = 150; /* Vitesse de transition (hide) en ms (150 = 0.150s) */
		var opacity_show  = 1;   /* Opacité du background (show) (1 = 100%) */
		var opacity_hide  = 0;   /* Opacité du background (hide) (0 =   0%) */

		$('#menu li').hover(
			function () { // mouse hover
				$(this).children('div').fadeTo(fadein_speed, opacity_show);
				$(this).children('a').css({color: '#ffffff'});
				$(this).css({cursor: 'pointer'});
				
				$(this).children('ul').fadeTo(fadein_speed, opacity_show);
			}
			,
			function () { // mouse leave  
				$(this).children('div').fadeTo(fadeout_speed, opacity_hide);
				$(this).children('a').css({color: '#3a3a38'});
				$(this).css({cursor: 'auto'});
				
				$(this).children('ul').css({display: 'none'});
			}
		);
		
		$('#menu li').click(
			function () {
				// document.location.href = $(this).children('a').attr('href');
			}
		);
		$('#menu li ul li').click(
			function () {
				document.location.href = $(this).children('a').attr('href');
			}
		);
	}
);
