
function mainmenu(){
	
$('ul#nav > li').hover(function() {
	
	if(!$(this).find('ul').length > 0) // si il existe pas des sous rubriques
	{
	  $(this).css('background-image','url(squelettes/images/coin_menu_on_bis.jpg)');
	  $(this).css('height','45px');
	  $(this).find('>a').css('background-image','url(squelettes/images/fond_menu_hover_bis.jpg)');
	  $(this).find('>a').css('height','35px');
	  $('ul:first', this).show();
	}
	else
	{
	  
	  
	  $(this).css('background-image','url(squelettes/images/coin_menu_on_bis.jpg)');
	  $(this).css('z-index','500');
	  $(this).find('>a').css('background-image','url(squelettes/images/fond_menu_hover_ter.jpg)');
	  $(this).find('>a').css('height','35px');
	  $(this).find('ul:first').css('background','url(squelettes/images/fond_menu_ul.jpg) 0px -3px no-repeat #72729d');
	  $('ul:first', this).show();
	}
  },
  function() {
	if(!$(this).hasClass('on'))	// si class pas "on", on ne retire le style
	{
		$(this).css('background-image','none');
		$(this).find('>a').css('background-image','none');
		$(this).find('>a').css('height','auto');
		$(this).find('>a').css('z-index','600');
	}
	else	// si class "on", on remet le style on
	{
		$(this).css('background-image','url(squelettes/images/coin_menu_on_bis.jpg)');
		$(this).find('>a').css('background-image','url(squelettes/images/fond_menu_hover_bis.jpg)');
	}
	
	$('ul:first', this).hide();
  });




	
	
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(200);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});

// gestion de la flèche droite si sous menu
$(".sous_li").hover(function(){
			
			if($(this).find('ul').length > 0){
			$(this).find('>a').css('background',' url(squelettes/images/fleche.gif) center right no-repeat');
			}
		},function(){
			$(this).find('>a').css('background','none');



});

} // fin fonction mainmenu

function mainmenu_ie6(){
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}






$(document).ready(function(){
	 if (!(jQuery.browser.msie && parseInt(jQuery.browser.version) == '6')){
	mainmenu();
	}
	else{
	mainmenu_ie6();
	}
});
 
 
 




 
 // gestion de "ajouter aux favoris"
 
 $().ready(function(){
    // add a "rel" attrib if Opera 7+
    if(window.opera) {
        if ($("a.jqbookmark").attr("rel") != ""){ // don't overwrite the rel attrib if already set
            $("a.jqbookmark").attr("rel","sidebar");
        }
    }
   
    $("a.jqbookmark").click(function(event){
		
        event.preventDefault(); // prevent the anchor tag from sending the user off to the link
        var url = document.URL;
        var title = document.title;
        if (window.sidebar) { // Mozilla Firefox Bookmark
			
			window.sidebar.addPanel(title, url, "");
        } else if( window.external ) { // IE Favorite
			alert(url + title);
            window.external.AddFavorite( url, title);
        } else if(window.opera) { // Opera 7+
            return false; // do nothing - the rel="sidebar" should do the trick
        } else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)
            alert('Unfortunately, this browser does not support the requested action, please bookmark this page manually.');
        }
    });
});
 
 
 
 
 // gestion apparition-disparition boite newsletter
 
 $(document).ready(function(){
	$(".liste-des-listes").hide();
	$("#email").focus(function(){
		$(".liste-des-listes").show('normal');
	});
	
 });
