Les gîtes

hebergement de sites or if we come from the last one, then the overlay should move left -> right, otherwise right->left */ if(item == 'bg1' || current == nombre-1) { $('#menugites .sub'+parseInt(current+1)).stop().animate({backgroundPosition:"(-"+larg_menu*2+"px 0)"},300,function(){ $(this).find('li').hide(); }); } else { $('#menugites .sub'+parseInt(current+1)).stop().animate({backgroundPosition:"("+larg_menu*2+"px 0)"},300,function(){ $(this).find('li').hide(); }); } if(item == 'bg1' || current == nombre-1){ /* if we hover the first
  • or if we come from the last one, then the images should move left -> right */ $('#menugites > li').animate({backgroundPosition:"(-800px 0)"},0).removeClass(bg_all).addClass(item); move(1,item); } else{ /* if we hover the first
  • or if we come from the last one, then the images should move right -> left */ $('#menugites > li').animate({backgroundPosition:"(800px 0)"},0).removeClass(bg_all).addClass(item); move(0,item); } /* We want that if we go from the first one to the last one (without hovering the middle one), or from the last one to the first one, the middle menu's overlay should also slide, either from left to right or right to left. */ if(current == nombre-1 && item == 'bg1'){ $('#menugites .sub'+parseInt(current)).stop().animate({backgroundPosition:"(-"+larg_menu*2+"px 0)"},300); } if(current == 0 && item == 'bg3'){ $('#menugites .sub'+parseInt(current+2)).stop().animate({backgroundPosition:"("+larg_menu*2+"px 0)"},300); } /* change the current element */ current = $this.parent().index(); /* let's make the overlay of the current one appear */ $('#menugites .sub'+parseInt(current+1)).stop().animate({backgroundPosition:"(0 0)"},300,function(){ $(this).find('li').fadeIn(); }); }); } }).attr('src', repertoire_images+i+'.jpg'); /* dir:1 - bouga de gauche droite dir:0 - bouga de droite gauche */ function move(dir,item){ if(dir){ for(var i = 1; i