document.write(""); document.write("
"); aa2li_width=233;/*设置一个li元素的宽度*/ aa2ul="#aa2 >ul";/*设置ul*/ aa2li_number=$(aa2ul+">li").length; aa2ul_width=aa2li_number*aa2li_width; $(aa2ul).css("width",aa2ul_width+"px"); $(aa2ul).css("left","0px"); var intaa2=setInterval("aa2to_left_auto()",5000);/*按时间间隔启动*/ aa2banner_i=1; aa2LoadBanner(aa2banner_i); function aa2to_left_auto() { if (aa2banner_i < aa2li_number){ aa2banner_i++; } else{ aa2banner_i=1; } aa2LoadBanner(aa2banner_i); } function aa2LoadBanner(i) { aa2banner_i=i; if(!$(aa2ul).is(":animated")){ $(aa2ul).animate({left:"-"+(i-1)*aa2li_width+"px"},300,'swing'); } $("#aa2 .page a").removeClass("cur"); $("#aa2 .page .a"+i).addClass("cur"); $("#aa2 .page .a"+i).blur(); }