//判断是否是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

成都卫士通信息产业股份有限公司欢迎您...

',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_leftsettings.failure_limit){return false;}}});} if(options){if(undefined!==options.failurelimit){options.failure_limit=options.failurelimit;delete options.failurelimit;} if(undefined!==options.effectspeed){options.effect_speed=options.effectspeed;delete options.effectspeed;} $.extend(settings,options);} $container=(settings.container===undefined||settings.container===window)?$window:$(settings.container);if(0===settings.event.indexof("scroll")){$container.bind(settings.event,function(){return update();});} this.each(function(){var self=this;var $self=$(self);self.loaded=false;if($self.attr("src")===undefined||$self.attr("src")===false){if($self.is("img")){$self.attr("src",settings.placeholder);}} $self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings);} $("").bind("load",function(){var original=$self.attr("data-"+settings.data_attribute);$self.hide();if($self.is("img")){$self.attr("src",original);}else{$self.css("background-image","url('"+original+"')");} $self[settings.effect](settings.effect_speed);self.loaded=true;var temp=$.grep(elements,function(element){return!element.loaded;});elements=$(temp);if(settings.load){var elements_left=elements.length;settings.load.call(self,elements_left,settings);}}).attr("src",$self.attr("data-"+settings.data_attribute));}});if(0!==settings.event.indexof("scroll")){$self.bind(settings.event,function(){if(!self.loaded){$self.trigger("appear");}});}});$window.bind("resize",function(){update();});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appversion)){$window.bind("pageshow",function(event){if(event.originalevent&&event.originalevent.persisted){elements.each(function(){$(this).trigger("appear");});}});} $(document).ready(function(){update();});return this;};$.belowthefold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=(window.innerheight?window.innerheight:$window.height())+$window.scrolltop();}else{fold=$(settings.container).offset().top+$(settings.container).height();} return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.width()+$window.scrollleft();}else{fold=$(settings.container).offset().left+$(settings.container).width();} return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrolltop();}else{fold=$(settings.container).offset().top;} return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollleft();}else{fold=$(settings.container).offset().left;} return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.inviewport=function(element,settings){return!$.rightoffold(element,settings)&&!$.leftofbegin(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings);};$.extend($.expr[":"],{"below-the-fold":function(a){return $.belowthefold(a,{threshold:0});},"above-the-top":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-screen":function(a){return $.rightoffold(a,{threshold:0});},"left-of-screen":function(a){return!$.rightoffold(a,{threshold:0});},"in-viewport":function(a){return $.inviewport(a,{threshold:0});},"above-the-fold":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-fold":function(a){return $.rightoffold(a,{threshold:0});},"left-of-fold":function(a){return!$.rightoffold(a,{threshold:0});}});})(jquery,window,document); /*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) } console.log('\n\n%c技术支持 %c爱诚科技\nhttp://www.ac57.com','color:blue','color:red');