//!function(a){a(document).ready(function(){function q(){if(document.url.indexof("google.com/reader/view")>-1&&(g=!0),i)for(var a=i.split(/[,\n] ?/),b=a.length;b--;)if(document.url.indexof(a[b])>-1){d("mousewheel",v),g=!0;break}}function r(){if(document.body){var a=document.body,b=document.documentelement,c=window.innerheight,d=a.scrollheight;if(o=document.compatmode.indexof("css")>=0?b:a,n=a,q(),l=!0,top!=self)j=!0;else if(d>c&&(a.offsetheight<=c||b.offsetheight<=c)&&(o.style.height="auto",o.offsetheight<=c)){var e=document.createelement("div");e.style.clear="both",a.appendchild(e)}if(document.url.indexof("mail.google.com")>-1){var f=document.createelement("style");f.innerhtml=".iu { visibility: hidden }",(document.getelementsbytagname("head")[0]||b).appendchild(f)}m||(a.style.backgroundattachment="scroll"),g&&d("keydown",w)}}function u(c,e,f,g){if(g||(g=1e3),f(e,f),s.push({x:e,y:f,lastx:0>e?.99:-.99,lasty:0>f?.99:-.99,start:+new date}),!t){var h=function(){for(var i=+new date,j=0,k=0,l=0;l=b,p=o?1:n/b;d&&(p=h(p));var q=m.x*p-m.lastx>>0,r=m.y_2ap-m.lasty>>0;j+=q,k+=r,m.lastx+=q,m.lasty+=r,o&&(s.splice(l,1),l--)}if(e){var u=c.scrollleft;c.scrollleft+=j,j&&c.scrollleft===u&&(e=0)}if(f){var v=c.scrolltop;c.scrolltop+=k,k&&c.scrolltop===v&&(f=0)}e||f||(s=[]),s.length?settimeout(h,g/a+1):t=!1};settimeout(h,0),t=!0}}function v(a){l||r();var b=a.target;var version=getchromeversion();var d=b(b);var vision=getchromeversion();if(vision>55){d=document.documentelement}function getchromeversion(){var arr=navigator.useragent.split(' ');var chromeversion='';for(var i=0;i1.2&&(e*=c/120),math.abs(f)>1.2&&(f*=c/120),u(d,-e,-f),a.preventdefault()}function w(a){var b=a.target,c=a.ctrlkey||a.altkey||a.metakey;if(/input|textarea|embed/i.test(b.nodename)||b.iscontenteditable||a.defaultprevented||c)return!0;if(e(b,"button")&&a.keycode===p.spacebar)return!0;var d,e=0,f=0,g=b(n),i=g.clientheight;switch(g==document.body&&(i=window.innerheight),a.keycode){case p.up:f=-h;break;case p.down:f=h;break;case p.spacebar:d=a.shiftkey?1:-1,f=.9*-d*i;break;case p.pageup:f=.9*-i;break;case p.pagedown:f=.9*i;break;case p.home:f=-g.scrolltop;break;case p.end:var j=g.scrollheight-g.scrolltop-i;f=j>0?j+10:0;break;case p.left:e=-h;break;case p.right:e=h;break;default:return!0}u(g,e,f),a.preventdefault()}function x(a){n=a.target}function a(a,b){for(var c=a.length;c--;)y[z(a[c])]=b;return b}function b(a){var b=[],c=o.scrollheight;do{var d=y[z(a)];if(d)return a(b,d);if(b.push(a),c===a.scrollheight){if(!j||o.clientheight+100?1:-1,b=b>0?1:-1,(k.x!==a||k.y!==b)&&(k.x=a,k.y=b,s=[])}function g(a){var b,c,d;return a*=e,1>a?b=a-(1-math.exp(-a)):(c=math.exp(-1),a-=1,d=1-math.exp(-a),b=c+d*(1-c)),b*f}function h(a){return a>=1?1:0>=a?0:(1==f&&(f/=g(1)),g(a))}var n,o,a=150,b=600,c=150,d=!0,e=5,f=1,g=!1,h=50,i="",j=!1,k={x:0,y:0},l=!1,m=!0,p={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},s=[],t=!1,y={};setinterval(function(){y={}},1e4);var z=function(){var a=0;return function(b){return b.uniqueid||(b.uniqueid=a++)}}();/chrome/.test(navigator.useragent.tolowercase())&&(c("mousedown",x),c("mousewheel",v),c("keydown",w),c("load",r))})}(jquery); /*wow*/ (function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexof||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.ismobile=function(a){return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(a)},a.prototype.addevent=function(a,b,c){return null!=a.addeventlistener?a.addeventlistener(b,c,!1):null!=a.attachevent?a.attachevent("on"+b,c):a[b]=c},a.prototype.removeevent=function(a,b,c){return null!=a.removeeventlistener?a.removeeventlistener(b,c,!1):null!=a.detachevent?a.detachevent("on"+b,c):delete a[b]},a.prototype.innerheight=function(){return"innerheight"in window?window.innerheight:document.documentelement.clientheight},a}(),c=this.weakmap||this.mozweakmap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.mutationobserver||this.webkitmutationobserver||this.mozmutationobserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("mutationobserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("wow.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notsupported=!0,a.prototype.observe=function(){},a}()),d=this.getcomputedstyle||function(a){return this.getpropertyvalue=function(b){var c;return"float"===b&&(b="stylefloat"),e.test(b)&&b.replace(e,function(a,b){return b.touppercase()}),(null!=(c=a.currentstyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.wow=function(){function e(a){null==a&&(a={}),this.scrollcallback=f(this.scrollcallback,this),this.scrollhandler=f(this.scrollhandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationnamecache=new c}return e.prototype.defaults={boxclass:"wow",animateclass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentelement,"interactive"===(a=document.readystate)||"complete"===a?this.start():this.util().addevent(document,"domcontentloaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.queryselectorall("."+this.config.boxclass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetstyle();else{for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applystyle(b,!0);this.util().addevent(window,"scroll",this.scrollhandler),this.util().addevent(window,"resize",this.scrollhandler),this.interval=setinterval(this.scrollcallback,50)}return this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addednodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.dosync(c));return f}.call(a));return g}}(this)).observe(document.body,{childlist:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeevent(window,"scroll",this.scrollhandler),this.util().removeevent(window,"resize",this.scrollhandler),null!=this.interval?clearinterval(this.interval):void 0},e.prototype.sync=function(){return a.notsupported?this.dosync(this.element):void 0},e.prototype.dosync=function(a){var b,c,d,e,f;if(!this.stopped){if(null==a&&(a=this.element),1!==a.nodetype)return;for(a=a.parentnode||a,e=a.queryselectorall("."+this.config.boxclass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.applystyle(b,!0),this.boxes.push(b),this.all.push(b),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applystyle(a),a.classname=""+a.classname+" "+this.config.animateclass},e.prototype.applystyle=function(a,b){var c,d,e;return d=a.getattribute("data-wow-duration"),c=a.getattribute("data-wow-delay"),e=a.getattribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customstyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestanimationframe"in window?function(a){return window.requestanimationframe(a)}:function(a){return a()}}(),e.prototype.resetstyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.setattribute("style","visibility: visible;"));return e},e.prototype.customstyle=function(a,b,c,d,e){return b&&this.cacheanimationname(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorset(a.style,{animationduration:c}),d&&this.vendorset(a.style,{animationdelay:d}),e&&this.vendorset(a.style,{animationiterationcount:e}),this.vendorset(a.style,{animationname:b?"none":this.cachedanimationname(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorset=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charat(0).touppercase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorcss=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getpropertycssvalue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getpropertycssvalue("-"+f+"-"+b);return c},e.prototype.animationname=function(a){var b;try{b=this.vendorcss(a,"animation-name").csstext}catch(c){b=d(a).getpropertyvalue("animation-name")}return"none"===b?"":b},e.prototype.cacheanimationname=function(a){return this.animationnamecache.set(a,this.animationname(a))},e.prototype.cachedanimationname=function(a){return this.animationnamecache.get(a)},e.prototype.scrollhandler=function(){return this.scrolled=!0},e.prototype.scrollcallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isvisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsettop=function(a){for(var b;void 0===a.offsettop;)a=a.parentnode;for(b=a.offsettop;a=a.offsetparent;)b+=a.offsettop;return b},e.prototype.isvisible=function(a){var b,c,d,e,f;return c=a.getattribute("data-wow-offset")||this.config.offset,f=window.pageyoffset,e=f+math.min(this.element.clientheight,this.util().innerheight())-c,d=this.offsettop(a),b=d+a.clientheight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().ismobile(navigator.useragent)},e}()}).call(this); /*superslide*/ !function(a){a.fn.slide=function(b){return a.fn.slide.defaults={type:"slide",effect:"fade",autoplay:!1,delaytime:500,intertime:4500,triggertime:150,defaultindex:0,titcell:".hd li",maincell:".bd",targetcell:null,trigger:"mouseover",scroll:1,vis:1,titonclassname:"on",autopage:!1,prevcell:".prev",nextcell:".next",pagestatecell:".pagestate",opp:!1,pnloop:!0,easing:"swing",startfun:null,endfun:null,switchload:null,playstatecell:".playstate",mouseoverstop:!0,defaultplay:!0,returndefault:!1},this.each(function(){var c=a.extend({},a.fn.slide.defaults,b),d=a(this),e=c.effect,f=a(c.prevcell,d),g=a(c.nextcell,d),h=a(c.pagestatecell,d),i=a(c.playstatecell,d),j=a(c.titcell,d),k=j.size(),l=a(c.maincell,d),m=l.children().size(),n=c.switchload,o=a(c.targetcell,d),p=parseint(c.defaultindex),q=parseint(c.delaytime),r=parseint(c.intertime);parseint(c.triggertime);var q,t=parseint(c.scroll),u=parseint(c.vis),v="false"==c.autoplay||0==c.autoplay?!1:!0,w="false"==c.opp||0==c.opp?!1:!0,x="false"==c.autopage||0==c.autopage?!1:!0,y="false"==c.pnloop||0==c.pnloop?!1:!0,z="false"==c.mouseoverstop||0==c.mouseoverstop?!1:!0,a="false"==c.defaultplay||0==c.defaultplay?!1:!0,b="false"==c.returndefault||0==c.returndefault?!1:!0,c=0,d=0,e=0,f=0,g=c.easing,h=null,i=null,j=null,k=c.titonclassname,l=j.index(d.find("."+k)),m=p=-1==l?p:l,n=p,o=p,p=m>=u?0!=m%t?m%t:t:0,r="leftmarquee"==e||"topmarquee"==e?!0:!1,s=function(){a.isfunction(c.startfun)&&c.startfun(p,k,d,a(c.titcell,d),l,o,f,g)},t=function(){a.isfunction(c.endfun)&&c.endfun(p,k,d,a(c.titcell,d),l,o,f,g)},u=function(){j.removeclass(k),a&&j.eq(n).addclass(k)};if("menu"==c.type)return a&&j.removeclass(k).eq(p).addclass(k),j.hover(function(){q=a(this).find(c.targetcell);var b=j.index(a(this));i=settimeout(function(){switch(p=b,j.removeclass(k).eq(p).addclass(k),s(),e){case"fade":q.stop(!0,!0).animate({opacity:"show"},q,g,t);break;case"slidedown":q.stop(!0,!0).animate({height:"show"},q,g,t)}},c.triggertime)},function(){switch(cleartimeout(i),e){case"fade":q.animate({opacity:"hide"},q,g);break;case"slidedown":q.animate({height:"hide"},q,g)}}),b&&d.hover(function(){cleartimeout(j)},function(){j=settimeout(u,q)}),void 0;if(0==k&&(k=m),r&&(k=2),x){if(m>=u)if("leftloop"==e||"toploop"==e)k=0!=m%t?(0^m/t)+1:m/t;else{var v=m-u;k=1+parseint(0!=v%t?v/t+1:v/t),0>=k&&(k=1)}else k=1;j.html("");var w="";if(1==c.autopage||"true"==c.autopage)for(var x=0;k>x;x++)w+="
  • "+(x+1)+"
  • ";else for(var x=0;k>x;x++)w+=c.autopage.replace("$",x+1);j.html(w);var j=j.children()}if(m>=u){l.children().each(function(){a(this).width()>e&&(e=a(this).width(),d=a(this).outerwidth(!0)),a(this).height()>f&&(f=a(this).height(),c=a(this).outerheight(!0))});var y=l.children(),z=function(){for(var a=0;u>a;a++)y.eq(a).clone().addclass("clone").appendto(l);for(var a=0;p>a;a++)y.eq(m-a-1).clone().addclass("clone").prependto(l)};switch(e){case"fold":l.css({position:"relative",width:d,height:c}).children().css({position:"absolute",width:e,left:0,top:0,display:"none"});break;case"top":l.wrap('
    ').css({top:-(p*t)*c,position:"relative",padding:"0",margin:"0"}).children().css({height:f});break;case"left":l.wrap('
    ').css({width:m*d,left:-(p*t)*d,position:"relative",overflow:"hidden",padding:"0",margin:"0"}).children().css({"float":"left",width:e});break;case"leftloop":case"leftmarquee":z(),l.wrap('
    ').css({width:(m+u+p)*d,position:"relative",overflow:"hidden",padding:"0",margin:"0",left:-(p+p*t)*d}).children().css({"float":"left",width:e});break;case"toploop":case"topmarquee":z(),l.wrap('
    ').css({height:(m+u+p)*c,position:"relative",padding:"0",margin:"0",top:-(p+p*t)*c}).children().css({height:f})}}var $=function(a){var b=a*t;return a==k?b=m:-1==a&&0!=m%t&&(b=-m%t),b},_=function(b){var c=function(c){for(var d=c;u+c>d;d++)b.eq(d).find("img["+n+"]").each(function(){var b=a(this);if(b.attr("src",b.attr(n)).removeattr(n),l.find(".clone")[0])for(var c=l.children(),d=0;d=1?p=1:0>=p&&(p=0):(o=p,p>=k?p=0:0>p&&(p=k-1)),s(),null!=n&&_(l.children()),o[0]&&(q=o.eq(p),null!=n&&_(o),"slidedown"==e?(o.not(q).stop(!0,!0).slideup(q),q.slidedown(q,g,function(){l[0]||t()})):(o.not(q).stop(!0,!0).hide(),q.animate({opacity:"show"},q,function(){l[0]||t()}))),m>=u)switch(e){case"fade":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,g,function(){t()}).siblings().hide();break;case"fold":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,g,function(){t()}).siblings().animate({opacity:"hide"},q,g);break;case"top":l.stop(!0,!1).animate({top:-p*t*c},q,g,function(){t()});break;case"left":l.stop(!0,!1).animate({left:-p*t*d},q,g,function(){t()});break;case"leftloop":var b=o;l.stop(!0,!0).animate({left:-($(o)+p)*d},q,g,function(){-1>=b?l.css("left",-(p+(k-1)*t)*d):b>=k&&l.css("left",-p*d),t()});break;case"toploop":var b=o;l.stop(!0,!0).animate({top:-($(o)+p)*c},q,g,function(){-1>=b?l.css("top",-(p+(k-1)*t)*c):b>=k&&l.css("top",-p*c),t()});break;case"leftmarquee":var c=l.css("left").replace("px","");0==p?l.animate({left:++c},0,function(){l.css("left").replace("px","")>=0&&l.css("left",-m*d)}):l.animate({left:--c},0,function(){l.css("left").replace("px","")<=-(m+p)*d&&l.css("left",-p*d)});break;case"topmarquee":var d=l.css("top").replace("px","");0==p?l.animate({top:++d},0,function(){l.css("top").replace("px","")>=0&&l.css("top",-m*c)}):l.animate({top:--d},0,function(){l.css("top").replace("px","")<=-(m+p)*c&&l.css("top",-p*c)})}j.removeclass(k).eq(p).addclass(k),m=p,y||(g.removeclass("nextstop"),f.removeclass("prevstop"),0==p&&f.addclass("prevstop"),p==k-1&&g.addclass("nextstop")),h.html(""+(p+1)+"./"+k)}};a&&ab(!0),b&&d.hover(function(){cleartimeout(j)},function(){j=settimeout(function(){p=n,a?ab():"slidedown"==e?q.slideup(q,u):q.animate({opacity:"hide"},q,u),m=p},300)});var bb=function(a){h=setinterval(function(){w?p--:p++,ab()},a?a:r)},cb=function(a){h=setinterval(ab,a?a:r)},db=function(){z||(clearinterval(h),bb())},eb=function(){(y||p!=k-1)&&(p++,ab(),r||db())},fb=function(){(y||0!=p)&&(p--,ab(),r||db())},gb=function(){clearinterval(h),r?cb():bb(),i.removeclass("pausestate")},hb=function(){clearinterval(h),i.addclass("pausestate")};if(v?r?(w?p--:p++,cb(),z&&l.hover(hb,gb)):(bb(),z&&d.hover(hb,gb)):(r&&(w?p--:p++),i.addclass("pausestate")),i.click(function(){i.hasclass("pausestate")?gb():hb()}),"mouseover"==c.trigger?j.hover(function(){var a=j.index(this);i=settimeout(function(){p=a,ab(),db()},c.triggertime)},function(){cleartimeout(i)}):j.click(function(){p=j.index(this),ab(),db()}),r){if(g.mousedown(eb),f.mousedown(fb),y){var ib,jb=function(){ib=settimeout(function(){clearinterval(h),cb(0^r/10)},150)},kb=function(){cleartimeout(ib),clearinterval(h),cb()};g.mousedown(jb),g.mouseup(kb),f.mousedown(jb),f.mouseup(kb)}"mouseover"==c.trigger&&(g.hover(eb,function(){}),f.hover(fb,function(){}))}else g.click(eb),f.click(fb)})}}(jquery),jquery.easing.jswing=jquery.easing.swing,jquery.extend(jquery.easing,{def:"easeoutquad",swing:function(a,b,c,d,e){return jquery.easing[jquery.easing.def](a,b,c,d,e)},easeinquad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeoutquad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeinoutquad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeincubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeoutcubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeinoutcubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeinquart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeoutquart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeinoutquart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeinquint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeoutquint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeinoutquint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeinsine:function(a,b,c,d,e){return-d*math.cos(b/e*(math.pi/2))+d+c},easeoutsine:function(a,b,c,d,e){return d*math.sin(b/e*(math.pi/2))+c},easeinoutsine:function(a,b,c,d,e){return-d/2*(math.cos(math.pi*b/e)-1)+c},easeinexpo:function(a,b,c,d,e){return 0==b?c:d*math.pow(2,10*(b/e-1))+c},easeoutexpo:function(a,b,c,d,e){return b==e?c+d:d*(-math.pow(2,-10*b/e)+1)+c},easeinoutexpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*math.pow(2,10*(b-1))+c:d/2*(-math.pow(2,-10*--b)+2)+c},easeincirc:function(a,b,c,d,e){return-d*(math.sqrt(1-(b/=e)*b)-1)+c},easeoutcirc:function(a,b,c,d,e){return d*math.sqrt(1-(b=b/e-1)*b)+c},easeinoutcirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(math.sqrt(1-b*b)-1)+c:d/2*(math.sqrt(1-(b-=2)*b)+1)+c},easeinelastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),hb?-.5*h*math.pow(2,10*(b-=1))*math.sin((b*e-f)*2*math.pi/g)+c:.5*h*math.pow(2,-10*(b-=1))*math.sin((b*e-f)*2*math.pi/g)+d+c},easeinback:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeoutback:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeinoutback:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeinbounce:function(a,b,c,d,e){return d-jquery.easing.easeoutbounce(a,e-b,0,d,e)+c},easeoutbounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeinoutbounce:function(a,b,c,d,e){return e/2>b?.5*jquery.easing.easeinbounce(a,2*b,0,d,e)+c:.5*jquery.easing.easeoutbounce(a,2*b-e,0,d,e)+.5*d+c}}); /*mousewheel*/ (function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheeldelta&&(e=c.wheeldelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.horizontal_axis&&(h=0,g=-1*e),c.wheeldeltay!==undefined&&(h=c.wheeldeltay/120),c.wheeldeltax!==undefined&&(g=-1*c.wheeldeltax/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["dommousescroll","mousewheel"];if(a.event.fixhooks)for(var c=b.length;c;)a.event.fixhooks[b[--c]]=a.event.mousehooks;a.event.special.mousewheel={setup:function(){if(this.addeventlistener)for(var a=b.length;a;)this.addeventlistener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeeventlistener)for(var a=b.length;a;)this.removeeventlistener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jquery); /*数字增加 class='counter'*/ !function(){"use strict";function t(o){if(!o)throw new error("no options passed to waypoint constructor");if(!o.element)throw new error("no element option passed to waypoint constructor");if(!o.handler)throw new error("no handler option passed to waypoint constructor");this.key="waypoint-"+e,this.options=t.adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerpoint=null,this.group=t.group.findorcreate({name:this.options.group,axis:this.axis}),this.context=t.context.findorcreatebyelement(this.options.context),t.offsetaliases[this.options.offset]&&(this.options.offset=t.offsetaliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queuetrigger=function(t){this.group.queuetrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeall=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyall=function(){t.invokeall("destroy")},t.disableall=function(){t.invokeall("disable")},t.enableall=function(){t.invokeall("enable")},t.refreshall=function(){t.context.refreshall()},t.viewportheight=function(){return window.innerheight||document.documentelement.clientheight},t.viewportwidth=function(){return document.documentelement.clientwidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetaliases={"bottom-in-view":function(){return this.context.innerheight()-this.adapter.outerheight()},"right-in-view":function(){return this.context.innerwidth()-this.adapter.outerwidth()}},window.waypoint=t}(),function(){"use strict";function t(t){window.settimeout(t,1e3/60)}function e(t){this.element=t,this.adapter=n.adapter,this.adapter=new this.adapter(t),this.key="waypoint-context-"+i,this.didscroll=!1,this.didresize=!1,this.oldscroll={x:this.adapter.scrollleft(),y:this.adapter.scrolltop()},this.waypoints={vertical:{},horizontal:{}},t.waypointcontextkey=this.key,o[t.waypointcontextkey]=this,i+=1,this.createthrottledscrollhandler(),this.createthrottledresizehandler()}var i=0,o={},n=window.waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkempty=function(){var t=this.adapter.isemptyobject(this.waypoints.horizontal),e=this.adapter.isemptyobject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createthrottledresizehandler=function(){function t(){e.handleresize(),e.didresize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didresize||(e.didresize=!0,n.requestanimationframe(t))})},e.prototype.createthrottledscrollhandler=function(){function t(){e.handlescroll(),e.didscroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didscroll||n.istouch)&&(e.didscroll=!0,n.requestanimationframe(t))})},e.prototype.handleresize=function(){n.context.refreshall()},e.prototype.handlescroll=function(){var t={},e={horizontal:{newscroll:this.adapter.scrollleft(),oldscroll:this.oldscroll.x,forward:"right",backward:"left"},vertical:{newscroll:this.adapter.scrolltop(),oldscroll:this.oldscroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newscroll>o.oldscroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldscroll=a.triggerpoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queuetrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushtriggers();this.oldscroll={x:e.horizontal.newscroll,y:e.vertical.newscroll}},e.prototype.innerheight=function(){return this.element==this.element.window?n.viewportheight():this.adapter.innerheight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkempty()},e.prototype.innerwidth=function(){return this.element==this.element.window?n.viewportwidth():this.adapter.innerwidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handlescroll(),t={horizontal:{contextoffset:e?0:i.left,contextscroll:e?0:this.oldscroll.x,contextdimension:this.innerwidth(),oldscroll:this.oldscroll.x,forward:"right",backward:"left",offsetprop:"left"},vertical:{contextoffset:e?0:i.top,contextscroll:e?0:this.oldscroll.y,contextdimension:this.innerheight(),oldscroll:this.oldscroll.y,forward:"down",backward:"up",offsetprop:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerpoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetprop]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parsefloat(f),d.options.offset.indexof("%")>-1&&(f=math.ceil(s.contextdimension*f/100))),l=s.contextscroll-s.contextoffset,d.triggerpoint=y+l-f,h=w=s.oldscroll,u=h&&p,c=!h&&!p,!g&&u?(d.queuetrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queuetrigger(s.forward),o[d.group.id]=d.group):g&&s.oldscroll>=d.triggerpoint&&(d.queuetrigger(s.forward),o[d.group.id]=d.group)}}return n.requestanimationframe(function(){for(var t in o)o[t].flushtriggers()}),this},e.findorcreatebyelement=function(t){return e.findbyelement(t)||new e(t)},e.refreshall=function(){for(var t in o)o[t].refresh()},e.findbyelement=function(t){return o[t.waypointcontextkey]},window.onload=function(){r&&r(),e.refreshall()},n.requestanimationframe=function(e){var i=window.requestanimationframe||window.mozrequestanimationframe||window.webkitrequestanimationframe||t;i.call(window,e)},n.context=e}(),function(){"use strict";function t(t,e){return t.triggerpoint-e.triggerpoint}function e(t,e){return e.triggerpoint-t.triggerpoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.cleartriggerqueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.cleartriggerqueues=function(){this.triggerqueues={up:[],down:[],left:[],right:[]}},i.prototype.flushtriggers=function(){for(var i in this.triggerqueues){var o=this.triggerqueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.cleartriggerqueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.adapter.inarray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.adapter.inarray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queuetrigger=function(t,e){this.triggerqueues[e].push(t)},i.prototype.remove=function(t){var e=n.adapter.inarray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findorcreate=function(t){return o[t.axis][t.name]||new i(t)},n.group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jquery,i=window.waypoint;e.each(["innerheight","innerwidth","off","offset","on","outerheight","outerwidth","scrollleft","scrolltop"],function(e,i){t.prototype[i]=function(){var t=array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inarray","isemptyobject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",adapter:t}),i.adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isfunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.waypoint;window.jquery&&(window.jquery.fn.waypoint=t(window.jquery)),window.zepto&&(window.zepto.fn.waypoint=t(window.zepto))}();!function(t){"use strict";t.fn.countup=function(e){var a=t.extend({time:2e3,delay:20},e);return this.each(function(){var e=t(this),n=a,u=function(){e.data("counterupto")||e.data("counterupto",e.text());var t=parseint(e.data("counter-time"))>0?parseint(e.data("counter-time")):n.time,a=parseint(e.data("counter-delay"))>0?parseint(e.data("counter-delay")):n.delay,u=t/a,r=e.data("counterupto"),o=[r],c=/[0-9]+,[0-9]+/.test(r);r=r.replace(/,/g,"");for(var d=(/^[0-9]+$/.test(r),/^[0-9]+\.[0-9]+$/.test(r)),s=d?(r.split(".")[1]||[]).length:0,i=u;i>=1;i--){var p=parseint(math.round(r/u*i));if(d&&(p=parsefloat(r/u*i).tofixed(s)),c)for(;/(\d+)(\d{3})/.test(p.tostring());)p=p.tostring().replace(/(\d+)(\d{3})/,"$1,$2");o.unshift(p)}e.data("counterup-nums",o),e.text("0");var f=function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?settimeout(e.data("counterup-func"),a):(delete e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))};e.data("counterup-func",f),settimeout(e.data("counterup-func"),a)};e.waypoint(u,{offset:"100%",triggeronce:!0})})}}(jquery);$('.counter').countup(); /*iscroll*/ (function(window,document,math){var raf=window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||window.orequestanimationframe||window.msrequestanimationframe||function(callback){window.settimeout(callback,1000/60)};var utils=(function(){var me={};var _elementstyle=document.createelement('div').style;var _vendor=(function(){var vendors=['t','webkitt','mozt','mst','ot'],transform,i=0,l=vendors.length;for(;i0){destination=wrappersize?wrappersize/2.5*(speed/8):0;distance=math.abs(current)+destination;duration=distance/speed}return{destination:math.round(destination),duration:duration}};var _transform=_prefixstyle('transform');me.extend(me,{hastransform:_transform!==false,hasperspective:_prefixstyle('perspective')in _elementstyle,hastouch:'ontouchstart'in window,haspointer:!!(window.pointerevent||window.mspointerevent),hastransition:_prefixstyle('transition')in _elementstyle});me.isbadandroid=(function(){var appversion=window.navigator.appversion;if(/android/.test(appversion)&&!(/chrome\/\d/.test(appversion))){var safariversion=appversion.match(/safari\/(\d+.\d)/);if(safariversion&&typeof safariversion==="object"&&safariversion.length>=2){return parsefloat(safariversion[1])<535.19}else{return true}}else{return false}})();me.extend(me.style={},{transform:_transform,transitiontimingfunction:_prefixstyle('transitiontimingfunction'),transitionduration:_prefixstyle('transitionduration'),transitiondelay:_prefixstyle('transitiondelay'),transformorigin:_prefixstyle('transformorigin')});me.hasclass=function(e,c){var re=new regexp("(^|\\s)"+c+"(\\s|$)");return re.test(e.classname)};me.addclass=function(e,c){if(me.hasclass(e,c)){return}var newclass=e.classname.split(' ');newclass.push(c);e.classname=newclass.join(' ')};me.removeclass=function(e,c){if(!me.hasclass(e,c)){return}var re=new regexp("(^|\\s)"+c+"(\\s|$)",'g');e.classname=e.classname.replace(re,' ')};me.offset=function(el){var left=-el.offsetleft,top=-el.offsettop;while(el=el.offsetparent){left-=el.offsetleft;top-=el.offsettop}return{left:left,top:top}};me.preventdefaultexception=function(el,exceptions){for(var i in exceptions){if(exceptions[i].test(el[i])){return true}}return false};me.extend(me.eventtype={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,mspointerdown:3,mspointermove:3,mspointerup:3});me.extend(me.ease={},{quadratic:{style:'cubic-bezier(0.25, 0.46, 0.45, 0.94)',fn:function(k){return k*(2-k)}},circular:{style:'cubic-bezier(0.1, 0.57, 0.1, 1)',fn:function(k){return math.sqrt(1-(--k*k))}},back:{style:'cubic-bezier(0.175, 0.885, 0.32, 1.275)',fn:function(k){var b=4;return(k=k-1)*k*((b+1)*k+b)+1}},bounce:{style:'',fn:function(k){if((k/=1)<(1/2.75)){return 7.5625*k*k}else if(k<(2/2.75)){return 7.5625*(k-=(1.5/2.75))*k+0.75}else if(k<(2.5/2.75)){return 7.5625*(k-=(2.25/2.75))*k+0.9375}else{return 7.5625*(k-=(2.625/2.75))*k+0.984375}}},elastic:{style:'',fn:function(k){var f=0.22,e=0.4;if(k===0){return 0}if(k==1){return 1}return(e*math.pow(2,-10*k)*math.sin((k-f/4)*(2*math.pi)/f)+1)}}});me.tap=function(e,eventname){var ev=document.createevent('event');ev.initevent(eventname,true,true);ev.pagex=e.pagex;ev.pagey=e.pagey;e.target.dispatchevent(ev)};me.click=function(e){var target=e.target,ev;if(!(/(select|input|textarea)/i).test(target.tagname)){ev=document.createevent(window.mouseevent?'mouseevents':'event');ev.initevent('click',true,true);ev.view=e.view||window;ev.detail=1;ev.screenx=target.screenx||0;ev.screeny=target.screeny||0;ev.clientx=target.clientx||0;ev.clienty=target.clienty||0;ev.ctrlkey=!!e.ctrlkey;ev.altkey=!!e.altkey;ev.shiftkey=!!e.shiftkey;ev.metakey=!!e.metakey;ev.button=0;ev.relatedtarget=null;ev._constructed=true;target.dispatchevent(ev)}};return me})();function iscroll(el,options){this.wrapper=typeof el=='string'?document.queryselector(el):el;this.scroller=this.wrapper.children[0];this.scrollerstyle=this.scroller.style;this.options={resizescrollbars:true,mousewheelspeed:20,snapthreshold:0.334,disablepointer:!utils.haspointer,disabletouch:utils.haspointer||!utils.hastouch,disablemouse:utils.haspointer||utils.hastouch,startx:0,starty:0,scrolly:true,directionlockthreshold:5,momentum:true,bounce:true,bouncetime:600,bounceeasing:'',preventdefault:true,preventdefaultexception:{tagname:/^(input|textarea|button|select)$/},hwcompositing:true,usetransition:true,usetransform:true,bindtowrapper:typeof window.onmousedown==="undefined"};for(var i in options){this.options[i]=options[i]}this.translatez=this.options.hwcompositing&&utils.hasperspective?' translatez(0)':'';this.options.usetransition=utils.hastransition&&this.options.usetransition;this.options.usetransform=utils.hastransform&&this.options.usetransform;this.options.eventpassthrough=this.options.eventpassthrough===true?'vertical':this.options.eventpassthrough;this.options.preventdefault=!this.options.eventpassthrough&&this.options.preventdefault;this.options.scrolly=this.options.eventpassthrough=='vertical'?false:this.options.scrolly;this.options.scrollx=this.options.eventpassthrough=='horizontal'?false:this.options.scrollx;this.options.freescroll=this.options.freescroll&&!this.options.eventpassthrough;this.options.directionlockthreshold=this.options.eventpassthrough?0:this.options.directionlockthreshold;this.options.bounceeasing=typeof this.options.bounceeasing=='string'?utils.ease[this.options.bounceeasing]||utils.ease.circular:this.options.bounceeasing;this.options.resizepolling=this.options.resizepolling===undefined?60:this.options.resizepolling;if(this.options.tap===true){this.options.tap='tap'}if(!this.options.usetransition&&!this.options.usetransform){if(!(/relative|absolute/i).test(this.scrollerstyle.position)){this.scrollerstyle.position="relative"}}if(this.options.shrinkscrollbars=='scale'){this.options.usetransition=false}this.options.invertwheeldirection=this.options.invertwheeldirection?-1:1;this.x=0;this.y=0;this.directionx=0;this.directiony=0;this._events={};this._init();this.refresh();this.scrollto(this.options.startx,this.options.starty);this.enable()}iscroll.prototype={version:'5.2.0',_init:function(){this._initevents();if(this.options.scrollbars||this.options.indicators){this._initindicators()}if(this.options.mousewheel){this._initwheel()}if(this.options.snap){this._initsnap()}if(this.options.keybindings){this._initkeys()}},destroy:function(){this._initevents(true);cleartimeout(this.resizetimeout);this.resizetimeout=null;this._execevent('destroy')},_transitionend:function(e){if(e.target!=this.scroller||!this.isintransition){return}this._transitiontime();if(!this.resetposition(this.options.bouncetime)){this.isintransition=false;this._execevent('scrollend')}},_start:function(e){if(utils.eventtype[e.type]!=1){var button;if(!e.which){button=(e.button<2)?0:((e.button==4)?1:2)}else{button=e.button}if(button!==0){return}}if(!this.enabled||(this.initiated&&utils.eventtype[e.type]!==this.initiated)){return}if(this.options.preventdefault&&!utils.isbadandroid&&!utils.preventdefaultexception(e.target,this.options.preventdefaultexception)){e.preventdefault()}var point=e.touches?e.touches[0]:e,pos;this.initiated=utils.eventtype[e.type];this.moved=false;this.distx=0;this.disty=0;this.directionx=0;this.directiony=0;this.directionlocked=0;this.starttime=utils.gettime();if(this.options.usetransition&&this.isintransition){this._transitiontime();this.isintransition=false;pos=this.getcomputedposition();this._translate(math.round(pos.x),math.round(pos.y));this._execevent('scrollend')}else if(!this.options.usetransition&&this.isanimating){this.isanimating=false;this._execevent('scrollend')}this.startx=this.x;this.starty=this.y;this.absstartx=this.x;this.absstarty=this.y;this.pointx=point.pagex;this.pointy=point.pagey;this._execevent('beforescrollstart')},_move:function(e){if(!this.enabled||utils.eventtype[e.type]!==this.initiated){return}if(this.options.preventdefault){e.preventdefault()}var point=e.touches?e.touches[0]:e,deltax=point.pagex-this.pointx,deltay=point.pagey-this.pointy,timestamp=utils.gettime(),newx,newy,absdistx,absdisty;this.pointx=point.pagex;this.pointy=point.pagey;this.distx+=deltax;this.disty+=deltay;absdistx=math.abs(this.distx);absdisty=math.abs(this.disty);if(timestamp-this.endtime>300&&(absdistx<10&&absdisty<10)){return}if(!this.directionlocked&&!this.options.freescroll){if(absdistx>absdisty+this.options.directionlockthreshold){this.directionlocked='h'}else if(absdisty>=absdistx+this.options.directionlockthreshold){this.directionlocked='v'}else{this.directionlocked='n'}}if(this.directionlocked=='h'){if(this.options.eventpassthrough=='vertical'){e.preventdefault()}else if(this.options.eventpassthrough=='horizontal'){this.initiated=false;return}deltay=0}else if(this.directionlocked=='v'){if(this.options.eventpassthrough=='horizontal'){e.preventdefault()}else if(this.options.eventpassthrough=='vertical'){this.initiated=false;return}deltax=0}deltax=this.hashorizontalscroll?deltax:0;deltay=this.hasverticalscroll?deltay:0;newx=this.x+deltax;newy=this.y+deltay;if(newx>0||newx0?0:this.maxscrollx}if(newy>0||newy0?0:this.maxscrolly}this.directionx=deltax>0?-1:deltax<0?1:0;this.directiony=deltay>0?-1:deltay<0?1:0;if(!this.moved){this._execevent('scrollstart')}this.moved=true;this._translate(newx,newy);if(timestamp-this.starttime>300){this.starttime=timestamp;this.startx=this.x;this.starty=this.y}},_end:function(e){if(!this.enabled||utils.eventtype[e.type]!==this.initiated){return}if(this.options.preventdefault&&!utils.preventdefaultexception(e.target,this.options.preventdefaultexception)){e.preventdefault()}var point=e.changedtouches?e.changedtouches[0]:e,momentumx,momentumy,duration=utils.gettime()-this.starttime,newx=math.round(this.x),newy=math.round(this.y),distancex=math.abs(newx-this.startx),distancey=math.abs(newy-this.starty),time=0,easing='';this.isintransition=0;this.initiated=0;this.endtime=utils.gettime();if(this.resetposition(this.options.bouncetime)){return}this.scrollto(newx,newy);if(!this.moved){if(this.options.tap){utils.tap(e,this.options.tap)}if(this.options.click){utils.click(e)}this._execevent('scrollcancel');return}if(this._events.flick&&duration<200&&distancex<100&&distancey<100){this._execevent('flick');return}if(this.options.momentum&&duration<300){momentumx=this.hashorizontalscroll?utils.momentum(this.x,this.startx,duration,this.maxscrollx,this.options.bounce?this.wrapperwidth:0,this.options.deceleration):{destination:newx,duration:0};momentumy=this.hasverticalscroll?utils.momentum(this.y,this.starty,duration,this.maxscrolly,this.options.bounce?this.wrapperheight:0,this.options.deceleration):{destination:newy,duration:0};newx=momentumx.destination;newy=momentumy.destination;time=math.max(momentumx.duration,momentumy.duration);this.isintransition=1}if(this.options.snap){var snap=this._nearestsnap(newx,newy);this.currentpage=snap;time=this.options.snapspeed||math.max(math.max(math.min(math.abs(newx-snap.x),1000),math.min(math.abs(newy-snap.y),1000)),300);newx=snap.x;newy=snap.y;this.directionx=0;this.directiony=0;easing=this.options.bounceeasing}if(newx!=this.x||newy!=this.y){if(newx>0||newx0||newy0){x=0}else if(this.x0){y=0}else if(this.y-1){this._events[type].splice(index,1)}},_execevent:function(type){if(!this._events[type]){return}var i=0,l=this._events[type].length;if(!l){return}for(;i0;var transitiontype=this.options.usetransition&&easing.style;if(!time||transitiontype){if(transitiontype){this._transitiontimingfunction(easing.style);this._transitiontime(time)}this._translate(x,y)}else{this._animate(x,y,time,easing.fn)}},scrolltoelement:function(el,time,offsetx,offsety,easing){el=el.nodetype?el:this.scroller.queryselector(el);if(!el){return}var pos=utils.offset(el);pos.left-=this.wrapperoffset.left;pos.top-=this.wrapperoffset.top;if(offsetx===true){offsetx=math.round(el.offsetwidth/2-this.wrapper.offsetwidth/2)}if(offsety===true){offsety=math.round(el.offsetheight/2-this.wrapper.offsetheight/2)}pos.left-=offsetx||0;pos.top-=offsety||0;pos.left=pos.left>0?0:pos.left0?0:pos.top0){newx--}else if(wheeldeltax<0){newx++}if(wheeldeltay>0){newy--}else if(wheeldeltay<0){newy++}this.gotopage(newx,newy);return}newx=this.x+math.round(this.hashorizontalscroll?wheeldeltax:0);newy=this.y+math.round(this.hasverticalscroll?wheeldeltay:0);this.directionx=wheeldeltax>0?-1:wheeldeltax<0?1:0;this.directiony=wheeldeltay>0?-1:wheeldeltay<0?1:0;if(newx>0){newx=0}else if(newx0){newy=0}else if(newy-this.scrollerwidth){this.pages[i]=[];l=0;y=0;while(y>-this.scrollerheight){this.pages[i][l]={x:math.max(x,this.maxscrollx),y:math.max(y,this.maxscrolly),width:stepx,height:stepy,cx:x-cx,cy:y-cy};y-=stepy;l++}x-=stepx;i++}}else{el=this.options.snap;l=el.length;n=-1;for(;ithis.maxscrollx){m++}}}this.gotopage(this.currentpage.pagex||0,this.currentpage.pagey||0,0);if(this.options.snapthreshold%1===0){this.snapthresholdx=this.options.snapthreshold;this.snapthresholdy=this.options.snapthreshold}else{this.snapthresholdx=math.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].width*this.options.snapthreshold);this.snapthresholdy=math.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].height*this.options.snapthreshold)}});this.on('flick',function(){var time=this.options.snapspeed||math.max(math.max(math.min(math.abs(this.x-this.startx),1000),math.min(math.abs(this.y-this.starty),1000)),300);this.gotopage(this.currentpage.pagex+this.directionx,this.currentpage.pagey+this.directiony,time)})},_nearestsnap:function(x,y){if(!this.pages.length){return{x:0,y:0,pagex:0,pagey:0}}var i=0,l=this.pages.length,m=0;if(math.abs(x-this.absstartx)0){x=0}else if(x0){y=0}else if(y=this.pages[i][0].cx){x=this.pages[i][0].x;break}}l=this.pages[i].length;for(;m=this.pages[0][m].cy){y=this.pages[0][m].y;break}}if(i==this.currentpage.pagex){i+=this.directionx;if(i<0){i=0}else if(i>=this.pages.length){i=this.pages.length-1}x=this.pages[i][0].x}if(m==this.currentpage.pagey){m+=this.directiony;if(m<0){m=0}else if(m>=this.pages[0].length){m=this.pages[0].length-1}y=this.pages[0][m].y}return{x:x,y:y,pagex:i,pagey:m}},gotopage:function(x,y,time,easing){easing=easing||this.options.bounceeasing;if(x>=this.pages.length){x=this.pages.length-1}else if(x<0){x=0}if(y>=this.pages[x].length){y=this.pages[x].length-1}else if(y<0){y=0}var posx=this.pages[x][y].x,posy=this.pages[x][y].y;time=time===undefined?this.options.snapspeed||math.max(math.max(math.min(math.abs(posx-this.x),1000),math.min(math.abs(posy-this.y),1000)),300):time;this.currentpage={x:posx,y:posy,pagex:x,pagey:y};this.scrollto(posx,posy,time,easing)},next:function(time,easing){var x=this.currentpage.pagex,y=this.currentpage.pagey;x++;if(x>=this.pages.length&&this.hasverticalscroll){x=0;y++}this.gotopage(x,y,time,easing)},prev:function(time,easing){var x=this.currentpage.pagex,y=this.currentpage.pagey;x--;if(x<0&&this.hasverticalscroll){x=0;y--}this.gotopage(x,y,time,easing)},_initkeys:function(e){var keys={pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40};var i;if(typeof this.options.keybindings=='object'){for(i in this.options.keybindings){if(typeof this.options.keybindings[i]=='string'){this.options.keybindings[i]=this.options.keybindings[i].touppercase().charcodeat(0)}}}else{this.options.keybindings={}}for(i in keys){this.options.keybindings[i]=this.options.keybindings[i]||keys[i]}utils.addevent(window,'keydown',this);this.on('destroy',function(){utils.removeevent(window,'keydown',this)})},_key:function(e){if(!this.enabled){return}var snap=this.options.snap,newx=snap?this.currentpage.pagex:this.x,newy=snap?this.currentpage.pagey:this.y,now=utils.gettime(),prevtime=this.keytime||0,acceleration=0.250,pos;if(this.options.usetransition&&this.isintransition){pos=this.getcomputedposition();this._translate(math.round(pos.x),math.round(pos.y));this.isintransition=false}this.keyacceleration=now-prevtime<200?math.min(this.keyacceleration+acceleration,50):0;switch(e.keycode){case this.options.keybindings.pageup:if(this.hashorizontalscroll&&!this.hasverticalscroll){newx+=snap?1:this.wrapperwidth}else{newy+=snap?1:this.wrapperheight}break;case this.options.keybindings.pagedown:if(this.hashorizontalscroll&&!this.hasverticalscroll){newx-=snap?1:this.wrapperwidth}else{newy-=snap?1:this.wrapperheight}break;case this.options.keybindings.end:newx=snap?this.pages.length-1:this.maxscrollx;newy=snap?this.pages[0].length-1:this.maxscrolly;break;case this.options.keybindings.home:newx=0;newy=0;break;case this.options.keybindings.left:newx+=snap?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.up:newy+=snap?1:5+this.keyacceleration>>0;break;case this.options.keybindings.right:newx-=snap?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.down:newy-=snap?1:5+this.keyacceleration>>0;break;default:return}if(snap){this.gotopage(newx,newy);return}if(newx>0){newx=0;this.keyacceleration=0}else if(newx0){newy=0;this.keyacceleration=0}else if(newy=desttime){that.isanimating=false;that._translate(destx,desty);if(!that.resetposition(that.options.bouncetime)){that._execevent('scrollend')}return}now=(now-starttime)/duration;easing=easingfn(now);newx=(destx-startx)*easing+startx;newy=(desty-starty)*easing+starty;that._translate(newx,newy);if(that.isanimating){raf(step)}}this.isanimating=true;step()},handleevent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'mspointerdown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'mspointermove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'mspointerup':case'mouseup':case'touchcancel':case'pointercancel':case'mspointercancel':case'mousecancel':this._end(e);break;case'orientationchange':case'resize':this._resize();break;case'transitionend':case'webkittransitionend':case'otransitionend':case'mstransitionend':this._transitionend(e);break;case'wheel':case'dommousescroll':case'mousewheel':this._wheel(e);break;case'keydown':this._key(e);break;case'click':if(this.enabled&&!e._constructed){e.preventdefault();e.stoppropagation()}break}}};function createdefaultscrollbar(direction,interactive,type){var scrollbar=document.createelement('div'),indicator=document.createelement('div');if(type===true){scrollbar.style.csstext='position:absolute;z-index:9999';indicator.style.csstext='-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px'}indicator.classname='iscrollindicator';if(direction=='h'){if(type===true){scrollbar.style.csstext+=';height:7px;left:2px;right:2px;bottom:0';indicator.style.height='100%'}scrollbar.classname='iscrollhorizontalscrollbar'}else{if(type===true){scrollbar.style.csstext+=';width:7px;bottom:2px;top:2px;right:1px';indicator.style.width='100%'}scrollbar.classname='iscrollverticalscrollbar'}scrollbar.style.csstext+=';overflow:hidden';if(!interactive){scrollbar.style.pointerevents='none'}scrollbar.appendchild(indicator);return scrollbar}function indicator(scroller,options){this.wrapper=typeof options.el=='string'?document.queryselector(options.el):options.el;this.wrapperstyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorstyle=this.indicator.style;this.scroller=scroller;this.options={listenx:true,listeny:true,interactive:false,resize:true,defaultscrollbars:false,shrink:false,fade:false,speedratiox:0,speedratioy:0};for(var i in options){this.options[i]=options[i]}this.sizeratiox=1;this.sizeratioy=1;this.maxposx=0;this.maxposy=0;if(this.options.interactive){if(!this.options.disabletouch){utils.addevent(this.indicator,'touchstart',this);utils.addevent(window,'touchend',this)}if(!this.options.disablepointer){utils.addevent(this.indicator,utils.prefixpointerevent('pointerdown'),this);utils.addevent(window,utils.prefixpointerevent('pointerup'),this)}if(!this.options.disablemouse){utils.addevent(this.indicator,'mousedown',this);utils.addevent(window,'mouseup',this)}}if(this.options.fade){this.wrapperstyle[utils.style.transform]=this.scroller.translatez;var durationprop=utils.style.transitionduration;if(!durationprop){return}this.wrapperstyle[durationprop]=utils.isbadandroid?'0.0001ms':'0ms';var self=this;if(utils.isbadandroid){raf(function(){if(self.wrapperstyle[durationprop]==='0.0001ms'){self.wrapperstyle[durationprop]='0s'}})}this.wrapperstyle.opacity='0'}}indicator.prototype={handleevent:function(e){switch(e.type){case'touchstart':case'pointerdown':case'mspointerdown':case'mousedown':this._start(e);break;case'touchmove':case'pointermove':case'mspointermove':case'mousemove':this._move(e);break;case'touchend':case'pointerup':case'mspointerup':case'mouseup':case'touchcancel':case'pointercancel':case'mspointercancel':case'mousecancel':this._end(e);break}},destroy:function(){if(this.options.fadescrollbars){cleartimeout(this.fadetimeout);this.fadetimeout=null}if(this.options.interactive){utils.removeevent(this.indicator,'touchstart',this);utils.removeevent(this.indicator,utils.prefixpointerevent('pointerdown'),this);utils.removeevent(this.indicator,'mousedown',this);utils.removeevent(window,'touchmove',this);utils.removeevent(window,utils.prefixpointerevent('pointermove'),this);utils.removeevent(window,'mousemove',this);utils.removeevent(window,'touchend',this);utils.removeevent(window,utils.prefixpointerevent('pointerup'),this);utils.removeevent(window,'mouseup',this)}if(this.options.defaultscrollbars){this.wrapper.parentnode.removechild(this.wrapper)}},_start:function(e){var point=e.touches?e.touches[0]:e;e.preventdefault();e.stoppropagation();this.transitiontime();this.initiated=true;this.moved=false;this.lastpointx=point.pagex;this.lastpointy=point.pagey;this.starttime=utils.gettime();if(!this.options.disabletouch){utils.addevent(window,'touchmove',this)}if(!this.options.disablepointer){utils.addevent(window,utils.prefixpointerevent('pointermove'),this)}if(!this.options.disablemouse){utils.addevent(window,'mousemove',this)}this.scroller._execevent('beforescrollstart')},_move:function(e){var point=e.touches?e.touches[0]:e,deltax,deltay,newx,newy,timestamp=utils.gettime();if(!this.moved){this.scroller._execevent('scrollstart')}this.moved=true;deltax=point.pagex-this.lastpointx;this.lastpointx=point.pagex;deltay=point.pagey-this.lastpointy;this.lastpointy=point.pagey;newx=this.x+deltax;newy=this.y+deltay;this._pos(newx,newy);e.preventdefault();e.stoppropagation()},_end:function(e){if(!this.initiated){return}this.initiated=false;e.preventdefault();e.stoppropagation();utils.removeevent(window,'touchmove',this);utils.removeevent(window,utils.prefixpointerevent('pointermove'),this);utils.removeevent(window,'mousemove',this);if(this.scroller.options.snap){var snap=this.scroller._nearestsnap(this.scroller.x,this.scroller.y);var time=this.options.snapspeed||math.max(math.max(math.min(math.abs(this.scroller.x-snap.x),1000),math.min(math.abs(this.scroller.y-snap.y),1000)),300);if(this.scroller.x!=snap.x||this.scroller.y!=snap.y){this.scroller.directionx=0;this.scroller.directiony=0;this.scroller.currentpage=snap;this.scroller.scrollto(snap.x,snap.y,time,this.scroller.options.bounceeasing)}}if(this.moved){this.scroller._execevent('scrollend')}},transitiontime:function(time){time=time||0;var durationprop=utils.style.transitionduration;if(!durationprop){return}this.indicatorstyle[durationprop]=time+'ms';if(!time&&utils.isbadandroid){this.indicatorstyle[durationprop]='0.0001ms';var self=this;raf(function(){if(self.indicatorstyle[durationprop]==='0.0001ms'){self.indicatorstyle[durationprop]='0s'}})}},transitiontimingfunction:function(easing){this.indicatorstyle[utils.style.transitiontimingfunction]=easing},refresh:function(){this.transitiontime();if(this.options.listenx&&!this.options.listeny){this.indicatorstyle.display=this.scroller.hashorizontalscroll?'block':'none'}else if(this.options.listeny&&!this.options.listenx){this.indicatorstyle.display=this.scroller.hasverticalscroll?'block':'none'}else{this.indicatorstyle.display=this.scroller.hashorizontalscroll||this.scroller.hasverticalscroll?'block':'none'}if(this.scroller.hashorizontalscroll&&this.scroller.hasverticalscroll){utils.addclass(this.wrapper,'iscrollbothscrollbars');utils.removeclass(this.wrapper,'iscrolllonescrollbar');if(this.options.defaultscrollbars&&this.options.customstyle){if(this.options.listenx){this.wrapper.style.right='8px'}else{this.wrapper.style.bottom='8px'}}}else{utils.removeclass(this.wrapper,'iscrollbothscrollbars');utils.addclass(this.wrapper,'iscrolllonescrollbar');if(this.options.defaultscrollbars&&this.options.customstyle){if(this.options.listenx){this.wrapper.style.right='2px'}else{this.wrapper.style.bottom='2px'}}}var r=this.wrapper.offsetheight;if(this.options.listenx){this.wrapperwidth=this.wrapper.clientwidth;if(this.options.resize){this.indicatorwidth=math.max(math.round(this.wrapperwidth*this.wrapperwidth/(this.scroller.scrollerwidth||this.wrapperwidth||1)),8);this.indicatorstyle.width=this.indicatorwidth+'px'}else{this.indicatorwidth=this.indicator.clientwidth}this.maxposx=this.wrapperwidth-this.indicatorwidth;if(this.options.shrink=='clip'){this.minboundaryx=-this.indicatorwidth+8;this.maxboundaryx=this.wrapperwidth-8}else{this.minboundaryx=0;this.maxboundaryx=this.maxposx}this.sizeratiox=this.options.speedratiox||(this.scroller.maxscrollx&&(this.maxposx/this.scroller.maxscrollx))}if(this.options.listeny){this.wrapperheight=this.wrapper.clientheight;if(this.options.resize){this.indicatorheight=math.max(math.round(this.wrapperheight*this.wrapperheight/(this.scroller.scrollerheight||this.wrapperheight||1)),8);this.indicatorstyle.height=this.indicatorheight+'px'}else{this.indicatorheight=this.indicator.clientheight}this.maxposy=this.wrapperheight-this.indicatorheight;if(this.options.shrink=='clip'){this.minboundaryy=-this.indicatorheight+8;this.maxboundaryy=this.wrapperheight-8}else{this.minboundaryy=0;this.maxboundaryy=this.maxposy}this.maxposy=this.wrapperheight-this.indicatorheight;this.sizeratioy=this.options.speedratioy||(this.scroller.maxscrolly&&(this.maxposy/this.scroller.maxscrolly))}this.updateposition()},updateposition:function(){var x=this.options.listenx&&math.round(this.sizeratiox*this.scroller.x)||0,y=this.options.listeny&&math.round(this.sizeratioy*this.scroller.y)||0;if(!this.options.ignoreboundaries){if(xthis.maxboundaryx){if(this.options.shrink=='scale'){this.width=math.max(this.indicatorwidth-(x-this.maxposx),8);this.indicatorstyle.width=this.width+'px';x=this.maxposx+this.indicatorwidth-this.width}else{x=this.maxboundaryx}}else if(this.options.shrink=='scale'&&this.width!=this.indicatorwidth){this.width=this.indicatorwidth;this.indicatorstyle.width=this.width+'px'}if(ythis.maxboundaryy){if(this.options.shrink=='scale'){this.height=math.max(this.indicatorheight-(y-this.maxposy)*3,8);this.indicatorstyle.height=this.height+'px';y=this.maxposy+this.indicatorheight-this.height}else{y=this.maxboundaryy}}else if(this.options.shrink=='scale'&&this.height!=this.indicatorheight){this.height=this.indicatorheight;this.indicatorstyle.height=this.height+'px'}}this.x=x;this.y=y;if(this.scroller.options.usetransform){this.indicatorstyle[utils.style.transform]='translate('+x+'px,'+y+'px)'+this.scroller.translatez}else{this.indicatorstyle.left=x+'px';this.indicatorstyle.top=y+'px'}},_pos:function(x,y){if(x<0){x=0}else if(x>this.maxposx){x=this.maxposx}if(y<0){y=0}else if(y>this.maxposy){y=this.maxposy}x=this.options.listenx?math.round(x/this.sizeratiox):this.scroller.x;y=this.options.listeny?math.round(y/this.sizeratioy):this.scroller.y;this.scroller.scrollto(x,y)},fade:function(val,hold){if(hold&&!this.visible){return}cleartimeout(this.fadetimeout);this.fadetimeout=null;var time=val?250:500,delay=val?0:300;val=val?'1':'0';this.wrapperstyle[utils.style.transitionduration]=time+'ms';this.fadetimeout=settimeout((function(val){this.wrapperstyle.opacity=val;this.visible=+val}).bind(this,val),delay)}};iscroll.utils=utils;if(typeof module!='undefined'&&module.exports){module.exports=iscroll}else if(typeof define=='function'&&define.amd){define(function(){return iscroll})}else{window.iscroll=iscroll}})(window,document,math); /* * 移动端模拟导航可点击自动滑动 0.1.4 * date: 2017-01-11 * by: xiewei * 导航可左右滑动,可点击边缘的一个,自动滚动下一个到可视范围【依赖于iscroll.js】 */ (function ($) { $.fn.navbarscroll = function (options) { //各种属性、参数 var _defaults = { classname:'cur', //当前选中点击元素的class类名 clickscrolltime:300, //点击后滑动时间 duibiscreenwidth:0.4, //单位以rem为准,默认为0.4rem scrollerwidth:3, //单位以px为准,默认为3,[仅用于特殊情况:外层宽度因为小数点造成的不精准情况] defaultselect:0, //初始选中第n个,默认第0个 fingerclick:0, //目标第0或1个选项触发,必须每一项长度一致,方可用此项 endclickscroll:function(thisobj){}//回调函数 } var _opt = $.extend(_defaults, options); this.each(function () { //插件实现代码 var _wrapper = $(this); var _win = $(window); var _win_width = _win.width(),_wrapper_width = _wrapper.width(),_wrapper_off_left = _wrapper.offset().left; var _wrapper_off_right=_win_width-_wrapper_off_left-_wrapper_width; var _obj_scroller = _wrapper.children('.scroller'); var _obj_ul = _obj_scroller.children('ul'); var _obj_li = _obj_ul.children('li'); var _scroller_w = 0; _obj_li.css({"margin-left":"0","margin-right":"0"}); for (var i = 0; i < _obj_li.length; i++) { _scroller_w += _obj_li[i].offsetwidth; } _obj_scroller.width(_scroller_w+_opt.scrollerwidth); var myscroll = new iscroll('#'+_wrapper.attr('id'), { eventpassthrough: true, scrollx: true, scrolly: false, preventdefault: false }); _init(_obj_li.eq(_opt.defaultselect)); _obj_li.click(function(){ _init($(this)); }); //解决pc端谷歌浏览器模拟的手机屏幕出现莫名的卡顿现象,滑动时禁止默认事件(2017-01-11) _wrapper[0].addeventlistener('touchmove',function (e){e.preventdefault();},false); function _init(thiobj){ var $this_obj=thiobj; var duibi=_opt.duibiscreenwidth*_win_width/10,this_index=$this_obj.index(),this_off_left=$this_obj.offset().left,this_pos_left=$this_obj.position().left,this_width=$this_obj.width(),this_prev_width=$this_obj.prev('li').width(),this_next_width=$this_obj.next('li').width(); var this_off_right=_win_width-this_off_left-this_width; if(_scroller_w+2>_wrapper_width){ if(_opt.fingerclick==1){ if(this_index==1){ myscroll.scrollto(-this_pos_left+this_prev_width,0, _opt.clickscrolltime); }else if(this_index==0){ myscroll.scrollto(-this_pos_left,0, _opt.clickscrolltime); }else if(this_index==_obj_li.length-2){ myscroll.scrollby(this_off_right-_wrapper_off_right-this_width,0, _opt.clickscrolltime); }else if(this_index==_obj_li.length-1){ myscroll.scrollby(this_off_right-_wrapper_off_right,0, _opt.clickscrolltime); }else{ if(this_off_left-_wrapper_off_left-(this_width*_opt.fingerclick)1||this_off_right-_wrapper_off_right<-1){ myscroll.scrollby(this_off_right-_wrapper_off_right,0, _opt.clickscrolltime); } }else{ if(this_off_left-_wrapper_off_left