$(document).ready(function(){ var movetime=500; var maxw=250; var avgw= parseInt(97); var index; var t=false; //延时执行 var _this; //标记当前 /*function cur(ele){ ele=$(ele)? $(ele):ele; ele.addClass("active").siblings().removeClass("active"); }; $(".nav .menu-li:eq(0)").addClass("active").animate({"width":maxw+"px"}); $(".nav").find(".menu-li").click(function(){ _this=$(this); index=$( ".nav .menu-li" ).index( $(this)[0] ); var act=function (){ _this.siblings(".menu-li").removeClass("active"); _this.animate({"width":maxw+"px"},{duration:movetime,easing:"easeOutQuart",complete:function(){cur(_this)}}).siblings(".menu-li").animate({"width":avgw+"px"},{duration:movetime}) } t=setTimeout(act,200); return false; }).mouseout(function(){ if(t){ clearTimeout(t); } });*/ $("#wp_nav_w10 .menu-li").eq(0).animate({"width":270},0).find(".sub-menu").show(); $("#wp_nav_w10 .menu-li").each(function(index,el){ var _this =$(this); var W = (index==1)?"330":"227"; $(this).find("h1").on("click",function(){ _this.siblings().animate({"width":97},100); _this.siblings().find(".sub-menu").hide(); _this.animate({"width":W},100); $(this).nextAll(".sub-menu").show(); }); }); //$("#wp_nav_w10 .menu-li").eq(0).find("h1").trigger("click"); /*$("#box").Tab({ Obutton : true });*/ $(".p1_1 div").mouseover(function(){ $(".p1_1 div").removeClass("mark"); $(".p1_1 div").eq($(this).index()).addClass("mark"); }); $(".p1_1 div").mouseout(function(){ $(".p1_1 div").removeClass("mark"); }); $(".p2_3 img").eq(0).css("float","left"); $(".p2_3 img").eq(1).css("float","right"); })