// JavaScript Document
var menu2Actif = '';
var menu3Actif = '';

function afficheMenu2(idmenu2){
	
	//on masque l'ancien sous menu2 affiché
	if(menu2Actif != ''){
		$('#'+menu2Actif).hide();	
	}
	
	//on affiche le nouveau menu2 selectionne
	$('#'+idmenu2).show();
	menu2Actif = idmenu2;	
	
}

/*
function afficheMenu3(idmenu3){
	
	//on masque l'ancien sous menu3 affiché
	if(menu3Actif != ''){
		$('#'+menu3Actif).hide();	
	}
	
	//on affiche le nouveau menu3 selectionne
	$('#'+idmenu3).show();
	menu3Actif = idmenu3;
	
	setTimeout(function(){
        $('#'+idmenu3).hide();
     }, 3000);

	
}*/


var obj = null;
var enCours = false;

$(document).ready(function() {
	
	$('.menu2 > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut('fast');
			$(this).css("background","none");
			obj = null;
		}
		$(this).find('ul').fadeIn('fast');
		$(this).css("background","#eee");
	}, function() {
		obj = $(this);		
		obj.find('ul').hide();
		$(this).css("background","none");
	});
		
});

/*
$.timer(3000, function (timer) {
		if(timeStop){
			timer.stop();
		}else{
			changeActu();
		}
	});*/