/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndexif(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNodereturn e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0800){ size=Math.round(winW/16.8); }else if(winW<=800){ size=Math.round(winW/7.5); if(size>65){ size=65; } }else{ size=100; } $('html').css({ 'font-size':size+'px' }) } //-- $(function(){ //-- $('.sNavA').each(function (i) { $(this).hover( function () { $('.sNavA').eq(i).addClass('aNow1'); $('.sNav').eq(i).addClass('on'); }, function () { $('.sNavA').eq(i).removeClass('aNow1'); $('.sNav').removeClass('on'); } ) }) $('.sNav').each(function (i) { $(this).hover( function () { $('.sNavA').eq(i).addClass('aNow1'); $(this).addClass('on'); }, function () { $('.sNavA').removeClass('aNow1'); $(this).removeClass('on'); } ) }) //-- $('.sNavB').each(function (i) { $(this).hover( function () { $('.sNavB').eq(i).addClass('aNow1'); $('.xNav').eq(i).addClass('on'); }, function () { $('.sNavB').eq(i).removeClass('aNow1'); $('.xNav').removeClass('on'); } ) }) $('.xNav').each(function (i) { $(this).hover( function () { $('.sNavB').eq(i).addClass('aNow1'); $(this).addClass('on'); }, function () { $('.sNavB').removeClass('aNow1'); $(this).removeClass('on'); } ) }) //-- $('.sNavC').each(function (i) { $(this).hover( function () { $('.zNav').eq(i).css('left',$(this).offset().left); $('.sNavC').eq(i).addClass('aNow1'); $('.zNav').eq(i).slideDown(); }, function () { $('.sNavC').eq(i).removeClass('aNow1'); $('.zNav').hide(); } ) }) $('.zNav').each(function (i) { $(this).hover( function () { $('.sNavC').eq(i).addClass('aNow1'); $(this).show(); }, function () { $('.sNavC').removeClass('aNow1'); $(this).hide(); } ) }) //-- $('.tabContentDiv').find('.tabContent:first').show(); $('.tab').each(function(i){ $(this).find('li').each(function(ii){ $(this).hover( function(){ $('.tab').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv').eq(i).find('.tabContent').hide(); $('.tabContentDiv').eq(i).find('.tabContent').eq(ii).addClass('on'); $('.tabContentDiv').eq(i).find('.tabContent').eq(ii).show(); }, function(){} ) }) }) //-- $('.tabContentDiv2').find('.tabContent2:first').show(); $('.tab2').each(function(i){ $(this).find('li').each(function(ii){ $(this).click( function(){ $('.tab2').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv2').eq(i).find('.tabContent2').hide(); $('.tabContentDiv2').eq(i).find('.tabContent2').eq(ii).addClass('on'); $('.tabContentDiv2').eq(i).find('.tabContent2').eq(ii).show(); } ) }) }) //-- $('.study').find('.part3').find('.list').find('li:odd').addClass('li01'); $('.contactPart3').find('.list').find('li:odd').addClass('li01'); $('.virus4').find('.table1').find('tr:even').find('td').css('background','#f9f8f3'); $('.food2').find('.table').find('tr:even').find('td').css('background','#f9f8f3'); $('.solid3').find('.table').find('tr:even').find('td').css('background','#fafafa'); $('.reliability3').find('.table').find('tr:even').find('td').css('background','#fafafa'); $('.register3').find('.table').find('tr:even').find('td').css('background','#fafafa'); $('.register4').find('.table').find('tr:even').find('td').css('background','#fafafa'); $('.register6').find('.list').find('li:odd').addClass('li01'); $('.analysis4').find('.table').find('tr:even').find('td').css('background','#fafafa'); $('.cosmetics1').find('.table1').find('tr:even').find('td').css('background','#f9f9f2'); $('.cosmetics1').find('.table2').find('tr:even').find('td').css('background','#f9f9f2'); $('.cosmetics2').find('.table1').find('tr:even').find('td').css('background','#f9f9f2'); $('.cosmetics3').find('.table').find('tr:odd').find('td').css('background','#f9f9f2'); $('.protect3').find('.table').find('tr:even').find('td').css('background','#f9f9f2'); $('.poison2').find('.table').find('tr:odd').find('td').css('background','#f9f9f2'); $('.poison3').find('.table').find('tr:even').find('td').css('background','#f9f9f2'); //-- $('.solid4').find('.list').find('.swiper-slide').each(function(i){ $(this).click(function(){ prompt_fun('.bigPicLayer'); }) }) //-- $('.solid5').find('li').each(function(i){ $(this).find('.name').find('a').click(function(){ if($(this).hasClass('liNow')){ $('.solid5').find('li').find('a').removeClass('liNow'); $('.solid5').find('li').removeClass('liNow'); $('.solid5').find('.hideBox').slideUp(500); }else{ $('.solid5').find('li').find('a').removeClass('liNow'); $('.solid5').find('li').removeClass('liNow'); $('.solid5').find('.hideBox').slideUp(500); $(this).addClass('liNow'); $('.solid5').find('li').eq(i).addClass('liNow'); $('.solid5').find('.hideBox').eq(i).slideToggle(500); } }) }) //-- $('.solid6').find('li').each(function(i){ $(this).find('.name').find('a').click(function(){ if($(this).hasClass('liNow')){ $('.solid6').find('li').find('a').removeClass('liNow'); $('.solid6').find('li').removeClass('liNow'); $('.solid6').find('.hideBox').slideUp(500); }else{ $('.solid6').find('li').find('a').removeClass('liNow'); $('.solid6').find('li').removeClass('liNow'); $('.solid6').find('.hideBox').slideUp(500); $(this).addClass('liNow'); $('.solid6').find('li').eq(i).addClass('liNow'); $('.solid6').find('.hideBox').eq(i).slideToggle(500); } }) }) //-- $('.zizhiPic').find('.swiper-slide').each(function(i){ $(this).click(function(){ prompt_fun('.zizhiLayer'); }) }) //-- $('.radiation2').find('.list').find('li').each(function(i){ $(this).click(function(){ prompt_fun('.bigPicLayer2'); }) }) //-- $('.job').find('li').each(function(i){ $(this).find('.ico').find('a').click(function(){ if($(this).hasClass('liNow')){ $('.job').find('li').find('a').removeClass('liNow'); $('.job').find('li').removeClass('liNow'); $('.job').find('.hideBox').slideUp(500); }else{ $('.job').find('li').find('a').removeClass('liNow'); $('.job').find('li').removeClass('liNow'); $('.job').find('.hideBox').slideUp(500); $(this).addClass('liNow'); $('.job').find('li').eq(i).addClass('liNow'); $('.job').find('.hideBox').eq(i).slideToggle(500); } }) }) //-- $('.foot').find('.link2').hover( function(){ $(this).find('dl').stop(true,true).slideDown(300); }, function(){ $(this).find('dl').stop(true,true).slideUp(300); } ) //-- $('.touDiv .limgList li').hover( function(){ $(this).find('.hideLayer').show(); }, function(){ $(this).find('.hideLayer').hide(); }) //-- $('.sideBar li').hover( function(){ $(this).find('.hideLayer').show(); }, function(){ $(this).find('.hideLayer').hide(); }) //-- $('.sideService .layer').hover( function(){ $(this).find('.hideBox').fadeIn(200); }, function(){ $(this).find('.hideBox').fadeOut(200); }) //-- $('.sideSolu .layer').hover( function(){ $(this).find('.hideBox').fadeIn(200); }, function(){ $(this).find('.hideBox').fadeOut(200); }) //-- $('.sideService2 .layer').hover( function(){ $(this).find('.hideBox').fadeIn(200); }, function(){ $(this).find('.hideBox').fadeOut(200); }) //-- $('.sideSolu2 .layer').hover( function(){ $(this).find('.hideBox').fadeIn(200); }, function(){ $(this).find('.hideBox').fadeOut(200); }) //-- if($('.topA').length>0){ $(window).scroll(function(){ if($(window).scrollTop()>500){ $('.topA').fadeIn(200); }else{ $('.topA').fadeOut(200); } }) } //-- $('.topA').click(function(){ $('body,html').animate({scrollTop: 0}, 500); }) //-- if($('.aboutPart4 .layerDiv').length>0){ $(window).scroll(function(){ $('.aboutPart4').each(function(i){ if($(window).scrollTop()>=$(this).offset().top-400){ $('.aboutPart4').find('.layerDiv').addClass('liNow'); } }) }) } //-- if($('.serviceShow1 .rightDiv').length>0){ $(window).scroll(function(){ if($(window).scrollTop()>0){ $('.serviceShow1 .rightDiv').addClass('on'); }else{ $('.serviceShow1 .rightDiv').removeClass('on'); } if($(window).scrollTop()>$(document).height()-1200){ $('.serviceShow1 .rightDiv').removeClass('on'); }else{ } }) } if($('.serviceLayer').length>0){ $(window).scroll(function(){ if($(window).scrollTop()>0){ $('.serviceLayer').addClass('on'); }else{ $('.serviceLayer').removeClass('on'); } if($(window).scrollTop()>$(document).height()-1500){ $('.serviceLayer').removeClass('on'); }else{ } }) } //-- //下拉通用 $('.select').each(function(i){ function showFn(selectObj) { //展开效果 // 把其他的下拉收起 $('.select').children("dd").slideUp(200); selectObj.children("dd").slideDown(200); selectObj.addClass('on'); } function hideFn(selectObj){ //关闭效果 selectObj.children("dd").slideUp(200); selectObj.removeClass('on'); } function hideAll(){ $('.select dd').slideUp(200); }; $(this).children('dt').click(function(){ var index = $(this).parent().index(); var selectObj = $(this).parent(); $(this).next().is(":hidden")?showFn(selectObj):hideFn(selectObj); }); $(this).children('dd').find("li").click(function(){ var index = $(this).closest('.select').index(); var dataId=$(this).attr('data-id'); var selectObj = $(this).closest('.select'); $(this).closest('.select').children("dt").find('a').html($(this).html()); $(this).closest('.select').children("dt").find('a').attr('data-id',dataId); hideFn(selectObj); }); $("body").click(function(i){ !$(i.target).parents(".select").first().is($(".select")) ? hideAll():""; }); }); }) jQuery(document).ready(function($){ // browser window scroll (in pixels) after which the "back to top" link is shown var offset = 300, //browser window scroll (in pixels) after which the "back to top" link opacity is reduced offset_opacity = 1200, //duration of the top scrolling animation (in ms) scroll_top_duration = 300, //grab the "back to top" link $back_to_top = $('.cd-top'); //hide or show the "back to top" link $(window).scroll(function(){ ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out'); if( $(this).scrollTop() > offset_opacity ) { $back_to_top.addClass('cd-fade-out'); } }); //smooth scroll to top $back_to_top.on('click', function(event){ event.preventDefault(); $('body,html').animate({ scrollTop: 0 , }, scroll_top_duration ); }); }); /** * Swiper 3.4.2 * Most modern mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/swiper/ * * Copyright 2017, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under MIT * * Released on: March 10, 2017 */ !function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=x.params.autoplay,a=x.slides.eq(x.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||x.params.autoplay),x.autoplayTimeoutId=setTimeout(function(){x.params.loop?(x.fixLoop(),x._slideNext(),x.emit("onAutoplay",x)):x.isEnd?s.autoplayStopOnLast?x.stopAutoplay():(x._slideTo(0),x.emit("onAutoplay",x)):(x._slideNext(),x.emit("onAutoplay",x))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),x.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!x.params.allowSwipeToNext&&(x.isHorizontal()&&39===a||!x.isHorizontal()&&40===a))return!1;if(!x.params.allowSwipeToPrev&&(x.isHorizontal()&&37===a||!x.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(x.container.parents("."+x.params.slideClass).length>0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=x.container.offset();x.rtl&&(n.left=n.left-x.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+x.width,n.top],[n.left,n.top+x.height],[n.left+x.width,n.top+x.height]],l=0;l=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}x.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=x.rtl?-1:1,s=p(e);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var r=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,i=x.isBeginning,n=x.isEnd;if(r>=x.minTranslate()&&(r=x.minTranslate()),r<=x.maxTranslate()&&(r=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(r),x.updateProgress(),x.updateActiveIndex(),(!i&&x.isBeginning||!n&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout(function(){x.slideReset()},300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,e),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===r||r===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,e);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,e);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):x.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslates=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var y in c[w])void 0===s[w][y]&&(s[w][y]=c[w][y]);var x=this;if(x.params=s,x.originalParams=h,x.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(x.$=e,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var e,a=!1,t=[];for(e in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s=window.innerWidth&&!a&&(a=e);return a||"max"},x.setBreakpoint=function(){var e=x.getActiveBreakpoint();if(e&&x.currentBreakpoint!==e){var a=e in x.params.breakpoints?x.params.breakpoints[e]:x.originalParams,t=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=e,t&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=e(t),0!==x.container.length)){if(x.container.length>1){var T=[];return x.container.each(function(){T.push(new a(this,s))}),T}x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=e(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=e(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=e(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.container.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,x.params.allowSwipeToPrev===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,x.params.allowSwipeToNext===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,x.params.allowSwipeToPrev===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,x.params.allowSwipeToNext===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(e){x.container[0].style.cursor="move",x.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=e?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},x.preloadImages=function(){function e(){void 0!==x&&null!==x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a1)for(e=0;ex.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(e=0;et?r:t}t&&x.wrapper.css("height",t+"px")},x.updateContainerSize=function(){var e,a;e=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===e&&x.isHorizontal()||0===a&&!x.isHorizontal()||(e=e-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=e,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var e,a=x.params.spaceBetween,t=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""});var n;x.params.slidesPerColumn>1&&(n=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(n=Math.max(n,x.params.slidesPerView*x.params.slidesPerColumn)));var o,l=x.params.slidesPerColumn,p=n/l,d=p-(x.params.slidesPerColumn*p-x.slides.length);for(e=0;e1){var u,c,g;"column"===x.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(x.isHorizontal()?"top":"left"),0!==g&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),x.params.roundLengths&&(o=r(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=r(o)),x.isHorizontal()?x.slides[e].style.width=o+"px":x.slides[e].style.height=o+"px"),x.slides[e].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-x.size/2-a),0===e&&(t=t-x.size/2-a),Math.abs(t)<.001&&(t=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t),t=t+o+a),x.virtualSize+=o+a,s=o,i++)}x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter;var h;if(x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*n,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(h=[],e=0;e1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var e=0;ex.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(r+=x.slides[a].swiperSlideSize,t++,r>x.size&&(s=!0))}else for(e=x.activeIndex+1;e=0&&i0&&n<=x.size||i<=0&&n>=x.size)&&x.slides.eq(t).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-r:r}}},x.updateProgress=function(e){void 0===e&&(e=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),t=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(e-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!t&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(e),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var e,a,t,s=x.rtl?x.translate:-x.translate;for(a=0;a=x.slidesGrid[a]&&s=x.slidesGrid[a]&&s=x.slidesGrid[a]&&(e=a);x.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/x.params.slidesPerGroup),t>=x.snapGrid.length&&(t=x.snapGrid.length-1),e!==x.activeIndex&&(x.snapIndex=t,x.previousIndex=x.activeIndex,x.activeIndex=e,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),s.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var t=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===t.length&&(t=x.slides.eq(0),t.addClass(x.params.slideNextClass));var r=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===r.length&&(r=x.slides.eq(-1),r.addClass(x.params.slidePrevClass)),s.loop&&(t.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),r.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var i,n=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?(i=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup),i>x.slides.length-1-2*x.loopedSlides&&(i-=x.slides.length-2*x.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==x.params.paginationType&&(i=n+i)):i=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each(function(){e(this).index()===i&&e(this).addClass(x.params.bulletActiveClass)}):x.bullets.eq(i).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(i+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(n)),"progress"===x.params.paginationType){var o=(i+1)/n,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,i+1,n)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var e="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,t=0;t";x.paginationContainer.html(e),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(e=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):' / ',x.paginationContainer.html(e)),"progress"===x.params.paginationType&&(e=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'',x.paginationContainer.html(e)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(e){function a(){x.rtl,x.translate;t=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(t),x.updateActiveIndex(),x.updateClasses()}if(x){x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set();var t;if(e){x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()}else x.params.autoHeight&&x.updateAutoHeight()}},x.onResize=function(e){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,t=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||e)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var r=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(r),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=t,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],i=x.support.touch?r:document,n=!!x.params.nested;if(x.browser.ie)r[t](x.touchEvents.start,x.onTouchStart,!1),i[t](x.touchEvents.move,x.onTouchMove,n),i[t](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};r[t](x.touchEvents.start,x.onTouchStart,o),r[t](x.touchEvents.move,x.onTouchMove,n),r[t](x.touchEvents.end,x.onTouchEnd,o)}(s.simulateTouch&&!x.device.ios&&!x.device.android||s.simulateTouch&&!x.support.touch&&x.device.ios)&&(r[t]("mousedown",x.onTouchStart,!1),document[t]("mousemove",x.onTouchMove,n),document[t]("mouseup",x.onTouchEnd,!1))}window[t]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&r[t]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(e){x.allowClick||(x.params.preventClicks&&e.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},x.onClickNext=function(e){e.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(e){e.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*x.params.slidesPerGroup ;x.params.loop&&(t+=x.loopedSlides),x.slideTo(t)},x.updateClickedSlide=function(a){var t=n(a,"."+x.params.slideClass),s=!1;if(t)for(var r=0;rx.slides.length-x.loopedSlides+l/2?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o):o>x.slides.length-l?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o)}else x.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&n(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||n(a,x.params.swipeHandler)){var t=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&t<=x.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,x.touches.startX=t,x.touches.startY=s,z=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(b&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentXx.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentYx.touches.startY&&x.translate>=x.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,M=x.isHorizontal()?t>x.params.touchAngle:90-t>x.params.touchAngle)}if(M&&x.emit("onTouchMoveOpposite",x,a),void 0===X&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),C||(s.loop&&x.fixLoop(),E=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),D=!1,!x.params.grabCursor||x.params.allowSwipeToNext!==!0&&x.params.allowSwipeToPrev!==!0||x.setGrabCursor(!0)),C=!0;var r=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;r*=x.params.touchRatio,x.rtl&&(r=-r),x.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>x.minTranslate()?(i=!1,x.params.resistance&&(P=x.minTranslate()-1+Math.pow(-x.minTranslate()+E+r,x.params.resistanceRatio))):r<0&&PE&&(P=E),x.params.threshold>0){if(!(Math.abs(r)>x.params.threshold||I))return void(P=E);if(!I)return I=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,P=E,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===H.length&&H.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:z}),H.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(P),x.setWrapperTranslate(P))}}}}},x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,b){x.params.grabCursor&&C&&b&&(x.params.allowSwipeToNext===!0||x.params.allowSwipeToPrev===!0)&&x.setGrabCursor(!1);var t=Date.now(),s=t-z;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!e(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout(function(){x&&(x.allowClick=!0)},0),!b||!C||!x.swipeDirection||0===x.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=x.params.followFinger?x.rtl?x.translate:-x.translate:-P,x.params.freeMode){if(r<-x.minTranslate())return void x.slideTo(x.activeIndex);if(r>-x.maxTranslate())return void(x.slides.length1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)150||(new window.Date).getTime()-i.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*x.params.freeModeMomentumRatio,d=x.velocity*p,m=x.translate+d;x.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(mx.minTranslate())x.params.freeModeMomentumBounce?(m-x.minTranslate()>g&&(m=x.minTranslate()+g),u=x.minTranslate(),c=!0,D=!0):m=x.minTranslate();else if(x.params.freeModeSticky){var h,v=0;for(v=0;v-m){h=v;break}m=Math.abs(x.snapGrid[h]-m)=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var f,w=0,y=x.slidesSizesGrid[0];for(f=0;f=x.slidesGrid[f]&&r=x.slidesGrid[f]&&(w=f,y=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var T=(r-x.slidesGrid[w])/y;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(T>=x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w)),"prev"===x.swipeDirection&&(T>1-x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(w+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(w)}}},x._slideTo=function(e,a){return x.slideTo(e,a,!0,!0)},x.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),x.snapIndex=Math.floor(e/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var r=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(r),x.params.normalizeSlideIndex)for(var i=0;i=Math.floor(100*x.slidesGrid[i])&&(e=i);return!(!x.params.allowSwipeToNext&&rx.translate&&r>x.maxTranslate()&&(x.activeIndex||0)!==e)&&(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=e,x.updateRealIndex(),x.rtl&&-r===x.translate||!x.rtl&&r===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(r),!1):(x.updateClasses(),x.onTransitionStart(t),0===a||x.browser.lteIE9?(x.setWrapperTranslate(r),x.setWrapperTransition(0),x.onTransitionEnd(t)):(x.setWrapperTranslate(r),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd(t)}))),!0)))},x.onTransitionStart=function(e){void 0===e&&(e=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),e&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(e){x.animating=!1,x.setWrapperTransition(0),void 0===e&&(e=!0),x.lazy&&x.lazy.onTransitionEnd(),e&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)}return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)},x._slideNext=function(e){return x.slideNext(!0,e,!0)},x.slidePrev=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex-1,a,e,t)}return x.slideTo(x.activeIndex-1,a,e,t)},x._slidePrev=function(e){return x.slidePrev(!0,e,!0)},x.slideReset=function(e,a,t){return x.slideTo(x.activeIndex,a,e)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(e,a){x.wrapper.transition(e),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(e),x.params.parallax&&x.parallax&&x.parallax.setTransition(e),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(e),x.params.control&&x.controller&&x.controller.setTransition(e,a),x.emit("onSetTransition",x,e)},x.setWrapperTranslate=function(e,a,t){var s=0,i=0;x.isHorizontal()?s=x.rtl?-e:e:i=e,x.params.roundLengths&&(s=r(s),i=r(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var n,o=x.maxTranslate()-x.minTranslate();n=0===o?0:(e-x.minTranslate())/o,n!==x.progress&&x.updateProgress(e),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,t),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],e)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var e=x.container.parents(),a=0;aa.length&&(x.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t=a.length-x.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t=0;t--)x.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(e){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),e&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var e;x.activeIndex=2*x.loopedSlides||x.activeIndex>x.slides.length-2*x.params.slidesPerView)&&(e=-x.slides.length+x.activeIndex+x.loopedSlides,e+=x.loopedSlides,x.slideTo(e,0,!1,!0))},x.appendSlide=function(e){if(x.params.loop&&x.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a'),t.append(d)),0===m.length&&(m=e('
'),t.append(m)),d.length&&(d[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var t=!1;x.slides.eq(x.activeIndex).transitionEnd(function(){if(!t&&x&&e(this).hasClass(x.params.slideActiveClass)){t=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s'),x.wrapper.append(a)),a.css({height:x.width+"px"})):(a=x.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('
'),x.container.append(a))));for(var s=0;s-1&&(t=90*s+90*o,x.rtl&&(t=90*-s-90*o)),r.transform(m),x.params.cube.slideShadows){var u=x.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=x.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('
'),r.append(u)),0===c.length&&(c=e('
'),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=x.params.cube.shadowScale,f=x.params.cube.shadowScale/h,w=x.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(x.height/2+w)+"px, "+-x.height/2/f+"px) rotateX(-90deg)")}var y=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(x.isHorizontal()?0:t)+"deg) rotateY("+(x.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=x.translate,t=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,r=x.params.coverflow.depth,i=0,n=x.slides.length;i'),o.append(f)),0===w.length&&(w=e('
'),o.append(w)),f.length&&(f[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(x.browser.ie){x.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==x.slides.length)){var s=x.slides.eq(a),r=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(x.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==x&&null!==x&&x){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}}),x.emit("onLazyImageLoad",x,s[0],a[0])})}},load:function(){var a,t=x.params.slidesPerView;if("auto"===t&&(t=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each(function(){x.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=x.activeIndex;a1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(x.activeIndex+r+Math.max(s,r),x.slides.length),n=Math.max(x.activeIndex-Math.max(r,s),0);for(a=x.activeIndex+t;a0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(e){var a=x.scrollbar,t=x.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,r=-x.minTranslate()*a.moveDivider,i=-x.maxTranslate()*a.moveDivider;si&&(s=i),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(e){var a=x.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(e){var a=x.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(e){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:function(){return x.params.simulateTouch!==!1||x.support.touch?x.touchEvents:x.touchEventsDesktop}(),enableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=e(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('
'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var e,a=x.scrollbar,t=(x.translate,a.dragSize);e=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){x.params.scrollbar&&x.scrollbar.drag.transition(e)}},x.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length;this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,e.slidesGrid):new x.controller.LinearSpline(x.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),i=-x.controller.spline.interpolate(-e)),i&&"container"!==x.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),i=(e-x.minTranslate())*r+a.minTranslate()),x.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,x),a.updateActiveIndex()}var r,i,n=x.params.control;if(Array.isArray(n))for(var o=0;o-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,d),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,d),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,x.progress)}),x.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=x.slides.eq(x.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+x.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,y,x,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(x/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,y=-f,d=l*s.scale,m=p*s.scale,dw&&(d=w),my&&(m=y)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[t]("gesturestart",x.zoom.onGestureStart,s),x.slides[t]("gesturechange",x.zoom.onGestureChange,s),x.slides[t]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[t](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[t](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[t](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[t]("touchStart",x.zoom.onTouchStart),x.slides.each(function(a,s){e(s).find("."+x.params.zoomContainerClass).length>0&&e(s)[t](x.touchEvents.move,x.zoom.onTouchMove)}),x[t]("touchEnd",x.zoom.onTouchEnd),x[t]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[];for(var Y in x.plugins){var A=x.plugins[Y](x,x.params[Y]);A&&x._plugins.push(A)}return x.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),e(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each(function(){var a=e(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&e(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&e(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(e,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),e!==!1&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper}); //# sourceMappingURL=maps/swiper.jquery.min.js.map //本插件由www.swiper.com.cn提供 //版本1.03 function swiperAnimateCache(a){for(j=0;j微信里点“发现”,扫一下

二维码便可将本文分享至朋友圈。

', wechatQrcodeSize: 100, sites: ['weibo', 'qq', 'wechat', 'douban', 'qzone', 'linkedin', 'facebook', 'twitter', 'google'], mobileSites: [], disabled: [], initialized: false }; var _vancheerTemplates = { qzone: 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + _vancheerShare["url"] + '&title=' + _vancheerShare["title"] + '&desc=' + _vancheerShare["description"] + '&summary=' + _vancheerShare["description"] + '&site=' + _vancheerShare["source"] + '&pics=' + _vancheerShare["image"] + '', qq: 'http://connect.qq.com/widget/shareqq/index.html?url=' + _vancheerShare["url"] + '&title=' + _vancheerShare["title"] + '&source=' + _vancheerShare["source"] + '&desc=' + _vancheerShare["description"] + '&pics=' + _vancheerShare["image"] + '&summary="' + _vancheerShare["description"] + '"', weibo: 'https://service.weibo.com/share/share.php?url=' + _vancheerShare["url"] + '&title=' + _vancheerShare["title"] + '&pic=' + _vancheerShare["image"] + '&appkey={{WEIBOKEY}}', wechat: 'javascript:', douban: 'http://shuo.douban.com/!service/share?href=' + _vancheerShare["url"] + '&name=' + _vancheerShare["title"] + '&text=' + _vancheerShare["description"] + 'ℑ=' + _vancheerShare["image"] + '&starid=0&aid=0&style=11', linkedin: 'http://www.linkedin.com/shareArticle?mini=true&ro=true&title=' + _vancheerShare["title"] + '&url=' + _vancheerShare["url"] + '&summary=' + _vancheerShare["description"] + '&source=' + _vancheerShare["source"] + '&armin=armin', facebook: 'https://www.facebook.com/sharer/sharer.php?u=' + _vancheerShare["url"] + '', twitter: 'https://twitter.com/intent/tweet?text=' + _vancheerShare["title"] + '&url=' + _vancheerShare["url"] + '&via=' + _vancheerShare["origin"] + '', google: 'https://plus.google.com/share?url=' + _vancheerShare["url"] + '' }; function getMetaContentByName(name) { return (document.getElementsByName(name)[0] || 0).content; } function createWechat(elem, data) { var wechat = getElementsByClassName(elem, 'icon-wechat', 'a'); if (wechat.length === 0) { return false; } var elems = createElementByString('

' + data.wechatQrcodeTitle + '

' + data.wechatQrcodeHelper + '
'); var qrcode = getElementsByClassName(elems[0], 'qrcode', 'div'); new QRCode(qrcode[0], { text: data.url, width: data.wechatQrcodeSize, height: data.wechatQrcodeSize }); wechat[0].appendChild(elems[0]); } function tsina() { window.open(_vancheerTemplates["weibo"], "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes,width=800,height=600"); } function weixin() { window.location.href = _vancheerTemplates["wechat"]; } function sqq() { window.open(_vancheerTemplates["qq"], "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes,width=800,height=600"); } function qzone() { window.open(_vancheerTemplates["qzone"], "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes,width=800,height=600"); } $("#txtkey1").keydown(function (e) { if (e.keyCode == 13) { search(); } }); $("#txtkey2").keydown(function (e) { if (e.keyCode == 13) { search2(); } }); $('.solid4').find('.list').find('.swiper-slide').each(function (i) { $(this).unbind("click") $(this).click(function () { $(".bigPicLayer .imgDiv img").attr("src", $(this).find(".img img").attr("src")); $(".bigPicLayer .name").html($(this).find(".name").html()); prompt_fun('.bigPicLayer'); }) }) $('.zizhiPic').find('.swiper-slide').each(function (i) { $(this).unbind("click") $(this).click(function () { $(".zizhiLayer .imgDiv img").attr("src", $(this).find(".imgDiv img").attr("src")); prompt_fun('.zizhiLayer'); }) }) //-- $('.radiation2').find('.list').find('li').each(function (i) { $(this).unbind("click") $(this).click(function () { $(".bigPicLayer2 .imgDiv img").attr("src", $(this).find(".imgDiv img").attr("src")); $(".bigPicLayer2 .name").html($(this).find(".name").html()); prompt_fun('.bigPicLayer2'); }) }) $('.clean3').find('.list').find('li').each(function (i) { $(this).unbind("click"); $(this).click(function () { //$(".bigPicLayer2").css({ "height": $(window).height() * 0.8, "margin-top": -$(window).height() * 0.8/2 }); $(".bigPicLayer2 .imgDiv img").attr("src", $(this).find(".imgDiv img").attr("src")); $(".bigPicLayer2 .name").html($(this).find(".name").html()); prompt_fun('.bigPicLayer2'); }) }) if ($(".safety2").length > 0) { $(".safety2 table td").each(function (ind,ele) { if ($(ele).html().indexOf(" 0) { $(".cosmetics3 table td").each(function (ind, ele) { if ($(ele).html().indexOf(" 0) { $(".poison2 table td").each(function (ind, ele) { if ($(ele).html().indexOf(" -1 || $(this).html().indexOf("在线咨询") > -1) { $(this).attr("href", "javascript:;"); openZoosUrl('chatwin'); } //else if ($(this).html().indexOf("留言咨询") > -1) window.location.href = "/contact/index.html#contactPart4_1"; }) $(".conDiv .btnDiv a").click(function () { if ($(this).html().indexOf("立即咨询") > -1 || $(this).html().indexOf("在线咨询") > -1) { $(this).attr("href", "javascript:;"); openZoosUrl('chatwin'); } }) $(".box .btnDiv a").click(function () { if ($(this).html().indexOf("立即咨询") > -1 || $(this).html().indexOf("在线咨询") > -1) { $(this).attr("href", "javascript:;"); openZoosUrl('chatwin'); } }) $(".pageBanner .btnDiv a").click(function () { if ($(this).html().indexOf("立即咨询") > -1 || $(this).html().indexOf("在线咨询") > -1) { $(this).attr("href", "javascript:;"); openZoosUrl('chatwin'); } }) }); function search() { if (document.getElementById("txtkey1").value == "") { alert("请输入您要搜索的关键字!"); } else { location.href = "/search.aspx?k=" + document.getElementById("txtkey1").value; } } function search2() { if (document.getElementById("txtkey2").value == "") { alert("请输入您要搜索的关键字!"); } else { location.href = "/search.aspx?k=" + document.getElementById("txtkey2").value; } } function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for (var i = 0; i < strs.length; i++) { theRequest[strs[i].split("=")[0]] = unescape(decodeURI(strs[i].split("=")[1])); } } return theRequest; } //只有确定按钮的提示框 //参数 (标题,文本内容) function Salert(title,content){ var tmp = '

' + title + '

' + content + '
'; $("body").append(tmp); } //自由的确认框 //参数 (标题,文本内容,左按钮文本,右按钮文本,左按钮执行方法,右按钮执行方法); function Sconfirm(title, content, LbuttonVal, RbuttonVal, LbuttonClick, RbuttonClick) { var tmp = '

' + title + '

' + content + '
'; $("body").append(tmp); } //确定和取消按钮的提示框(确定按钮绑定的没带参数的点击事件) //参数 (标题,文本内容,左边确认按钮要执行的点击操作方法名(不带参数)) function Sconform1(title,content,LbuttonClick){ var tmp = '

' + title + '

' + content + '
'; $("body").append(tmp); } //确定和取消按钮的提示框(确定按钮绑定的有带参数的点击事件(带参数)) function Sconform2(title,content,LbuttonClick){ var tmp = '

' + title + '

' + content + '
'; $("body").append(tmp); } //关闭对话框 function closemsgs() { $(".ui-dialog").each(function (i, item) { if ($(item).hasClass("show")) { $(item).removeClass("show").addClass("hide"); } }); } function checkform() { if (document.getElementById("name").value == "" ) { Salert("", "请输入您的称呼!"); document.getElementById("name").focus(); return; } if (document.getElementById("tel").value == "" ) { Salert("", "请输入您的手机号码!"); document.getElementById("tel").focus(); return; } if (document.getElementById("tel").value != "" ) { var telReg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; if (!telReg.test(document.getElementById("tel").value)) { document.getElementById("tel").focus(); Salert("", "请输入正确的手机号码!"); return false; } } if (document.getElementById("email").value == "" ) { Salert("", "请输入您的电子邮箱!"); document.getElementById("email").focus(); return false; } if (document.getElementById("email").value != "") { var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (!myreg.test(document.getElementById("email").value)) { document.getElementById("email").focus(); Salert("", "请输入正确的电子邮箱!"); return false; } } //if (document.getElementById("addr").value == "" ) { // Salert("", "请输入您的联系地址!"); // document.getElementById("addr").focus(); // return; //} //if (document.getElementById("weixin").value == "") { // Salert("", "请输入您的微信号!"); // document.getElementById("weixin").focus(); // return; //} //if (document.getElementById("qq").value == "") { // Salert("", "请输入您的QQ号码!"); // document.getElementById("qq").focus(); // return; //} if (document.getElementById("nr").value == "") { Salert("", "请输入您的留言内容!"); document.getElementById("nr").focus(); return; } $.ajax({ type: "post", url: "/AjaxAction/message.aspx?name=" + $("#name").val() + "&tel=" + $("#tel").val() + "&email=" + $("#email").val() + "&city=" + $("#city").val() + "&addr=" + $("#addr").val() + "&nr=" + $("#nr").val(), data: "", success: function (data) { if (data == "1") { Salert("", "恭喜,您的留言已提交成功!"); setTimeout("location.href = document.URL", 1000);//延时2秒 } else { Salert("", "抱歉,您的留言提交失败,请重新尝试!"); } } }); } //右侧悬浮 function tj() { var project = $("#rproject").val(); var title = $("#rtitle").val(); var name = $("#rname").val(); var tel = $("#rtel").val(); var content = $("#rcontent").val(); //if (project == "") { // Salert("", "请输入检测项目!"); // return false; //} //if (name == "") { // Salert("", "请输入您的姓名!"); // return false; //} if (tel == "") { Salert("", "请输入您的电话!"); return false; } //if (tel!= ""){ // var telReg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; // if (!telReg.test(tel)){ // Salert("", "请输入正确的电话!"); // return false; // } //} if (content == "") { Salert("", "请输入咨询内容!"); return false; } $.ajax({ type: "post", url: "/AjaxAction/message.ashx?action=add", data: { "title": title, "name": name, "tel": tel, "content": content, "project": project }, dataType: "json", success: function (data) { if (data.status == 1) { Salert("", "恭喜,您的留言已提交成功!"); setTimeout("location.href = document.URL", 1000);//延时2秒 } else { Salert("", "抱歉,您的留言提交失败,请重新尝试!"); } } }); } //解决方案 function tjconsulting() { var name = $("#name").val(); var tel = $("#tel").val(); var email = $("#email").val(); var content = $("#content").val(); var nodecode = $("#nodecode").val(); if (name == "") { Salert("", "请输入您的姓名!"); return false; } if (tel == "") { Salert("", "请输入您的手机号码!"); return false; } //if (tel != "") { // var telReg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; // if (!telReg.test(tel)) { // Salert("", "请输入正确的手机号码!"); // return false; // } //} var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (email != "" && !myreg.test(email)) { Salert("", "请输入正确的电子邮箱!"); return false; } if (content == "") { Salert("", "请简述您的需求!"); return false; } $.ajax({ type: "post", url: "/AjaxAction/message.ashx?action=addconsulting", data: { "email": email, "name": name, "tel": tel, "content": content, "nodecode": nodecode }, dataType: "json", success: function (data) { if (data.status == 1) { Salert("", "恭喜,您的留言已提交成功!"); setTimeout("location.href = document.URL", 1000);//延时2秒 } else { Salert("", "抱歉,您的留言提交失败,请重新尝试!"); } } }); } //解决方案 function tjcontact() { var name = $("#name").val(); var tel = $("#tel").val(); var email = $("#email").val(); var company = $("#company").val(); var content = $("#content").val(); var nodecode = $("#nodecode").val(); //if (name == "") { // Salert("", "请输入您的姓名!"); // return false; //} if (tel == "") { Salert("", "请输入您的手机号码!"); return false; } if (tel != "") { var telReg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; if (!telReg.test(tel)) { Salert("", "请输入正确的手机号码!"); return false; } } var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (email != "" && !myreg.test(email)) { Salert("", "请输入正确的电子邮箱!"); return false; } if (content == "") { Salert("", "请简述您的需求!"); return false; } $.ajax({ type: "post", url: "/AjaxAction/message.ashx?action=addfeedback", data: { "email": email, "name": name, "tel": tel, "content": content, "nodecode": nodecode }, dataType: "json", success: function (data) { if (data.status == 1) { Salert("", "恭喜,您的留言已提交成功!"); setTimeout("location.href = document.URL", 1000);//延时2秒 } else { Salert("", "抱歉,您的留言提交失败,请重新尝试!"); } } }); } //在线报名 function Salert(title, content) { var tmp = '

' + title + '

' + content + '
'; $("body").append(tmp); } function closemsgs() { $(".ui-dialog").each(function (i, item) { if ($(item).hasClass("show")) { $(item).removeClass("show").addClass("hide"); } }); } !function(t){"use strict";t.fn.countUp=function(e){var a=t.extend({time:2e3,delay:10},e);return this.each(function(){var e=t(this),n=a,u=function(){e.data("counterupTo")||e.data("counterupTo",e.text());var t=parseInt(e.data("counter-time"))>0?parseInt(e.data("counter-time")):n.time,a=parseInt(e.data("counter-delay"))>0?parseInt(e.data("counter-delay")):n.delay,u=t/a,r=e.data("counterupTo"),o=[r],c=/[0-9]+,[0-9]+/.test(r);r=r.replace(/,/g,"");for(var d=(/^[0-9]+$/.test(r),/^[0-9]+\.[0-9]+$/.test(r)),s=d?(r.split(".")[1]||[]).length:0,i=u;i>=1;i--){var p=parseInt(Math.round(r/u*i));if(d&&(p=parseFloat(r/u*i).toFixed(s)),c)for(;/(\d+)(\d{3})/.test(p.toString());)p=p.toString().replace(/(\d+)(\d{3})/,"$1,$2");o.unshift(p)}e.data("counterup-nums",o),e.text("0");var f=function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?setTimeout(e.data("counterup-func"),a):(delete e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))};e.data("counterup-func",f),setTimeout(e.data("counterup-func"),a)};e.waypoint(u,{offset:"100%",triggerOnce:!0})})}}(jQuery); /*! Waypoints - 4.0.0 Copyright © 2011-2015 Caleb Troughton Licensed under the MIT license. https://github.com/imakewebthings/waypoints/blob/master/licenses.txt */ !function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); (function(F) { var G = false; var H = false; var I = false; var J = 5000; var K = 2000; var $ = F; function getScriptPath() { var a = document.getElementsByTagName('script'); var b = a[a.length - 1].src.split('?')[0]; return (b.split('/').length > 0) ? b.split('/').slice(0, -1).join('/') + '/': '' } var L = getScriptPath(); var M = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || false })(); var N = (function() { return window.cancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || false })(); var O = false; var P = function() { if (O) return O; var c = document.createElement('DIV'); var d = {}; d.haspointerlock = "pointerLockElement" in document || "mozPointerLockElement" in document || "webkitPointerLockElement" in document; d.isopera = ("opera" in window); d.isopera12 = (d.isopera && ("getUserMedia" in navigator)); d.isie = (("all" in document) && ("attachEvent" in c) && !d.isopera); d.isieold = (d.isie && !("msInterpolationMode" in c.style)); d.isie7 = d.isie && !d.isieold && (!("documentMode" in document) || (document.documentMode == 7)); d.isie8 = d.isie && ("documentMode" in document) && (document.documentMode == 8); d.isie9 = d.isie && ("performance" in window) && (document.documentMode >= 9); d.isie10 = d.isie && ("performance" in window) && (document.documentMode >= 10); d.isie9mobile = /iemobile.9/i.test(navigator.userAgent); if (d.isie9mobile) d.isie9 = false; d.isie7mobile = (!d.isie9mobile && d.isie7) && /iemobile/i.test(navigator.userAgent); d.ismozilla = ("MozAppearance" in c.style); d.iswebkit = ("WebkitAppearance" in c.style); d.ischrome = ("chrome" in window); d.ischrome22 = (d.ischrome && d.haspointerlock); d.cantouch = ("ontouchstart" in document.documentElement) || ("ontouchstart" in window); d.hasmstouch = (window.navigator.msPointerEnabled || false); d.ismac = /^mac$/i.test(navigator.platform); d.isios = (d.cantouch && /iphone|ipad|ipod/i.test(navigator.platform)); d.isios4 = ((d.isios) && !("seal" in Object)); d.isandroid = (/android/i.test(navigator.userAgent)); d.trstyle = false; d.hastransform = false; d.hastranslate3d = false; d.transitionstyle = false; d.hastransition = false; d.transitionend = false; var e = ['transform', 'msTransform', 'webkitTransform', 'MozTransform', 'OTransform']; for (var a = 0; a < e.length; a++) { if (typeof c.style[e[a]] != "undefined") { d.trstyle = e[a]; break } } d.hastransform = (d.trstyle != false); if (d.hastransform) { c.style[d.trstyle] = "translate3d(1px,2px,3px)"; d.hastranslate3d = /translate3d/.test(c.style[d.trstyle]) } d.transitionstyle = false; d.prefixstyle = ''; d.transitionend = false; var e = ['transition', 'webkitTransition', 'MozTransition', 'OTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; var f = ['', '-webkit-', '-moz-', '-o-', '-o', '-ms-', '-khtml-']; var g = ['transitionend', 'webkitTransitionEnd', 'transitionend', 'otransitionend', 'oTransitionEnd', 'msTransitionEnd', 'KhtmlTransitionEnd']; for (var a = 0; a < e.length; a++) { if (e[a] in c.style) { d.transitionstyle = e[a]; d.prefixstyle = f[a]; d.transitionend = g[a]; break } } d.hastransition = (d.transitionstyle); function detectCursorGrab() { var b = ['-moz-grab', '-webkit-grab', 'grab']; if ((d.ischrome && !d.ischrome22) || d.isie) b = []; for (var a = 0; a < b.length; a++) { var p = b[a]; c.style['cursor'] = p; if (c.style['cursor'] == p) return p } return 'url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize' } d.cursorgrabvalue = detectCursorGrab(); d.hasmousecapture = ("setCapture" in c); c = null; O = d; return d }; var Q = function(A, B) { var C = this; this.version = '3.1.4'; this.name = 'nicescroll'; C.me = B; this.opt = { doc: $("body"), win: false, zindex: 0, cursoropacitymin: 0, cursoropacitymax: 1, cursorcolor: "#424242", cursorwidth: "5px", cursorborder: "1px solid #fff", cursorborderradius: "5px", scrollspeed: 60, mousescrollstep: 8 * 3, touchbehavior: false, hwacceleration: true, usetransition: true, boxzoom: false, dblclickzoom: true, gesturezoom: true, grabcursorenabled: true, autohidemode: true, background: "", iframeautoresize: true, cursorminheight: 32, preservenativescrolling: true, railoffset: false, bouncescroll: true, spacebarenabled: true, railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, disableoutline: true, horizrailenabled: true, railalign: "right", railvalign: "bottom", enabletranslate3d: true, enablemousewheel: true, enablekeyboard: true, smoothscroll: true, sensitiverail: true, enablemouselockapi: true, cursorfixedheight: false }; this.opt.snapbackspeed = 80; if (A || false) { for (var a in C.opt) { if (typeof A[a] != "undefined") C.opt[a] = A[a] } } this.doc = C.opt.doc; this.iddoc = (this.doc && this.doc[0]) ? this.doc[0].id || '': ''; this.ispage = /BODY|HTML/.test((C.opt.win) ? C.opt.win[0].nodeName: this.doc[0].nodeName); this.haswrapper = (C.opt.win !== false); this.win = C.opt.win || (this.ispage ? $(window) : this.doc); this.docscroll = (this.ispage && !this.haswrapper) ? $(window) : this.win; this.body = $("body"); this.viewport = false; this.isfixed = false; this.iframe = false; this.isiframe = ((this.doc[0].nodeName == 'IFRAME') && (this.win[0].nodeName == 'IFRAME')); this.istextarea = (this.win[0].nodeName == 'TEXTAREA'); this.forcescreen = false; this.canshowonmouseevent = (C.opt.autohidemode != "scroll"); this.onmousedown = false; this.onmouseup = false; this.onmousemove = false; this.onmousewheel = false; this.onkeypress = false; this.ongesturezoom = false; this.onclick = false; this.onscrollstart = false; this.onscrollend = false; this.onscrollcancel = false; this.onzoomin = false; this.onzoomout = false; this.view = false; this.page = false; this.scroll = { x: 0, y: 0 }; this.scrollratio = { x: 0, y: 0 }; this.cursorheight = 20; this.scrollvaluemax = 0; this.scrollrunning = false; this.scrollmom = false; this.observer = false; do { this.id = "ascrail" + (K++) } while ( document . getElementById ( this . id )); this.rail = false; this.cursor = false; this.cursorfreezed = false; this.zoom = false; this.zoomactive = false; this.hasfocus = false; this.hasmousefocus = false; this.visibility = true; this.locked = false; this.hidden = false; this.cursoractive = true; this.nativescrollingarea = false; this.events = []; this.saved = {}; this.delaylist = {}; this.synclist = {}; this.lastdeltax = 0; this.lastdeltay = 0; this.detected = P(); var D = $.extend({}, this.detected); this.canhwscroll = (D.hastransform && C.opt.hwacceleration); this.ishwscroll = (this.canhwscroll && C.haswrapper); this.istouchcapable = false; if (D.cantouch && D.ischrome && !D.isios && !D.isandroid) { this.istouchcapable = true; D.cantouch = false } if (D.cantouch && D.ismozilla && !D.isios) { this.istouchcapable = true; D.cantouch = false } if (!C.opt.enablemouselockapi) { D.hasmousecapture = false; D.haspointerlock = false } this.delayed = function(a, b, c, d) { var e = C.delaylist[a]; var f = (new Date()).getTime(); if (!d && e && e.tt) return false; if (e && e.tt) clearTimeout(e.tt); if (e && e.last + c > f && !e.tt) { C.delaylist[a] = { last: f + c, tt: setTimeout(function() { C.delaylist[a].tt = 0; b.call() }, c) } } else if (!e || !e.tt) { C.delaylist[a] = { last: f, tt: 0 }; setTimeout(function() { b.call() }, 0) } }; this.synched = function(b, c) { function requestSync() { if (C.onsync) return; M(function() { C.onsync = false; for (b in C.synclist) { var a = C.synclist[b]; if (a) a.call(C); C.synclist[b] = false } }); C.onsync = true }; C.synclist[b] = c; requestSync(); return b }; this.unsynched = function(a) { if (C.synclist[a]) C.synclist[a] = false }; this.css = function(a, b) { for (var n in b) { C.saved.css.push([a, n, a.css(n)]); a.css(n, b[n]) } }; this.scrollTop = function(a) { return (typeof a == "undefined") ? C.getScrollTop() : C.setScrollTop(a) }; this.scrollLeft = function(a) { return (typeof a == "undefined") ? C.getScrollLeft() : C.setScrollLeft(a) }; BezierClass = function(a, b, c, d, e, f, g) { this.st = a; this.ed = b; this.spd = c; this.p1 = d || 0; this.p2 = e || 1; this.p3 = f || 0; this.p4 = g || 1; this.ts = (new Date()).getTime(); this.df = this.ed - this.st }; BezierClass.prototype = { B2: function(t) { return 3 * t * t * (1 - t) }, B3: function(t) { return 3 * t * (1 - t) * (1 - t) }, B4: function(t) { return (1 - t) * (1 - t) * (1 - t) }, getNow: function() { var a = (new Date()).getTime(); var b = 1 - ((a - this.ts) / this.spd); var c = this.B2(b) + this.B3(b) + this.B4(b); return (b < 0) ? this.ed: this.st + Math.round(this.df * c) }, update: function(a, b) { this.st = this.getNow(); this.ed = a; this.spd = b; this.ts = (new Date()).getTime(); this.df = this.ed - this.st; return this } }; if (this.ishwscroll) { this.doc.translate = { x: 0, y: 0, tx: "0px", ty: "0px" }; if (D.hastranslate3d && D.isios) this.doc.css("-webkit-backface-visibility", "hidden"); function getMatrixValues() { var a = C.doc.css(D.trstyle); if (a && (a.substr(0, 6) == "matrix")) { return a.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, '').split(/, +/) } return false } this.getScrollTop = function(a) { if (!a) { var b = getMatrixValues(); if (b) return (b.length == 16) ? -b[13] : -b[5]; if (C.timerscroll && C.timerscroll.bz) return C.timerscroll.bz.getNow() } return C.doc.translate.y }; this.getScrollLeft = function(a) { if (!a) { var b = getMatrixValues(); if (b) return (b.length == 16) ? -b[12] : -b[4]; if (C.timerscroll && C.timerscroll.bh) return C.timerscroll.bh.getNow() } return C.doc.translate.x }; if (document.createEvent) { this.notifyScrollEvent = function(a) { var e = document.createEvent("UIEvents"); e.initUIEvent("scroll", false, true, window, 1); a.dispatchEvent(e) } } else if (document.fireEvent) { this.notifyScrollEvent = function(a) { var e = document.createEventObject(); a.fireEvent("onscroll"); e.cancelBubble = true } } else { this.notifyScrollEvent = function(a, b) {} } if (D.hastranslate3d && C.opt.enabletranslate3d) { this.setScrollTop = function(a, b) { C.doc.translate.y = a; C.doc.translate.ty = (a * -1) + "px"; C.doc.css(D.trstyle, "translate3d(" + C.doc.translate.tx + "," + C.doc.translate.ty + ",0px)"); if (!b) C.notifyScrollEvent(C.win[0]) }; this.setScrollLeft = function(a, b) { C.doc.translate.x = a; C.doc.translate.tx = (a * -1) + "px"; C.doc.css(D.trstyle, "translate3d(" + C.doc.translate.tx + "," + C.doc.translate.ty + ",0px)"); if (!b) C.notifyScrollEvent(C.win[0]) } } else { this.setScrollTop = function(a, b) { C.doc.translate.y = a; C.doc.translate.ty = (a * -1) + "px"; C.doc.css(D.trstyle, "translate(" + C.doc.translate.tx + "," + C.doc.translate.ty + ")"); if (!b) C.notifyScrollEvent(C.win[0]) }; this.setScrollLeft = function(a, b) { C.doc.translate.x = a; C.doc.translate.tx = (a * -1) + "px"; C.doc.css(D.trstyle, "translate(" + C.doc.translate.tx + "," + C.doc.translate.ty + ")"); if (!b) C.notifyScrollEvent(C.win[0]) } } } else { this.getScrollTop = function() { return C.docscroll.scrollTop() }; this.setScrollTop = function(a) { return C.docscroll.scrollTop(a) }; this.getScrollLeft = function() { return C.docscroll.scrollLeft() }; this.setScrollLeft = function(a) { return C.docscroll.scrollLeft(a) } } this.getTarget = function(e) { if (!e) return false; if (e.target) return e.target; if (e.srcElement) return e.srcElement; return false }; this.hasParent = function(e, a) { if (!e) return false; var b = e.target || e.srcElement || e || false; while (b && b.id != a) { b = b.parentNode || false } return (b !== false) }; var E = { "thin": 1, "medium": 3, "thick": 5 }; function getWidthToPixel(a, b, c) { var d = a.css(b); var e = parseFloat(d); if (isNaN(e)) { e = E[d] || 0; var f = (e == 3) ? ((c) ? (C.win.outerHeight() - C.win.innerHeight()) : (C.win.outerWidth() - C.win.innerWidth())) : 1; if (C.isie8 && e) e += 1; return (f) ? e: 0 } return e }; this.getOffset = function() { if (C.isfixed) return { top: parseFloat(C.win.css('top')), left: parseFloat(C.win.css('left')) }; if (!C.viewport) return C.win.offset(); var a = C.win.offset(); var b = C.viewport.offset(); return { top: a.top - b.top + C.viewport.scrollTop(), left: a.left - b.left + C.viewport.scrollLeft() } }; this.updateScrollBar = function(a) { if (C.ishwscroll) { C.rail.css({ height: C.win.innerHeight() }); if (C.railh) C.railh.css({ width: C.win.innerWidth() }) } else { var b = C.getOffset(); var c = { top: b.top, left: b.left }; c.top += getWidthToPixel(C.win, 'border-top-width', true); var d = (C.win.outerWidth() - C.win.innerWidth()) / 2; c.left += (C.rail.align) ? C.win.outerWidth() - getWidthToPixel(C.win, 'border-right-width') - C.rail.width: getWidthToPixel(C.win, 'border-left-width'); var e = C.opt.railoffset; if (e) { if (e.top) c.top += e.top; if (C.rail.align && e.left) c.left += e.left } if (!C.locked) C.rail.css({ top: c.top, left: c.left, height: (a) ? a.h: C.win.innerHeight() }); if (C.zoom) { C.zoom.css({ top: c.top + 1, left: (C.rail.align == 1) ? c.left - 20 : c.left + C.rail.width + 4 }) } if (C.railh && !C.locked) { var c = { top: b.top, left: b.left }; var y = (C.railh.align) ? c.top + getWidthToPixel(C.win, 'border-top-width', true) + C.win.innerHeight() - C.railh.height: c.top + getWidthToPixel(C.win, 'border-top-width', true); var x = c.left + getWidthToPixel(C.win, 'border-left-width'); C.railh.css({ top: y, left: x, width: C.railh.width }) } } }; this.doRailClick = function(e, a, b) { var c, pg, cur, pos; if (C.rail.drag && C.rail.drag.pt != 1) return; if (C.locked) return; if (C.rail.drag) return; C.cancelScroll(); C.cancelEvent(e); if (a) { c = (b) ? C.doScrollLeft: C.doScrollTop; cur = (b) ? ((e.pageX - C.railh.offset().left - (C.cursorwidth / 2)) * C.scrollratio.x) : ((e.pageY - C.rail.offset().top - (C.cursorheight / 2)) * C.scrollratio.y); c(cur) } else { c = (b) ? C.doScrollLeftBy: C.doScrollBy; cur = (b) ? C.scroll.x: C.scroll.y; pos = (b) ? e.pageX - C.railh.offset().left: e.pageY - C.rail.offset().top; pg = (b) ? C.view.w: C.view.h; (cur >= pos) ? c(pg) : c( - pg) } }; C.hasanimationframe = (M); C.hascancelanimationframe = (N); if (!C.hasanimationframe) { M = function(a) { return setTimeout(a, 16) }; N = clearInterval } else if (!C.hascancelanimationframe) N = function() { C.cancelAnimationFrame = true }; this.init = function() { C.saved.css = []; if (D.isie7mobile) return true; if (D.hasmstouch) C.css((C.ispage) ? $("html") : C.win, { '-ms-touch-action': 'none' }); if (!C.ispage || (!D.cantouch && !D.isieold && !D.isie9mobile)) { var m = C.docscroll; if (C.ispage) m = (C.haswrapper) ? C.win: C.doc; if (!D.isie9mobile) C.css(m, { 'overflow-y': 'hidden' }); if (C.ispage && D.isie7) { if (C.doc[0].nodeName == 'BODY') C.css($("html"), { 'overflow-y': 'hidden' }); else if (C.doc[0].nodeName == 'HTML') C.css($("body"), { 'overflow-y': 'hidden' }) } if (D.isios && !C.ispage && !C.haswrapper) C.css($("body"), { "-webkit-overflow-scrolling": "touch" }); var o = $(document.createElement('div')); o.css({ position: "relative", top: 0, "float": "right", width: C.opt.cursorwidth, height: "0px", 'background-color': C.opt.cursorcolor, border: C.opt.cursorborder, 'background-clip': 'padding-box', '-webkit-border-radius': C.opt.cursorborderradius, '-moz-border-radius': C.opt.cursorborderradius, 'border-radius': C.opt.cursorborderradius }); o.hborder = parseFloat(o.outerHeight() - o.innerHeight()); C.cursor = o; var p = $(document.createElement('div')); p.attr('id', C.id); var v, a, kp = ["left", "right"]; for (var n in kp) { a = kp[n]; v = C.opt.railpadding[a]; (v) ? p.css("padding-" + a, v + "px") : C.opt.railpadding[a] = 0 } p.append(o); p.width = Math.max(parseFloat(C.opt.cursorwidth), o.outerWidth()) + C.opt.railpadding['left'] + C.opt.railpadding['right']; p.css({ width: p.width + "px", 'zIndex': (C.ispage) ? C.opt.zindex: C.opt.zindex + 2, "background": C.opt.background }); p.visibility = true; p.scrollable = true; p.align = (C.opt.railalign == "left") ? 0 : 1; C.rail = p; C.rail.drag = false; var q = false; if (C.opt.boxzoom && !C.ispage && !D.isieold) { q = document.createElement('div'); C.bind(q, "click", C.doZoom); C.zoom = $(q); C.zoom.css({ "cursor": "pointer", 'z-index': C.opt.zindex, 'backgroundImage': 'url(' + L + 'zoomico_wev8.png)', 'height': 18, 'width': 18, 'backgroundPosition': '0px 0px' }); if (C.opt.dblclickzoom) C.bind(C.win, "dblclick", C.doZoom); if (D.cantouch && C.opt.gesturezoom) { C.ongesturezoom = function(e) { if (e.scale > 1.5) C.doZoomIn(e); if (e.scale < 0.8) C.doZoomOut(e); return C.cancelEvent(e) }; C.bind(C.win, "gestureend", C.ongesturezoom) } }; C.railh = false; if (C.opt.horizrailenabled) { C.css(m, { 'overflow-x': 'hidden' }); var o = $(document.createElement('div')); o.css({ position: "relative", top: 0, height: C.opt.cursorwidth, width: "0px", 'background-color': C.opt.cursorcolor, border: C.opt.cursorborder, 'background-clip': 'padding-box', '-webkit-border-radius': C.opt.cursorborderradius, '-moz-border-radius': C.opt.cursorborderradius, 'border-radius': C.opt.cursorborderradius }); o.wborder = parseFloat(o.outerWidth() - o.innerWidth()); C.cursorh = o; var r = $(document.createElement('div')); r.attr('id', C.id + '-hr'); r.height = 1 + Math.max(parseFloat(C.opt.cursorwidth), o.outerHeight()); r.css({ height: r.height + "px", 'zIndex': (C.ispage) ? C.opt.zindex: C.opt.zindex + 2, "background": C.opt.background }); r.append(o); r.visibility = true; r.scrollable = true; r.align = (C.opt.railvalign == "top") ? 0 : 1; C.railh = r; C.railh.drag = false } if (C.ispage) { p.css({ position: "fixed", top: "0px", height: "100%" }); (p.align) ? p.css({ right: "0px" }) : p.css({ left: "0px" }); C.body.append(p); if (C.railh) { r.css({ position: "fixed", left: "0px", width: "100%" }); (r.align) ? r.css({ bottom: "0px" }) : r.css({ top: "0px" }); C.body.append(r) } } else { if (C.ishwscroll) { if (C.win.css('position') == 'static') C.css(C.win, { 'position': 'relative' }); var s = (C.win[0].nodeName == 'HTML') ? C.body: C.win; if (C.zoom) { C.zoom.css({ position: "absolute", top: 1, right: 0, "margin-right": p.width + 4 }); s.append(C.zoom) } p.css({ position: "absolute", top: 0 }); (p.align) ? p.css({ right: 0 }) : p.css({ left: 0 }); s.append(p); if (r) { r.css({ position: "absolute", left: 0, bottom: 0 }); (r.align) ? r.css({ bottom: 0 }) : r.css({ top: 0 }); s.append(r) } } else { C.isfixed = (C.win.css("position") == "fixed"); var t = (C.isfixed) ? "fixed": "absolute"; if (!C.isfixed) C.viewport = C.getViewport(C.win[0]); if (C.viewport) C.body = C.viewport; p.css({ position: t }); if (C.zoom) C.zoom.css({ position: t }); C.updateScrollBar(); C.body.append(p); if (C.zoom) C.body.append(C.zoom); if (C.railh) { r.css({ position: t }); C.body.append(r) } } if (D.isios) C.css(C.win, { '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', '-webkit-touch-callout': 'none' }); if (D.isie && C.opt.disableoutline) C.win.attr("hideFocus", "true"); if (D.iswebkit && C.opt.disableoutline) C.win.css({ "outline": "none" }) } if (C.opt.autohidemode === false) { C.autohidedom = false; C.rail.css({ opacity: C.opt.cursoropacitymax }); if (C.railh) C.railh.css({ opacity: C.opt.cursoropacitymax }) } else if (C.opt.autohidemode === true) { C.autohidedom = $().add(C.rail); if (C.railh) C.autohidedom = C.autohidedom.add(C.railh) } else if (C.opt.autohidemode == "scroll") { C.autohidedom = $().add(C.rail); if (C.railh) C.autohidedom = C.autohidedom.add(C.railh) } else if (C.opt.autohidemode == "cursor") { C.autohidedom = $().add(C.cursor); if (C.railh) C.autohidedom = C.autohidedom.add(C.railh.cursor) } else if (C.opt.autohidemode == "hidden") { C.autohidedom = false; C.hide(); C.locked = false } if (D.isie9mobile) { C.scrollmom = new R(C); C.onmangotouch = function(e) { var a = C.getScrollTop(); var b = C.getScrollLeft(); if ((a == C.scrollmom.lastscrolly) && (b == C.scrollmom.lastscrollx)) return true; var c = a - C.mangotouch.sy; var d = b - C.mangotouch.sx; var f = Math.round(Math.sqrt(Math.pow(d, 2) + Math.pow(c, 2))); if (f == 0) return; var g = (c < 0) ? -1 : 1; var h = (d < 0) ? -1 : 1; var i = +new Date(); if (C.mangotouch.lazy) clearTimeout(C.mangotouch.lazy); if (((i - C.mangotouch.tm) > 80) || (C.mangotouch.dry != g) || (C.mangotouch.drx != h)) { C.scrollmom.stop(); C.scrollmom.reset(b, a); C.mangotouch.sy = a; C.mangotouch.ly = a; C.mangotouch.sx = b; C.mangotouch.lx = b; C.mangotouch.dry = g; C.mangotouch.drx = h; C.mangotouch.tm = i } else { C.scrollmom.stop(); C.scrollmom.update(C.mangotouch.sx - d, C.mangotouch.sy - c); var j = i - C.mangotouch.tm; C.mangotouch.tm = i; var k = Math.max(Math.abs(C.mangotouch.ly - a), Math.abs(C.mangotouch.lx - b)); C.mangotouch.ly = a; C.mangotouch.lx = b; if (k > 2) { C.mangotouch.lazy = setTimeout(function() { C.mangotouch.lazy = false; C.mangotouch.dry = 0; C.mangotouch.drx = 0; C.mangotouch.tm = 0; C.scrollmom.doMomentum(30) }, 100) } } }; var u = C.getScrollTop(); var w = C.getScrollLeft(); C.mangotouch = { sy: u, ly: u, dry: 0, sx: w, lx: w, drx: 0, lazy: false, tm: 0 }; C.bind(C.docscroll, "scroll", C.onmangotouch) } else { if (D.cantouch || C.istouchcapable || C.opt.touchbehavior || D.hasmstouch) { C.scrollmom = new R(C); C.ontouchstart = function(e) { if (e.pointerType && e.pointerType != 2) return false; if (!C.locked) { if (D.hasmstouch) { var a = (e.target) ? e.target: false; while (a) { var b = $(a).getNiceScroll(); if ((b.length > 0) && (b[0].me == C.me)) break; if (b.length > 0) return false; if ((a.nodeName == 'DIV') && (a.id == C.id)) break; a = (a.parentNode) ? a.parentNode: false } } C.cancelScroll(); var a = C.getTarget(e); if (a) { var c = (/INPUT/i.test(a.nodeName)) && (/range/i.test(a.type)); if (c) return C.stopPropagation(e) } if (! ("clientX" in e) && ("changedTouches" in e)) { e.clientX = e.changedTouches[0].clientX; e.clientY = e.changedTouches[0].clientY } if (C.forcescreen) { var d = e; var e = { "original": (e.original) ? e.original: e }; e.clientX = d.screenX; e.clientY = d.screenY } C.rail.drag = { x: e.clientX, y: e.clientY, sx: C.scroll.x, sy: C.scroll.y, st: C.getScrollTop(), sl: C.getScrollLeft(), pt: 2 }; if (C.opt.touchbehavior && C.isiframe && D.isie) { var f = C.win.position(); C.rail.drag.x += f.left; C.rail.drag.y += f.top } C.hasmoving = false; C.lastmouseup = false; C.scrollmom.reset(e.clientX, e.clientY); if (!D.cantouch && !this.istouchcapable && !D.hasmstouch) { var g = (a) ? /INPUT|SELECT|TEXTAREA/i.test(a.nodeName) : false; if (!g) { if (!C.ispage && D.hasmousecapture) a.setCapture(); return C.cancelEvent(e) } if (/SUBMIT|CANCEL|BUTTON/i.test($(a).attr('type'))) { pc = { "tg": a, "click": false }; C.preventclick = pc } } } }; C.ontouchend = function(e) { if (e.pointerType && e.pointerType != 2) return false; if (C.rail.drag && (C.rail.drag.pt == 2)) { C.scrollmom.doMomentum(); C.rail.drag = false; if (C.hasmoving) { C.hasmoving = false; C.lastmouseup = true; C.hideCursor(); if (D.hasmousecapture) document.releaseCapture(); if (!D.cantouch) return C.cancelEvent(e) } } }; var x = (C.opt.touchbehavior && C.isiframe && !D.hasmousecapture); C.ontouchmove = function(e, a) { if (e.pointerType && e.pointerType != 2) return false; if (C.rail.drag && (C.rail.drag.pt == 2)) { if (D.cantouch && (typeof e.original == "undefined")) return true; C.hasmoving = true; if (C.preventclick && !C.preventclick.click) { C.preventclick.click = C.preventclick.tg.onclick || false; C.preventclick.tg.onclick = C.onpreventclick } var b = $.extend({ "original": e }, e); e = b; if (("changedTouches" in e)) { e.clientX = e.changedTouches[0].clientX; e.clientY = e.changedTouches[0].clientY } if (C.forcescreen) { var c = e; var e = { "original": (e.original) ? e.original: e }; e.clientX = c.screenX; e.clientY = c.screenY } var d = ofy = 0; if (x && !a) { var f = C.win.position(); d = -f.left; ofy = -f.top } var g = e.clientY + ofy; var h = (g - C.rail.drag.y); var i = C.rail.drag.st - h; if (C.ishwscroll && C.opt.bouncescroll) { if (i < 0) { i = Math.round(i / 2) } else if (i > C.page.maxh) { i = C.page.maxh + Math.round((i - C.page.maxh) / 2) } } else { if (i < 0) { i = 0; g = 0 } if (i > C.page.maxh) { i = C.page.maxh; g = 0 } } var j = e.clientX + d; if (C.railh && C.railh.scrollable) { var k = (j - C.rail.drag.x); var l = C.rail.drag.sl - k; if (C.ishwscroll && C.opt.bouncescroll) { if (l < 0) { l = Math.round(l / 2) } else if (l > C.page.maxw) { l = C.page.maxw + Math.round((l - C.page.maxw) / 2) } } else { if (l < 0) { l = 0; j = 0 } if (l > C.page.maxw) { l = C.page.maxw; j = 0 } } } C.synched("touchmove", function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.rail.drag && (C.rail.drag.pt == 2)) { if (C.prepareTransition) C.prepareTransition(0); if (C.rail.scrollable) C.setScrollTop(i); C.scrollmom.update(j, g); if (C.railh && C.railh.scrollable) { C.setScrollLeft(l); C.showCursor(i, l) } else { C.showCursor(i) } if (D.isie10) document.selection.clear() } }); if (!D.ischrome && !C.istouchcapable) return C.cancelEvent(e) } } } if (D.cantouch || C.opt.touchbehavior) { C.onpreventclick = function(e) { if (C.preventclick) { C.preventclick.tg.onclick = C.preventclick.click; C.preventclick = false; return C.cancelEvent(e) } }; C.onmousedown = C.ontouchstart; C.onmouseup = C.ontouchend; C.onclick = (D.isios) ? false: function(e) { if (C.lastmouseup) { C.lastmouseup = false; return C.cancelEvent(e) } else { return true } }; C.onmousemove = C.ontouchmove; if (D.cursorgrabvalue) { C.css((C.ispage) ? C.doc: C.win, { 'cursor': D.cursorgrabvalue }); C.css(C.rail, { 'cursor': D.cursorgrabvalue }) } } else { C.onmousedown = function(e, a) { if (C.rail.drag && C.rail.drag.pt != 1) return; if (C.locked) return C.cancelEvent(e); C.cancelScroll(); C.rail.drag = { x: e.clientX, y: e.clientY, sx: C.scroll.x, sy: C.scroll.y, pt: 1, hr: ( !! a) }; var b = C.getTarget(e); if (!C.ispage && D.hasmousecapture) b.setCapture(); if (C.isiframe && !D.hasmousecapture) { C.saved["csspointerevents"] = C.doc.css("pointer-events"); C.css(C.doc, { "pointer-events": "none" }) } return C.cancelEvent(e) }; C.onmouseup = function(e) { if (C.rail.drag) { if (D.hasmousecapture) document.releaseCapture(); if (C.isiframe && !D.hasmousecapture) C.doc.css("pointer-events", C.saved["csspointerevents"]); if (C.rail.drag.pt != 1) return; C.rail.drag = false; return C.cancelEvent(e) } }; C.onmousemove = function(e) { if (C.rail.drag) { if (C.rail.drag.pt != 1) return; if (D.ischrome && e.which == 0) return C.onmouseup(e); C.cursorfreezed = true; if (C.rail.drag.hr) { C.scroll.x = C.rail.drag.sx + (e.clientX - C.rail.drag.x); if (C.scroll.x < 0) C.scroll.x = 0; var a = C.scrollvaluemaxw; if (C.scroll.x > a) C.scroll.x = a } else { C.scroll.y = C.rail.drag.sy + (e.clientY - C.rail.drag.y); if (C.scroll.y < 0) C.scroll.y = 0; var b = C.scrollvaluemax; if (C.scroll.y > b) C.scroll.y = b } C.synched('mousemove', function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.rail.drag && (C.rail.drag.pt == 1)) { C.showCursor(); if (C.rail.drag.hr) C.doScrollLeft(Math.round(C.scroll.x * C.scrollratio.x)); else C.doScrollTop(Math.round(C.scroll.y * C.scrollratio.y)) } }); return C.cancelEvent(e) } else { C.checkarea = true } } } if (D.cantouch || C.opt.touchbehavior) { C.bind(C.win, "mousedown", C.onmousedown) } if (D.hasmstouch) { C.css(C.rail, { '-ms-touch-action': 'none' }); C.css(C.cursor, { '-ms-touch-action': 'none' }); C.bind(C.win, "MSPointerDown", C.ontouchstart); C.bind(document, "MSPointerUp", C.ontouchend); C.bind(document, "MSPointerMove", C.ontouchmove); C.bind(C.cursor, "MSGestureHold", function(e) { e.preventDefault() }); C.bind(C.cursor, "contextmenu", function(e) { e.preventDefault() }) } if (this.istouchcapable) { C.bind(C.win, "touchstart", C.ontouchstart); C.bind(document, "touchend", C.ontouchend); C.bind(document, "touchcancel", C.ontouchend); C.bind(document, "touchmove", C.ontouchmove) } C.bind(C.cursor, "mousedown", C.onmousedown); C.bind(C.cursor, "mouseup", C.onmouseup); if (C.railh) { C.bind(C.cursorh, "mousedown", function(e) { C.onmousedown(e, true) }); C.bind(C.cursorh, "mouseup", function(e) { if (C.rail.drag && C.rail.drag.pt == 2) return; C.rail.drag = false; C.hasmoving = false; C.hideCursor(); if (D.hasmousecapture) document.releaseCapture(); return C.cancelEvent(e) }) } C.bind(document, "mouseup", C.onmouseup); if (D.hasmousecapture) C.bind(C.win, "mouseup", C.onmouseup); C.bind(document, "mousemove", C.onmousemove); if (C.onclick) C.bind(document, "click", C.onclick); if (!D.cantouch && !C.opt.touchbehavior) { C.jqbind(C.rail, "mouseenter", function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.canshowonmouseevent) C.showCursor(); C.rail.active = true }); C.jqbind(C.rail, "mouseleave", function() { C.rail.active = false; if (!C.rail.drag) C.hideCursor() }); if (C.opt.sensitiverail) { C.bind(C.rail, "click", function(e) { C.doRailClick(e, false, false) }); C.bind(C.rail, "dblclick", function(e) { C.doRailClick(e, true, false) }); C.bind(C.cursor, "click", function(e) { C.cancelEvent(e) }); C.bind(C.cursor, "dblclick", function(e) { C.cancelEvent(e) }) } if (C.railh) { C.jqbind(C.railh, "mouseenter", function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.canshowonmouseevent) C.showCursor(); C.rail.active = true }); C.jqbind(C.railh, "mouseleave", function() { C.rail.active = false; if (!C.rail.drag) C.hideCursor() }); if (C.opt.sensitiverail) { C.bind(C.railh, "click", function(e) { C.doRailClick(e, false, true) }); C.bind(C.railh, "dblclick", function(e) { C.doRailClick(e, true, true) }); C.bind(C.cursorh, "click", function(e) { C.cancelEvent(e) }); C.bind(C.cursorh, "dblclick", function(e) { C.cancelEvent(e) }) } } if (C.zoom) { C.jqbind(C.zoom, "mouseenter", function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.canshowonmouseevent) C.showCursor(); C.rail.active = true }); C.jqbind(C.zoom, "mouseleave", function() { C.rail.active = false; if (!C.rail.drag) C.hideCursor() }) } } if (C.opt.enablemousewheel) { if (!C.isiframe) C.bind((D.isie && C.ispage) ? document: C.docscroll, "mousewheel", C.onmousewheel); C.bind(C.rail, "mousewheel", C.onmousewheel); if (C.railh) C.bind(C.railh, "mousewheel", C.onmousewheelhr) } if (!C.ispage && !D.cantouch && !(/HTML|BODY/.test(C.win[0].nodeName))) { if (!C.win.attr("tabindex")) C.win.attr({ "tabindex": J++ }); C.jqbind(C.win, "focus", function(e) { try { if (C.me.is(":visible") === false) return } catch(e) {} G = (C.getTarget(e)).id || true; C.hasfocus = true; if (C.canshowonmouseevent) C.noticeCursor() }); C.jqbind(C.win, "blur", function(e) { G = false; C.hasfocus = false }); C.jqbind(C.win, "mouseenter", function(e) { try { if (C.me.is(":visible") === false) return } catch(e) {} H = (C.getTarget(e)).id || true; C.hasmousefocus = true; if (C.canshowonmouseevent) C.noticeCursor() }); C.jqbind(C.win, "mouseleave", function() { H = false; C.hasmousefocus = false }) } } C.onkeypress = function(e) { if (C.locked && C.page.maxh == 0) return true; e = (e) ? e: window.e; var a = C.getTarget(e); if (a && /INPUT|TEXTAREA|SELECT|OPTION/.test(a.nodeName)) { var b = a.getAttribute('type') || a.type || false; if ((!b) || !(/submit|button|cancel/i.tp)) return true } if (C.hasfocus || (C.hasmousefocus && !G) || (C.ispage && !G && !H)) { var c = e.keyCode; if (C.locked && c != 27) return C.cancelEvent(e); var d = e.ctrlKey || false; var f = e.shiftKey || false; var g = false; switch (c) { case 38: case 63233: C.doScrollBy(24 * 3); g = true; break; case 40: case 63235: C.doScrollBy( - 24 * 3); g = true; break; case 37: case 63232: if (C.railh) { (d) ? C.doScrollLeft(0) : C.doScrollLeftBy(24 * 3); g = true } break; case 39: case 63234: if (C.railh) { (d) ? C.doScrollLeft(C.page.maxw) : C.doScrollLeftBy( - 24 * 3); g = true } break; case 33: case 63276: C.doScrollBy(C.view.h); g = true; break; case 34: case 63277: C.doScrollBy( - C.view.h); g = true; break; case 36: case 63273: (C.railh && d) ? C.doScrollPos(0, 0) : C.doScrollTo(0); g = true; break; case 35: case 63275: (C.railh && d) ? C.doScrollPos(C.page.maxw, C.page.maxh) : C.doScrollTo(C.page.maxh); g = true; break; case 32: if (C.opt.spacebarenabled) { (f) ? C.doScrollBy(C.view.h) : C.doScrollBy( - C.view.h); g = true } break; case 27: if (C.zoomactive) { C.doZoom(); g = true } break } if (g) return C.cancelEvent(e) } }; if (C.opt.enablekeyboard) C.bind(document, (D.isopera && !D.isopera12) ? "keypress": "keydown", C.onkeypress); C.bind(window, 'resize', C.resize); C.bind(window, 'orientationchange', C.resize); C.bind(window, "load", C.resize); if (D.ischrome && !C.ispage && !C.haswrapper) { var y = C.win.attr("style"); var z = parseFloat(C.win.css("width")) + 1; C.win.css('width', z); C.synched("chromefix", function() { C.win.attr("style", y) }) } C.onAttributeChange = function(e) { C.lazyResize() }; if (!C.ispage && !C.haswrapper) { if ("WebKitMutationObserver" in window) { C.observer = new WebKitMutationObserver(function(a) { a.forEach(C.onAttributeChange) }); C.observer.observe(C.win[0], { attributes: true, subtree: false }) } else { C.bind(C.win, (D.isie && !D.isie9) ? "propertychange": "DOMAttrModified", C.onAttributeChange); if (D.isie9) C.win[0].attachEvent("onpropertychange", C.onAttributeChange) } } if (!C.ispage && C.opt.boxzoom) C.bind(window, "resize", C.resizeZoom); if (C.istextarea) C.bind(C.win, "mouseup", C.resize); C.resize() } if (this.doc[0].nodeName == 'IFRAME') { function oniframeload(e) { C.iframexd = false; try { var b = 'contentDocument' in this ? this.contentDocument: this.contentWindow.document; var a = b.domain } catch(e) { C.iframexd = true; b = false }; if (C.iframexd) { if ("console" in window) console.log('NiceScroll error: policy restriced iframe'); return true } C.forcescreen = true; if (C.isiframe) { C.iframe = { "doc": $(b), "html": C.doc.contents().find('html')[0], "body": C.doc.contents().find('body')[0] }; C.getContentSize = function() { return { w: Math.max(C.iframe.html.scrollWidth, C.iframe.body.scrollWidth), h: Math.max(C.iframe.html.scrollHeight, C.iframe.body.scrollHeight) } }; C.docscroll = $(C.iframe.body) } if (!D.isios && C.opt.iframeautoresize && !C.isiframe) { C.win.scrollTop(0); C.doc.height(""); var c = Math.max(b.getElementsByTagName('html')[0].scrollHeight, b.body.scrollHeight); C.doc.height(c) } C.resize(); if (D.isie7) C.css($(C.iframe.html), { 'overflow-y': 'hidden' }); C.css($(C.iframe.body), { 'overflow-y': 'hidden' }); if ('contentWindow' in this) { C.bind(this.contentWindow, "scroll", C.onscroll) } else { C.bind(b, "scroll", C.onscroll) } if (C.opt.enablemousewheel) { C.bind(b, "mousewheel", C.onmousewheel) } if (C.opt.enablekeyboard) C.bind(b, (D.isopera) ? "keypress": "keydown", C.onkeypress); if (D.cantouch || C.opt.touchbehavior) { C.bind(b, "mousedown", C.onmousedown); C.bind(b, "mousemove", function(e) { C.onmousemove(e, true) }); if (D.cursorgrabvalue) C.css($(b.body), { 'cursor': D.cursorgrabvalue }) } C.bind(b, "mouseup", C.onmouseup); if (C.zoom) { if (C.opt.dblclickzoom) C.bind(b, 'dblclick', C.doZoom); if (C.ongesturezoom) C.bind(b, "gestureend", C.ongesturezoom) } }; if (this.doc[0].readyState && this.doc[0].readyState == "complete") { setTimeout(function() { oniframeload.call(C.doc[0], false) }, 500) } C.bind(this.doc, "load", oniframeload) } }; this.showCursor = function(a, b) { if (C.cursortimeout) { clearTimeout(C.cursortimeout); C.cursortimeout = 0 } if (!C.rail) return; try { var c = C.me.offset().top; if (C.me.scrollParent && C.me.scrollParent().length > 0) { if (C.rail.parent().get(0).tagName != "BODY") { c = c - C.me.scrollParent().offset().top; c = c + C.me.scrollParent().offset().scrollTop() } } if (C.rail.parent().get(0).tagName != "BODY") { c = c - F(".e8_boxhead").height() } C.rail.css("top", c); if (!C.rail.data("__resize")) { C.resize(); C.rail.data("__resize", true) } } catch(e) { if (window.console) console.log(e, "jquery.nicescroll.js#showCursor") } if (C.autohidedom) { C.autohidedom.stop().css({ opacity: C.opt.cursoropacitymax }); C.cursoractive = true } if ((typeof a != "undefined") && (a !== false)) { C.scroll.y = Math.round(a * 1 / C.scrollratio.y) } if (typeof b != "undefined") { C.scroll.x = Math.round(b * 1 / C.scrollratio.x) } C.cursor.css({ height: C.cursorheight, top: C.scroll.y }); if (C.cursorh) { (!C.rail.align && C.rail.visibility) ? C.cursorh.css({ width: C.cursorwidth, left: C.scroll.x + C.rail.width }) : C.cursorh.css({ width: C.cursorwidth, left: C.scroll.x }); C.cursoractive = true } if (C.zoom) C.zoom.stop().css({ opacity: C.opt.cursoropacitymax }) }; this.hideCursor = function(a) { if (C.cursortimeout) return; if (!C.rail) return; if (!C.autohidedom) return; if (a) { C.cursortimeout = setTimeout(function() { if (!C.rail.active || !C.showonmouseevent) { C.autohidedom.stop().animate({ opacity: C.opt.cursoropacitymin }); if (C.zoom) C.zoom.stop().animate({ opacity: C.opt.cursoropacitymin }); C.cursoractive = false } C.cursortimeout = 0 }, a || 400) } else { if (!C.rail.active || !C.showonmouseevent) { C.autohidedom.stop().animate({ opacity: C.opt.cursoropacitymin }); if (C.zoom) C.zoom.stop().animate({ opacity: C.opt.cursoropacitymin }); C.cursoractive = false } C.cursortimeout = 0 } }; this.noticeCursor = function(a, b, c) { C.showCursor(b, c); if (!C.rail.active) C.hideCursor(a) }; this.getContentSize = (C.ispage) ? function() { return { w: Math.max(document.body.scrollWidth, document.documentElement.scrollWidth), h: Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) } }: (C.haswrapper) ? function() { return { w: C.doc.outerWidth() + parseInt(C.win.css('paddingLeft')) + parseInt(C.win.css('paddingRight')), h: C.doc.outerHeight() + parseInt(C.win.css('paddingTop')) + parseInt(C.win.css('paddingBottom')) } }: function() { return { w: C.docscroll[0].scrollWidth, h: C.docscroll[0].scrollHeight } }; this.onResize = function(e, a) { try { if (C.me.is(":visible") === false) return } catch(e) {} if (!C.win) return false; if (!C.haswrapper && !C.ispage) { if (C.win.css('display') == 'none') { if (C.visibility) C.hideRail().hideRailHr(); return false } else { if (!C.hidden && !C.visibility) C.showRail().showRailHr() } } var b = C.page.maxh; var c = C.page.maxw; var d = { h: C.view.h, w: C.view.w }; C.view = { w: (C.ispage) ? C.win.width() : parseInt(C.win[0].clientWidth), h: (C.ispage) ? C.win.height() : parseInt(C.win[0].clientHeight) }; C.page = (a) ? a: C.getContentSize(); C.page.maxh = Math.max(0, C.page.h - C.view.h); C.page.maxw = Math.max(0, C.page.w - C.view.w); if ((C.page.maxh == b) && (C.page.maxw == c) && (C.view.w == d.w)) { if (!C.ispage) { var f = C.win.offset(); if (C.lastposition) { var g = C.lastposition; if ((g.top == f.top) && (g.left == f.left)) return C } C.lastposition = f } else { return C } } if (C.page.maxh == 0) { C.hideRail(); C.scrollvaluemax = 0; C.scroll.y = 0; C.scrollratio.y = 0; C.cursorheight = 0; C.setScrollTop(0); C.rail.scrollable = false } else { C.rail.scrollable = true } if (C.page.maxw == 0) { C.hideRailHr(); C.scrollvaluemaxw = 0; C.scroll.x = 0; C.scrollratio.x = 0; C.cursorwidth = 0; C.setScrollLeft(0); C.railh.scrollable = false } else { C.railh.scrollable = true } C.locked = (C.page.maxh == 0) && (C.page.maxw == 0); if (C.locked) { if (!C.ispage) C.updateScrollBar(C.view); return false } if (!C.hidden && !C.visibility) { C.showRail().showRailHr() } else if (!C.hidden && !C.railh.visibility) C.showRailHr(); if (C.istextarea && C.win.css('resize') && C.win.css('resize') != 'none') C.view.h -= 20; if (!C.ispage) C.updateScrollBar(C.view); C.cursorheight = Math.min(C.view.h, Math.round(C.view.h * (C.view.h / C.page.h))); C.cursorheight = (C.opt.cursorfixedheight) ? C.opt.cursorfixedheight: Math.max(C.opt.cursorminheight, C.cursorheight); C.cursorwidth = Math.min(C.view.w, Math.round(C.view.w * (C.view.w / C.page.w))); C.cursorwidth = (C.opt.cursorfixedheight) ? C.opt.cursorfixedheight: Math.max(C.opt.cursorminheight, C.cursorwidth); C.scrollvaluemax = C.view.h - C.cursorheight - C.cursor.hborder; if (C.railh) { C.railh.width = (C.page.maxh > 0) ? (C.view.w - C.rail.width) : C.view.w; C.scrollvaluemaxw = C.railh.width - C.cursorwidth - C.cursorh.wborder } C.scrollratio = { x: (C.page.maxw / C.scrollvaluemaxw), y: (C.page.maxh / C.scrollvaluemax) }; var h = C.getScrollTop(); if (h > C.page.maxh) { C.doScrollTop(C.page.maxh) } else { C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y)); C.scroll.x = Math.round(C.getScrollLeft() * (1 / C.scrollratio.x)); if (C.cursoractive) C.noticeCursor() } if (C.scroll.y && (C.getScrollTop() == 0)) C.doScrollTo(Math.floor(C.scroll.y * C.scrollratio.y)); return C }; this.resize = function() { C.delayed('resize', C.onResize, 30); return C }; this.lazyResize = function() { C.delayed('resize', C.resize, 250) }; this._bind = function(a, b, c, d) { C.events.push({ e: a, n: b, f: c, b: d, q: false }); if (a.addEventListener) { a.addEventListener(b, c, d || false) } else if (a.attachEvent) { a.attachEvent("on" + b, c) } else { a["on" + b] = c } }; this.jqbind = function(a, b, c) { C.events.push({ e: a, n: b, f: c, q: true }); $(a).bind(b, c) }; this.bind = function(b, c, d, f) { var g = ("jquery" in b) ? b[0] : b; if (g.addEventListener) { if (D.cantouch && /mouseup|mousedown|mousemove/.test(c)) { var h = (c == 'mousedown') ? 'touchstart': (c == 'mouseup') ? 'touchend': 'touchmove'; C._bind(g, h, function(e) { if (e.touches) { if (e.touches.length < 2) { var a = (e.touches.length) ? e.touches[0] : e; a.original = e; d.call(this, a) } } else if (e.changedTouches) { var a = e.changedTouches[0]; a.original = e; d.call(this, a) } }, f || false) } C._bind(g, c, d, f || false); if (c == 'mousewheel') C._bind(g, "DOMMouseScroll", d, f || false); if (D.cantouch && c == "mouseup") C._bind(g, "touchcancel", d, f || false) } else { C._bind(g, c, function(e) { e = e || window.event || false; if (e) { if (e.srcElement) e.target = e.srcElement } return ((d.call(g, e) === false) || f === false) ? C.cancelEvent(e) : true }) } }; this._unbind = function(a, b, c, d) { if (a.removeEventListener) { a.removeEventListener(b, c, d) } else if (a.detachEvent) { a.detachEvent('on' + b, c) } else { a['on' + b] = false } }; this.unbindAll = function() { for (var a = 0; a < C.events.length; a++) { var r = C.events[a]; (r.q) ? r.e.unbind(r.n, r.f) : C._unbind(r.e, r.n, r.f, r.b) } }; this.cancelEvent = function(e) { var e = (e.original) ? e.original: (e) ? e: window.event || false; if (!e) return false; if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); if (e.preventManipulation) e.preventManipulation(); e.cancelBubble = true; e.cancel = true; e.returnValue = false; return false }; this.stopPropagation = function(e) { var e = (e.original) ? e.original: (e) ? e: window.event || false; if (!e) return false; if (e.stopPropagation) return e.stopPropagation(); if (e.cancelBubble) e.cancelBubble = true; return false }; this.showRail = function() { if ((C.page.maxh != 0) && (C.ispage || C.win.css('display') != 'none')) { C.visibility = true; C.rail.visibility = true; C.rail.css('display', 'block') } return C }; this.showRailHr = function() { if (!C.railh) return C; if ((C.page.maxw != 0) && (C.ispage || C.win.css('display') != 'none')) { C.railh.visibility = true; C.railh.css('display', 'block') } return C }; this.hideRail = function() { C.visibility = false; C.rail.visibility = false; C.rail.css('display', 'none'); return C }; this.hideRailHr = function() { if (!C.railh) return C; C.railh.visibility = false; C.railh.css('display', 'none'); return C }; this.show = function() { C.hidden = false; C.locked = false; return C.showRail().showRailHr() }; this.hide = function() { C.hidden = true; C.locked = true; return C.hideRail().hideRailHr() }; this.toggle = function() { return (C.hidden) ? C.show() : C.hide() }; this.remove = function() { C.stop(); if (C.cursortimeout) clearTimeout(C.cursortimeout); C.doZoomOut(); C.unbindAll(); if (C.observer !== false) C.observer.disconnect(); C.events = []; if (C.cursor) { C.cursor.remove(); C.cursor = null } if (C.cursorh) { C.cursorh.remove(); C.cursorh = null } if (C.rail) { C.rail.remove(); C.rail = null } if (C.railh) { C.railh.remove(); C.railh = null } if (C.zoom) { C.zoom.remove(); C.zoom = null } for (var a = 0; a < C.saved.css.length; a++) { var d = C.saved.css[a]; d[0].css(d[1], (typeof d[2] == "undefined") ? '': d[2]) } C.saved = false; C.me.data('__nicescroll', ''); C.me = null; C.doc = null; C.docscroll = null; C.win = null; return C }; this.scrollstart = function(a) { this.onscrollstart = a; return C }; this.scrollend = function(a) { this.onscrollend = a; return C }; this.scrollcancel = function(a) { this.onscrollcancel = a; return C }; this.zoomin = function(a) { this.onzoomin = a; return C }; this.zoomout = function(a) { this.onzoomout = a; return C }; this.isScrollable = function(e) { var a = (e.target) ? e.target: e; while (a && (a.nodeType == 1) && !(/BODY|HTML/.test(a.nodeName))) { var b = $(a); var c = b.css('overflowY') || b.css('overflowX') || b.css('overflow') || ''; if (/scroll|auto/.test(c)) return (a.clientHeight != a.scrollHeight); a = (a.parentNode) ? a.parentNode: false } return false }; this.getViewport = function(a) { var b = (a && a.parentNode) ? a.parentNode: false; while (b && (b.nodeType == 1) && !(/BODY|HTML/.test(b.nodeName))) { var c = $(b); var d = c.css('overflowY') || c.css('overflowX') || c.css('overflow') || ''; if ((/scroll|auto/.test(d)) && (b.clientHeight != b.scrollHeight)) return c; if (c.getNiceScroll().length > 0) return c; b = (b.parentNode) ? b.parentNode: false } return false }; function execScrollWheel(e, b) { var c = 0; var d = 0; var f = 1; if ("wheelDeltaY" in e) { f = C.opt.mousescrollstep / (16 * 3); c = Math.floor(e.wheelDeltaX * f); d = Math.floor(e.wheelDeltaY * f); if (d < 0) d = d + 1; if (b && (c == 0) && d) { c = d; d = 0 } } else { var g = e.detail ? e.detail * -1 : e.wheelDelta / 40; if (g) { (b) ? c = Math.floor(g * C.opt.mousescrollstep) : d = Math.floor(g * C.opt.mousescrollstep) } } if (c) { if (C.scrollmom) { C.scrollmom.stop() } C.lastdeltax += c; C.synched("mousewheelx", function() { var a = C.lastdeltax; C.lastdeltax = 0; if (!C.rail.drag) { C.doScrollLeftBy(a) } }) } if (d) { if (C.scrollmom) { C.scrollmom.stop() } C.lastdeltay += d; C.synched("mousewheely", function() { var a = C.lastdeltay; C.lastdeltay = 0; if (!C.rail.drag) { C.doScrollBy(a) } }) } }; this.onmousewheel = function(e) { if (C.locked) return true; if (!C.rail.scrollable) { if (C.railh && C.railh.scrollable) { return C.onmousewheelhr(e) } else { return true } } if (C.opt.preservenativescrolling && C.checkarea) { C.checkarea = false; C.nativescrollingarea = C.isScrollable(e) } if (C.nativescrollingarea) return true; if (C.locked) return C.cancelEvent(e); if (C.rail.drag) return C.cancelEvent(e); execScrollWheel(e, false); return C.cancelEvent(e) }; this.onmousewheelhr = function(e) { if (C.locked || !C.railh.scrollable) return true; if (C.opt.preservenativescrolling && C.checkarea) { C.checkarea = false; C.nativescrollingarea = C.isScrollable(e) } if (C.nativescrollingarea) return true; if (C.locked) return C.cancelEvent(e); if (C.rail.drag) return C.cancelEvent(e); execScrollWheel(e, true); return C.cancelEvent(e) }; this.stop = function() { try { if (C.me.is(":visible") === false) return } catch(e) {} C.cancelScroll(); if (C.scrollmon) C.scrollmon.stop(); C.cursorfreezed = false; C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y)); C.noticeCursor(); return C }; this.getTransitionSpeed = function(a) { var b = Math.round(C.opt.scrollspeed * 10); var c = Math.min(b, Math.round((a / 20) * C.opt.scrollspeed)); return (c > 20) ? c: 0 }; if (!C.opt.smoothscroll) { this.doScrollLeft = function(x, a) { var y = C.getScrollTop(); C.doScrollPos(x, y, a) }; this.doScrollTop = function(y, a) { var x = C.getScrollLeft(); C.doScrollPos(x, y, a) }; this.doScrollPos = function(x, y, a) { var b = (x > C.page.maxw) ? C.page.maxw: x; if (b < 0) b = 0; var c = (y > C.page.maxh) ? C.page.maxh: y; if (c < 0) c = 0; C.synched('scroll', function() { C.setScrollTop(c); C.setScrollLeft(b) }) }; this.cancelScroll = function() {} } else if (C.ishwscroll && D.hastransition && C.opt.usetransition) { this.prepareTransition = function(a, b) { var c = (b) ? ((a > 20) ? a: 0) : C.getTransitionSpeed(a); var d = (c) ? D.prefixstyle + 'transform ' + c + 'ms ease-out': ''; if (!C.lasttransitionstyle || C.lasttransitionstyle != d) { C.lasttransitionstyle = d; C.doc.css(D.transitionstyle, d) } return c }; this.doScrollLeft = function(x, a) { var y = (C.scrollrunning) ? C.newscrolly: C.getScrollTop(); C.doScrollPos(x, y, a) }; this.doScrollTop = function(y, a) { var x = (C.scrollrunning) ? C.newscrollx: C.getScrollLeft(); C.doScrollPos(x, y, a) }; this.doScrollPos = function(x, y, k) { var l = C.getScrollTop(); var m = C.getScrollLeft(); if (((C.newscrolly - l) * (y - l) < 0) || ((C.newscrollx - m) * (x - m) < 0)) C.cancelScroll(); if (C.opt.bouncescroll == false) { if (y < 0) y = 0; else if (y > C.page.maxh) y = C.page.maxh; if (x < 0) x = 0; else if (x > C.page.maxw) x = C.page.maxw } if (x == C.newscrollx && y == C.newscrolly) return false; C.newscrolly = y; C.newscrollx = x; C.newscrollspeed = k || false; if (C.timer) return false; C.timer = setTimeout(function() { var a = C.getScrollTop(); var b = C.getScrollLeft(); var c = {}; c.x = x - b; c.y = y - a; c.px = b; c.py = a; var d = Math.round(Math.sqrt(Math.pow(c.x, 2) + Math.pow(c.y, 2))); var f = (C.newscrollspeed) ? C.newscrollspeed: d; var g = C.prepareTransition(f); if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm); if (g > 0) { if (!C.scrollrunning && C.onscrollstart) { var h = { "type": "scrollstart", "current": { "x": b, "y": a }, "request": { "x": x, "y": y }, "end": { "x": C.newscrollx, "y": C.newscrolly }, "speed": g }; C.onscrollstart.call(C, h) } if (D.transitionend) { if (!C.scrollendtrapped) { C.scrollendtrapped = true; C.bind(C.doc, D.transitionend, C.onScrollEnd, false) } } else { if (C.scrollendtrapped) clearTimeout(C.scrollendtrapped); C.scrollendtrapped = setTimeout(C.onScrollEnd, g) } var i = a; var j = b; C.timerscroll = { bz: new BezierClass(i, C.newscrolly, g, 0, 0, 0.58, 1), bh: new BezierClass(j, C.newscrollx, g, 0, 0, 0.58, 1) }; if (!C.cursorfreezed) C.timerscroll.tm = setInterval(function() { try { if (C.me.is(":visible") === false) return } catch(e) {} C.showCursor(C.getScrollTop(), C.getScrollLeft()) }, 60) } C.synched("doScroll-set", function() { C.timer = 0; if (C.scrollendtrapped) C.scrollrunning = true; C.setScrollTop(C.newscrolly); C.setScrollLeft(C.newscrollx); if (!C.scrollendtrapped) C.onScrollEnd() }) }, 50) }; this.cancelScroll = function() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (!C.scrollendtrapped) return true; var a = C.getScrollTop(); var b = C.getScrollLeft(); C.scrollrunning = false; if (!D.transitionend) clearTimeout(D.transitionend); C.scrollendtrapped = false; C._unbind(C.doc, D.transitionend, C.onScrollEnd); C.prepareTransition(0); C.setScrollTop(a); if (C.railh) C.setScrollLeft(b); if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm); C.timerscroll = false; C.cursorfreezed = false; C.showCursor(a, b); return C }; this.onScrollEnd = function() { try { if (C.me.is(":visible") === false) return } catch(e) {}; if (C.scrollendtrapped) C._unbind(C.doc, D.transitionend, C.onScrollEnd); C.scrollendtrapped = false; C.prepareTransition(0); if (C.timerscroll && C.timerscroll.tm) clearInterval(C.timerscroll.tm); C.timerscroll = false; var a = C.getScrollTop(); var b = C.getScrollLeft(); C.setScrollTop(a); if (C.railh) C.setScrollLeft(b); C.noticeCursor(false, a, b); C.cursorfreezed = false; if (a < 0) a = 0; else if (a > C.page.maxh) a = C.page.maxh; if (b < 0) b = 0; else if (b > C.page.maxw) b = C.page.maxw; if ((a != C.newscrolly) || (b != C.newscrollx)) return C.doScrollPos(b, a, C.opt.snapbackspeed); if (C.onscrollend && C.scrollrunning) { var c = { "type": "scrollend", "current": { "x": b, "y": a }, "end": { "x": C.newscrollx, "y": C.newscrolly } }; C.onscrollend.call(C, c) } C.scrollrunning = false } } else { this.doScrollLeft = function(x) { var y = (C.scrollrunning) ? C.newscrolly: C.getScrollTop(); C.doScrollPos(x, y) }; this.doScrollTop = function(y) { var x = (C.scrollrunning) ? C.newscrollx: C.getScrollLeft(); C.doScrollPos(x, y) }; this.doScrollPos = function(x, y) { var y = ((typeof y == "undefined") || (y === false)) ? C.getScrollTop(true) : y; if ((C.timer) && (C.newscrolly == y) && (C.newscrollx == x)) return true; if (C.timer) N(C.timer); C.timer = 0; var g = C.getScrollTop(); var h = C.getScrollLeft(); if (((C.newscrolly - g) * (y - g) < 0) || ((C.newscrollx - h) * (x - h) < 0)) C.cancelScroll(); C.newscrolly = y; C.newscrollx = x; if (!C.bouncescroll || !C.rail.visibility) { if (C.newscrolly < 0) { C.newscrolly = 0 } else if (C.newscrolly > C.page.maxh) { C.newscrolly = C.page.maxh } } if (!C.bouncescroll || !C.railh.visibility) { if (C.newscrollx < 0) { C.newscrollx = 0 } else if (C.newscrollx > C.page.maxw) { C.newscrollx = C.page.maxw } } C.dst = {}; C.dst.x = x - h; C.dst.y = y - g; C.dst.px = h; C.dst.py = g; var i = Math.round(Math.sqrt(Math.pow(C.dst.x, 2) + Math.pow(C.dst.y, 2))); C.dst.ax = C.dst.x / i; C.dst.ay = C.dst.y / i; var j = 0; var k = i; if (C.dst.x == 0) { j = g; k = y; C.dst.ay = 1; C.dst.py = 0 } else if (C.dst.y == 0) { j = h; k = x; C.dst.ax = 1; C.dst.px = 0 } var l = C.getTransitionSpeed(i); if (l > 0) { C.bzscroll = (C.bzscroll) ? C.bzscroll.update(k, l) : new BezierClass(j, k, l, 0, 1, 0, 1) } else { C.bzscroll = false } if (C.timer) return; if ((g == C.page.maxh && y >= C.page.maxh) || (h == C.page.maxw && x >= C.page.maxw)) C.checkContentSize(); var m = 1; function scrolling() { try { if (C.me.is(":visible") === false) return } catch(e) {} if (C.cancelAnimationFrame) return true; C.scrollrunning = true; m = 1 - m; if (m) return (C.timer = M(scrolling) || 1); var a = 0; var b = sy = C.getScrollTop(); if (C.dst.ay) { b = (C.bzscroll) ? C.dst.py + (C.bzscroll.getNow() * C.dst.ay) : C.newscrolly; var c = b - sy; if ((c < 0 && b < C.newscrolly) || (c > 0 && b > C.newscrolly)) b = C.newscrolly; C.setScrollTop(b); if (b == C.newscrolly) a = 1 } else { a = 1 } var d = sx = C.getScrollLeft(); if (C.dst.ax) { d = (C.bzscroll) ? C.dst.px + (C.bzscroll.getNow() * C.dst.ax) : C.newscrollx; var c = d - sx; if ((c < 0 && d < C.newscrollx) || (c > 0 && d > C.newscrollx)) d = C.newscrollx; C.setScrollLeft(d); if (d == C.newscrollx) a += 1 } else { a += 1 } if (a == 2) { C.timer = 0; C.cursorfreezed = false; C.bzscroll = false; C.scrollrunning = false; if (b < 0) b = 0; else if (b > C.page.maxh) b = C.page.maxh; if (d < 0) d = 0; else if (d > C.page.maxw) d = C.page.maxw; if ((d != C.newscrollx) || (b != C.newscrolly)) C.doScrollPos(d, b); else { if (C.onscrollend) { var f = { "type": "scrollend", "current": { "x": sx, "y": sy }, "end": { "x": C.newscrollx, "y": C.newscrolly } }; C.onscrollend.call(C, f) } } } else { C.timer = M(scrolling) || 1 } }; C.cancelAnimationFrame = false; C.timer = 1; if (C.onscrollstart && !C.scrollrunning) { var n = { "type": "scrollstart", "current": { "x": h, "y": g }, "request": { "x": x, "y": y }, "end": { "x": C.newscrollx, "y": C.newscrolly }, "speed": l }; C.onscrollstart.call(C, n) } scrolling(); if ((g == C.page.maxh && y >= g) || (h == C.page.maxw && x >= h)) C.checkContentSize(); C.noticeCursor() }; this.cancelScroll = function() { if (C.timer) N(C.timer); C.timer = 0; C.bzscroll = false; C.scrollrunning = false; return C } }; this.doScrollBy = function(a, b) { try { if (C.me.is(":visible") === false) return } catch(e) {}; var c = 0; if (b) { c = Math.floor((C.scroll.y - a) * C.scrollratio.y) } else { var d = (C.timer) ? C.newscrolly: C.getScrollTop(true); c = d - a } if (C.bouncescroll) { var f = Math.round(C.view.h / 2); if (c < -f) c = -f; else if (c > (C.page.maxh + f)) c = (C.page.maxh + f) } C.cursorfreezed = false; py = C.getScrollTop(true); if (c < 0 && py <= 0) return C.noticeCursor(); else if (c > C.page.maxh && py >= C.page.maxh) { C.checkContentSize(); return C.noticeCursor() } C.doScrollTop(c) }; this.doScrollLeftBy = function(a, b) { try { if (C.me.is(":visible") === false) return } catch(e) {}; var c = 0; if (b) { c = Math.floor((C.scroll.x - a) * C.scrollratio.x) } else { var d = (C.timer) ? C.newscrollx: C.getScrollLeft(true); c = d - a } if (C.bouncescroll) { var f = Math.round(C.view.w / 2); if (c < -f) c = -f; else if (c > (C.page.maxw + f)) c = (C.page.maxw + f) } C.cursorfreezed = false; px = C.getScrollLeft(true); if (c < 0 && px <= 0) return C.noticeCursor(); else if (c > C.page.maxw && px >= C.page.maxw) return C.noticeCursor(); C.doScrollLeft(c) }; this.doScrollTo = function(a, b) { var c = (b) ? Math.round(a * C.scrollratio.y) : a; if (c < 0) c = 0; else if (c > C.page.maxh) c = C.page.maxh; C.cursorfreezed = false; C.doScrollTop(a) }; this.checkContentSize = function() { var a = C.getContentSize(); if ((a.h != C.page.h) || (a.w != C.page.w)) C.resize(false, a) }; C.onscroll = function(e) { try { if (C.me.is(":visible") === false) return } catch(e) {}; if (C.rail.drag) return; if (!C.cursorfreezed) { C.synched('scroll', function() { C.scroll.y = Math.round(C.getScrollTop() * (1 / C.scrollratio.y)); if (C.railh) C.scroll.x = Math.round(C.getScrollLeft() * (1 / C.scrollratio.x)); C.noticeCursor() }) } }; C.bind(C.docscroll, "scroll", C.onscroll); this.doZoomIn = function(e) { if (C.zoomactive) return; C.zoomactive = true; C.zoomrestore = { style: {} }; var b = ['position', 'top', 'left', 'zIndex', 'backgroundColor', 'marginTop', 'marginBottom', 'marginLeft', 'marginRight']; var c = C.win[0].style; for (var a in b) { var d = b[a]; C.zoomrestore.style[d] = (typeof c[d] != 'undefined') ? c[d] : '' } C.zoomrestore.style.width = C.win.css('width'); C.zoomrestore.style.height = C.win.css('height'); C.zoomrestore.padding = { w: C.win.outerWidth() - C.win.width(), h: C.win.outerHeight() - C.win.height() }; if (D.isios4) { C.zoomrestore.scrollTop = $(window).scrollTop(); $(window).scrollTop(0) } C.win.css({ "position": (D.isios4) ? "absolute": "fixed", "top": 0, "left": 0, "z-index": C.opt.zindex + 100, "margin": "0px" }); var f = C.win.css("backgroundColor"); if (f == "" || /transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(f)) C.win.css("backgroundColor", "#fff"); C.rail.css({ "z-index": C.opt.zindex + 110 }); C.zoom.css({ "z-index": C.opt.zindex + 112 }); C.zoom.css('backgroundPosition', '0px -18px'); C.resizeZoom(); if (C.onzoomin) C.onzoomin.call(C); return C.cancelEvent(e) }; this.doZoomOut = function(e) { if (!C.zoomactive) return; C.zoomactive = false; C.win.css("margin", ""); C.win.css(C.zoomrestore.style); if (D.isios4) { $(window).scrollTop(C.zoomrestore.scrollTop) } C.rail.css({ "z-index": (C.ispage) ? C.opt.zindex: C.opt.zindex + 2 }); C.zoom.css({ "z-index": C.opt.zindex }); C.zoomrestore = false; C.zoom.css('backgroundPosition', '0px 0px'); C.onResize(); if (C.onzoomout) C.onzoomout.call(C); return C.cancelEvent(e) }; this.doZoom = function(e) { return (C.zoomactive) ? C.doZoomOut(e) : C.doZoomIn(e) }; this.resizeZoom = function() { if (!C.zoomactive) return; var a = C.getScrollTop(); C.win.css({ width: $(window).width() - C.zoomrestore.padding.w + "px", height: $(window).height() - C.zoomrestore.padding.h + "px" }); C.onResize(); console.log(a); C.setScrollTop(Math.min(C.page.maxh, a)) }; this.init(); $.nicescroll.push(this) }; var R = function(r) { var s = this; this.nc = r; this.lastx = 0; this.lasty = 0; this.speedx = 0; this.speedy = 0; this.lasttime = 0; this.steptime = 0; this.snapx = false; this.snapy = false; this.demulx = 0; this.demuly = 0; this.lastscrollx = -1; this.lastscrolly = -1; this.chkx = 0; this.chky = 0; this.timer = 0; this.time = function() { return + new Date() }; this.reset = function(a, b) { s.stop(); var c = s.time(); s.steptime = 0; s.lasttime = c; s.speedx = 0; s.speedy = 0; s.lastx = a; s.lasty = b; s.lastscrollx = -1; s.lastscrolly = -1 }; this.update = function(a, b) { var c = s.time(); s.steptime = c - s.lasttime; s.lasttime = c; var d = b - s.lasty; var e = a - s.lastx; var f = s.nc.getScrollTop(); var g = s.nc.getScrollLeft(); var h = f + d; var i = g + e; s.snapx = (i < 0) || (i > s.nc.page.maxw); s.snapy = (h < 0) || (h > s.nc.page.maxh); s.speedx = e; s.speedy = d; s.lastx = a; s.lasty = b }; this.stop = function() { s.nc.unsynched("domomentum2d"); if (s.timer) clearTimeout(s.timer); s.timer = 0; s.lastscrollx = -1; s.lastscrolly = -1 }; this.doSnapy = function(a, b) { var c = false; if (b < 0) { b = 0; c = true } else if (b > s.nc.page.maxh) { b = s.nc.page.maxh; c = true } if (a < 0) { a = 0; c = true } else if (a > s.nc.page.maxw) { a = s.nc.page.maxw; c = true } if (c) s.nc.doScrollPos(a, b, s.nc.opt.snapbackspeed) }; this.doMomentum = function(d) { var t = s.time(); var l = (d) ? t + d: s.lasttime; var e = s.nc.getScrollLeft(); var f = s.nc.getScrollTop(); var g = s.nc.page.maxh; var h = s.nc.page.maxw; s.speedx = (h > 0) ? Math.min(60, s.speedx) : 0; s.speedy = (g > 0) ? Math.min(60, s.speedy) : 0; var i = l && (t - l) <= 50; if ((f < 0) || (f > g) || (e < 0) || (e > h)) i = false; var j = (s.speedy && i) ? s.speedy: false; var k = (s.speedx && i) ? s.speedx: false; if (j || k) { var m = Math.max(16, s.steptime); if (m > 50) { var n = m / 50; s.speedx *= n; s.speedy *= n; m = 50 } s.demulxy = 0; s.lastscrollx = s.nc.getScrollLeft(); s.chkx = s.lastscrollx; s.lastscrolly = s.nc.getScrollTop(); s.chky = s.lastscrolly; var o = s.lastscrollx; var p = s.lastscrolly; var q = function() { var c = ((s.time() - t) > 600) ? 0.04 : 0.02; if (s.speedx) { o = Math.floor(s.lastscrollx - (s.speedx * (1 - s.demulxy))); s.lastscrollx = o; if ((o < 0) || (o > h)) c = 0.10 } if (s.speedy) { p = Math.floor(s.lastscrolly - (s.speedy * (1 - s.demulxy))); s.lastscrolly = p; if ((p < 0) || (p > g)) c = 0.10 } s.demulxy = Math.min(1, s.demulxy + c); s.nc.synched("domomentum2d", function() { if (s.speedx) { var a = s.nc.getScrollLeft(); if (a != s.chkx) s.stop(); s.chkx = o; s.nc.setScrollLeft(o) } if (s.speedy) { var b = s.nc.getScrollTop(); if (b != s.chky) s.stop(); s.chky = p; s.nc.setScrollTop(p) } if (!s.timer) { s.nc.hideCursor(); s.doSnapy(o, p) } }); if (s.demulxy < 1) { s.timer = setTimeout(q, m) } else { s.stop(); s.nc.hideCursor(); s.doSnapy(o, p) } }; q() } else { s.doSnapy(s.nc.getScrollLeft(), s.nc.getScrollTop()) } } }; var S = F.fn.scrollTop; $.cssHooks["pageYOffset"] = { get: function(a, b, c) { var d = $.data(a, '__nicescroll') || false; return (d && d.ishwscroll) ? d.getScrollTop() : S.call(a) }, set: function(a, b) { var c = $.data(a, '__nicescroll') || false; (c && c.ishwscroll) ? c.setScrollTop(parseInt(b)) : S.call(a, b); return this } }; F.fn.scrollTop = function(b) { if (typeof b == "undefined") { var c = (this[0]) ? $.data(this[0], '__nicescroll') || false: false; return (c && c.ishwscroll) ? c.getScrollTop() : S.call(this) } else { return this.each(function() { var a = $.data(this, '__nicescroll') || false; (a && a.ishwscroll) ? a.setScrollTop(parseInt(b)) : S.call($(this), b) }) } }; var T = F.fn.scrollLeft; $.cssHooks.pageXOffset = { get: function(a, b, c) { var d = $.data(a, '__nicescroll') || false; return (d && d.ishwscroll) ? d.getScrollLeft() : T.call(a) }, set: function(a, b) { var c = $.data(a, '__nicescroll') || false; (c && c.ishwscroll) ? c.setScrollLeft(parseInt(b)) : T.call(a, b); return this } }; F.fn.scrollLeft = function(b) { if (typeof b == "undefined") { var c = (this[0]) ? $.data(this[0], '__nicescroll') || false: false; return (c && c.ishwscroll) ? c.getScrollLeft() : T.call(this) } else { return this.each(function() { var a = $.data(this, '__nicescroll') || false; (a && a.ishwscroll) ? a.setScrollLeft(parseInt(b)) : T.call($(this), b) }) } }; var U = function(c) { var d = this; this.length = 0; this.name = "nicescrollarray"; this.each = function(b) { for (var a = 0; a < d.length; a++) b.call(d[a]); return d }; this.push = function(a) { d[d.length] = a; d.length++ }; this.eq = function(a) { return d[a] }; if (c) { for (a = 0; a < c.length; a++) { var e = $.data(c[a], '__nicescroll') || false; if (e) { this[this.length] = e; this.length++ } } } return this }; function mplex(b, c, d) { for (var a = 0; a < c.length; a++) d(b, c[a]) }; mplex(U.prototype, ['show', 'hide', 'toggle', 'onResize', 'resize', 'remove', 'stop', 'doScrollPos'], function(e, n) { e[n] = function() { var a = arguments; return this.each(function() { this[n].apply(this, a) }) } }); F.fn.getNiceScroll = function(a) { if (typeof a == "undefined") { return new U(this) } else { var b = $.data(this[a], '__nicescroll') || false; return b } }; F.extend(F.expr[':'], { nicescroll: function(a) { return ($.data(a, '__nicescroll')) ? true: false } }); $.fn.niceScroll = function(b, c) { if (typeof c == "undefined") { if ((typeof b == "object") && !("jquery" in b)) { c = b; b = false } } var d = new U(); if (typeof c == "undefined") c = {}; if (b || false) { c.doc = $(b); c.win = $(this) } var e = !("doc" in c); if (!e && !("win" in c)) c.win = $(this); this.each(function() { var a = $(this).data('__nicescroll') || false; if (!a) { c.doc = (e) ? $(this) : c.doc; a = new Q(c, $(this)); $(this).data('__nicescroll', a) } d.push(a) }); return (d.length == 1) ? d[0] : d }; window.NiceScroll = { getjQuery: function() { return F } }; if (!$.nicescroll) { $.nicescroll = new U() } })(jQuery); (function($) { $.fn.perfectScrollbar = function(a) { if (a === "update" || a === "resize") { $(this).getNiceScroll().resize(); return } else if (a === "getScrollObj") { return $(this).getNiceScroll() } else if (a === "getScrollTop") { var b = $(this).getNiceScroll().eq(0); return b.getScrollTop() } else if (a === "hide") { $(this).getNiceScroll().hide() } else if (a === "show") { $(this).getNiceScroll().show() } else if (a === "toggle") { $(this).getNiceScroll().toggle() } else if (a === "remove" || a === "destroy") { $(this).getNiceScroll().remove() } else if (a === "stop") { $(this).getNiceScroll().stop() } else if (a === "doScrollPos") { $(this).getNiceScroll().doScrollPos() } a = jQuery.extend({ cursorwidth: 5, cursorborder: "none", cursorcolor: "#999", hidecursordelay: 0, zindex: 10001, horizrailenabled: false }, a); return $(this).niceScroll(a) } })(jQuery); (function ($) { $.fn.textSearch = function (str, options) { var defaults = { divFlag: true, divStr: " ", markClass: "", markColor: "red", nullReport: true, callback: function () { return false; } }; var sets = $.extend({}, defaults, options || {}), clStr; if (sets.markClass) { clStr = "class='" + sets.markClass + "'"; } else { clStr = "style='color:" + sets.markColor + ";'"; } //对前一次高亮处理的文字还原 $("span[rel='mark']").each(function () { var text = document.createTextNode($(this).text()); $(this).replaceWith($(text)); }); //字符串正则表达式关键字转化 $.regTrim = function (s) { var imp = /[\^\.\\\|\(\)\*\+\-\$\[\]\?]/g; var imp_c = {}; imp_c["^"] = "\\^"; imp_c["."] = "\\."; imp_c["\\"] = "\\\\"; imp_c["|"] = "\\|"; imp_c["("] = "\\("; imp_c[")"] = "\\)"; imp_c["*"] = "\\*"; imp_c["+"] = "\\+"; imp_c["-"] = "\\-"; imp_c["$"] = "\$"; imp_c["["] = "\\["; imp_c["]"] = "\\]"; imp_c["?"] = "\\?"; s = s.replace(imp, function (o) { return imp_c[o]; }); return s; }; $(this).each(function () { var t = $(this); str = $.trim(str); if (str === "") { //alert("关键字为空"); return false; } else { //将关键字push到数组之中 var arr = []; if (sets.divFlag) { arr = str.split(sets.divStr); } else { arr.push(str); } } var v_html = t.html(); //删除注释 v_html = v_html.replace(//g, ""); //将HTML代码支离为HTML片段和文字片段,其中文字片段用于正则替换处理,而HTML片段置之不理 var tags = /[^<>]+|<(\/?)([A-Za-z]+)([^<>]*)>/g; var a = v_html.match(tags), test = 0; $.each(a, function (i, c) { if (!/<(?:.|\s)*?>/.test(c)) {//非标签 //开始执行替换 $.each(arr, function (index, con) { if (con === "") { return; } var reg = new RegExp($.regTrim(con), "g"); if (reg.test(c)) { //正则替换 c = c.replace(reg, "♂" + con + "♀"); test = 1; } }); c = c.replace(/♂/g, "").replace(/♀/g, ""); a[i] = c; } }); //将支离数组重新组成字符串 var new_html = a.join(""); $(this).html(new_html); if (test === 0 && sets.nullReport) { return false; } //执行回调函数 sets.callback(); }); }; })(jQuery);