//banner var t = n = 0, _this,cell,count,butt; var flag=true; $.fn.t_banner=function(){ _this=$(this); cell=_this.find('.cell'); count=cell.length; butt=$("
"); for(i=0;i"); cell.eq(i).find('.ban_t').addclass('ban_t'+i) } _this.append(butt); cell.hide().eq(0).show().find('.ban_t').animate({top:'60px',opacity:1},'slow'); butt.find('a').eq(0).addclass('on') butt.find('a').each(function(index, element) { $(this).click(function() { if(flag){ flag=false clearinterval(t) if (index >= count) return; cell.filter(":visible").fadeout(500); cell.eq(index).fadein(600); cell.find('.ban_t:visible').animate({top:'30px',opacity:0},'slow',function(){ flag=true; }); cell.eq(index).find('.ban_t').animate({top:'60px',opacity:1},'slow'); $(this).addclass("on").siblings().removeattr("class"); n=index; t = setinterval("showauto()", 6000); }else{ } }); }); t = setinterval("showauto()", 6000); } // // function showauto(){ n = n >=(count - 1) ? 0 : ++n; butt.find('a').eq(n).click() } //i_pic_new var t2 = n2 = 0, _this2,cell2,count2,butt2; var flag2=true; $.fn.t_news=function(){ _this2=$(this); cell2=_this2.find('.cell'); count2=cell2.length; butt2=$("
"); for(i2=0;i2"); } _this2.append(butt2); cell2.hide().eq(0).show(); butt2.find('a').eq(0).addclass('on') butt2.find('a').each(function(index, element) { $(this).click(function() { if(flag2){ flag2=false clearinterval(t2) if (index >= count2) return; cell2.filter(":visible").fadeout(500); cell2.eq(index).fadein(1000,function(){ flag2=true; }); $(this).addclass("on").siblings().removeattr("class"); n2=index; t2 = setinterval("showauto2()", 4000); }else{ } }); }); t2 = setinterval("showauto2()", 4000); } // function showauto2(){ n2 = n2 >=(count2 - 1) ? 0 : ++n2; butt2.find('a').eq(n2).click() }