function imgslideinit(sid,speed){ var oslider=$(sid),nav=oslider.next(),id=sid.substr(1),count=1; id=new swipe(document.getelementbyid(id),{startslide:0,auto:4000,speed:speed,callback:function(event,index,elem){var oimg=oslider.find('img'),len=oimg.length,maxcount=len-2; nav.find('.i_point').removeclass('active'); nav.find('.i_point').eq(index).addclass('active'); if(count<=maxcount){if(index>=1&&index<=maxcount){var currimg=oimg.eq(index+1),src=currimg.attr('data-src'); currimg.attr('src',src)}count++}}}) } function tabslideinit(sid){ var oslider=$(sid),nav=oslider.prev(),id=sid.substr(1),obj=sid.substr(1); obj=new swipe(document.getelementbyid(id),{startslide:0,speed:200,callback:function(event,index,elem){var oli=nav.find('li'); if(oli.length>1){nav.find('li.on').removeclass('on'); oli.eq(index).addclass('on')}}}); nav.find('li').click(function(){var i=nav.find('li').index(this); obj.slide(i,200)}) } function addonscroll(fn){ if(typeof window.onscroll=='function'){ var tempfn=window.onscroll; window.onscroll=function(){ tempfn(); fn() } }else{ window.onscroll=function(){fn()} } } function tabbindevent(index){ settimeout(function(){ var id='#floor'+index; tabslideinit(id); index=parseint(index)+1; var nextid='#floor'+index; if(index<=13&&$(nextid).length>0){tabbindevent(index)}},200) }