!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,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},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.6.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))&&v(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+" "]&&(!y||!y.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)&&ve(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(B,"$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.sourceIndex;if(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 ye(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 ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(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=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.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&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.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)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return 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},j=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&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(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))&&(!y||!y.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 j(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||D,"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,D=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),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(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 ve(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 je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(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"}),v.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||(v.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):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 B(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(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.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 B(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 0");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); !function(o){o.fn.setCookieNotice=function(e){"yes"===cnArgs.onScroll&&o(window).off("scroll",cnHandleScroll);var c=new Date,i=new Date,n=o("#cookie-notice"),t=this;if(i.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTime)),e="accept"===e,document.cookie=cnArgs.cookieName+"="+e+";expires="+i.toUTCString()+";"+(void 0!==cnArgs.cookieDomain&&""!==cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(void 0!==cnArgs.cookiePath&&""!==cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":""),o.event.trigger({type:"setCookieNotice",value:e,time:c,expires:i}),"fade"===cnArgs.hideEffect?n.fadeOut(300,function(){t.removeCookieNotice()}):"slide"===cnArgs.hideEffect?n.slideUp(300,function(){t.removeCookieNotice()}):t.removeCookieNotice(),e&&"1"===cnArgs.redirection){var r=window.location.protocol+"//",a=window.location.host+"/"+window.location.pathname;"1"===cnArgs.cache?(r=r+a.replace("//","/")+(""===window.location.search?"?":window.location.search+"&")+"cn-reloaded=1"+window.location.hash,window.location.href=r):(r=r+a.replace("//","/")+window.location.search+window.location.hash,window.location.reload(!0))}else;},o.fn.removeCookieNotice=function(e){o("#cookie-notice").remove(),o("body").removeClass("cookies-not-accepted")},o(document).ready(function(){var e=o("#cookie-notice");"yes"===cnArgs.onScroll&&(cnHandleScroll=function(){var e=o(this);e.scrollTop()>parseInt(cnArgs.onScrollOffset)&&(e.setCookieNotice("accept"),e.off("scroll",cnHandleScroll))}),o(document).on("click",".cn-set-cookie",function(e){e.preventDefault(),o(this).setCookieNotice(o(this).data("cookie-set"))}),-1===document.cookie.indexOf("cookie_notice_accepted")?("yes"===cnArgs.onScroll&&o(window).on("scroll",cnHandleScroll),"fade"===cnArgs.hideEffect?e.fadeIn(300):"slide"===cnArgs.hideEffect?e.slideDown(300):e.show(),o("body").addClass("cookies-not-accepted")):e.removeCookieNotice()})}(jQuery); window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o 0&&$ul.is(':hidden')){ $this.one('click.superfish', false); if(e.type==='MSPointerDown'||e.type==='pointerdown'){ $this.trigger('focus'); }else{ $.proxy(over, $this.parent('li'))(); }} }, over=function (){ var $this=$(this), o=getOptions($this); clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out=function (){ var $this=$(this), o=getOptions($this); if(ios){ $.proxy(close, $this, o)(); }else{ clearTimeout(o.sfTimer); o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay); }}, close=function (o){ o.retainPath=($.inArray(this[0], o.$path) > -1); this.superfish('hide'); if(!this.parents('.' + o.hoverClass).length){ o.onIdle.call(getMenu(this)); if(o.$path.length){ $.proxy(over, o.$path)(); }} }, getMenu=function ($el){ return $el.closest('.' + c.menuClass); }, getOptions=function ($el){ return getMenu($el).data('sf-options'); }; return { hide: function (instant){ if(this.length){ var $this=this, o=getOptions($this); if(!o){ return this; } var not=(o.retainPath===true) ? o.$path:'', $ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), speed=o.speedOut; if(instant){ $ul.show(); speed=0; } o.retainPath=false; o.onBeforeHide.call($ul); $ul.stop(true, true).animate(o.animationOut, speed, function (){ var $this=$(this); o.onHide.call($this); }); } return this; }, show: function (){ var o=getOptions(this); if(!o){ return this; } var $this=this.addClass(o.hoverClass), $ul=$this.children(o.popUpSelector); o.onBeforeShow.call($ul); $ul.stop(true, true).animate(o.animation, o.speed, function (){ o.onShow.call($ul); }); return this; }, destroy: function (){ return this.each(function (){ var $this=$(this), o=$this.data('sf-options'), $hasPopUp; if(!o){ return false; } $hasPopUp=$this.find(o.popUpSelector).parent('li'); clearTimeout(o.sfTimer); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); $this.off('.superfish').off('.hoverIntent'); $hasPopUp.children(o.popUpSelector).attr('style', function (i, style){ return style.replace(/display[^;]+;?/g, ''); }); o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); $this.find('.' + o.hoverClass).removeClass(o.hoverClass); o.onDestroy.call($this); $this.removeData('sf-options'); }); }, init: function (op){ return this.each(function (){ var $this=$(this); if($this.data('sf-options')){ return false; } var o=$.extend({}, $.fn.superfish.defaults, op), $hasPopUp=$this.find(o.popUpSelector).parent('li'); o.$path=setPathToCurrent($this, o); $this.data('sf-options', o); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); applyHandlers($this, o); $hasPopUp.not('.' + c.bcClass).superfish('hide', true); o.onInit.call(this); }); }};})(); $.fn.superfish=function (method, args){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if(typeof method==='object'||! method){ return methods.init.apply(this, arguments); }else{ return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); }}; $.fn.superfish.defaults={ popUpSelector: 'ul,.sf-mega', hoverClass: 'sfHover', pathClass: 'overrideThisToUse', pathLevels: 1, delay: 800, animation: {opacity: 'show'}, animationOut: {opacity: 'hide'}, speed: 'normal', speedOut: 'fast', cssArrows: true, disableHI: false, onInit: $.noop, onBeforeShow: $.noop, onShow: $.noop, onBeforeHide: $.noop, onHide: $.noop, onIdle: $.noop, onDestroy: $.noop };})(jQuery, window); ;(function($){ var _previousResizeWidth=-1, _updateTimeout=-1; var _parse=function(value){ return parseFloat(value)||0; }; var _rows=function(elements){ var tolerance=1, $elements=$(elements), lastTop=null, rows=[]; $elements.each(function(){ var $that=$(this), top=$that.offset().top - _parse($that.css('margin-top')), lastRow=rows.length > 0 ? rows[rows.length - 1]:null; if(lastRow===null){ rows.push($that); }else{ if(Math.floor(Math.abs(lastTop - top)) <=tolerance){ rows[rows.length - 1]=lastRow.add($that); }else{ rows.push($that); }} lastTop=top; }); return rows; }; var _parseOptions=function(options){ var opts={ byRow: true, property: 'height', target: null, remove: false }; if(typeof options==='object'){ return $.extend(opts, options); } if(typeof options==='boolean'){ opts.byRow=options; }else if(options==='remove'){ opts.remove=true; } return opts; }; var matchHeight=$.fn.matchHeight=function(options){ var opts=_parseOptions(options); if(opts.remove){ var that=this; this.css(opts.property, ''); $.each(matchHeight._groups, function(key, group){ group.elements=group.elements.not(that); }); return this; } if(this.length <=1&&!opts.target){ return this; } matchHeight._groups.push({ elements: this, options: opts }); matchHeight._apply(this, opts); return this; }; matchHeight._groups=[]; matchHeight._throttle=80; matchHeight._maintainScroll=false; matchHeight._beforeUpdate=null; matchHeight._afterUpdate=null; matchHeight._apply=function(elements, options){ var opts=_parseOptions(options), $elements=$(elements), rows=[$elements]; var scrollTop=$(window).scrollTop(), htmlHeight=$('html').outerHeight(true); var $hiddenParents=$elements.parents().filter(':hidden'); $hiddenParents.each(function(){ var $that=$(this); $that.data('style-cache', $that.attr('style')); }); $hiddenParents.css('display', 'block'); if(opts.byRow&&!opts.target){ $elements.each(function(){ var $that=$(this), display=$that.css('display'); if(display!=='inline-block'&&display!=='inline-flex'){ display='block'; } $that.data('style-cache', $that.attr('style')); $that.css({ 'display': display, 'padding-top': '0', 'padding-bottom': '0', 'margin-top': '0', 'margin-bottom': '0', 'border-top-width': '0', 'border-bottom-width': '0', 'height': '100px' }); }); rows=_rows($elements); $elements.each(function(){ var $that=$(this); $that.attr('style', $that.data('style-cache')||''); }); } $.each(rows, function(key, row){ var $row=$(row), targetHeight=0; if(!opts.target){ if(opts.byRow&&$row.length <=1){ $row.css(opts.property, ''); return; } $row.each(function(){ var $that=$(this), display=$that.css('display'); if(display!=='inline-block'&&display!=='inline-flex'){ display='block'; } var css={ 'display': display }; css[opts.property]=''; $that.css(css); if($that.outerHeight(false) > targetHeight){ targetHeight=$that.outerHeight(false); } $that.css('display', ''); }); }else{ targetHeight=opts.target.outerHeight(false); } $row.each(function(){ var $that=$(this), verticalPadding=0; if(opts.target&&$that.is(opts.target)){ return; } if($that.css('box-sizing')!=='border-box'){ verticalPadding +=_parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width')); verticalPadding +=_parse($that.css('padding-top')) + _parse($that.css('padding-bottom')); } $that.css(opts.property, (targetHeight - verticalPadding) + 'px'); }); }); $hiddenParents.each(function(){ var $that=$(this); $that.attr('style', $that.data('style-cache')||null); }); if(matchHeight._maintainScroll){ $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true)); } return this; }; matchHeight._applyDataApi=function(){ var groups={}; $('[data-match-height], [data-mh]').each(function(){ var $this=$(this), groupId=$this.attr('data-mh')||$this.attr('data-match-height'); if(groupId in groups){ groups[groupId]=groups[groupId].add($this); }else{ groups[groupId]=$this; }}); $.each(groups, function(){ this.matchHeight(true); }); }; var _update=function(event){ if(matchHeight._beforeUpdate){ matchHeight._beforeUpdate(event, matchHeight._groups); } $.each(matchHeight._groups, function(){ matchHeight._apply(this.elements, this.options); }); if(matchHeight._afterUpdate){ matchHeight._afterUpdate(event, matchHeight._groups); }}; matchHeight._update=function(throttle, event){ if(event&&event.type==='resize'){ var windowWidth=$(window).width(); if(windowWidth===_previousResizeWidth){ return; } _previousResizeWidth=windowWidth; } if(!throttle){ _update(event); }else if(_updateTimeout===-1){ _updateTimeout=setTimeout(function(){ _update(event); _updateTimeout=-1; }, matchHeight._throttle); }}; $(matchHeight._applyDataApi); $(window).bind('load', function(event){ matchHeight._update(false, event); }); $(window).bind('resize orientationchange', function(event){ matchHeight._update(true, event); }); })(jQuery); (function(factory){ 'use strict'; if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports!=='undefined'){ module.exports=factory(require('jquery')); }else{ factory(jQuery); }}(function($){ 'use strict'; var Slick=window.Slick||{}; Slick=(function(){ var instanceUid=0; function Slick(element, settings){ var _=this, dataSettings; _.defaults={ accessibility: true, adaptiveHeight: false, appendArrows: $(element), appendDots: $(element), arrows: true, asNavFor: null, prevArrow: '', nextArrow: '', autoplay: false, autoplaySpeed: 3000, centerMode: false, centerPadding: '50px', cssEase: 'ease', customPaging: function(slider, i){ return ''; }, dots: false, dotsClass: 'slick-dots', draggable: true, easing: 'linear', edgeFriction: 0.35, fade: false, focusOnSelect: false, infinite: true, initialSlide: 0, lazyLoad: 'ondemand', mobileFirst: false, pauseOnHover: true, pauseOnDotsHover: false, respondTo: 'window', responsive: null, rows: 1, rtl: false, slide: '', slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: true, swipeToSlide: false, touchMove: true, touchThreshold: 5, useCSS: true, variableWidth: false, vertical: false, verticalSwiping: false, waitForAnimate: true, zIndex: 1000 }; _.initials={ animating: false, dragging: false, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: false, slideOffset: 0, swipeLeft: null, $list: null, touchObject: {}, transformsEnabled: false, unslicked: false }; $.extend(_, _.initials); _.activeBreakpoint=null; _.animType=null; _.animProp=null; _.breakpoints=[]; _.breakpointSettings=[]; _.cssTransitions=false; _.hidden='hidden'; _.paused=false; _.positionProp=null; _.respondTo=null; _.rowCount=1; _.shouldClick=true; _.$slider=$(element); _.$slidesCache=null; _.transformType=null; _.transitionType=null; _.visibilityChange='visibilitychange'; _.windowWidth=0; _.windowTimer=null; dataSettings=$(element).data('slick')||{}; _.options=$.extend({}, _.defaults, dataSettings, settings); _.currentSlide=_.options.initialSlide; _.originalSettings=_.options; if(typeof document.mozHidden!=='undefined'){ _.hidden='mozHidden'; _.visibilityChange='mozvisibilitychange'; }else if(typeof document.webkitHidden!=='undefined'){ _.hidden='webkitHidden'; _.visibilityChange='webkitvisibilitychange'; } _.autoPlay=$.proxy(_.autoPlay, _); _.autoPlayClear=$.proxy(_.autoPlayClear, _); _.changeSlide=$.proxy(_.changeSlide, _); _.clickHandler=$.proxy(_.clickHandler, _); _.selectHandler=$.proxy(_.selectHandler, _); _.setPosition=$.proxy(_.setPosition, _); _.swipeHandler=$.proxy(_.swipeHandler, _); _.dragHandler=$.proxy(_.dragHandler, _); _.keyHandler=$.proxy(_.keyHandler, _); _.autoPlayIterator=$.proxy(_.autoPlayIterator, _); _.instanceUid=instanceUid++; _.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/; _.registerBreakpoints(); _.init(true); _.checkResponsive(true); } return Slick; }()); Slick.prototype.addSlide=Slick.prototype.slickAdd=function(markup, index, addBefore){ var _=this; if(typeof(index)==='boolean'){ addBefore=index; index=null; }else if(index < 0||(index >=_.slideCount)){ return false; } _.unload(); if(typeof(index)==='number'){ if(index===0&&_.$slides.length===0){ $(markup).appendTo(_.$slideTrack); }else if(addBefore){ $(markup).insertBefore(_.$slides.eq(index)); }else{ $(markup).insertAfter(_.$slides.eq(index)); }}else{ if(addBefore===true){ $(markup).prependTo(_.$slideTrack); }else{ $(markup).appendTo(_.$slideTrack); }} _.$slides=_.$slideTrack.children(this.options.slide); _.$slideTrack.children(this.options.slide).detach(); _.$slideTrack.append(_.$slides); _.$slides.each(function(index, element){ $(element).attr('data-slick-index', index); }); _.$slidesCache=_.$slides; _.reinit(); }; Slick.prototype.animateHeight=function(){ var _=this; if(_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false){ var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true); _.$list.animate({ height: targetHeight }, _.options.speed); }}; Slick.prototype.animateSlide=function(targetLeft, callback){ var animProps={}, _=this; _.animateHeight(); if(_.options.rtl===true&&_.options.vertical===false){ targetLeft=-targetLeft; } if(_.transformsEnabled===false){ if(_.options.vertical===false){ _.$slideTrack.animate({ left: targetLeft }, _.options.speed, _.options.easing, callback); }else{ _.$slideTrack.animate({ top: targetLeft }, _.options.speed, _.options.easing, callback); }}else{ if(_.cssTransitions===false){ if(_.options.rtl===true){ _.currentLeft=-(_.currentLeft); } $({ animStart: _.currentLeft }).animate({ animStart: targetLeft }, { duration: _.options.speed, easing: _.options.easing, step: function(now){ now=Math.ceil(now); if(_.options.vertical===false){ animProps[_.animType]='translate(' + now + 'px, 0px)'; _.$slideTrack.css(animProps); }else{ animProps[_.animType]='translate(0px,' + now + 'px)'; _.$slideTrack.css(animProps); }}, complete: function(){ if(callback){ callback.call(); }} }); }else{ _.applyTransition(); targetLeft=Math.ceil(targetLeft); if(_.options.vertical===false){ animProps[_.animType]='translate3d(' + targetLeft + 'px, 0px, 0px)'; }else{ animProps[_.animType]='translate3d(0px,' + targetLeft + 'px, 0px)'; } _.$slideTrack.css(animProps); if(callback){ setTimeout(function(){ _.disableTransition(); callback.call(); }, _.options.speed); }} }}; Slick.prototype.asNavFor=function(index){ var _=this, asNavFor=_.options.asNavFor; if(asNavFor&&asNavFor!==null){ asNavFor=$(asNavFor).not(_.$slider); } if(asNavFor!==null&&typeof asNavFor==='object'){ asNavFor.each(function(){ var target=$(this).slick('getSlick'); if(!target.unslicked){ target.slideHandler(index, true); }}); }}; Slick.prototype.applyTransition=function(slide){ var _=this, transition={}; if(_.options.fade===false){ transition[_.transitionType]=_.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; }else{ transition[_.transitionType]='opacity ' + _.options.speed + 'ms ' + _.options.cssEase; } if(_.options.fade===false){ _.$slideTrack.css(transition); }else{ _.$slides.eq(slide).css(transition); }}; Slick.prototype.autoPlay=function(){ var _=this; if(_.autoPlayTimer){ clearInterval(_.autoPlayTimer); } if(_.slideCount > _.options.slidesToShow&&_.paused!==true){ _.autoPlayTimer=setInterval(_.autoPlayIterator, _.options.autoplaySpeed); }}; Slick.prototype.autoPlayClear=function(){ var _=this; if(_.autoPlayTimer){ clearInterval(_.autoPlayTimer); }}; Slick.prototype.autoPlayIterator=function(){ var _=this; if(_.options.infinite===false){ if(_.direction===1){ if((_.currentSlide + 1)===_.slideCount - 1){ _.direction=0; } _.slideHandler(_.currentSlide + _.options.slidesToScroll); }else{ if((_.currentSlide - 1===0)){ _.direction=1; } _.slideHandler(_.currentSlide - _.options.slidesToScroll); }}else{ _.slideHandler(_.currentSlide + _.options.slidesToScroll); }}; Slick.prototype.buildArrows=function(){ var _=this; if(_.options.arrows===true){ _.$prevArrow=$(_.options.prevArrow).addClass('slick-arrow'); _.$nextArrow=$(_.options.nextArrow).addClass('slick-arrow'); if(_.slideCount > _.options.slidesToShow){ _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); if(_.htmlExpr.test(_.options.prevArrow)){ _.$prevArrow.prependTo(_.options.appendArrows); } if(_.htmlExpr.test(_.options.nextArrow)){ _.$nextArrow.appendTo(_.options.appendArrows); } if(_.options.infinite!==true){ _.$prevArrow .addClass('slick-disabled') .attr('aria-disabled', 'true'); }}else{ _.$prevArrow.add(_.$nextArrow) .addClass('slick-hidden') .attr({ 'aria-disabled': 'true', 'tabindex': '-1' }); }} }; Slick.prototype.buildDots=function(){ var _=this, i, dotString; if(_.options.dots===true&&_.slideCount > _.options.slidesToShow){ dotString='
    '; for (i=0; i <=_.getDotCount(); i +=1){ dotString +='
  • ' + _.options.customPaging.call(this, _, i) + '
  • '; } dotString +='
'; _.$dots=$(dotString).appendTo(_.options.appendDots); _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false'); }}; Slick.prototype.buildOut=function(){ var _=this; _.$slides = _.$slider .children(_.options.slide + ':not(.slick-cloned)') .addClass('slick-slide'); _.slideCount=_.$slides.length; _.$slides.each(function(index, element){ $(element) .attr('data-slick-index', index) .data('originalStyling', $(element).attr('style')||''); }); _.$slidesCache=_.$slides; _.$slider.addClass('slick-slider'); _.$slideTrack=(_.slideCount===0) ? $('
').appendTo(_.$slider) : _.$slides.wrapAll('
').parent(); _.$list=_.$slideTrack.wrap('
').parent(); _.$slideTrack.css('opacity', 0); if(_.options.centerMode===true||_.options.swipeToSlide===true){ _.options.slidesToScroll=1; } $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); _.setupInfinite(); _.buildArrows(); _.buildDots(); _.updateDots(); _.setSlideClasses(typeof _.currentSlide==='number' ? _.currentSlide:0); if(_.options.draggable===true){ _.$list.addClass('draggable'); }}; Slick.prototype.buildRows=function(){ var _=this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; newSlides=document.createDocumentFragment(); originalSlides=_.$slider.children(); if(_.options.rows > 1){ slidesPerSection=_.options.slidesPerRow * _.options.rows; numOfSlides=Math.ceil(originalSlides.length / slidesPerSection ); for(a=0; a < numOfSlides; a++){ var slide=document.createElement('div'); for(b=0; b < _.options.rows; b++){ var row=document.createElement('div'); for(c=0; c < _.options.slidesPerRow; c++){ var target=(a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); if(originalSlides.get(target)){ row.appendChild(originalSlides.get(target)); }} slide.appendChild(row); } newSlides.appendChild(slide); } _.$slider.html(newSlides); _.$slider.children().children().children() .css({ 'width':(100 / _.options.slidesPerRow) + '%', 'display': 'inline-block' }); }}; Slick.prototype.checkResponsive=function(initial, forceUpdate){ var _=this, breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint=false; var sliderWidth=_.$slider.width(); var windowWidth=window.innerWidth||$(window).width(); if(_.respondTo==='window'){ respondToWidth=windowWidth; }else if(_.respondTo==='slider'){ respondToWidth=sliderWidth; }else if(_.respondTo==='min'){ respondToWidth=Math.min(windowWidth, sliderWidth); } if(_.options.responsive && _.options.responsive.length && _.options.responsive!==null){ targetBreakpoint=null; for (breakpoint in _.breakpoints){ if(_.breakpoints.hasOwnProperty(breakpoint)){ if(_.originalSettings.mobileFirst===false){ if(respondToWidth < _.breakpoints[breakpoint]){ targetBreakpoint=_.breakpoints[breakpoint]; }}else{ if(respondToWidth > _.breakpoints[breakpoint]){ targetBreakpoint=_.breakpoints[breakpoint]; }} }} if(targetBreakpoint!==null){ if(_.activeBreakpoint!==null){ if(targetBreakpoint!==_.activeBreakpoint||forceUpdate){ _.activeBreakpoint = targetBreakpoint; if(_.breakpointSettings[targetBreakpoint]==='unslick'){ _.unslick(targetBreakpoint); }else{ _.options=$.extend({}, _.originalSettings, _.breakpointSettings[ targetBreakpoint]); if(initial===true){ _.currentSlide=_.options.initialSlide; } _.refresh(initial); } triggerBreakpoint=targetBreakpoint; }}else{ _.activeBreakpoint=targetBreakpoint; if(_.breakpointSettings[targetBreakpoint]==='unslick'){ _.unslick(targetBreakpoint); }else{ _.options=$.extend({}, _.originalSettings, _.breakpointSettings[ targetBreakpoint]); if(initial===true){ _.currentSlide=_.options.initialSlide; } _.refresh(initial); } triggerBreakpoint=targetBreakpoint; }}else{ if(_.activeBreakpoint!==null){ _.activeBreakpoint=null; _.options=_.originalSettings; if(initial===true){ _.currentSlide=_.options.initialSlide; } _.refresh(initial); triggerBreakpoint=targetBreakpoint; }} if(!initial&&triggerBreakpoint!==false){ _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); }} }; Slick.prototype.changeSlide=function(event, dontAnimate){ var _=this, $target=$(event.target), indexOffset, slideOffset, unevenOffset; if($target.is('a')){ event.preventDefault(); } if(!$target.is('li')){ $target=$target.closest('li'); } unevenOffset=(_.slideCount % _.options.slidesToScroll!==0); indexOffset=unevenOffset ? 0:(_.slideCount - _.currentSlide) % _.options.slidesToScroll; switch (event.data.message){ case 'previous': slideOffset=indexOffset===0 ? _.options.slidesToScroll:_.options.slidesToShow - indexOffset; if(_.slideCount > _.options.slidesToShow){ _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); } break; case 'next': slideOffset=indexOffset===0 ? _.options.slidesToScroll:indexOffset; if(_.slideCount > _.options.slidesToShow){ _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); } break; case 'index': var index=event.data.index===0 ? 0 : event.data.index||$target.index() * _.options.slidesToScroll; _.slideHandler(_.checkNavigable(index), false, dontAnimate); $target.children().trigger('focus'); break; default: return; }}; Slick.prototype.checkNavigable=function(index){ var _=this, navigables, prevNavigable; navigables=_.getNavigableIndexes(); prevNavigable=0; if(index > navigables[navigables.length - 1]){ index=navigables[navigables.length - 1]; }else{ for (var n in navigables){ if(index < navigables[n]){ index=prevNavigable; break; } prevNavigable=navigables[n]; }} return index; }; Slick.prototype.cleanUpEvents=function(){ var _=this; if(_.options.dots&&_.$dots!==null){ $('li', _.$dots).off('click.slick', _.changeSlide); if(_.options.pauseOnDotsHover===true&&_.options.autoplay===true){ $('li', _.$dots) .off('mouseenter.slick', $.proxy(_.setPaused, _, true)) .off('mouseleave.slick', $.proxy(_.setPaused, _, false)); }} if(_.options.arrows===true&&_.slideCount > _.options.slidesToShow){ _.$prevArrow&&_.$prevArrow.off('click.slick', _.changeSlide); _.$nextArrow&&_.$nextArrow.off('click.slick', _.changeSlide); } _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); _.$list.off('click.slick', _.clickHandler); $(document).off(_.visibilityChange, _.visibility); _.$list.off('mouseenter.slick', $.proxy(_.setPaused, _, true)); _.$list.off('mouseleave.slick', $.proxy(_.setPaused, _, false)); if(_.options.accessibility===true){ _.$list.off('keydown.slick', _.keyHandler); } if(_.options.focusOnSelect===true){ $(_.$slideTrack).children().off('click.slick', _.selectHandler); } $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition); }; Slick.prototype.cleanUpRows=function(){ var _=this, originalSlides; if(_.options.rows > 1){ originalSlides=_.$slides.children().children(); originalSlides.removeAttr('style'); _.$slider.html(originalSlides); }}; Slick.prototype.clickHandler=function(event){ var _=this; if(_.shouldClick===false){ event.stopImmediatePropagation(); event.stopPropagation(); event.preventDefault(); }}; Slick.prototype.destroy=function(refresh){ var _=this; _.autoPlayClear(); _.touchObject={}; _.cleanUpEvents(); $('.slick-cloned', _.$slider).detach(); if(_.$dots){ _.$dots.remove(); } if(_.options.arrows===true){ if(_.$prevArrow&&_.$prevArrow.length){ _.$prevArrow .removeClass('slick-disabled slick-arrow slick-hidden') .removeAttr('aria-hidden aria-disabled tabindex') .css("display",""); if(_.htmlExpr.test(_.options.prevArrow)){ _.$prevArrow.remove(); }} if(_.$nextArrow&&_.$nextArrow.length){ _.$nextArrow .removeClass('slick-disabled slick-arrow slick-hidden') .removeAttr('aria-hidden aria-disabled tabindex') .css("display",""); if(_.htmlExpr.test(_.options.nextArrow)){ _.$nextArrow.remove(); }} } if(_.$slides){ _.$slides .removeClass('slick-slide slick-active slick-center slick-visible slick-current') .removeAttr('aria-hidden') .removeAttr('data-slick-index') .each(function(){ $(this).attr('style', $(this).data('originalStyling')); }); _.$slideTrack.children(this.options.slide).detach(); _.$slideTrack.detach(); _.$list.detach(); _.$slider.append(_.$slides); } _.cleanUpRows(); _.$slider.removeClass('slick-slider'); _.$slider.removeClass('slick-initialized'); _.unslicked=true; if(!refresh){ _.$slider.trigger('destroy', [_]); }}; Slick.prototype.disableTransition=function(slide){ var _=this, transition={}; transition[_.transitionType]=''; if(_.options.fade===false){ _.$slideTrack.css(transition); }else{ _.$slides.eq(slide).css(transition); }}; Slick.prototype.fadeSlide=function(slideIndex, callback){ var _=this; if(_.cssTransitions===false){ _.$slides.eq(slideIndex).css({ zIndex: _.options.zIndex }); _.$slides.eq(slideIndex).animate({ opacity: 1 }, _.options.speed, _.options.easing, callback); }else{ _.applyTransition(slideIndex); _.$slides.eq(slideIndex).css({ opacity: 1, zIndex: _.options.zIndex }); if(callback){ setTimeout(function(){ _.disableTransition(slideIndex); callback.call(); }, _.options.speed); }} }; Slick.prototype.fadeSlideOut=function(slideIndex){ var _=this; if(_.cssTransitions===false){ _.$slides.eq(slideIndex).animate({ opacity: 0, zIndex: _.options.zIndex - 2 }, _.options.speed, _.options.easing); }else{ _.applyTransition(slideIndex); _.$slides.eq(slideIndex).css({ opacity: 0, zIndex: _.options.zIndex - 2 }); }}; Slick.prototype.filterSlides=Slick.prototype.slickFilter=function(filter){ var _=this; if(filter!==null){ _.unload(); _.$slideTrack.children(this.options.slide).detach(); _.$slidesCache.filter(filter).appendTo(_.$slideTrack); _.reinit(); }}; Slick.prototype.getCurrent=Slick.prototype.slickCurrentSlide=function(){ var _=this; return _.currentSlide; }; Slick.prototype.getDotCount=function(){ var _=this; var breakPoint=0; var counter=0; var pagerQty=0; if(_.options.infinite===true){ while (breakPoint < _.slideCount){ ++pagerQty; breakPoint=counter + _.options.slidesToShow; counter +=_.options.slidesToScroll <=_.options.slidesToShow ? _.options.slidesToScroll:_.options.slidesToShow; }}else if(_.options.centerMode===true){ pagerQty=_.slideCount; }else{ while (breakPoint < _.slideCount){ ++pagerQty; breakPoint=counter + _.options.slidesToShow; counter +=_.options.slidesToScroll <=_.options.slidesToShow ? _.options.slidesToScroll:_.options.slidesToShow; }} return pagerQty - 1; }; Slick.prototype.getLeft=function(slideIndex){ var _=this, targetLeft, verticalHeight, verticalOffset=0, targetSlide; _.slideOffset=0; verticalHeight=_.$slides.first().outerHeight(true); if(_.options.infinite===true){ if(_.slideCount > _.options.slidesToShow){ _.slideOffset=(_.slideWidth * _.options.slidesToShow) * -1; verticalOffset=(verticalHeight * _.options.slidesToShow) * -1; } if(_.slideCount % _.options.slidesToScroll!==0){ if(slideIndex + _.options.slidesToScroll > _.slideCount&&_.slideCount > _.options.slidesToShow){ if(slideIndex > _.slideCount){ _.slideOffset=((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1; verticalOffset=((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; }else{ _.slideOffset=((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1; verticalOffset=((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1; }} }}else{ if(slideIndex + _.options.slidesToShow > _.slideCount){ _.slideOffset=((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; verticalOffset=((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; }} if(_.slideCount <=_.options.slidesToShow){ _.slideOffset=0; verticalOffset=0; } if(_.options.centerMode===true&&_.options.infinite===true){ _.slideOffset +=_.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; }else if(_.options.centerMode===true){ _.slideOffset=0; _.slideOffset +=_.slideWidth * Math.floor(_.options.slidesToShow / 2); } if(_.options.vertical===false){ targetLeft=((slideIndex * _.slideWidth) * -1) + _.slideOffset; }else{ targetLeft=((slideIndex * verticalHeight) * -1) + verticalOffset; } if(_.options.variableWidth===true){ if(_.slideCount <=_.options.slidesToShow||_.options.infinite===false){ targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex); }else{ targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); } targetLeft=targetSlide[0] ? targetSlide[0].offsetLeft * -1:0; if(_.options.centerMode===true){ if(_.options.infinite===false){ targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex); }else{ targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); } targetLeft=targetSlide[0] ? targetSlide[0].offsetLeft * -1:0; targetLeft +=(_.$list.width() - targetSlide.outerWidth()) / 2; }} return targetLeft; }; Slick.prototype.getOption=Slick.prototype.slickGetOption=function(option){ var _=this; return _.options[option]; }; Slick.prototype.getNavigableIndexes=function(){ var _=this, breakPoint=0, counter=0, indexes=[], max; if(_.options.infinite===false){ max=_.slideCount; }else{ breakPoint=_.options.slidesToScroll * -1; counter=_.options.slidesToScroll * -1; max=_.slideCount * 2; } while (breakPoint < max){ indexes.push(breakPoint); breakPoint=counter + _.options.slidesToScroll; counter +=_.options.slidesToScroll <=_.options.slidesToShow ? _.options.slidesToScroll:_.options.slidesToShow; } return indexes; }; Slick.prototype.getSlick=function(){ return this; }; Slick.prototype.getSlideCount=function(){ var _=this, slidesTraversed, swipedSlide, centerOffset; centerOffset=_.options.centerMode===true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2):0; if(_.options.swipeToSlide===true){ _.$slideTrack.find('.slick-slide').each(function(index, slide){ if(slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)){ swipedSlide=slide; return false; }}); slidesTraversed=Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide)||1; return slidesTraversed; }else{ return _.options.slidesToScroll; }}; Slick.prototype.goTo=Slick.prototype.slickGoTo=function(slide, dontAnimate){ var _=this; _.changeSlide({ data: { message: 'index', index: parseInt(slide) }}, dontAnimate); }; Slick.prototype.init=function(creation){ var _=this; if(!$(_.$slider).hasClass('slick-initialized')){ $(_.$slider).addClass('slick-initialized'); _.buildRows(); _.buildOut(); _.setProps(); _.startLoad(); _.loadSlider(); _.initializeEvents(); _.updateArrows(); _.updateDots(); } if(creation){ _.$slider.trigger('init', [_]); } if(_.options.accessibility===true){ _.initADA(); }}; Slick.prototype.initArrowEvents=function(){ var _=this; if(_.options.arrows===true&&_.slideCount > _.options.slidesToShow){ _.$prevArrow.on('click.slick', { message: 'previous' }, _.changeSlide); _.$nextArrow.on('click.slick', { message: 'next' }, _.changeSlide); }}; Slick.prototype.initDotEvents=function(){ var _=this; if(_.options.dots===true&&_.slideCount > _.options.slidesToShow){ $('li', _.$dots).on('click.slick', { message: 'index' }, _.changeSlide); } if(_.options.dots===true&&_.options.pauseOnDotsHover===true&&_.options.autoplay===true){ $('li', _.$dots) .on('mouseenter.slick', $.proxy(_.setPaused, _, true)) .on('mouseleave.slick', $.proxy(_.setPaused, _, false)); }}; Slick.prototype.initializeEvents=function(){ var _=this; _.initArrowEvents(); _.initDotEvents(); _.$list.on('touchstart.slick mousedown.slick', { action: 'start' }, _.swipeHandler); _.$list.on('touchmove.slick mousemove.slick', { action: 'move' }, _.swipeHandler); _.$list.on('touchend.slick mouseup.slick', { action: 'end' }, _.swipeHandler); _.$list.on('touchcancel.slick mouseleave.slick', { action: 'end' }, _.swipeHandler); _.$list.on('click.slick', _.clickHandler); $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); _.$list.on('mouseenter.slick', $.proxy(_.setPaused, _, true)); _.$list.on('mouseleave.slick', $.proxy(_.setPaused, _, false)); if(_.options.accessibility===true){ _.$list.on('keydown.slick', _.keyHandler); } if(_.options.focusOnSelect===true){ $(_.$slideTrack).children().on('click.slick', _.selectHandler); } $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition); }; Slick.prototype.initUI=function(){ var _=this; if(_.options.arrows===true&&_.slideCount > _.options.slidesToShow){ _.$prevArrow.show(); _.$nextArrow.show(); } if(_.options.dots===true&&_.slideCount > _.options.slidesToShow){ _.$dots.show(); } if(_.options.autoplay===true){ _.autoPlay(); }}; Slick.prototype.keyHandler=function(event){ var _=this; if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')){ if(event.keyCode===37&&_.options.accessibility===true){ _.changeSlide({ data: { message: 'previous' }}); }else if(event.keyCode===39&&_.options.accessibility===true){ _.changeSlide({ data: { message: 'next' }}); }} }; Slick.prototype.lazyLoad=function(){ var _=this, loadRange, cloneRange, rangeStart, rangeEnd; function loadImages(imagesScope){ $('img[data-lazy]', imagesScope).each(function(){ var image=$(this), imageSource=$(this).attr('data-lazy'), imageToLoad=document.createElement('img'); imageToLoad.onload=function(){ image .animate({ opacity: 0 }, 100, function(){ image .attr('src', imageSource) .animate({ opacity: 1 }, 200, function(){ image .removeAttr('data-lazy') .removeClass('slick-loading'); }); }); }; imageToLoad.src=imageSource; }); } if(_.options.centerMode===true){ if(_.options.infinite===true){ rangeStart=_.currentSlide + (_.options.slidesToShow / 2 + 1); rangeEnd=rangeStart + _.options.slidesToShow + 2; }else{ rangeStart=Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); rangeEnd=2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; }}else{ rangeStart=_.options.infinite ? _.options.slidesToShow + _.currentSlide:_.currentSlide; rangeEnd=rangeStart + _.options.slidesToShow; if(_.options.fade===true){ if(rangeStart > 0) rangeStart--; if(rangeEnd <=_.slideCount) rangeEnd++; }} loadRange=_.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); loadImages(loadRange); if(_.slideCount <=_.options.slidesToShow){ cloneRange=_.$slider.find('.slick-slide'); loadImages(cloneRange); } else if(_.currentSlide >=_.slideCount - _.options.slidesToShow){ cloneRange=_.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); loadImages(cloneRange); }else if(_.currentSlide===0){ cloneRange=_.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); loadImages(cloneRange); }}; Slick.prototype.loadSlider=function(){ var _=this; _.setPosition(); _.$slideTrack.css({ opacity: 1 }); _.$slider.removeClass('slick-loading'); _.initUI(); if(_.options.lazyLoad==='progressive'){ _.progressiveLazyLoad(); }}; Slick.prototype.next=Slick.prototype.slickNext=function(){ var _=this; _.changeSlide({ data: { message: 'next' }}); }; Slick.prototype.orientationChange=function(){ var _=this; _.checkResponsive(); _.setPosition(); }; Slick.prototype.pause=Slick.prototype.slickPause=function(){ var _=this; _.autoPlayClear(); _.paused=true; }; Slick.prototype.play=Slick.prototype.slickPlay=function(){ var _=this; _.paused=false; _.autoPlay(); }; Slick.prototype.postSlide=function(index){ var _=this; _.$slider.trigger('afterChange', [_, index]); _.animating=false; _.setPosition(); _.swipeLeft=null; if(_.options.autoplay===true&&_.paused===false){ _.autoPlay(); } if(_.options.accessibility===true){ _.initADA(); }}; Slick.prototype.prev=Slick.prototype.slickPrev=function(){ var _=this; _.changeSlide({ data: { message: 'previous' }}); }; Slick.prototype.preventDefault=function(e){ e.preventDefault(); }; Slick.prototype.progressiveLazyLoad=function(){ var _=this, imgCount, targetImage; imgCount=$('img[data-lazy]', _.$slider).length; if(imgCount > 0){ targetImage=$('img[data-lazy]', _.$slider).first(); targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function(){ targetImage.removeAttr('data-lazy'); _.progressiveLazyLoad(); if(_.options.adaptiveHeight===true){ _.setPosition(); }}) .error(function(){ targetImage.removeAttr('data-lazy'); _.progressiveLazyLoad(); }); }}; Slick.prototype.refresh=function(initializing){ var _=this, currentSlide=_.currentSlide; _.destroy(true); $.extend(_, _.initials, { currentSlide: currentSlide }); _.init(); if(!initializing){ _.changeSlide({ data: { message: 'index', index: currentSlide }}, false); }}; Slick.prototype.registerBreakpoints=function(){ var _=this, breakpoint, currentBreakpoint, l, responsiveSettings=_.options.responsive||null; if($.type(responsiveSettings)==="array"&&responsiveSettings.length){ _.respondTo=_.options.respondTo||'window'; for(breakpoint in responsiveSettings){ l=_.breakpoints.length-1; currentBreakpoint=responsiveSettings[breakpoint].breakpoint; if(responsiveSettings.hasOwnProperty(breakpoint)){ while(l >=0){ if(_.breakpoints[l]&&_.breakpoints[l]===currentBreakpoint){ _.breakpoints.splice(l,1); } l--; } _.breakpoints.push(currentBreakpoint); _.breakpointSettings[currentBreakpoint]=responsiveSettings[breakpoint].settings; }} _.breakpoints.sort(function(a, b){ return(_.options.mobileFirst) ? a-b:b-a; }); }}; Slick.prototype.reinit=function(){ var _=this; _.$slides = _.$slideTrack .children(_.options.slide) .addClass('slick-slide'); _.slideCount=_.$slides.length; if(_.currentSlide >=_.slideCount&&_.currentSlide!==0){ _.currentSlide=_.currentSlide - _.options.slidesToScroll; } if(_.slideCount <=_.options.slidesToShow){ _.currentSlide=0; } _.registerBreakpoints(); _.setProps(); _.setupInfinite(); _.buildArrows(); _.updateArrows(); _.initArrowEvents(); _.buildDots(); _.updateDots(); _.initDotEvents(); _.checkResponsive(false, true); if(_.options.focusOnSelect===true){ $(_.$slideTrack).children().on('click.slick', _.selectHandler); } _.setSlideClasses(0); _.setPosition(); _.$slider.trigger('reInit', [_]); if(_.options.autoplay===true){ _.focusHandler(); }}; Slick.prototype.resize=function(){ var _=this; if($(window).width()!==_.windowWidth){ clearTimeout(_.windowDelay); _.windowDelay=window.setTimeout(function(){ _.windowWidth=$(window).width(); _.checkResponsive(); if(!_.unslicked){ _.setPosition(); }}, 50); }}; Slick.prototype.removeSlide=Slick.prototype.slickRemove=function(index, removeBefore, removeAll){ var _=this; if(typeof(index)==='boolean'){ removeBefore=index; index=removeBefore===true ? 0:_.slideCount - 1; }else{ index=removeBefore===true ? --index:index; } if(_.slideCount < 1||index < 0||index > _.slideCount - 1){ return false; } _.unload(); if(removeAll===true){ _.$slideTrack.children().remove(); }else{ _.$slideTrack.children(this.options.slide).eq(index).remove(); } _.$slides=_.$slideTrack.children(this.options.slide); _.$slideTrack.children(this.options.slide).detach(); _.$slideTrack.append(_.$slides); _.$slidesCache=_.$slides; _.reinit(); }; Slick.prototype.setCSS=function(position){ var _=this, positionProps={}, x, y; if(_.options.rtl===true){ position=-position; } x=_.positionProp=='left' ? Math.ceil(position) + 'px':'0px'; y=_.positionProp=='top' ? Math.ceil(position) + 'px':'0px'; positionProps[_.positionProp]=position; if(_.transformsEnabled===false){ _.$slideTrack.css(positionProps); }else{ positionProps={}; if(_.cssTransitions===false){ positionProps[_.animType]='translate(' + x + ', ' + y + ')'; _.$slideTrack.css(positionProps); }else{ positionProps[_.animType]='translate3d(' + x + ', ' + y + ', 0px)'; _.$slideTrack.css(positionProps); }} }; Slick.prototype.setDimensions=function(){ var _=this; if(_.options.vertical===false){ if(_.options.centerMode===true){ _.$list.css({ padding: ('0px ' + _.options.centerPadding) }); }}else{ _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); if(_.options.centerMode===true){ _.$list.css({ padding: (_.options.centerPadding + ' 0px') }); }} _.listWidth=_.$list.width(); _.listHeight=_.$list.height(); if(_.options.vertical===false&&_.options.variableWidth===false){ _.slideWidth=Math.ceil(_.listWidth / _.options.slidesToShow); _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); }else if(_.options.variableWidth===true){ _.$slideTrack.width(5000 * _.slideCount); }else{ _.slideWidth=Math.ceil(_.listWidth); _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); } var offset=_.$slides.first().outerWidth(true) - _.$slides.first().width(); if(_.options.variableWidth===false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); }; Slick.prototype.setFade=function(){ var _=this, targetLeft; _.$slides.each(function(index, element){ targetLeft=(_.slideWidth * index) * -1; if(_.options.rtl===true){ $(element).css({ position: 'relative', right: targetLeft, top: 0, zIndex: _.options.zIndex - 2, opacity: 0 }); }else{ $(element).css({ position: 'relative', left: targetLeft, top: 0, zIndex: _.options.zIndex - 2, opacity: 0 }); }}); _.$slides.eq(_.currentSlide).css({ zIndex: _.options.zIndex - 1, opacity: 1 }); }; Slick.prototype.setHeight=function(){ var _=this; if(_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false){ var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true); _.$list.css('height', targetHeight); }}; Slick.prototype.setOption=Slick.prototype.slickSetOption=function(option, value, refresh){ var _=this, l, item; if(option==="responsive"&&$.type(value)==="array"){ for(item in value){ if($.type(_.options.responsive)!=="array"){ _.options.responsive=[ value[item] ]; }else{ l=_.options.responsive.length-1; while(l >=0){ if(_.options.responsive[l].breakpoint===value[item].breakpoint){ _.options.responsive.splice(l,1); } l--; } _.options.responsive.push(value[item]); }} }else{ _.options[option]=value; } if(refresh===true){ _.unload(); _.reinit(); }}; Slick.prototype.setPosition=function(){ var _=this; _.setDimensions(); _.setHeight(); if(_.options.fade===false){ _.setCSS(_.getLeft(_.currentSlide)); }else{ _.setFade(); } _.$slider.trigger('setPosition', [_]); }; Slick.prototype.setProps=function(){ var _=this, bodyStyle=document.body.style; _.positionProp=_.options.vertical===true ? 'top':'left'; if(_.positionProp==='top'){ _.$slider.addClass('slick-vertical'); }else{ _.$slider.removeClass('slick-vertical'); } if(bodyStyle.WebkitTransition!==undefined || bodyStyle.MozTransition!==undefined || bodyStyle.msTransition!==undefined){ if(_.options.useCSS===true){ _.cssTransitions=true; }} if(_.options.fade){ if(typeof _.options.zIndex==='number'){ if(_.options.zIndex < 3){ _.options.zIndex=3; }}else{ _.options.zIndex=_.defaults.zIndex; }} if(bodyStyle.OTransform!==undefined){ _.animType='OTransform'; _.transformType='-o-transform'; _.transitionType='OTransition'; if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined) _.animType=false; } if(bodyStyle.MozTransform!==undefined){ _.animType='MozTransform'; _.transformType='-moz-transform'; _.transitionType='MozTransition'; if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.MozPerspective===undefined) _.animType=false; } if(bodyStyle.webkitTransform!==undefined){ _.animType='webkitTransform'; _.transformType='-webkit-transform'; _.transitionType='webkitTransition'; if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined) _.animType=false; } if(bodyStyle.msTransform!==undefined){ _.animType='msTransform'; _.transformType='-ms-transform'; _.transitionType='msTransition'; if(bodyStyle.msTransform===undefined) _.animType=false; } if(bodyStyle.transform!==undefined&&_.animType!==false){ _.animType='transform'; _.transformType='transform'; _.transitionType='transition'; } _.transformsEnabled=(_.animType!==null&&_.animType!==false); }; Slick.prototype.setSlideClasses=function(index){ var _=this, centerOffset, allSlides, indexOffset, remainder; allSlides=_.$slider .find('.slick-slide') .removeClass('slick-active slick-center slick-current') .attr('aria-hidden', 'true'); _.$slides .eq(index) .addClass('slick-current'); if(_.options.centerMode===true){ centerOffset=Math.floor(_.options.slidesToShow / 2); if(_.options.infinite===true){ if(index >=centerOffset&&index <=(_.slideCount - 1) - centerOffset){ _.$slides .slice(index - centerOffset, index + centerOffset + 1) .addClass('slick-active') .attr('aria-hidden', 'false'); }else{ indexOffset=_.options.slidesToShow + index; allSlides .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2) .addClass('slick-active') .attr('aria-hidden', 'false'); } if(index===0){ allSlides .eq(allSlides.length - 1 - _.options.slidesToShow) .addClass('slick-center'); }else if(index===_.slideCount - 1){ allSlides .eq(_.options.slidesToShow) .addClass('slick-center'); }} _.$slides .eq(index) .addClass('slick-center'); }else{ if(index >=0&&index <=(_.slideCount - _.options.slidesToShow)){ _.$slides .slice(index, index + _.options.slidesToShow) .addClass('slick-active') .attr('aria-hidden', 'false'); }else if(allSlides.length <=_.options.slidesToShow){ allSlides .addClass('slick-active') .attr('aria-hidden', 'false'); }else{ remainder=_.slideCount % _.options.slidesToShow; indexOffset=_.options.infinite===true ? _.options.slidesToShow + index:index; if(_.options.slidesToShow==_.options.slidesToScroll&&(_.slideCount - index) < _.options.slidesToShow){ allSlides .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) .addClass('slick-active') .attr('aria-hidden', 'false'); }else{ allSlides .slice(indexOffset, indexOffset + _.options.slidesToShow) .addClass('slick-active') .attr('aria-hidden', 'false'); }} } if(_.options.lazyLoad==='ondemand'){ _.lazyLoad(); }}; Slick.prototype.setupInfinite=function(){ var _=this, i, slideIndex, infiniteCount; if(_.options.fade===true){ _.options.centerMode=false; } if(_.options.infinite===true&&_.options.fade===false){ slideIndex=null; if(_.slideCount > _.options.slidesToShow){ if(_.options.centerMode===true){ infiniteCount=_.options.slidesToShow + 1; }else{ infiniteCount=_.options.slidesToShow; } for (i=_.slideCount; i > (_.slideCount - infiniteCount); i -=1){ slideIndex=i - 1; $(_.$slides[slideIndex]).clone(true).attr('id', '') .attr('data-slick-index', slideIndex - _.slideCount) .prependTo(_.$slideTrack).addClass('slick-cloned'); } for (i=0; i < infiniteCount; i +=1){ slideIndex=i; $(_.$slides[slideIndex]).clone(true).attr('id', '') .attr('data-slick-index', slideIndex + _.slideCount) .appendTo(_.$slideTrack).addClass('slick-cloned'); } _.$slideTrack.find('.slick-cloned').find('[id]').each(function(){ $(this).attr('id', ''); }); }} }; Slick.prototype.setPaused=function(paused){ var _=this; if(_.options.autoplay===true&&_.options.pauseOnHover===true){ _.paused=paused; if(!paused){ _.autoPlay(); }else{ _.autoPlayClear(); }} }; Slick.prototype.selectHandler=function(event){ var _=this; var targetElement = $(event.target).is('.slick-slide') ? $(event.target) : $(event.target).parents('.slick-slide'); var index=parseInt(targetElement.attr('data-slick-index')); if(!index) index=0; if(_.slideCount <=_.options.slidesToShow){ _.setSlideClasses(index); _.asNavFor(index); return; } _.slideHandler(index); }; Slick.prototype.slideHandler=function(index, sync, dontAnimate){ var targetSlide, animSlide, oldSlide, slideLeft, targetLeft=null, _=this; sync=sync||false; if(_.animating===true&&_.options.waitForAnimate===true){ return; } if(_.options.fade===true&&_.currentSlide===index){ return; } if(_.slideCount <=_.options.slidesToShow){ return; } if(sync===false){ _.asNavFor(index); } targetSlide=index; targetLeft=_.getLeft(targetSlide); slideLeft=_.getLeft(_.currentSlide); _.currentLeft=_.swipeLeft===null ? slideLeft:_.swipeLeft; if(_.options.infinite===false&&_.options.centerMode===false&&(index < 0||index > _.getDotCount() * _.options.slidesToScroll)){ if(_.options.fade===false){ targetSlide=_.currentSlide; if(dontAnimate!==true){ _.animateSlide(slideLeft, function(){ _.postSlide(targetSlide); }); }else{ _.postSlide(targetSlide); }} return; }else if(_.options.infinite===false&&_.options.centerMode===true&&(index < 0||index > (_.slideCount - _.options.slidesToScroll))){ if(_.options.fade===false){ targetSlide=_.currentSlide; if(dontAnimate!==true){ _.animateSlide(slideLeft, function(){ _.postSlide(targetSlide); }); }else{ _.postSlide(targetSlide); }} return; } if(_.options.autoplay===true){ clearInterval(_.autoPlayTimer); } if(targetSlide < 0){ if(_.slideCount % _.options.slidesToScroll!==0){ animSlide=_.slideCount - (_.slideCount % _.options.slidesToScroll); }else{ animSlide=_.slideCount + targetSlide; }}else if(targetSlide >=_.slideCount){ if(_.slideCount % _.options.slidesToScroll!==0){ animSlide=0; }else{ animSlide=targetSlide - _.slideCount; }}else{ animSlide=targetSlide; } _.animating=true; _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); oldSlide=_.currentSlide; _.currentSlide=animSlide; _.setSlideClasses(_.currentSlide); _.updateDots(); _.updateArrows(); if(_.options.fade===true){ if(dontAnimate!==true){ _.fadeSlideOut(oldSlide); _.fadeSlide(animSlide, function(){ _.postSlide(animSlide); }); }else{ _.postSlide(animSlide); } _.animateHeight(); return; } if(dontAnimate!==true){ _.animateSlide(targetLeft, function(){ _.postSlide(animSlide); }); }else{ _.postSlide(animSlide); }}; Slick.prototype.startLoad=function(){ var _=this; if(_.options.arrows===true&&_.slideCount > _.options.slidesToShow){ _.$prevArrow.hide(); _.$nextArrow.hide(); } if(_.options.dots===true&&_.slideCount > _.options.slidesToShow){ _.$dots.hide(); } _.$slider.addClass('slick-loading'); }; Slick.prototype.swipeDirection=function(){ var xDist, yDist, r, swipeAngle, _=this; xDist=_.touchObject.startX - _.touchObject.curX; yDist=_.touchObject.startY - _.touchObject.curY; r=Math.atan2(yDist, xDist); swipeAngle=Math.round(r * 180 / Math.PI); if(swipeAngle < 0){ swipeAngle=360 - Math.abs(swipeAngle); } if((swipeAngle <=45)&&(swipeAngle >=0)){ return (_.options.rtl===false ? 'left':'right'); } if((swipeAngle <=360)&&(swipeAngle >=315)){ return (_.options.rtl===false ? 'left':'right'); } if((swipeAngle >=135)&&(swipeAngle <=225)){ return (_.options.rtl===false ? 'right':'left'); } if(_.options.verticalSwiping===true){ if((swipeAngle >=35)&&(swipeAngle <=135)){ return 'left'; }else{ return 'right'; }} return 'vertical'; }; Slick.prototype.swipeEnd=function(event){ var _=this, slideCount; _.dragging=false; _.shouldClick=(_.touchObject.swipeLength > 10) ? false:true; if(_.touchObject.curX===undefined){ return false; } if(_.touchObject.edgeHit===true){ _.$slider.trigger('edge', [_, _.swipeDirection()]); } if(_.touchObject.swipeLength >=_.touchObject.minSwipe){ switch (_.swipeDirection()){ case 'left': slideCount=_.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()):_.currentSlide + _.getSlideCount(); _.slideHandler(slideCount); _.currentDirection=0; _.touchObject={}; _.$slider.trigger('swipe', [_, 'left']); break; case 'right': slideCount=_.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()):_.currentSlide - _.getSlideCount(); _.slideHandler(slideCount); _.currentDirection=1; _.touchObject={}; _.$slider.trigger('swipe', [_, 'right']); break; }}else{ if(_.touchObject.startX!==_.touchObject.curX){ _.slideHandler(_.currentSlide); _.touchObject={};}} }; Slick.prototype.swipeHandler=function(event){ var _=this; if((_.options.swipe===false)||('ontouchend' in document&&_.options.swipe===false)){ return; }else if(_.options.draggable===false&&event.type.indexOf('mouse')!==-1){ return; } _.touchObject.fingerCount=event.originalEvent&&event.originalEvent.touches!==undefined ? event.originalEvent.touches.length:1; _.touchObject.minSwipe=_.listWidth / _.options .touchThreshold; if(_.options.verticalSwiping===true){ _.touchObject.minSwipe=_.listHeight / _.options .touchThreshold; } switch (event.data.action){ case 'start': _.swipeStart(event); break; case 'move': _.swipeMove(event); break; case 'end': _.swipeEnd(event); break; }}; Slick.prototype.swipeMove=function(event){ var _=this, edgeWasHit=false, curLeft, swipeDirection, swipeLength, positionOffset, touches; touches=event.originalEvent!==undefined ? event.originalEvent.touches:null; if(!_.dragging||touches&&touches.length!==1){ return false; } curLeft=_.getLeft(_.currentSlide); _.touchObject.curX=touches!==undefined ? touches[0].pageX:event.clientX; _.touchObject.curY=touches!==undefined ? touches[0].pageY:event.clientY; _.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); if(_.options.verticalSwiping===true){ _.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); } swipeDirection=_.swipeDirection(); if(swipeDirection==='vertical'){ return; } if(event.originalEvent!==undefined&&_.touchObject.swipeLength > 4){ event.preventDefault(); } positionOffset=(_.options.rtl===false ? 1:-1) * (_.touchObject.curX > _.touchObject.startX ? 1:-1); if(_.options.verticalSwiping===true){ positionOffset=_.touchObject.curY > _.touchObject.startY ? 1:-1; } swipeLength=_.touchObject.swipeLength; _.touchObject.edgeHit=false; if(_.options.infinite===false){ if((_.currentSlide===0&&swipeDirection==='right')||(_.currentSlide >=_.getDotCount()&&swipeDirection==='left')){ swipeLength=_.touchObject.swipeLength * _.options.edgeFriction; _.touchObject.edgeHit=true; }} if(_.options.vertical===false){ _.swipeLeft=curLeft + swipeLength * positionOffset; }else{ _.swipeLeft=curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; } if(_.options.verticalSwiping===true){ _.swipeLeft=curLeft + swipeLength * positionOffset; } if(_.options.fade===true||_.options.touchMove===false){ return false; } if(_.animating===true){ _.swipeLeft=null; return false; } _.setCSS(_.swipeLeft); }; Slick.prototype.swipeStart=function(event){ var _=this, touches; if(_.touchObject.fingerCount!==1||_.slideCount <=_.options.slidesToShow){ _.touchObject={}; return false; } if(event.originalEvent!==undefined&&event.originalEvent.touches!==undefined){ touches=event.originalEvent.touches[0]; } _.touchObject.startX=_.touchObject.curX=touches!==undefined ? touches.pageX:event.clientX; _.touchObject.startY=_.touchObject.curY=touches!==undefined ? touches.pageY:event.clientY; _.dragging=true; }; Slick.prototype.unfilterSlides=Slick.prototype.slickUnfilter=function(){ var _=this; if(_.$slidesCache!==null){ _.unload(); _.$slideTrack.children(this.options.slide).detach(); _.$slidesCache.appendTo(_.$slideTrack); _.reinit(); }}; Slick.prototype.unload=function(){ var _=this; $('.slick-cloned', _.$slider).remove(); if(_.$dots){ _.$dots.remove(); } if(_.$prevArrow&&_.htmlExpr.test(_.options.prevArrow)){ _.$prevArrow.remove(); } if(_.$nextArrow&&_.htmlExpr.test(_.options.nextArrow)){ _.$nextArrow.remove(); } _.$slides .removeClass('slick-slide slick-active slick-visible slick-current') .attr('aria-hidden', 'true') .css('width', ''); }; Slick.prototype.unslick=function(fromBreakpoint){ var _=this; _.$slider.trigger('unslick', [_, fromBreakpoint]); _.destroy(); }; Slick.prototype.updateArrows=function(){ var _=this, centerOffset; centerOffset=Math.floor(_.options.slidesToShow / 2); if(_.options.arrows===true && _.slideCount > _.options.slidesToShow && !_.options.infinite){ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); if(_.currentSlide===0){ _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); }else if(_.currentSlide >=_.slideCount - _.options.slidesToShow&&_.options.centerMode===false){ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); }else if(_.currentSlide >=_.slideCount - 1&&_.options.centerMode===true){ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); }} }; Slick.prototype.updateDots=function(){ var _=this; if(_.$dots!==null){ _.$dots .find('li') .removeClass('slick-active') .attr('aria-hidden', 'true'); _.$dots .find('li') .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) .addClass('slick-active') .attr('aria-hidden', 'false'); }}; Slick.prototype.visibility=function(){ var _=this; if(document[_.hidden]){ _.paused=true; _.autoPlayClear(); }else{ if(_.options.autoplay===true){ _.paused=false; _.autoPlay(); }} }; Slick.prototype.initADA=function(){ var _=this; _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 'aria-hidden': 'true', 'tabindex': '-1' }).find('a, input, button, select').attr({ 'tabindex': '-1' }); _.$slideTrack.attr('role', 'listbox'); _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i){ $(this).attr({ 'role': 'option', 'aria-describedby': 'slick-slide' + _.instanceUid + i + '' }); }); if(_.$dots!==null){ _.$dots.attr('role', 'tablist').find('li').each(function(i){ $(this).attr({ 'role': 'presentation', 'aria-selected': 'false', 'aria-controls': 'navigation' + _.instanceUid + i + '', 'id': 'slick-slide' + _.instanceUid + i + '' }); }) .first().attr('aria-selected', 'true').end() .find('button').attr('role', 'button').end() .closest('div').attr('role', 'toolbar'); } _.activateADA(); }; Slick.prototype.activateADA=function(){ var _=this, _isSlideOnFocus=_.$slider.find('*').is(':focus'); _.$slideTrack.find('.slick-active').attr({ 'aria-hidden': 'false', 'tabindex': '0' }).find('a, input, button, select').attr({ 'tabindex': '0' }); (_isSlideOnFocus)&&_.$slideTrack.find('.slick-active').focus(); }; Slick.prototype.focusHandler=function(){ var _=this; _.$slider.on('focus.slick blur.slick', '*', function(event){ event.stopImmediatePropagation(); var sf=$(this); setTimeout(function(){ if(_.isPlay){ if(sf.is(':focus')){ _.autoPlayClear(); _.paused=true; }else{ _.paused=false; _.autoPlay(); }} }, 0); }); }; $.fn.slick=function(){ var _=this, opt=arguments[0], args=Array.prototype.slice.call(arguments, 1), l=_.length, i=0, ret; for (i; i < l; i++){ if(typeof opt=='object'||typeof opt=='undefined') _[i].slick=new Slick(_[i], opt); else ret=_[i].slick[opt].apply(_[i].slick, args); if(typeof ret!='undefined') return ret; } return _; };})); (function($){ var _PLUGIN_='mmenu', _VERSION_='5.2.0'; if($[ _PLUGIN_ ]){ return; } $[ _PLUGIN_ ]=function($menu, opts, conf){ this.$menu=$menu; this._api=[ 'bind', 'init', 'update', 'setSelected', 'getInstance', 'openPanel', 'closePanel', 'closeAllPanels' ]; this.opts=opts; this.conf=conf; this.vars={}; this.cbck={}; if(typeof this.___deprecated=='function'){ this.___deprecated(); } this._initMenu(); this._initAnchors(); var $panels=this.$menu.children(this.conf.panelNodetype); this._initAddons(); this.init($panels); if(typeof this.___debug=='function'){ this.___debug(); } return this; }; $[ _PLUGIN_ ].version=_VERSION_; $[ _PLUGIN_ ].addons={}; $[ _PLUGIN_ ].uniqueId=0; $[ _PLUGIN_ ].defaults={ extensions:[], navbar:{ title:'Menu', titleLink:'panel' }, onClick:{ setSelected:true }, slidingSubmenus:true }; $[ _PLUGIN_ ].configuration={ classNames:{ panel:'Panel', vertical:'Vertical', selected:'Selected', divider:'Divider', spacer:'Spacer' }, clone:false, openingInterval:25, panelNodetype:'ul, ol, div', transitionDuration:400 }; $[ _PLUGIN_ ].prototype={ init: function($panels){ $panels=$panels.not('.' + _c.nopanel); $panels=this._initPanels($panels); this.trigger('init', $panels); this.trigger('update'); }, update: function(){ this.trigger('update'); }, setSelected: function($i){ this.$menu.find('.' + _c.listview).children().removeClass(_c.selected); $i.addClass(_c.selected); this.trigger('setSelected', $i); }, openPanel: function($panel){ var $l=$panel.parent(); if($l.hasClass(_c.vertical)){ var $sub=$l.parents('.' + _c.subopened); if($sub.length){ return this.openPanel($sub.first()); } $l.addClass(_c.opened); }else{ if($panel.hasClass(_c.current)){ return; } var $panels=$(this.$menu).children('.' + _c.panel), $current=$panels.filter('.' + _c.current); $panels .removeClass(_c.highest) .removeClass(_c.current) .not($panel) .not($current) .not('.' + _c.vertical) .addClass(_c.hidden); if($panel.hasClass(_c.opened)){ $current .addClass(_c.highest) .removeClass(_c.opened) .removeClass(_c.subopened); }else{ $panel.addClass(_c.highest); $current.addClass(_c.subopened); } $panel .removeClass(_c.hidden) .addClass(_c.current); setTimeout( function(){ $panel .removeClass(_c.subopened) .addClass(_c.opened); }, this.conf.openingInterval ); } this.trigger('openPanel', $panel); }, closePanel: function($panel){ var $l=$panel.parent(); if($l.hasClass(_c.vertical)){ $l.removeClass(_c.opened); this.trigger('closePanel', $panel); }}, closeAllPanels: function(){ this.$menu.find('.' + _c.listview) .children() .removeClass(_c.selected) .filter('.' + _c.vertical) .removeClass(_c.opened); var $pnls=this.$menu.children('.' + _c.panel), $frst=$pnls.first(); this.$menu.children('.' + _c.panel) .not($frst) .removeClass(_c.subopened) .removeClass(_c.opened) .removeClass(_c.current) .removeClass(_c.highest) .addClass(_c.hidden); this.openPanel($frst); }, togglePanel: function($panel){ var $l=$panel.parent(); if($l.hasClass(_c.vertical)){ this[ $l.hasClass(_c.opened) ? 'closePanel':'openPanel' ]($panel); }}, getInstance: function(){ return this; }, bind: function(event, fn){ this.cbck[ event ]=this.cbck[ event ]||[]; this.cbck[ event ].push(fn); }, trigger: function(){ var that=this, args=Array.prototype.slice.call(arguments), evnt=args.shift(); if(this.cbck[ evnt ]){ for(var e=0, l=this.cbck[ evnt ].length; e < l; e++){ this.cbck[ evnt ][ e ].apply(that, args); }} }, _initMenu: function(){ var that=this; if(this.opts.offCanvas&&this.conf.clone){ this.$menu=this.$menu.clone(true); this.$menu.add(this.$menu.find('[id]')) .filter('[id]') .each(function(){ $(this).attr('id', _c.mm($(this).attr('id'))); } ); } this.$menu.contents().each(function(){ if($(this)[ 0 ].nodeType==3){ $(this).remove(); }} ); this.$menu .parent() .addClass(_c.wrapper); var clsn=[ _c.menu ]; if(!this.opts.slidingSubmenus){ clsn.push(_c.vertical); } this.opts.extensions=(this.opts.extensions.length) ? 'mm-' + this.opts.extensions.join(' mm-') : ''; if(this.opts.extensions){ clsn.push(this.opts.extensions); } this.$menu.addClass(clsn.join(' ')); }, _initPanels: function($panels){ var that=this; this.__findAddBack($panels, 'ul, ol') .not('.' + _c.nolistview) .addClass(_c.listview); var $lis=this.__findAddBack($panels, '.' + _c.listview).children(); this.__refactorClass($lis, this.conf.classNames.selected, 'selected'); this.__refactorClass($lis, this.conf.classNames.divider, 'divider'); this.__refactorClass($lis, this.conf.classNames.spacer, 'spacer'); this.__refactorClass(this.__findAddBack($panels, '.' + this.conf.classNames.panel), this.conf.classNames.panel, 'panel'); var $curpanels=$(), $oldpanels=$panels .add($panels.find('.' + _c.panel)) .add(this.__findAddBack($panels, '.' + _c.listview).children().children(this.conf.panelNodetype)) .not('.' + _c.nopanel); this.__refactorClass($oldpanels, this.conf.classNames.vertical, 'vertical'); if(!this.opts.slidingSubmenus){ $oldpanels.addClass(_c.vertical); } $oldpanels .each(function(){ var $t=$(this), $p=$t; if($t.is('ul, ol')){ $t.wrap('
'); $p=$t.parent(); }else{ $p.addClass(_c.panel); } var id=$t.attr('id'); $t.removeAttr('id'); $p.attr('id', id||that.__getUniqueId()); if($t.hasClass(_c.vertical)){ $t.removeClass(that.conf.classNames.vertical); $p.add($p.parent()).addClass(_c.vertical); } $curpanels=$curpanels.add($p); var $f=$p.children().first(), $l=$p.children().last(); if($f.is('.' + _c.listview)){ $f.addClass(_c.first); } if($l.is('.' + _c.listview)){ $l.addClass(_c.last); }} ); var $allpanels=$('.' + _c.panel, this.$menu); $curpanels .each(function(i){ var $t=$(this), $p=$t.parent(), $a=$p.children('a, span').first(); if(!$p.is('.' + _c.menu)){ $p.data(_d.sub, $t); $t.data(_d.parent, $p); } if(!$p.children('.' + _c.next).length){ if($p.parent().is('.' + _c.listview)){ var id=$t.attr('id'), $b=$('').insertBefore($a); if($a.is('span')){ $b.addClass(_c.fullsubopen); }} } if(!$t.children('.' + _c.navbar).length){ if(!$p.hasClass(_c.vertical)){ if($p.parent().is('.' + _c.listview)){ var $p=$p.closest('.' + _c.panel); }else{ var $a=$p.closest('.' + _c.panel).find('a[href="#' + $t.attr('id') + '"]').first(), $p=$a.closest('.' + _c.panel); } var $navbar=$('
'); if($p.length){ var id=$p.attr('id'); switch(that.opts.navbar.titleLink){ case 'anchor': _url=$a.attr('href'); break; case 'panel': case 'parent': _url='#' + id; break; case 'none': default: _url=false; break; } $navbar .append('') .append('' + $a.text() + '') .prependTo($t); $t.addClass(_c.hasnavbar); } else if(that.opts.navbar.title){ $navbar .append('' + that.opts.navbar.title + '') .prependTo($t); $t.addClass(_c.hasnavbar); }} }} ); var $s=this.__findAddBack($panels, '.' + _c.listview) .children('.' + _c.selected) .removeClass(_c.selected) .last() .addClass(_c.selected); $s.add($s.parentsUntil('.' + _c.menu, 'li')) .filter('.' + _c.vertical) .addClass(_c.opened) .end() .not('.' + _c.vertical) .each(function(){ $(this).parentsUntil('.' + _c.menu, '.' + _c.panel) .not('.' + _c.vertical) .first() .addClass(_c.opened) .parentsUntil('.' + _c.menu, '.' + _c.panel) .not('.' + _c.vertical) .first() .addClass(_c.opened) .addClass(_c.subopened); } ); $s.children('.' + _c.panel) .not('.' + _c.vertical) .addClass(_c.opened) .parentsUntil('.' + _c.menu, '.' + _c.panel) .not('.' + _c.vertical) .first() .addClass(_c.opened) .addClass(_c.subopened); var $current=$allpanels.filter('.' + _c.opened); if(!$current.length){ $current=$curpanels.first(); } $current .addClass(_c.opened) .last() .addClass(_c.current); $curpanels .not('.' + _c.vertical) .not($current.last()) .addClass(_c.hidden) .end() .appendTo(this.$menu); return $curpanels; }, _initAnchors: function(){ var that=this; glbl.$body .on(_e.click + '-oncanvas', 'a[href]', function(e){ var $t=$(this), fired=false, inMenu=that.$menu.find($t).length; for(var a in $[ _PLUGIN_ ].addons){ if(fired=$[ _PLUGIN_ ].addons[ a ].clickAnchor.call(that, $t, inMenu)){ break; }} if(!fired&&inMenu){ var _h=$t.attr('href'); if(_h.length > 1&&_h.slice(0, 1)=='#'){ var $h=$(_h, that.$menu); if($h.is('.' + _c.panel)){ fired=true; that[ $t.parent().hasClass(_c.vertical) ? 'togglePanel':'openPanel' ]($h); }} } if(fired){ e.preventDefault(); } if(!fired&&inMenu){ if($t.is('.' + _c.listview + ' > li > a') && !$t.is('[rel="external"]') && !$t.is('[target="_blank"]')){ if(that.__valueOrFn(that.opts.onClick.setSelected, $t)){ that.setSelected($(e.target).parent()); } var preventDefault=that.__valueOrFn(that.opts.onClick.preventDefault, $t, _h.slice(0, 1)=='#'); if(preventDefault){ e.preventDefault(); } if(that.__valueOrFn(that.opts.onClick.blockUI, $t, !preventDefault)){ glbl.$html.addClass(_c.blocking); } if(that.__valueOrFn(that.opts.onClick.close, $t, preventDefault)){ that.close(); }} }} ); }, _initAddons: function(){ for(var a in $[ _PLUGIN_ ].addons){ $[ _PLUGIN_ ].addons[ a ].add.call(this); $[ _PLUGIN_ ].addons[ a ].add=function(){};} for(var a in $[ _PLUGIN_ ].addons){ $[ _PLUGIN_ ].addons[ a ].setup.call(this); }}, __api: function(){ var that=this, api={}; $.each(this._api, function(i){ var fn=this; api[ fn ]=function(){ var re=that[ fn ].apply(that, arguments); return(typeof re=='undefined') ? api:re; }} ); return api; }, __valueOrFn: function(o, $e, d){ if(typeof o=='function'){ return o.call($e[ 0 ]); } if(typeof o=='undefined'&&typeof d!='undefined'){ return d; } return o; }, __refactorClass: function($e, o, c){ return $e.filter('.' + o).removeClass(o).addClass(_c[ c ]); }, __findAddBack: function($e, s){ return $e.find(s).add($e.filter(s)); }, __filterListItems: function($i){ return $i .not('.' + _c.divider) .not('.' + _c.hidden); }, __transitionend: function($e, fn, duration){ var _ended=false, _fn=function(){ if(!_ended){ fn.call($e[ 0 ]); } _ended=true; }; $e.one(_e.transitionend, _fn); $e.one(_e.webkitTransitionEnd, _fn); setTimeout(_fn, duration * 1.1); }, __getUniqueId: function(){ return _c.mm($[ _PLUGIN_ ].uniqueId++); }}; $.fn[ _PLUGIN_ ]=function(opts, conf){ initPlugin(); opts=$.extend(true, {}, $[ _PLUGIN_ ].defaults, opts); conf=$.extend(true, {}, $[ _PLUGIN_ ].configuration, conf); return this.each(function(){ var $menu=$(this); if($menu.data(_PLUGIN_)){ return; } var _menu=new $[ _PLUGIN_ ]($menu, opts, conf); $menu.data(_PLUGIN_, _menu.__api()); } ); }; $[ _PLUGIN_ ].support={ touch: 'ontouchstart' in window||navigator.msMaxTouchPoints }; var _c, _d, _e, glbl; function initPlugin(){ if($[ _PLUGIN_ ].glbl){ return; } glbl={ $wndw:$(window), $html:$('html'), $body:$('body') }; _c={}; _d={}; _e={}; $.each([ _c, _d, _e ], function(i, o){ o.add=function(a){ a=a.split(' '); for(var b=0, l=a.length; b < l; b++){ o[ a[ b ] ]=o.mm(a[ b ]); }};} ); _c.mm=function(c){ return 'mm-' + c; }; _c.add('wrapper menu vertical panel nopanel current highest opened subopened navbar hasnavbar title btn prev next first last listview nolistview selected divider spacer hidden fullsubopen'); _c.umm=function(c){ if(c.slice(0, 3)=='mm-'){ c=c.slice(3); } return c; }; _d.mm=function(d){ return 'mm-' + d; }; _d.add('parent sub'); _e.mm=function(e){ return e + '.mm'; }; _e.add('transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown'); $[ _PLUGIN_ ]._c=_c; $[ _PLUGIN_ ]._d=_d; $[ _PLUGIN_ ]._e=_e; $[ _PLUGIN_ ].glbl=glbl; }})(jQuery); (function($){ var _PLUGIN_='mmenu', _ADDON_='offCanvas'; $[ _PLUGIN_ ].addons[ _ADDON_ ]={ setup: function(){ if(!this.opts[ _ADDON_ ]){ return; } var that=this, opts=this.opts[ _ADDON_ ], conf=this.conf[ _ADDON_ ]; glbl=$[ _PLUGIN_ ].glbl; this._api=$.merge(this._api, [ 'open', 'close', 'setPage' ]); if(opts.position=='top'||opts.position=='bottom'){ opts.zposition='front'; } if(typeof conf.pageSelector!='string'){ conf.pageSelector='> ' + conf.pageNodetype; } glbl.$allMenus=(glbl.$allMenus||$()).add(this.$menu); this.vars.opened=false; var clsn=[ _c.offcanvas ]; if(opts.position!='left'){ clsn.push(_c.mm(opts.position)); } if(opts.zposition!='back'){ clsn.push(_c.mm(opts.zposition)); } this.$menu .addClass(clsn.join(' ')) .parent() .removeClass(_c.wrapper); this.setPage(glbl.$page); this._initBlocker(); this[ '_initWindow_' + _ADDON_ ](); this.$menu[ conf.menuInjectMethod + 'To' ](conf.menuWrapperSelector); }, add: function(){ _c=$[ _PLUGIN_ ]._c; _d=$[ _PLUGIN_ ]._d; _e=$[ _PLUGIN_ ]._e; _c.add('offcanvas slideout modal background opening blocker page'); _d.add('style'); _e.add('resize'); }, clickAnchor: function($a, inMenu){ if(!this.opts[ _ADDON_ ]){ return false; } var id=this.$menu.attr('id'); if(id&&id.length){ if(this.conf.clone){ id=_c.umm(id); } if($a.is('[href="#' + id + '"]')){ this.open(); return true; }} if(!glbl.$page){ return; } var id=glbl.$page.first().attr('id'); if(id&&id.length){ if($a.is('[href="#' + id + '"]')){ this.close(); return true; }} return false; }}; $[ _PLUGIN_ ].defaults[ _ADDON_ ]={ position:'left', zposition:'back', modal:false, moveBackground:true }; $[ _PLUGIN_ ].configuration[ _ADDON_ ]={ pageNodetype:'div', pageSelector:null, wrapPageIfNeeded:true, menuWrapperSelector:'body', menuInjectMethod:'prepend' }; $[ _PLUGIN_ ].prototype.open=function(){ if(this.vars.opened){ return; } var that=this; this._openSetup(); setTimeout( function(){ that._openFinish(); }, this.conf.openingInterval ); this.trigger('open'); }; $[ _PLUGIN_ ].prototype._openSetup=function(){ var that=this; this.closeAllOthers(); glbl.$page.each(function(){ $(this).data(_d.style, $(this).attr('style')||''); } ); glbl.$wndw.trigger(_e.resize + '-offcanvas', [ true ]); var clsn=[ _c.opened ]; if(this.opts[ _ADDON_ ].modal){ clsn.push(_c.modal); } if(this.opts[ _ADDON_ ].moveBackground){ clsn.push(_c.background); } if(this.opts[ _ADDON_ ].position!='left'){ clsn.push(_c.mm(this.opts[ _ADDON_ ].position)); } if(this.opts[ _ADDON_ ].zposition!='back'){ clsn.push(_c.mm(this.opts[ _ADDON_ ].zposition)); } if(this.opts.extensions){ clsn.push(this.opts.extensions); } glbl.$html.addClass(clsn.join(' ')); setTimeout(function(){ that.vars.opened=true; },this.conf.openingInterval); this.$menu.addClass(_c.current + ' ' + _c.opened); }; $[ _PLUGIN_ ].prototype._openFinish=function(){ var that=this; this.__transitionend(glbl.$page.first(), function(){ that.trigger('opened'); }, this.conf.transitionDuration ); glbl.$html.addClass(_c.opening); this.trigger('opening'); }; $[ _PLUGIN_ ].prototype.close=function(){ if(!this.vars.opened){ return; } var that=this; this.__transitionend(glbl.$page.first(), function(){ that.$menu .removeClass(_c.current) .removeClass(_c.opened); glbl.$html .removeClass(_c.opened) .removeClass(_c.modal) .removeClass(_c.background) .removeClass(_c.mm(that.opts[ _ADDON_ ].position)) .removeClass(_c.mm(that.opts[ _ADDON_ ].zposition)); if(that.opts.extensions){ glbl.$html.removeClass(that.opts.extensions); } glbl.$page.each(function(){ $(this).attr('style', $(this).data(_d.style)); } ); that.vars.opened=false; that.trigger('closed'); }, this.conf.transitionDuration ); glbl.$html.removeClass(_c.opening); this.trigger('close'); this.trigger('closing'); }; $[ _PLUGIN_ ].prototype.closeAllOthers=function(){ glbl.$allMenus .not(this.$menu) .each(function(){ var api=$(this).data(_PLUGIN_); if(api&&api.close){ api.close(); }} ); } $[ _PLUGIN_ ].prototype.setPage=function($page){ var that=this, conf=this.conf[ _ADDON_ ]; if(!$page||!$page.length){ $page=glbl.$body.find(conf.pageSelector); if($page.length > 1&&conf.wrapPageIfNeeded){ $page=$page.wrapAll('<' + this.conf[ _ADDON_ ].pageNodetype + ' />').parent(); }} $page.each(function(){ $(this).attr('id', $(this).attr('id')||that.__getUniqueId()); } ); $page.addClass(_c.page + ' ' + _c.slideout); glbl.$page=$page; this.trigger('setPage', $page); }; $[ _PLUGIN_ ].prototype[ '_initWindow_' + _ADDON_ ]=function(){ glbl.$wndw .off(_e.keydown + '-offcanvas') .on(_e.keydown + '-offcanvas', function(e){ if(glbl.$html.hasClass(_c.opened)){ if(e.keyCode==9){ e.preventDefault(); return false; }} } ); var _h=0; glbl.$wndw .off(_e.resize + '-offcanvas') .on(_e.resize + '-offcanvas', function(e, force){ if(glbl.$page.length==1){ if(force||glbl.$html.hasClass(_c.opened)){ var nh=glbl.$wndw.height(); if(force||nh!=_h){ _h=nh; glbl.$page.css('minHeight', nh); }} }} ); }; $[ _PLUGIN_ ].prototype._initBlocker=function(){ var that=this; if(!glbl.$blck){ glbl.$blck=$('
'); } glbl.$blck .appendTo(glbl.$body) .off(_e.touchstart + '-offcanvas ' + _e.touchmove + '-offcanvas') .on(_e.touchstart + '-offcanvas ' + _e.touchmove + '-offcanvas', function(e){ e.preventDefault(); e.stopPropagation(); glbl.$blck.trigger(_e.mousedown + '-offcanvas'); } ) .off(_e.mousedown + '-offcanvas') .on(_e.mousedown + '-offcanvas', function(e){ e.preventDefault(); if(!glbl.$html.hasClass(_c.modal)){ that.closeAllOthers(); that.close(); }} ); }; var _c, _d, _e, glbl; })(jQuery); (function($){ var _PLUGIN_='mmenu', _ADDON_='navbars'; $[ _PLUGIN_ ].addons[ _ADDON_ ]={ setup: function(){ var that=this, navs=this.opts[ _ADDON_ ], conf=this.conf[ _ADDON_ ]; glbl=$[ _PLUGIN_ ].glbl; if(typeof navs=='undefined'){ return; } if(!(navs instanceof Array)){ navs=[ navs ]; } var _pos={}; $.each(navs, function(n){ var opts=navs[ n ]; if(typeof opts=='boolean'&&opts){ opts={};} if(typeof opts!='object'){ opts={};} if(typeof opts.content=='undefined'){ opts.content=[ 'prev', 'title' ]; } if(!(opts.content instanceof Array)){ opts.content=[ opts.content ]; } opts=$.extend(true, {}, that.opts.navbar, opts); var poss=opts.position; if(poss!='bottom'){ poss='top'; } if(!_pos[ poss ]){ _pos[ poss ]=0; } _pos[ poss ]++; var $navbar=$('
') .addClass(_c.navbar) .addClass(_c.navbar + '-' + poss) .addClass(_c.navbar + '-' + poss + '-' + _pos[ poss ]); for(var c=0, l=opts.content.length; c < l; c++){ var ctnt=$[ _PLUGIN_ ].addons[ _ADDON_ ][ opts.content[ c ] ]||false; if(ctnt){ ctnt.call(that, $navbar, opts); }else{ ctnt=opts.content[ c ]; if(!(ctnt instanceof $)){ ctnt=$(opts.content[ c ]); } ctnt .each(function(){ $navbar.append($(this)); } ); }} var _content=$navbar.children().not('.' + _c.btn).length; if(_content > 1){ $navbar.addClass(_c.navbar + '-' + _content); } if($navbar.children('.' + _c.btn).length){ $navbar.addClass(_c.hasbtns); } $navbar.prependTo(that.$menu); } ); for(var p in _pos){ that.$menu.addClass(_c.hasnavbar + '-' + p + '-' + _pos[ p ]); }}, add: function(){ _c=$[ _PLUGIN_ ]._c; _d=$[ _PLUGIN_ ]._d; _e=$[ _PLUGIN_ ]._e; _c.add('close hasbtns'); }, clickAnchor: function($a, inMenu){}}; $[ _PLUGIN_ ].configuration.classNames[ _ADDON_ ]={ panelTitle:'Title', panelNext:'Next', panelPrev:'Prev' }; var _c, _d, _e, glbl; })(jQuery); (function($){ var _PLUGIN_='mmenu', _ADDON_='autoHeight'; $[ _PLUGIN_ ].addons[ _ADDON_ ]={ setup: function(){ if(!this.opts.offCanvas){ return; } switch(this.opts.offCanvas.position){ case 'left': case 'right': return; break; } var that=this, opts=this.opts[ _ADDON_ ], conf=this.conf[ _ADDON_ ]; glbl=$[ _PLUGIN_ ].glbl; if(typeof opts=='boolean'&&opts){ opts={ height: 'auto' };} if(typeof opts!='object'){ opts={};} opts=this.opts[ _ADDON_ ]=$.extend(true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts); if(opts.height!='auto'){ return; } this.$menu.addClass(_c.autoheight); var update=function($panl){ var $p=this.$menu.children('.' + _c.current); _top=parseInt($p.css('top') , 10)||0; _bot=parseInt($p.css('bottom') , 10)||0; this.$menu.addClass(_c.measureheight); $panl=$panl||this.$menu.children('.' + _c.current); if($panl.is('.' + _c.vertical)){ $panl=$panl .parents('.' + _c.panel) .not('.' + _c.vertical) .first(); } this.$menu .height($panl.outerHeight() + _top + _bot) .removeClass(_c.measureheight); }; this.bind('update', update); this.bind('openPanel', update); this.bind('closePanel', update); this.bind('open', update); glbl.$wndw .off(_e.resize + '-autoheight') .on(_e.resize + '-autoheight', function(e){ update.call(that); } ); }, add: function(){ _c=$[ _PLUGIN_ ]._c; _d=$[ _PLUGIN_ ]._d; _e=$[ _PLUGIN_ ]._e; _c.add('autoheight measureheight'); _e.add('resize'); }, clickAnchor: function($a, inMenu){}}; $[ _PLUGIN_ ].defaults[ _ADDON_ ]={ height: 'default' // 'auto' }; var _c, _d, _e, glbl; })(jQuery); (function($){ "use strict"; $.fn.fitVids=function(options){ var settings={ customSelector: null, ignore:null }; if(!document.getElementById('fit-vids-style')){ var head=document.head||document.getElementsByTagName('head')[0]; var css='.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; var div=document.createElement('div'); div.innerHTML='

x

'; head.appendChild(div.childNodes[1]); } if(options){ $.extend(settings, options); } return this.each(function(){ var selectors=[ "iframe[src*='player.vimeo.com/']", "iframe[src*='youtube.com/']", "iframe[src*='youtu.be/']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "iframe[src*='blip.tv/']", "iframe[src*='dailymotion.com/']", "iframe[src*='dai.ly/']", "iframe[src*='flickr.com/']", "iframe[src*='flic.kr/']", "iframe[src*='smugmug.com/']", "iframe[src*='hulu.com/']", "iframe[src*='viddler.com/']", "iframe[src*='revision3.com/']", "iframe[src*='wordpress.tv/']", "iframe[src*='funnyordie.com/']", "iframe[src*='slideshare.net/']", "iframe[src*='instagram.com/p/']", "iframe[src*='instagr.am/p/']", "iframe[src*='scribd.com/']", "object", "embed" ]; if(settings.customSelector){ selectors.push(settings.customSelector); } var ignoreList='.fitvidsignore'; if(settings.ignore){ ignoreList=ignoreList + ', ' + settings.ignore; } var $allVideos=$(this).find(selectors.join(',')); $allVideos=$allVideos.not("object object"); $allVideos=$allVideos.not(ignoreList); $allVideos.each(function(){ var $this=$(this); if($this.parents(ignoreList).length > 0){ return; } if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){ return; } if((!$this.css('height')&&!$this.css('width'))&&(isNaN($this.attr('height'))||isNaN($this.attr('width')))){ $this.attr('height', 9); $this.attr('width', 16); } var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10):$this.height(), width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10):$this.width(), aspectRatio=height / width; if(!$this.attr('id')){ var videoID='fitvid' + Math.floor(Math.random() * 999999); $this.attr('id', videoID); } $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + "%"); $this.removeAttr('height').removeAttr('width'); }); }); };})(window.jQuery||window.Zepto); ;(function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ factory(require('jquery')); }else{ factory(window.jQuery||window.Zepto); }}(function($){ var CLOSE_EVENT='Close', BEFORE_CLOSE_EVENT='BeforeClose', AFTER_CLOSE_EVENT='AfterClose', BEFORE_APPEND_EVENT='BeforeAppend', MARKUP_PARSE_EVENT='MarkupParse', OPEN_EVENT='Open', CHANGE_EVENT='Change', NS='mfp', EVENT_NS='.' + NS, READY_CLASS='mfp-ready', REMOVING_CLASS='mfp-removing', PREVENT_CLOSE_CLASS='mfp-prevent-close'; var mfp, MagnificPopup=function(){}, _isJQ = !!(window.jQuery), _prevStatus, _window=$(window), _body, _document, _prevContentType, _wrapClasses, _currPopupType; var _mfpOn=function(name, f){ mfp.ev.on(NS + name + EVENT_NS, f); }, _getEl=function(className, appendTo, html, raw){ var el=document.createElement('div'); el.className='mfp-'+className; if(html){ el.innerHTML=html; } if(!raw){ el=$(el); if(appendTo){ el.appendTo(appendTo); }}else if(appendTo){ appendTo.appendChild(el); } return el; }, _mfpTrigger=function(e, data){ mfp.ev.triggerHandler(NS + e, data); if(mfp.st.callbacks){ e=e.charAt(0).toLowerCase() + e.slice(1); if(mfp.st.callbacks[e]){ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data:[data]); }} }, _getCloseBtn=function(type){ if(type!==_currPopupType||!mfp.currTemplate.closeBtn){ mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%', mfp.st.tClose)); _currPopupType=type; } return mfp.currTemplate.closeBtn; }, _checkInstance=function(){ if(!$.magnificPopup.instance){ mfp=new MagnificPopup(); mfp.init(); $.magnificPopup.instance=mfp; }}, supportsTransitions=function(){ var s=document.createElement('p').style, // 's' for style. better to create an element if body yet to exist v=['ms','O','Moz','Webkit']; // 'v' for vendor if(s['transition']!==undefined){ return true; } while(v.length){ if(v.pop() + 'Transition' in s){ return true; }} return false; }; MagnificPopup.prototype={ constructor: MagnificPopup, init: function(){ var appVersion=navigator.appVersion; mfp.isIE7=appVersion.indexOf("MSIE 7.")!==-1; mfp.isIE8=appVersion.indexOf("MSIE 8.")!==-1; mfp.isLowIE=mfp.isIE7||mfp.isIE8; mfp.isAndroid=(/android/gi).test(appVersion); mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion); mfp.supportsTransition=supportsTransitions(); mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent)); _document=$(document); mfp.popupsCache={};}, open: function(data){ if(!_body){ _body=$(document.body); } var i; if(data.isObj===false){ mfp.items=data.items.toArray(); mfp.index=0; var items=data.items, item; for(i=0; i < items.length; i++){ item=items[i]; if(item.parsed){ item=item.el[0]; } if(item===data.el[0]){ mfp.index=i; break; }} }else{ mfp.items=$.isArray(data.items) ? data.items:[data.items]; mfp.index=data.index||0; } if(mfp.isOpen){ mfp.updateItemHTML(); return; } mfp.types=[]; _wrapClasses=''; if(data.mainEl&&data.mainEl.length){ mfp.ev=data.mainEl.eq(0); }else{ mfp.ev=_document; } if(data.key){ if(!mfp.popupsCache[data.key]){ mfp.popupsCache[data.key]={};} mfp.currTemplate=mfp.popupsCache[data.key]; }else{ mfp.currTemplate={};} mfp.st=$.extend(true, {}, $.magnificPopup.defaults, data); mfp.fixedContentPos=mfp.st.fixedContentPos==='auto' ? !mfp.probablyMobile:mfp.st.fixedContentPos; if(mfp.st.modal){ mfp.st.closeOnContentClick=false; mfp.st.closeOnBgClick=false; mfp.st.showCloseBtn=false; mfp.st.enableEscapeKey=false; } if(!mfp.bgOverlay){ mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS, function(){ mfp.close(); }); mfp.wrap=_getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e){ if(mfp._checkIfClose(e.target)){ mfp.close(); }}); mfp.container=_getEl('container', mfp.wrap); } mfp.contentContainer=_getEl('content'); if(mfp.st.preloader){ mfp.preloader=_getEl('preloader', mfp.container, mfp.st.tLoading); } var modules=$.magnificPopup.modules; for(i=0; i < modules.length; i++){ var n=modules[i]; n=n.charAt(0).toUpperCase() + n.slice(1); mfp['init'+n].call(mfp); } _mfpTrigger('BeforeOpen'); if(mfp.st.showCloseBtn){ if(!mfp.st.closeBtnInside){ mfp.wrap.append(_getCloseBtn()); }else{ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item){ values.close_replaceWith=_getCloseBtn(item.type); }); _wrapClasses +=' mfp-close-btn-in'; }} if(mfp.st.alignTop){ _wrapClasses +=' mfp-align-top'; } if(mfp.fixedContentPos){ mfp.wrap.css({ overflow: mfp.st.overflowY, overflowX: 'hidden', overflowY: mfp.st.overflowY }); }else{ mfp.wrap.css({ top: _window.scrollTop(), position: 'absolute' }); } if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){ mfp.bgOverlay.css({ height: _document.height(), position: 'absolute' }); } if(mfp.st.enableEscapeKey){ _document.on('keyup' + EVENT_NS, function(e){ if(e.keyCode===27){ mfp.close(); }}); } _window.on('resize' + EVENT_NS, function(){ mfp.updateSize(); }); if(!mfp.st.closeOnContentClick){ _wrapClasses +=' mfp-auto-cursor'; } if(_wrapClasses) mfp.wrap.addClass(_wrapClasses); var windowHeight=mfp.wH=_window.height(); var windowStyles={}; if(mfp.fixedContentPos){ if(mfp._hasScrollBar(windowHeight)){ var s=mfp._getScrollbarSize(); if(s){ windowStyles.marginRight=s; }} } if(mfp.fixedContentPos){ if(!mfp.isIE7){ windowStyles.overflow='hidden'; }else{ $('body, html').css('overflow', 'hidden'); }} var classesToadd=mfp.st.mainClass; if(mfp.isIE7){ classesToadd +=' mfp-ie7'; } if(classesToadd){ mfp._addClassToMFP(classesToadd); } mfp.updateItemHTML(); _mfpTrigger('BuildControls'); $('html').css(windowStyles); mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||_body); mfp._lastFocusedEl=document.activeElement; setTimeout(function(){ if(mfp.content){ mfp._addClassToMFP(READY_CLASS); mfp._setFocus(); }else{ mfp.bgOverlay.addClass(READY_CLASS); } _document.on('focusin' + EVENT_NS, mfp._onFocusIn); }, 16); mfp.isOpen=true; mfp.updateSize(windowHeight); _mfpTrigger(OPEN_EVENT); return data; }, close: function(){ if(!mfp.isOpen) return; _mfpTrigger(BEFORE_CLOSE_EVENT); mfp.isOpen=false; if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){ mfp._addClassToMFP(REMOVING_CLASS); setTimeout(function(){ mfp._close(); }, mfp.st.removalDelay); }else{ mfp._close(); }}, _close: function(){ _mfpTrigger(CLOSE_EVENT); var classesToRemove=REMOVING_CLASS + ' ' + READY_CLASS + ' '; mfp.bgOverlay.detach(); mfp.wrap.detach(); mfp.container.empty(); if(mfp.st.mainClass){ classesToRemove +=mfp.st.mainClass + ' '; } mfp._removeClassFromMFP(classesToRemove); if(mfp.fixedContentPos){ var windowStyles={marginRight: ''}; if(mfp.isIE7){ $('body, html').css('overflow', ''); }else{ windowStyles.overflow=''; } $('html').css(windowStyles); } _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); mfp.ev.off(EVENT_NS); mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); mfp.bgOverlay.attr('class', 'mfp-bg'); mfp.container.attr('class', 'mfp-container'); if(mfp.st.showCloseBtn && (!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){ if(mfp.currTemplate.closeBtn) mfp.currTemplate.closeBtn.detach(); } if(mfp._lastFocusedEl){ $(mfp._lastFocusedEl).focus(); } mfp.currItem=null; mfp.content=null; mfp.currTemplate=null; mfp.prevHeight=0; _mfpTrigger(AFTER_CLOSE_EVENT); }, updateSize: function(winHeight){ if(mfp.isIOS){ var zoomLevel=document.documentElement.clientWidth / window.innerWidth; var height=window.innerHeight * zoomLevel; mfp.wrap.css('height', height); mfp.wH=height; }else{ mfp.wH=winHeight||_window.height(); } if(!mfp.fixedContentPos){ mfp.wrap.css('height', mfp.wH); } _mfpTrigger('Resize'); }, updateItemHTML: function(){ var item=mfp.items[mfp.index]; mfp.contentContainer.detach(); if(mfp.content) mfp.content.detach(); if(!item.parsed){ item=mfp.parseEl(mfp.index); } var type=item.type; _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type:'', type]); mfp.currItem=item; if(!mfp.currTemplate[type]){ var markup=mfp.st[type] ? mfp.st[type].markup:false; _mfpTrigger('FirstMarkupParse', markup); if(markup){ mfp.currTemplate[type]=$(markup); }else{ mfp.currTemplate[type]=true; }} if(_prevContentType&&_prevContentType!==item.type){ mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); } var newContent=mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); mfp.appendContent(newContent, type); item.preloaded=true; _mfpTrigger(CHANGE_EVENT, item); _prevContentType=item.type; mfp.container.prepend(mfp.contentContainer); _mfpTrigger('AfterChange'); }, appendContent: function(newContent, type){ mfp.content=newContent; if(newContent){ if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside && mfp.currTemplate[type]===true){ if(!mfp.content.find('.mfp-close').length){ mfp.content.append(_getCloseBtn()); }}else{ mfp.content=newContent; }}else{ mfp.content=''; } _mfpTrigger(BEFORE_APPEND_EVENT); mfp.container.addClass('mfp-'+type+'-holder'); mfp.contentContainer.append(mfp.content); }, parseEl: function(index){ var item=mfp.items[index], type; if(item.tagName){ item={ el: $(item) };}else{ type=item.type; item={ data: item, src: item.src };} if(item.el){ var types=mfp.types; for(var i=0; i < types.length; i++){ if(item.el.hasClass('mfp-'+types[i])){ type=types[i]; break; }} item.src=item.el.attr('data-mfp-src'); if(!item.src){ item.src=item.el.attr('href'); }} item.type=type||mfp.st.type||'inline'; item.index=index; item.parsed=true; mfp.items[index]=item; _mfpTrigger('ElementParse', item); return mfp.items[index]; }, addGroup: function(el, options){ var eHandler=function(e){ e.mfpEl=this; mfp._openClick(e, el, options); }; if(!options){ options={};} var eName='click.magnificPopup'; options.mainEl=el; if(options.items){ options.isObj=true; el.off(eName).on(eName, eHandler); }else{ options.isObj=false; if(options.delegate){ el.off(eName).on(eName, options.delegate , eHandler); }else{ options.items=el; el.off(eName).on(eName, eHandler); }} }, _openClick: function(e, el, options){ var midClick=options.midClick!==undefined ? options.midClick:$.magnificPopup.defaults.midClick; if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey)){ return; } var disableOn=options.disableOn!==undefined ? options.disableOn:$.magnificPopup.defaults.disableOn; if(disableOn){ if($.isFunction(disableOn)){ if(!disableOn.call(mfp)){ return true; }}else{ if(_window.width() < disableOn){ return true; }} } if(e.type){ e.preventDefault(); if(mfp.isOpen){ e.stopPropagation(); }} options.el=$(e.mfpEl); if(options.delegate){ options.items=el.find(options.delegate); } mfp.open(options); }, updateStatus: function(status, text){ if(mfp.preloader){ if(_prevStatus!==status){ mfp.container.removeClass('mfp-s-'+_prevStatus); } if(!text&&status==='loading'){ text=mfp.st.tLoading; } var data={ status: status, text: text }; _mfpTrigger('UpdateStatus', data); status=data.status; text=data.text; mfp.preloader.html(text); mfp.preloader.find('a').on('click', function(e){ e.stopImmediatePropagation(); }); mfp.container.addClass('mfp-s-'+status); _prevStatus=status; }}, _checkIfClose: function(target){ if($(target).hasClass(PREVENT_CLOSE_CLASS)){ return; } var closeOnContent=mfp.st.closeOnContentClick; var closeOnBg=mfp.st.closeOnBgClick; if(closeOnContent&&closeOnBg){ return true; }else{ if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){ return true; } if((target!==mfp.content[0]&&!$.contains(mfp.content[0], target))){ if(closeOnBg){ if($.contains(document, target)){ return true; }} }else if(closeOnContent){ return true; }} return false; }, _addClassToMFP: function(cName){ mfp.bgOverlay.addClass(cName); mfp.wrap.addClass(cName); }, _removeClassFromMFP: function(cName){ this.bgOverlay.removeClass(cName); mfp.wrap.removeClass(cName); }, _hasScrollBar: function(winHeight){ return((mfp.isIE7 ? _document.height():document.body.scrollHeight) > (winHeight||_window.height())); }, _setFocus: function(){ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus(); }, _onFocusIn: function(e){ if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){ mfp._setFocus(); return false; }}, _parseMarkup: function(template, values, item){ var arr; if(item.data){ values=$.extend(item.data, values); } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function(key, value){ if(value===undefined||value===false){ return true; } arr=key.split('_'); if(arr.length > 1){ var el=template.find(EVENT_NS + '-'+arr[0]); if(el.length > 0){ var attr=arr[1]; if(attr==='replaceWith'){ if(el[0]!==value[0]){ el.replaceWith(value); }}else if(attr==='img'){ if(el.is('img')){ el.attr('src', value); }else{ el.replaceWith(''); }}else{ el.attr(arr[1], value); }} }else{ template.find(EVENT_NS + '-'+key).html(value); }}); }, _getScrollbarSize: function(){ if(mfp.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return mfp.scrollbarSize; }}; $.magnificPopup={ instance: null, proto: MagnificPopup.prototype, modules: [], open: function(options, index){ _checkInstance(); if(!options){ options={};}else{ options=$.extend(true, {}, options); } options.isObj=true; options.index=index||0; return this.instance.open(options); }, close: function(){ return $.magnificPopup.instance&&$.magnificPopup.instance.close(); }, registerModule: function(name, module){ if(module.options){ $.magnificPopup.defaults[name]=module.options; } $.extend(this.proto, module.proto); this.modules.push(name); }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '', tClose: 'Close (Esc)', tLoading: 'Loading...' }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
'); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ _body.removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur) _body.addClass(_ajaxCur); mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ _body.addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ _body.removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
'+ '
'+ ''+ '
', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery', supportsFastClick=Boolean($.fn.mfpFastClick); mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); var eName=supportsFastClick ? 'mfpFastClick':'click'; arrowLeft[eName](function(){ mfp.prev(); }); arrowRight[eName](function(){ mfp.next(); }); if(mfp.isIE7){ _getEl('b', arrowLeft[0], false, true); _getEl('a', arrowLeft[0], false, true); _getEl('b', arrowRight[0], false, true); _getEl('a', arrowRight[0], false, true); } mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); if(mfp.arrowLeft&&supportsFastClick){ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick(); } mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); /* Touch Support that might be implemented some day addSwipeGesture: function(){ var startX, moved, multipleTouches; return; var namespace='.mfp', addEventNames=function(pref, down, move, up, cancel){ mfp._tStart=pref + down + namespace; mfp._tMove=pref + move + namespace; mfp._tEnd=pref + up + namespace; mfp._tCancel=pref + cancel + namespace; }; if(window.navigator.msPointerEnabled){ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); }else if('ontouchstart' in window){ addEventNames('touch', 'start', 'move', 'end', 'cancel'); }else{ return; } _window.on(mfp._tStart, function(e){ var oE=e.originalEvent; multipleTouches=moved=false; startX=oE.pageX||oE.changedTouches[0].pageX; }).on(mfp._tMove, function(e){ if(e.originalEvent.touches.length > 1){ multipleTouches=e.originalEvent.touches.length; }else{ moved=true; }}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e){ if(moved&&!multipleTouches){ var oE=e.originalEvent, diff=startX - (oE.pageX||oE.changedTouches[0].pageX); if(diff > 20){ mfp.next(); }else if(diff < -20){ mfp.prev(); }} }); }, */ var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); /** * FastClick event implementation. (removes 300ms delay on touch devices) * Based on https://developers.google.com/mobile/articles/fast_buttons * * You may use it outside the Magnific Popup by calling just: * * $('.your-el').mfpFastClick(function(){ * console.log('Clicked!'); * }); * * To unbind: * $('.your-el').destroyMfpFastClick(); * * * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound. * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick * */ (function(){ var ghostClickDelay=1000, supportsTouch='ontouchstart' in window, unbindTouchMove=function(){ _window.off('touchmove'+ns+' touchend'+ns); }, eName='mfpFastClick', ns='.'+eName; $.fn.mfpFastClick=function(callback){ return $(this).each(function(){ var elem=$(this), lock; if(supportsTouch){ var timeout, startX, startY, pointerMoved, point, numPointers; elem.on('touchstart' + ns, function(e){ pointerMoved=false; numPointers=1; point=e.originalEvent ? e.originalEvent.touches[0]:e.touches[0]; startX=point.clientX; startY=point.clientY; _window.on('touchmove'+ns, function(e){ point=e.originalEvent ? e.originalEvent.touches:e.touches; numPointers=point.length; point=point[0]; if(Math.abs(point.clientX - startX) > 10 || Math.abs(point.clientY - startY) > 10){ pointerMoved=true; unbindTouchMove(); }}).on('touchend'+ns, function(e){ unbindTouchMove(); if(pointerMoved||numPointers > 1){ return; } lock=true; e.preventDefault(); clearTimeout(timeout); timeout=setTimeout(function(){ lock=false; }, ghostClickDelay); callback(); }); }); } elem.on('click' + ns, function(){ if(!lock){ callback(); }}); }); }; $.fn.destroyMfpFastClick=function(){ $(this).off('touchstart' + ns + ' click' + ns); if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns); };})(); _checkInstance(); })); jQuery(function($){ 'use strict'; var $mainNav=$('#masthead .navigation'); var $mobileNav=$('#mobilemenu'); $mainNav.clone().removeAttr('id').removeClass().appendTo($mobileNav); $mobileNav.find('li').removeAttr('id'); $mobileNav.mmenu({ offCanvas: { position: 'top', zposition: 'front' }, "autoHeight": true, "navbars": [ { "position": "top", "content": [ "prev", "title", "close" ] } ] }); $mainNav.superfish({ delay: 300, animation: { opacity: 'show', height: 'show' }, speed: 'fast', dropShadows: false }); $('body').fitVids(); $(".ci-lightbox, a[data-lightbox^='gal']").magnificPopup({ type: 'image', mainClass: 'mfp-with-zoom', gallery: { enabled: true }, zoom: { enabled: true }}); var $instagramWrap=$('.footer-widget-area'); var $instagramWidget=$instagramWrap.find('.instagram-pics'); if($instagramWidget.length){ var auto=$instagramWrap.data('auto'), speed=$instagramWrap.data('speed'); $instagramWidget.slick({ slidesToShow: 8, slidesToScroll: 3, arrows: false, autoplay: auto==1, speed: speed, responsive: [ { breakpoint: 767, settings: { slidesToShow: 4 }} ] }); } var $window=$(window); $window.load(function(){ var $equals=$("#site-content > .row > div[class^='col']"); $equals.matchHeight(); }); }); !function(a){var b;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a=0?a.replace(d,"$1"+c+"$2"):a+(a.indexOf("?")>0?"&":"?")+b+"="+c}function k(a,b){return a.split(/\s+/).slice(0,b).join(" ")}function l(a){p||a&&z.set("aawp-geotargeting",a)}function m(){var a={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(b,c,d){a[c]=void 0!==d?d:""}),!!a.aawp_debug_geotargeting}function n(){var a={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(b,c,d){a[c]=void 0!==d?d:""}),a.aawp_debug_geotargeting_ip?a.aawp_debug_geotargeting_ip:""}if("undefined"!=typeof aawp_geotargeting_settings&&"undefined"!=typeof aawp_geotargeting_localized_stores&&"undefined"!=typeof aawp_geotargeting_tracking_ids){var o=n(),p=m(),q="undefined"!=typeof aawp_geotargeting_api?aawp_geotargeting_api:"",r=aawp_geotargeting_settings,s=aawp_geotargeting_localized_stores,t=aawp_geotargeting_tracking_ids;if(!r.hasOwnProperty("store"))return;var u=r.hasOwnProperty("mode")?r.mode:"mode",v=r.store,w="",x="",y="",z=Cookies.noConflict(),A=z.get("aawp-geotargeting");void 0!==A&&p===!1?(x=A,b()):c()}});