(function(A){A.fn.extend({pause:function(C,B){C=C||1000;B=B||"fx";return this.queue(B,function(){var D=this;setTimeout(function(){A(D).dequeue()},C)})},clearQueue:function(B){return this.each(function(){B=B||"fx";if(this.queue&&this.queue[B]){this.queue[B].length=0}})},unpause:A.fn.clearQueue})})(jQuery);
$(document).ready(function(){
$("#bouton li a").click(
function(){
var B=$("#bouton li a").index(this);
var A=$("#header").width();
var D=B-1;
var C=(A/2)-140+(70*D);
$("#menu2 li").css({width:"240px",height:"0"}).hide();
$("#menu1 ul li").stop();
$("#menu1 ul li:eq("+D+") .txt").stop();
$("#menu1 ul li:eq("+D+") .txt").animate({opacity:0,width:"0px",height:"160px"},200);
$("#menu1 ul li").animate({marginLeft:"15px",width:"55px",border:"0"},300);
$("#header .accroche").pause(50).animate({opacity:1},500);
if (B >= 1){$("#header .accroche").animate({opacity:0},500);
$("#menu1 ul li:eq("+D+")").animate({marginLeft:"-"+C+"px",width:"325px"},500);
$("#menu1 ul li:eq("+D+") .txt").pause(150).animate({opacity:1,width:"270px",height:"160px",marginLeft:"55px"},500);}
$("#menu2 li").stop();$("#menu2 li").css({width:"0",height:"0"}).hide();
$("#menu2 li:eq("+B+")").css({width:"240px",height:"0"}).pause(600).animate({width:"240px",height:"526px",opacity:0.8},2000)})});
