var tHideSubMenu = null;
	
	jQuery(document).ready(function(){
		jQuery('#mainnav dd').hide(); //hide all sub-menus
		//jQuery('body').ScrollToAnchors(800); //make a beautiful scroll for anchors
		
		//do the job for main-menu/sub-menu
		jQuery('#mainnav dt').hover(function() {
			//var dd = jQuery('dd', jQuery(this).parent());
			var dd = jQuery(this).next('dd');
			if (dd.filter(':visible').is('dd')) { //we are coming again on the same main-menu
				window.clearTimeout(tHideSubMenu);
			} else { //we're changing of main-menu
				//hide visible sub-menus
				hideSubMenus();
				//show the sub-menu
				dd.addClass('submenu_actif').slideDown(500);
				jQuery(this).children('a').addClass('actif');
			}
			//set timer for hiding sub-menu
			dd.hover(function() { //over the sub-menu
				window.clearTimeout(tHideSubMenu);
			}, function() { //out of the sub-menu
				setHideTimeout();
			});
		}, function() { //out of the main-menu');
			setHideTimeout();
		});
	});
	
	function setHideTimeout() {
		if (tHideSubMenu)
			window.clearTimeout(tHideSubMenu);
		tHideSubMenu = window.setTimeout('hideSubMenus()', 1500);
	}
	
	function hideSubMenus() { //hide all visible sub-menus
		jQuery('#mainnav dd.submenu_actif').removeClass('submenu_actif').slideUp(500);
		jQuery('#mainnav dt a.actif').removeClass('actif');
	}



/***************************** gestion du sous-menu en page intérieure ***************************************/


var tHideSubMenuInt = null;
	
	jQuery(document).ready(function(){
		jQuery('a.toggleShow').parent().next('dd').hide(); //hide all sub-menus
		
		//do the job for main-menu/sub-menu
		jQuery('a.toggleShow').hover(function() {
			//var dd = jQuery('dd', jQuery(this).parent());
			var dd = jQuery(this).parent().next('dd');
			if (dd.filter(':visible').is('dd')) { //we are coming again on the same main-menu
				window.clearTimeout(tHideSubMenuInt);
			} else { //we're changing of main-menu
				//hide visible sub-menus
				hideSubMenusInt();
				//show the sub-menu
				dd.addClass('submenu_actif').slideDown(500);
			}
			//set timer for hiding sub-menu
			dd.hover(function() { //over the sub-menu
				window.clearTimeout(tHideSubMenuInt);
			}, function() { //out of the sub-menu
				setHideTimeoutInt();
			});
		}, function() { //out of the main-menu');
			setHideTimeoutInt();
		});
	});
	
	function setHideTimeoutInt() {
		if (tHideSubMenuInt)
			window.clearTimeout(tHideSubMenuInt);
		tHideSubMenuInt = window.setTimeout('hideSubMenusInt()', 1500);
	}
	
	function hideSubMenusInt() { //hide all visible sub-menus
		jQuery('#mainnav-int dd.submenu_actif').removeClass('submenu_actif').slideUp(500);
	}