//判断是否是IE浏览器,包括Edge浏览器 var userAgent = navigator.userAgent; if (!!window.ActiveXObject || "ActiveXObject" in window){ //console.log('ie'); }else if (userAgent.indexOf("Edge") > -1) { //console.log('Edge'); }else { if($(window).width()>=1024){ !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*p-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>60){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); } } /*! pace 0.4.17 */ /* (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V=[].slice,W={}.hasOwnProperty,X=function(a,b){function c(){this.constructor=a}for(var d in b)W.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},Y=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(t={catchupTime:500,initialRate:.03,minTime:500,ghostTime:500,maxProgressPerFrame:10,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!1}},B=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance?"function"==typeof performance.now?performance.now():void 0:void 0)?a:+new Date},D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,s=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==D&&(D=function(a){return setTimeout(a,50)},s=function(a){return clearTimeout(a)}),F=function(a){var b,c;return b=B(),(c=function(){var d;return d=B()-b,d>=33?(b=B(),a(d,function(){return D(c)})):setTimeout(c,33-d)})()},E=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?V.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},u=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?V.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)W.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?u(b[a],e):b[a]=e);return b},p=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},w=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];cO;O++)I=S[O],C[I]===!0&&(C[I]=t[I]);i=function(a){function b(){return T=b.__super__.constructor.apply(this,arguments)}return X(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(C.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace("pace-done",""),document.body.className+=" pace-running",this.el.innerHTML='
\n
\n
\n

威尼斯wns·8885556有限公司欢迎您...

',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b;return null==document.querySelector(C.target)?!1:(a=this.getElement(),a.children[0].style.width=""+this.progress+"%",(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?b="99":(b=this.progress<10?"0":"",b+=0|this.progress),a.children[0].setAttribute("data-progress",""+b)),this.lastRenderedProgress=this.progress)},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),N=window.XMLHttpRequest,M=window.XDomainRequest,L=window.WebSocket,v=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],null==a[d]&&"function"!=typeof e?f.push(a[d]=e):f.push(void 0)}catch(g){c=g}return f},z=[],Pace.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?V.call(arguments,1):[],z.unshift("ignore"),c=b.apply(null,a),z.shift(),c},Pace.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?V.call(arguments,1):[],z.unshift("track"),c=b.apply(null,a),z.shift(),c},H=function(a){var b;if(null==a&&(a="GET"),"track"===z[0])return"force";if(!z.length&&C.ajax){if("socket"===a&&C.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),Y.call(C.ajax.trackMethods,b)>=0)return!0}return!1},j=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return H(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new N(b),a(c),c},v(window.XMLHttpRequest,N),null!=M&&(window.XDomainRequest=function(){var b;return b=new M,a(b),b},v(window.XDomainRequest,M)),null!=L&&C.ajax.trackWebSockets&&(window.WebSocket=function(a,b){var d;return d=new L(a,b),H("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d},v(window.WebSocket,L))}return X(b,a),b}(h),P=null,x=function(){return null==P&&(P=new j),P},x().on("request",function(b){var c,d,e,f;return f=b.type,e=b.request,Pace.running||C.restartOnRequestAfter===!1&&"force"!==H(f)?void 0:(d=arguments,c=C.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,j;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(Pace.restart(),i=Pace.sources,j=[],c=0,g=i.length;g>c;c++){if(I=i[c],I instanceof a){I.watch.apply(I,d);break}j.push(void 0)}return j}},c))}),a=function(){function a(){var a=this;this.elements=[],x().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d;return d=a.type,b=a.request,c="socket"===d?new m(b):new n(b),this.elements.push(c)},a}(),n=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2}),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100});else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),m=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100})}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},C.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=B(),b=setInterval(function(){var g;return g=B()-c-50,c=B(),e.push(g),e.length>C.eventLag.sampleCount&&e.shift(),a=p(e),++d>=C.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/C.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,C.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+C.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),J=null,G=null,q=null,K=null,o=null,r=null,Pace.running=!1,y=function(){return C.restartOnPushState?Pace.restart():void 0},null!=window.history.pushState&&(R=window.history.pushState,window.history.pushState=function(){return y(),R.apply(window.history,arguments)}),null!=window.history.replaceState&&(U=window.history.replaceState,window.history.replaceState=function(){return y(),U.apply(window.history,arguments)}),k={ajax:a,elements:d,document:c,eventLag:f},(A=function(){var a,c,d,e,f,g,h,i;for(Pace.sources=J=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],C[a]!==!1&&J.push(new k[a](C[a]));for(i=null!=(h=C.extraSources)?h:[],d=0,f=i.length;f>d;d++)I=i[d],J.push(new I(C));return Pace.bar=q=new b,G=[],K=new l})(),Pace.stop=function(){return Pace.trigger("stop"),Pace.running=!1,q.destroy(),r=!0,null!=o&&("function"==typeof s&&s(o),o=null),A()},Pace.restart=function(){return Pace.trigger("restart"),Pace.stop(),Pace.start()},Pace.go=function(){return Pace.running=!0,q.render(),r=!1,o=F(function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v;for(j=100-q.progress,d=o=0,e=!0,h=p=0,t=J.length;t>p;h=++p)for(I=J[h],m=null!=G[h]?G[h]:G[h]=[],g=null!=(v=I.elements)?v:[I],i=s=0,u=g.length;u>s;i=++s)f=g[i],k=null!=m[i]?m[i]:m[i]=new l(f),e&=k.done,k.done||(d++,o+=k.tick(a));return c=o/d,q.update(K.tick(a,c)),n=B(),q.done()||e||r?(q.update(100),Pace.trigger("done"),setTimeout(function(){return q.finish(),Pace.running=!1,Pace.trigger("hide")},Math.max(C.ghostTime,Math.min(C.minTime,B()-n)))):b()})},Pace.start=function(a){u(C,a),Pace.running=!0;try{q.render()}catch(b){i=b}return document.querySelector(".pace")?(Pace.trigger("start"),Pace.go()):setTimeout(Pace.start,50)},"function"==typeof define&&define.amd?define(function(){return Pace}):"object"==typeof exports?module.exports=Pace:C.startOnPageLoad&&Pace.start()}).call(this); */ //锚链接 smoothscroll /*使用方法链接导航锚链接*/ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7(a,b){6(12 1r===\'7\'&&1r.2j){1r([],b(a))}Z 6(12 1O===\'S\'){2o.1O=b(a)}Z{a.2K=b(a)}})(12 1f!==\'2k\'?1f:24.1w||24.1f,7(u){\'37 2g\';3 v={};3 w=\'13\'1e L&&\'1g\'1e u;3 x,T,N,O,X;3 y={1P:\'[1o-1H]\',1s:\'[1o-1H-2n]\',1L:2H,1x:\'1V\',1Q:0,1E:11,1A:7(){}};3 z=7(){3 c={};3 d=Q;3 i=0;3 e=1d.14;6(V.15.17.18(1d[0])===\'[S 2L]\'){d=1d[0];i++}3 f=7(a){1p(3 b 1e a){6(V.15.2i.18(a,b)){6(d&&V.15.17.18(a[b])===\'[S V]\'){c[b]=z(11,c[b],a[b])}Z{c[b]=a[b]}}}};1p(;i1){1n=11;e[1]=e[1].1R(/"/g,\'\').1R(/\'/g,\'\')}}1p(;a&&a!==L&&a.2I===1;a=a.2J){6(c===\'.\'){6(d){6(a.1G.1S(b.Y(1))){9 a}}Z{6(1U 2U(\'(^|\\\\s)\'+b.Y(1)+\'(\\\\s|$)\').38(a.29)){9 a}}}6(c===\'#\'){6(a.2d===b.Y(1)){9 a}}6(c===\'[\'){6(a.2e(e[0])){6(1n){6(a.1W(e[0])===e[1]){9 a}}Z{9 a}}}6(a.1Z.20()===b){9 a}}9 M};v.1t=7(a){6(a.1c(0)===\'#\'){a=a.Y(1)}3 b=2m(a);3 c=b.14;3 d=-1;3 e;3 f=\'\';3 g=b.1u(0);1v(++d=2E&&e<=2F)||e==2G||(d===0&&e>=1i&&e<=1j)||(d===1&&e>=1i&&e<=1j&&g===1z)){f+=\'\\\\\'+e.17(16)+\' \';1B}6(e>=2M||e===1z||e===2N||e>=1i&&e<=1j||e>=2O&&e<=2P||e>=2Q&&e<=2S){f+=b.1c(d);1B}f+=\'\\\\\'+b.1c(d)}9\'#\'+f};3 C=7(a,b){3 c;6(a===\'2W\')c=b*b;6(a===\'33\')c=b*(2-b);6(a===\'36\')c=b<0.5?2*b*b:-1+(4-2*b)*b;6(a===\'39\')c=b*b*b;6(a===\'25\')c=(--b)*b*b+1;6(a===\'1V\')c=b<0.5?4*b*b*b:(b-1)*(2*b-2)*(2*b-2)+1;6(a===\'26\')c=b*b*b*b;6(a===\'27\')c=1-(--b)*b*b*b;6(a===\'28\')c=b<0.5?8*b*b*b*b:1-8*(--b)*b*b*b;6(a===\'2a\')c=b*b*b*b*b;6(a===\'2b\')c=1+(--b)*b*b*b*b;6(a===\'2c\')c=b<0.5?16*b*b*b*b*b:1+16*(--b)*b*b*b*b;9 c||b};3 D=7(a,b,c){3 d=0;6(a.1C){2f{d+=a.1D;a=a.1C}1v(a)}d=R.1a(d-b-c,0);9 R.2h(d,F()-E())};3 E=7(){9 R.1a(L.P.1b,1w.1F||0)};3 F=7(){9 R.1a(u.L.1l.1k,u.L.P.1k,u.L.1l.1h,u.L.P.1h,u.L.1l.1b,u.L.P.1b)};3 G=7(a){9!a||!(12 1m===\'S\'&&12 1m.1I===\'7\')?{}:1m.1I(a)};3 H=7(a,b){6(u.1J.1K&&(b||b===\'11\')&&u.W.1M!==\'2u:\'){u.1J.1K(M,M,[u.W.1M,\'//\',u.W.2v,u.W.2w,u.W.2x,a].2y(\'\'))}};3 I=7(a){9 a===M?0:(A(a)+a.1D)};v.1N=7(e,f,g){3 h=G(f?f.1W(\'1o-2B\'):M);3 i=z(x||y,g||{},h);3 j=V.15.17.18(e)===\'[S 2D]\'?11:Q;3 k=j?M:(e===\'#\'?u.L.P:u.L.13(e));6(!j&&!k)9;3 l=u.1q;6(!N){N=u.L.13(i.1s)}6(!O){O=I(N)}3 m=j?e:D(k,O,1T(i.1Q,10));3 n=m-l;3 o=F();3 p=0;3 q,19;6(!j){H(e,i.1E)}3 r=7(a,b,c){3 d=u.1q;6(a==b||d==b||((u.1F+d)>=o)){1X(c);6(!j){k.2R()}i.1A(e,f)}};3 s=7(){p+=16;q=(p/1T(i.1L,10));q=(q>1)?1:q;19=l+(n*C(i.1x,q));u.1Y(0,R.2T(19));r(19,m,X)};3 t=7(){1X(X);X=2V(s,16)};6(u.1q===0){u.1Y(0,0)}t()};3 J=7(a){6(a.2X!==0||a.2Y||a.2Z)9;3 b=B(a.30,x.1P);6(b&&b.1Z.20()===\'a\'){a.31();3 c=v.1t(b.32);v.1N(c,b,x)}};3 K=7(a){6(!T){T=34(7(){T=M;O=I(N)},35)}};v.21=7(){6(!x)9;u.L.22(\'23\',J,Q);u.22(\'1y\',K,Q);x=M;T=M;N=M;O=M;X=M};v.2l=7(a){6(!w)9;v.21();x=z(y,a||{});N=u.L.13(x.1s);O=I(N);u.L.1g(\'23\',J,Q);6(N){u.1g(\'1y\',K,Q)}};9 v});',62,197,'|||var|||if|function||return||||||||||||||||||||||||||||||||||||||document|null|fixedHeader|headerHeight|documentElement|false|Math|object|eventTimeout||Object|location|animationInterval|substr|else||true|typeof|querySelector|length|prototype||toString|call|position|max|clientHeight|charAt|arguments|in|global|addEventListener|offsetHeight|0x0030|0x0039|scrollHeight|body|JSON|value|data|for|pageYOffset|define|selectorHeader|escapeCharacters|charCodeAt|while|window|easing|resize|0x002D|callback|continue|offsetParent|offsetTop|updateURL|innerHeight|classList|scroll|parse|history|pushState|speed|protocol|animateScroll|exports|selector|offset|replace|contains|parseInt|new|easeInOutCubic|getAttribute|clearInterval|scrollTo|tagName|toLowerCase|destroy|removeEventListener|click|this|easeOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|className|easeInQuint|easeOutQuint|easeInOutQuint|id|hasAttribute|do|strict|min|hasOwnProperty|amd|undefined|init|String|header|module|split|throw|InvalidCharacterError|Invalid|character|file|host|pathname|search|join|the|input|options|0000|Number|0x0001|0x001F|0x007F|500|nodeType|parentNode|smoothScroll|Boolean|0x0080|0x005F|0x0041|0x005A|0x0061|focus|0x007A|floor|RegExp|setInterval|easeInQuad|button|metaKey|ctrlKey|target|preventDefault|hash|easeOutQuad|setTimeout|66|easeInOutQuad|use|test|easeInCubic|0x0000'.split('|'),0,{})); /*wow*/ /*! WOW - v1.0.1 - 2014-09-03 * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(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); /*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); /*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'+item+''+after});t.empty().append(inject)}}var methods={init:function(){return this.each(function(){injector($(this),'','char','')})},words:function(){return this.each(function(){injector($(this),' ','word',' ')})},lines:function(){return this.each(function(){var r="eefec303079ad17405c889e092e105b0";injector($(this).children("br").replaceWith(r).end(),r,'line','')})}};$.fn.lettering=function(method){if(method&&methods[method]){return methods[method].apply(this,[].slice.call(arguments,1))}else if(method==='letters'||!method){return methods.init.apply(this,[].slice.call(arguments,0))}$.error('Method '+method+' does not exist on jQuery.lettering');return this}})(jQuery); /*textillate.js*/ (function($){"use strict";function isInEffect(effect){return/In/.test(effect)||$.inArray(effect,$.fn.textillate.defaults.inEffects)>=0};function isOutEffect(effect){return/Out/.test(effect)||$.inArray(effect,$.fn.textillate.defaults.outEffects)>=0};function getData(node){var attrs=node.attributes||[],data={};if(!attrs.length)return data;$.each(attrs,function(i,attr){if(/^data-in-*/.test(attr.nodeName)){data.in=data.in||{};data.in[attr.nodeName.replace(/data-in-/,'')]=attr.nodeValue}else if(/^data-out-*/.test(attr.nodeName)){data.out=data.out||{};data.out[attr.nodeName.replace(/data-out-/,'')]=attr.nodeValue}else if(/^data-*/.test(attr.nodeName)){data[attr.nodeName]=attr.nodeValue}});return data};function shuffle(o){for(var j,x,i=o.length;i;j=parseInt(Math.random()*i),x=o[--i],o[i]=o[j],o[j]=x);return o};function animate($c,effect,cb){$c.addClass('animated '+effect).css('visibility','visible').show();$c.one('animationend webkitAnimationEnd oAnimationEnd',function(){$c.removeClass('animated '+effect);cb&&cb()})};function animateChars($chars,options,cb){var that=this,count=$chars.length;if(!count){cb&&cb();return};if(options.shuffle)$chars=shuffle($chars);if(options.reverse)$chars=$chars.toArray().reverse();$.each($chars,function(i,c){var $char=$(c);function complete(){if(isInEffect(options.effect)){$char.css('visibility','visible')}else if(isOutEffect(options.effect)){$char.css('visibility','hidden')}count-=1;if(!count&&cb)cb()};var delay=options.sync?options.delay:options.delay*i*options.delayScale;$char.text()?setTimeout(function(){animate($char,options.effect,complete)},delay):complete()})};var Textillate=function(element,options){var base=this,$element=$(element);base.init=function(){base.$texts=$element.find(options.selector);if(!base.$texts.length){base.$texts=$('
  • '+$element.html()+'
');$element.html(base.$texts)};base.$texts.hide();base.$current=$('').text(base.$texts.find(':first-child').html()).prependTo($element);if(isInEffect(options.in.effect)){base.$current.css('visibility','hidden')}else if(isOutEffect(options.out.effect)){base.$current.css('visibility','visible')};base.setOptions(options);base.timeoutRun=null;setTimeout(function(){base.options.autoStart&&base.start()},base.options.initialDelay)};base.setOptions=function(options){base.options=options};base.triggerEvent=function(name){var e=$.Event(name+'.tlt');$element.trigger(e,base);return e};base.in=function(index,cb){index=index||0;var $elem=base.$texts.find(':nth-child('+(index+1)+')'),options=$.extend({},base.options,getData($elem)),$chars;$elem.addClass('current');base.triggerEvent('inAnimationBegin');base.$current.text($elem.html()).lettering('words');base.$current.find('[class^="word"]').css({'display':'inline-block','-webkit-transform':'translate3d(0,0,0)','-moz-transform':'translate3d(0,0,0)','-o-transform':'translate3d(0,0,0)','transform':'translate3d(0,0,0)'}).each(function(){$(this).lettering()});$chars=base.$current.find('[class^="char"]').css('display','inline-block');if(isInEffect(options.in.effect)){$chars.css('visibility','hidden')}else if(isOutEffect(options.in.effect)){$chars.css('visibility','visible')};base.currentIndex=index;animateChars($chars,options.in,function(){base.triggerEvent('inAnimationEnd');if(options.in.callback)options.in.callback();if(cb)cb(base)})};base.out=function(cb){var $elem=base.$texts.find(':nth-child('+(base.currentIndex+1)+')'),$chars=base.$current.find('[class^="char"]'),options=$.extend({},base.options,getData($elem));base.triggerEvent('outAnimationBegin');animateChars($chars,options.out,function(){$elem.removeClass('current');base.triggerEvent('outAnimationEnd');if(options.out.callback)options.out.callback();if(cb)cb(base)})};base.start=function(index){base.triggerEvent('start');(function run(index){base.in(index,function(){var length=base.$texts.children().length;index+=1;if(!base.options.loop&&index>=length){if(base.options.callback)base.options.callback();base.triggerEvent('end')}else{index=index%length;base.timeoutRun=setTimeout(function(){base.out(function(){run(index)})},base.options.minDisplayTime)}})}(index||0))};base.stop=function(){if(base.timeoutRun){clearInterval(base.timeoutRun);base.timeoutRun=null}};base.init()};$.fn.textillate=function(settings,args){return this.each(function(){var $this=$(this),data=$this.data('textillate'),options=$.extend(true,{},$.fn.textillate.defaults,getData(this),typeof settings=='object'&&settings);if(!data){$this.data('textillate',(data=new Textillate(this,options)))}else if(typeof settings=='string'){data[settings].apply(data,[].concat(args))}else{data.setOptions.call(data,options)}})};$.fn.textillate.defaults={selector:'.texts',loop:false,minDisplayTime:2000,initialDelay:0,in:{effect:'fadeInLeftBig',delayScale:1.5,delay:50,sync:false,reverse:false,shuffle:false,callback:function(){}},out:{effect:'hinge',delayScale:1.5,delay:50,sync:false,reverse:false,shuffle:false,callback:function(){}},autoStart:true,inEffects:[],outEffects:['hinge'],callback:function(){}}}(jQuery)); /*imgloaded*/ (function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); /*数字递减 data-to='300' data-speed='1500' class="timer"*/ $.fn.countTo = function(options) { options = options || {}; return $(this).each(function() { var settings = $.extend({}, $.fn.countTo.defaults, { from: $(this).data('from'), to: $(this).data('to'), speed: $(this).data('speed'), refreshInterval: $(this).data('refresh-interval'), decimals: $(this).data('decimals') }, options); var loops = Math.ceil(settings.speed / settings.refreshInterval), increment = (settings.to - settings.from) / loops; var self = this, $self = $(this), loopCount = 0, value = settings.from, data = $self.data('countTo') || {}; $self.data('countTo', data); if (data.interval) { clearInterval(data.interval) } data.interval = setInterval(updateTimer, settings.refreshInterval); render(value); function updateTimer() { value += increment; loopCount++; render(value); if (typeof(settings.onUpdate) == 'function') { settings.onUpdate.call(self, value) } if (loopCount >= loops) { $self.removeData('countTo'); clearInterval(data.interval); value = settings.to; if (typeof(settings.onComplete) == 'function') { settings.onComplete.call(self, value) } } } function render(value) { var formattedValue = settings.formatter.call(self, value, settings); $self.html(formattedValue) } }) }; $.fn.countTo.defaults = { from: 0, to: 0, speed: 1000, refreshInterval: 100, decimals: 0, formatter: formatter, onUpdate: null, onComplete: null }; function formatter(value, settings) { return value.toFixed(settings.decimals) }