1 function init_gadgets(url_menu_rubrique
){
2 jQuery('#boutonbandeautoutsite').one('mouseover',function(){
3 jQuery(this).siblings('ul').find('li:first>a').animeajax();
5 url
: url_menu_rubrique
,
7 jQuery('#boutonbandeautoutsite').siblings('ul').remove();
8 jQuery('#boutonbandeautoutsite')
10 .parent().find('li').menuFocus();
15 function focus_zone(selecteur
){
16 jQuery(selecteur
).eq(0).find('a,input:visible').get(0).focus();
19 jQuery(document
).ready(function(){
20 init_gadgets(url_menu_rubrique
);
22 jQuery
.fn
.menuItemOpen = function(){
25 .parents('li').addClass('actif');
26 jQuery(this).siblings('li').removeClass('actif_tempo');
30 jQuery
.fn
.menuItemClose = function(){
32 .removeClass('actif_tempo');
33 is_open
= (jQuery(this).parents('ul').eq(-1).find('li.actif').length
>0);
36 // deplier le menu au focus clavier,
37 // enlever ce depliement si passage a la souris,
38 // delai de fermeture.
39 jQuery
.fn
.menuFocus = function(){
41 // le replier si un hover de souris sur un autre onglet,
42 // timer sur la fermeture des onglets pour ne pas que ca aille trop vite
43 // timer sur l'ouverture des onglets pour ne tolerer les derapages
47 clearTimeout(this.timerout
);
51 jQuery(this).menuItemOpen();
53 var me
= jQuery(this);
54 this.timerin
= setTimeout(function(){
55 me
.menuItemOpen(null);
62 clearTimeout(this.timerin
);
65 var me
= jQuery(this).removeClass('actif').addClass('actif_tempo');
66 this.timerout
= setTimeout(function(){
72 // navigation au clavier :
73 // deplier le ul enfant
74 .find('>a').focus(function(){
75 //jQuery(this).parents('ul').find('>li.actif').removeClass('actif');
76 jQuery(this).parents('li').addClass('actif');
78 // cacher en partant de l'onglet...
80 jQuery(this).parents('li').removeClass('actif');
85 // Controler la position verticale des sous-menus
86 // pour l'instant, effectuer a chaque hover, en cas de changement de taille d'affichage par exemple
87 jQuery('#bando_navigation').hover(function(){
88 hauteur
= parseInt(jQuery('#bando_navigation .largeur').height())
89 + parseInt(jQuery('#bando_navigation').css("padding-top"))
90 + parseInt(jQuery('#bando_navigation').css("padding-bottom"));
91 jQuery('#bando_navigation ul li>ul').css({'top':hauteur
});
94 jQuery('#bando_navigation li').menuFocus();
95 jQuery('#bando_outils ul.bandeau_rubriques li').menuFocus();
97 jQuery('#bandeau_haut #formRecherche input').hover(function(){
98 jQuery('#bandeau_haut ul.actif').trigger('mouseout');
100 jQuery('#bando_liens_rapides a')
102 jQuery('#bando_liens_rapides').addClass('actif');
105 jQuery('#bando_liens_rapides').removeClass('actif');
107 if (typeof window
.test_accepte_ajax
!= "undefined")