// JavaScript Document
/*
jQuery.noConflict();
jQuery(document).ready( function($) {
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq ul.ul_sous_menu_jq:not('ul.ul_sous_menu_jq_actif')").hide();
	
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq").mouseenter( function() {
		$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("fast", function () { $(this).parent().removeClass("open") });
		$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideDown("fast", function () { $(this).parent().addClass("open") } );
	}).mouseleave( function() {
		var mon_this = $(this);
		$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("fast", function () { $(this).parent().removeClass("open") });
		$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideUp("fast", function () { $(this).parent().removeClass("open") });
	});
});




jQuery.noConflict();
jQuery(document).ready( function($) {
        $("#main-menu ul.menu li")
                .mouseover( function() {
                        $(this).children("ul").css("display","block");
                })
                .mouseout( function() {
                        t = setTimeout(function(){
                                $(this).children("ul").css("display","none");                                            
                        }, 500); // adjust your time here
                });

                $(this).children("ul").hover(function(){
                        clearTimeout(t);
                },function(){
                        t = setTimeout(function(){
                                $(this).children("ul").css("display","none");                                            
                        }, 500); // adjust your time here
                }); 
				
				
				


*/


$(document).ready( function () {
 
    // Cacher les sous-menus : ce sont des blocs enfants des classes "parent" de Joomla
    $("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq ul.ul_sous_menu_jq:not('ul.ul_sous_menu_jq_actif')").hide();
 
    // Si vous voulez que le sous-menu reste ouvert, suite à un clic sur un lien de ce sous-menu,
    // il faut ajouter la ligne suivante :
    //$(".active ul").show();
 
    // On associe une nouvelle action au clic sur un lien "parent"
    $("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq > a").mouseenter( function () {
 
  // Si le sous-menu est visible, on le referme en slide
        if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
            $(this).next("ul.ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") } );
        }
 
  // Sinon on ferme tout ce qui pourrait déjà être ouvert, et on ouvre le menu concerné avec des slide
        else {
            $("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
            $(this).next("ul:not('ul.ul_sous_menu_jq_actif')").slideDown("normal", function () { $(this).parent().addClass("open") } );
        }
 
  // On empêche de suivre les liens créant les sous-menus
        return false;
    });
 
} ) ;


/*
jQuery.noConflict();
jQuery(document).ready( function($) {
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq ul.ul_sous_menu_jq:not('ul.ul_sous_menu_jq_actif')").hide();
	
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq").mouseenter( function() {
		
		if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
			//$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideUp("normal", function () { $(this).parent().removeClass("open") });
		}
		else {
			$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
			$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
	}).mouseleave( function() {
		if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
			//$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
		else {
			//$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
			$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideUp("normal", function () { $(this).parent().removeClass("open") });
		}
	});
});



jQuery.noConflict();
jQuery(document).ready( function($) {
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq ul.ul_sous_menu_jq:not('ul.ul_sous_menu_jq_actif')").hide();
	
	$("#menu_gauche ul#ul_menu_gauche li.li_menu_pere_jq").mouseenter( function() {
		
		if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
			//$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideUp("normal", function () { $(this).parent().removeClass("open") });
		}
		else {
			$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").css("display","none");
			$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").css("display","block");
		}
	}).mouseleave( function() {
		if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
			//$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
		else {
			//$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
			$(this).children("ul:not('ul.ul_sous_menu_jq_actif')").css("display","none");
		}
	});
});




/*
//jQuery.noConflict();
$(document).ready( function () {
	$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq:not('.ul_sous_menu_jq_actif')").hide();
	$("#ul_menu_gauche .li_menu_pere_jq > a").mouseover( function () {
		if ($(this).next("ul.ul_sous_menu_jq:visible").length != 0) {
			//$(this).next("ul.ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") } );
		}
		else {
			$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
			$(this).next(".ul_sous_menu_jq").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
	});
	$(".li_menu_pere_jq > ul").mouseout( function () {
			
			$("#ul_menu_gauche .li_menu_pere_jq .ul_sous_menu_jq").slideUp("normal", function () { $(this).parent().removeClass("open") });
			$(this).next(".ul_sous_menu_jq").slideDown("normal", function () { $(this).parent().addClass("open") } );
	});
} ) ;
*/