var ewww_webp_supported,swis_lazy_css_images;void 0===ewww_webp_supported&&(ewww_webp_supported=!1),void 0===swis_lazy_css_images&&(swis_lazy_css_images={}),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,window.lazySizesConfig.iframeLoadMode=1,"undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com",threshold:0,skip_autoscale:0,use_dpr:0}),50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold);for(const[a,b]of Object.entries(swis_lazy_css_images))try{document.querySelectorAll(b[0].selector).forEach(e=>{e.classList.contains("lazyload")||(e.classList.add("lazyload"),e.dataset.swisLazyId=a,5<b[0].rwidth&&5<b[0].rheight&&(e.dataset.eioRwidth=b[0].rwidth,e.dataset.eioRheight=b[0].rheight))})}catch(e){}!function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(e,n,s){"use strict";var o,l,d={};function c(e,t,a){var i,r;d[e]||(i=n.createElement(t?"link":"script"),r=n.getElementsByTagName("script")[0],t?(i.rel="stylesheet",i.href=e):(i.onload=function(){i.onerror=null,i.onload=null,a()},i.onerror=i.onload,i.src=e),d[e]=!0,d[i.src||i.href]=!0,r.parentNode.insertBefore(i,r))}n.addEventListener&&(l=/\(|\)|\s|'/,o=function(e,t){var a=n.createElement("img");a.onload=function(){a.onload=null,a.onerror=null,a=null,t()},a.onerror=a.onload,a.src=e,a&&a.complete&&a.onload&&a.onload()},addEventListener("lazybeforeunveil",function(e){var t,a,i;if(e.detail.instance==s&&!e.defaultPrevented){var r=e.target;if("none"==r.preload&&(r.preload=r.getAttribute("data-preload")||"auto"),null!=r.getAttribute("data-autoplay"))if(r.getAttribute("data-expand")&&!r.autoplay)try{r.play()}catch(e){}else requestAnimationFrame(function(){r.setAttribute("data-expand","-10"),s.aC(r,s.cfg.lazyClass)});(t=r.getAttribute("data-link"))&&c(t,!0),(t=r.getAttribute("data-script"))&&(e.detail.firesLoad=!0,c(t,null,function(){e.detail.firesLoad=!1,s.fire(r,"_lazyloaded",{},!0,!0)})),(t=r.getAttribute("data-require"))&&(s.cfg.requireJs?s.cfg.requireJs([t]):c(t)),(a=r.getAttribute("data-bg"))&&(e.detail.firesLoad=!0,o(a,function(){r.style.backgroundImage="url("+(l.test(a)?JSON.stringify(a):a)+")",e.detail.firesLoad=!1,s.fire(r,"_lazyloaded",{},!0,!0)})),(i=r.getAttribute("data-poster"))&&(e.detail.firesLoad=!0,o(i,function(){r.poster=i,e.detail.firesLoad=!1,s.fire(r,"_lazyloaded",{},!0,!0)}))}},!1))}),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(u,f,h){"use strict";var r;f.addEventListener&&(r=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(t){var e,a,i;t.detail.instance==h&&(t.defaultPrevented||("none"==t.target.preload&&(t.target.preload="auto"),(a=t.target.dataset.back)&&(ewww_webp_supported&&(e=t.target.dataset.backWebp)&&(a=e),a=n(a,t.target),t.target.style.backgroundImage&&-1===t.target.style.backgroundImage.search(/^initial/)?0===a.search(/\[/)?((a=JSON.parse(a)).forEach(function(e){r.test(e)&&JSON.stringify(e)}),a='url("'+a.join('"), url("')+'"',e=t.target.style.backgroundImage+", "+a,t.target.style.backgroundImage=e):t.target.style.backgroundImage=t.target.style.backgroundImage+', url("'+(r.test(a)?JSON.stringify(a):a)+'")':0===a.search(/\[/)?((a=JSON.parse(a)).forEach(function(e){r.test(e)&&JSON.stringify(e)}),a='url("'+a.join('"), url("')+'"',t.target.style.backgroundImage=a):t.target.style.backgroundImage="url("+(r.test(a)?JSON.stringify(a):a)+")"),(a=t.target.dataset.swisLazyId)&&a in swis_lazy_css_images&&(a=swis_lazy_css_images[a],i=f.querySelector("style#swis-lazy-css-styles"),a.forEach(function(e){e.url&&(ewww_webp_supported&&e.webp_url&&(e.url=e.webp_url),e.url=n(e.url,t.target),e=e.selector+" {--swis-bg-"+e.hash+": url("+e.url+"); }",i.sheet.insertRule(e))}))))},!1));function g(e,t=!1){var a=y(),i=Math.round(e.offsetWidth*a),r=Math.round(e.offsetHeight*a),n=e.getAttribute("data-src"),a=e.getAttribute("data-src-webp");ewww_webp_supported&&a&&-1==n.search("webp=1")&&!t&&(n=a),o(e)&&(a=e,a=h.hC(a,"et_pb_jt_filterable_grid_item_image")||h.hC(a,"ss-foreground-image")||h.hC(a,"img-crop")?"img-crop":h.hC(a,"object-cover")&&(h.hC(a,"object-top")||h.hC(a,"object-bottom"))?"img-w":h.hC(a,"object-cover")&&(h.hC(a,"object-left")||h.hC(a,"object-right"))?"img-h":h.hC(a,"ct-image")&&h.hC(a,"object-cover")||!a.getAttribute("data-srcset")&&!a.srcset&&a.offsetHeight>a.offsetWidth&&1<d(a)?"img-crop":"img",(a=l(n,i,r,a,t))&&n!=a&&(t&&e.setAttribute("src",a),e.setAttribute("data-src",a)))}var n=function(e,t){if(0===e.search(/\[/))return e;if(!o(t))return e;var a=y();a<eio_lazy_vars.bg_min_dpr&&(a=eio_lazy_vars.bg_min_dpr);var i=Math.round(t.offsetWidth*a),r=Math.round(t.offsetHeight*a),n="bg";h.hC(t,"wp-block-cover")||h.hC(t,"wp-block-cover__image-background")?(h.hC(t,"has-parallax")?(i=Math.round(u.screen.width*a),r=Math.round(u.screen.height*a)):r<300&&(r=430),n="bg-cover"):(h.hC(t,"cover-image")||h.hC(t,"elementor-bg")||h.hC(t,"et_parallax_bg")||h.hC(t,"bg-image-crop"))&&(n="bg-cover");var s=d(t);if("bg"==n&&1<r&&1<i&&0<s){a=Math.ceil(r*s),s=Math.ceil(i/s);i+2<a&&(i=a),r+2<s&&(r=s);t=p(t);if(Math.abs(t.w-i)<5||Math.abs(t.h-r)<5)return e}return e=l(e,i,r,n)},o=function(e){if(1==eio_lazy_vars.skip_autoscale)return!1;for(var t=e,a=0;a<=7;a++){if(t.hasAttributes())for(var i=t.attributes,r=/skip-autoscale/,a=i.length-1;0<=a;a--){if(r.test(i[a].name))return!1;if(r.test(i[a].value))return!1}if(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttributes)break;t=t.parentNode}return!0},l=function(e,t,a,i,r=!1){if(null===e)return e;var n=/w=(\d+)/,s=/fit=(\d+),(\d+)/,o=/resize=(\d+),(\d+)/,l=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(l))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var d=o.exec(l);if(d&&(t<d[1]||r))return"img-w"===i?l.replace(o,"w="+t):"img-h"===i?l.replace(o,"h="+a):l.replace(o,"resize="+t+","+a);o=n.exec(e);if(o&&(t<=o[1]||r)){if("img-h"===i)return l.replace(n,"h="+a);if("bg-cover"!==i&&"img-crop"!==i)return e.replace(n,"w="+t);var c=Math.abs(o[1]-t);return 20<c||a<1080?e.replace(n,"resize="+t+","+a):e}c=s.exec(l);if(c&&(t<c[1]||r)){if("bg-cover"!==i&&"img-crop"!==i)return"img-w"===i?l.replace(s,"w="+t):"img-h"===i?l.replace(s,"h="+a):l.replace(s,"fit="+t+","+a);l=Math.abs(c[1]-t),s=Math.abs(c[2]-a);return 20<l||20<s?e.replace(n,"resize="+t+","+a):e}if(!o&&!c&&!d)return"img"===i?e+"&fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"&resize="+t+","+a:"img-h"===i||t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===i?e+"?fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"?resize="+t+","+a:"img-h"===i||t<a?e+"?h="+a:e+"?w="+t:e},m=function(e){e=/-(\d+)x(\d+)\./.exec(e);return e&&1<e[1]&&1<e[2]?{w:e[1],h:e[2]}:{w:0,h:0}},p=function(e){var t=e.dataset.eioRwidth,e=e.dataset.eioRheight;return 1<t&&1<e?{w:t,h:e}:{w:0,h:0}},d=function(e){var t=e.getAttribute("width"),a=e.getAttribute("height");if(1<t&&1<a)return t/a;a=!1;if(a=(a=e.src&&-1<e.src.search("http")?e.src:a)||e.getAttribute("data-src")){var i=m(a);if(i.w&&i.h)return i.w/i.h}i=p(e);if(i.w&&i.h)return i.w/i.h;e=function(e){var t;if(e.srcset?t=e.srcset.split(","):(e=e.getAttribute("data-srcset"))&&(t=e.split(",")),t){var a=0,i=t.length;if(i){for(;a<i;a++){var r,n=t[a].trim().split(" ");!n[0].length||(n=m(n[0])).w&&n.h&&(r=n)}if(r.w&&r.h)return r}}return{w:0,h:0}}(e);return e.w&&e.h?e.w/e.h:0},y=function(){return eio_lazy_vars.use_dpr&&1<u.devicePixelRatio?u.devicePixelRatio:1};f.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");var t=d(e.target);1<e.target.clientHeight&&t&&(t=Math.ceil(t*e.target.clientHeight),e.detail.width+2<t&&(e.detail.width=t)),void 0!==e.target._lazysizesWidth?(!eio_lazy_vars.use_dpr&&1<u.devicePixelRatio&&(e.detail.width=Math.ceil(e.detail.width/u.devicePixelRatio)),e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)):!eio_lazy_vars.use_dpr&&1<u.devicePixelRatio&&(e.detail.width=Math.ceil(e.detail.width/u.devicePixelRatio))}),f.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n=e.target,s=n.getAttribute("data-srcset");n.naturalWidth&&!s&&1<n.naturalWidth&&1<n.naturalHeight&&(t=y(),a=n.naturalWidth,i=n.naturalHeight,(e=p(n)).w&&e.w>a&&(a=e.w,i=e.h),a=n.clientWidth&&1.25*n.clientWidth*t<a,i=n.clientHeight&&1.25*n.clientHeight*t<i,(a||i)&&g(n)),ewww_webp_supported&&(!s||(r=n.getAttribute("data-srcset-webp"))&&n.setAttribute("data-srcset",r),(r=n.getAttribute("data-src-webp"))&&n.setAttribute("data-src",r))});function e(e=!1){e.type&&"load"===e.type&&h.autoSizer.checkElems(),y();var t,a=f.getElementsByClassName(h.cfg.loadedClass),i=a.length;if(i)for(t=0;t<i;t++){var r,n,s,o,l,d,c=a[t];c.src&&!c.srcset&&1<c.naturalWidth&&1<c.naturalHeight&&1<c.clientWidth&&1<c.clientHeight&&(r=c.naturalWidth,n=c.naturalHeight,s=u.innerWidth,o=u.innerHeight,l=p(c),d=m(c.src),l.w?s=l.w:d.w&&(s=d.w),l.h?o=l.h:d.h&&(o=d.h),l=c.clientWidth,d=c.clientHeight,(1.1*r<l&&l<=s||1.1*n<d&&d<=o)&&g(c,!0))}}var t,a,i,s,c=(t=e,s=function(){a=null,t()},function(){i=Date.now(),a=a||setTimeout(v,99)});function v(){var e=Date.now()-i;e<99?setTimeout(v,99-e):(u.requestIdleCallback||s)(s)}addEventListener("load",e),addEventListener("resize",c),setTimeout(e,2e4)}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(i,f,n){"use strict";var h,g;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in g=i.lazySizesConfig||i.lazysizesConfig||{},t)e in g||(g[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:g,noSupport:!0};function c(e,t){E(e,t)||e.setAttribute("class",(e[y]("class")||"").trim()+" "+t)}function u(e,t){(t=E(e,t))&&e.setAttribute("class",(e[y]("class")||"").replace(t," "))}function m(e,t){var a;!l&&(a=i.picturefill||g.pf)?(t&&t.src&&!e[y]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,s,o,p=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",y="getAttribute",e=i[d].bind(i),v=i.setTimeout,z=i.requestAnimationFrame||v,b=i.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,E=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[y]("class")||"")&&C[t]},L=function(t,a,e){var i=e?d:"removeEventListener";e&&L(t,a),_.forEach(function(e){t[i](e,a)})},x=function(e,t,a,i,r){var n=f.createEvent("Event");return(a=a||{}).instance=h,n.initEvent(t,!i,!r),n.detail=a,e.dispatchEvent(n),n},M=function(e,t){return(getComputedStyle(e,null)||{})[t]},N=function(e,t,a){for(a=a||e.offsetWidth;a<g.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},S=(s=[],o=t=[],k._lsFlush=W,k);function W(){var e=o;for(o=t.length?s:t,r=!(a=!0);e.length;)e.shift()();a=!1}function k(e,t){a&&!t?e.apply(this,arguments):(o.push(e),r||(r=!0,(f.hidden?v:z)(W)))}function H(a,e){return e?function(){S(a)}:function(){var e=this,t=arguments;S(function(){a.apply(e,t)})}}function R(e){function t(){var e=n.now()-i;e<99?v(t,99-e):(b||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||v(t,99)}}var I,j,T,O,P,q,B,F,J,D,$,U,G,K,Q,V,X,Y,Z,ee,te,ae,ie,re,ne,se,oe,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),re=-1,ne=function(e){return(U=null==U?"hidden"==M(f.body,"visibility"):U)||!("hidden"==M(e.parentNode,"visibility")&&"hidden"==M(e,"visibility"))},G=ge,Q=ie=ae=0,V=g.throttleDelay,X=g.ricTimeout,Y=b&&49<X?function(){b(me,{timeout:X}),X!==g.ricTimeout&&(X=g.ricTimeout)}:H(function(){v(me)},!0),oe=H(pe),le=function(e){oe({target:e.target})},de=H(function(t,e,a,i,r){var n,s,o,l,d;(o=x(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,g.autosizesClass):t.setAttribute("sizes",i)),n=t[y](g.srcsetAttr),a=t[y](g.srcAttr),r&&(s=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||s),o={target:t},c(t,g.loadingClass),l&&(clearTimeout(T),T=v(he,2500),L(t,le,!0)),s&&A.call(d.getElementsByTagName("source"),ye),n?t.setAttribute("srcset",n):a&&!s&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||g.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||s)&&m(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,g.lazyClass),S(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,g.fastLoadedClass),pe(o),t._lazyCache=!0,v(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=R(function(){g.loadMode=3,se()}),{_:function(){P=n.now(),h.elements=f.getElementsByClassName(g.lazyClass),I=f.getElementsByClassName(g.lazyClass+" "+g.preloadClass),e("scroll",se,!0),e("resize",se,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+g.loadingClass)).length&&t.forEach&&z(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(se).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[d]("DOMNodeInserted",se,!0),p[d]("DOMAttrModified",se,!0),setInterval(se,999)),e("hashchange",se,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,se,!0)}),/d$|^c/.test(f.readyState)?ze():(e("load",ze),f[d]("DOMContentLoaded",se),v(ze,2e4)),h.elements.length?(ge(),S._lsFlush()):se()},checkElems:se=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():v(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[y](g.sizesAttr)||e[y]("sizes"))))&&j||!a||!e[y]("src")&&!e.srcset||e.complete||E(e,g.errorClass)||!E(e,g.lazyClass))&&(t=x(e,"lazyunveilread").detail,r&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:ve});function he(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function ge(){var e,t,a,i,r,n,s,o,l,d,c,u=h.elements;if((O=g.loadMode)&&ie<8&&(e=u.length)){for(t=0,re++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||h.prematureUnveil&&h.prematureUnveil(u[t]))ce(u[t]);else if((s=u[t][y]("data-expand"))&&(r=+s)||(r=ae),l||(l=!g.expand||g.expand<1?500<p.clientHeight&&500<p.clientWidth?500:370:g.expand,d=(h._defEx=l)*g.expFactor,c=g.hFac,U=null,ae<d&&ie<1&&2<re&&2<O&&!f.hidden?(ae=d,re=0):ae=1<O&&1<re&&ie<6?l:0),o!==r&&(q=innerWidth+r*c,B=innerHeight+r,n=-1*r,o=r),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(F=d.top)<=B&&(D=d.right)>=n*c&&(J=d.left)<=q&&($||D||J||F)&&(g.loadHidden||ne(u[t]))&&(j&&ie<3&&!s&&(O<3||re<4)||function(e,t){var a,i=e,r=ne(e);for(F-=t,$+=t,J-=t,D+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=p;)(r=0<(M(i,"opacity")||1))&&"visible"!=M(i,"overflow")&&(a=i.getBoundingClientRect(),r=D>a.left&&J<a.right&&$>a.top-1&&F<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&j&&!a&&ie<4&&re<4&&2<O&&(I[0]||g.preloadAfterLoad)&&(I[0]||!s&&($||D||J||F||"auto"!=u[t][y](g.sizesAttr)))&&(a=I[0]||u[t]);a&&!i&&ce(a)}}function me(){K=!1,Q=n.now(),G()}function pe(e){var t=e.target;t._lazyCache?delete t._lazyCache:(he(e),c(t,g.loadedClass),u(t,g.loadingClass),L(t,le),x(t,"lazyloaded"))}function ye(e){var t,a=e[y](g.srcsetAttr);(t=g.customMedia[e[y]("data-media")||e[y]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ve(){3==g.loadMode&&(g.loadMode=2),ue()}function ze(){j||(n.now()-P<999?v(ze,999):(j=!0,g.loadMode=3,se(),e("scroll",ve,!0)))}var be,we,_e,Ce=(we=H(function(e,t,a,i){var r,n,s;if(e._lazysizesWidth=i,e.setAttribute("sizes",i+="px"),w.test(t.nodeName||""))for(n=0,s=(r=t.getElementsByTagName("source")).length;n<s;n++)r[n].setAttribute("sizes",i);a.detail.dataAttr||m(e,a.detail)}),{_:function(){be=f.getElementsByClassName(g.autosizesClass),e("resize",_e)},checkElems:_e=R(function(){var e,t=be.length;if(t)for(e=0;e<t;e++)Ae(be[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=N(e,i,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Ee(){!Ee.i&&f.getElementsByClassName&&(Ee.i=!0,Ce._(),fe._())}return v(function(){g.init&&Ee()}),h={cfg:g,autoSizer:Ce,loader:fe,init:Ee,uP:m,aC:c,rC:u,hC:E,fire:x,gW:N,rAF:S}});
(function(){
var container, button, menu, links, subMenus, i, len;
container=document.getElementById('site-navigation');
if(! container){
return;
}
button=container.getElementsByTagName('button')[0];
if('undefined'===typeof button){
return;
}
menu=container.getElementsByTagName('ul')[0];
if('undefined'===typeof menu){
button.style.display='none';
return;
}
menu.setAttribute('aria-expanded', 'false');
if(-1===menu.className.indexOf('nav-menu') ){
menu.className +=' nav-menu';
}
button.onclick=function(){
if(-1!==container.className.indexOf('toggled') ){
container.className=container.className.replace(' toggled', '');
button.setAttribute('aria-expanded', 'false');
menu.setAttribute('aria-expanded', 'false');
}else{
container.className +=' toggled';
button.setAttribute('aria-expanded', 'true');
menu.setAttribute('aria-expanded', 'true');
}};
links=menu.getElementsByTagName('a');
subMenus=menu.getElementsByTagName('ul');
for(i=0, len=subMenus.length; i < len; i++){
subMenus[i].parentNode.setAttribute('aria-haspopup', 'true');
}
for(i=0, len=links.length; i < len; i++){
links[i].addEventListener('focus', toggleFocus, true);
links[i].addEventListener('blur', toggleFocus, true);
}
function toggleFocus(){
var self=this;
while(-1===self.className.indexOf('nav-menu') ){
if('li'===self.tagName.toLowerCase()){
if(-1!==self.className.indexOf('focus') ){
self.className=self.className.replace(' focus', '');
}else{
self.className +=' focus';
}}
self=self.parentElement;
}}
(function(container){
var touchStartFn, i,
parentLink=container.querySelectorAll('.menu-item-has-children > a, .page_item_has_children > a');
if('ontouchstart' in window){
touchStartFn=function(e){
var menuItem=this.parentNode, i;
if(! menuItem.classList.contains('focus') ){
e.preventDefault();
for(i=0; i < menuItem.parentNode.children.length; ++i){
if(menuItem===menuItem.parentNode.children[i]){
continue;
}
menuItem.parentNode.children[i].classList.remove('focus');
}
menuItem.classList.add('focus');
}else{
menuItem.classList.remove('focus');
}};
for(i=0; i < parentLink.length; ++i){
parentLink[i].addEventListener('touchstart', touchStartFn, false);
}}
}(container) );
})();
function watchAds(){
jQuery(".banner-container").each(function(i, el){
var elem=$(el);
if(elem.context.offsetHeight > 40){ // 150 //&&$(this).css('display')!=='none'
elem.css('visibility','visible');
elem.css('position','relative');
}else{
elem.css('height','auto');
elem.css('visibility','hidden');
elem.css('position','absolute');
}});
}
setTimeout(function(){
watchAds();
}, 1100);
setTimeout(function(){
watchAds();
}, 2010);
setTimeout(function(){
watchAds();
}, 5020);
setTimeout(function(){
watchAds();
}, 10020);
setTimeout(function(){
watchAds();
}, 15020);
setTimeout(function(){
watchAds();
}, 20020);
var forceCloseFloatingArticle=false;
jQuery(window).scroll(function(){
if(forceCloseFloatingArticle===false){
if(jQuery(window).scrollTop() > 1200){
jQuery('.floating-article').addClass('open');
}else{
jQuery('.floating-article').removeClass('open');
}}
});
jQuery('.floating-article .close-btn').on('click', function(){
jQuery('.floating-article').toggleClass('open');
jQuery('#related').blur();
jQuery('#related').focus();
forceCloseFloatingArticle=true;
});
(function(){
var isWebkit=navigator.userAgent.toLowerCase().indexOf('webkit') > -1,
isOpera=navigator.userAgent.toLowerCase().indexOf('opera')  > -1,
isIe=navigator.userAgent.toLowerCase().indexOf('msie')   > -1;
if(( isWebkit||isOpera||isIe)&&document.getElementById&&window.addEventListener){
window.addEventListener('hashchange', function(){
var id=location.hash.substring(1),
element;
if(!(/^[A-z0-9_-]+$/.test(id) )){
return;
}
element=document.getElementById(id);
if(element){
if(!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName) )){
element.tabIndex=-1;
}
element.focus();
}}, false);
}})();
(function(factory){
if(typeof define==="function"&&define.amd){
define([ "jquery" ], factory);
}else if(typeof exports==="object"){
module.exports=factory(require("jquery"));
}else{
factory(jQuery);
}})(function($){
var pluses=/\+/g;
function encode(s){
return config.raw ? s:encodeURIComponent(s);
}
function decode(s){
return config.raw ? s:decodeURIComponent(s);
}
function stringifyCookieValue(value){
return encode(config.json ? JSON.stringify(value):String(value));
}
function parseCookieValue(s){
if(s.indexOf('"')===0){
s=s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\");
}
try {
s=decodeURIComponent(s.replace(pluses, " "));
return config.json ? JSON.parse(s):s;
} catch (e){}}
function read(s, converter){
var value=config.raw ? s:parseCookieValue(s);
return $.isFunction(converter) ? converter(value):value;
}
var config=$.cookie=function(key, value, options){
if(arguments.length > 1&&!$.isFunction(value)){
options=$.extend({}, config.defaults, options);
if(typeof options.expires==="number"){
var days=options.expires, t=options.expires=new Date();
t.setMilliseconds(t.getMilliseconds() + days * 864e5);
}
return document.cookie=[ encode(key), "=", stringifyCookieValue(value), options.expires ? "; expires=" + options.expires.toUTCString():"",
options.path ? "; path=" + options.path:"", options.domain ? "; domain=" + options.domain:"", options.secure ? "; secure":"" ].join("");
}
var result=key ? undefined:{},
cookies=document.cookie ? document.cookie.split("; "):[], i=0, l=cookies.length;
for (;i < l; i++){
var parts=cookies[i].split("="), name=decode(parts.shift()), cookie=parts.join("=");
if(key===name){
result=read(cookie, value);
break;
}
if(!key&&(cookie=read(cookie))!==undefined){
result[name]=cookie;
}}
return result;
};
config.defaults={};
$.removeCookie=function(key, options){
$.cookie(key, "", $.extend({}, options, {
expires: -1
}));
return !$.cookie(key);
};});
function initApp(){}
initApp();
(function(l, f){
function m(){
var a=e.elements;
return "string"==typeof a ? a.split(" "):a;
}
function i(a){
var b=n[a[o]];
b||(b={}, h++, a[o]=h, n[h]=b);
return b;
}
function p(a, b, c){
b||(b=f);
if(g) return b.createElement(a);
c||(c=i(b));
b=c.cache[a] ? c.cache[a].cloneNode():r.test(a) ? (c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);
return b.canHaveChildren&&!s.test(a) ? c.frag.appendChild(b):b;
}
function t(a, b){
if(!b.cache) b.cache={}, b.createElem=a.createElement, b.createFrag=a.createDocumentFragment,
b.frag=b.createFrag();
a.createElement=function(c){
return !e.shivMethods ? b.createElem(c):p(c, a, b);
};
a.createDocumentFragment=Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function(a){
b.createElem(a);
b.frag.createElement(a);
return 'c("' + a + '")';
}) + ");return n}")(e, b.frag);
}
function q(a){
a||(a=f);
var b=i(a);
if(e.shivCSS&&!j&&!b.hasCSS){
var c, d=a;
c=d.createElement("p");
d=d.getElementsByTagName("head")[0]||d.documentElement;
c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild, d.firstChild);
b.hasCSS = !!c;
}
g||t(a, b);
return a;
}
var k=l.html5||{}, s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, j, o="_html5shiv", h=0, n={}, g;
(function(){
try {
var a=f.createElement("a");
a.innerHTML="<xyz></xyz>";
j="hidden" in a;
var b;
if(!(b=1==a.childNodes.length)){
f.createElement("a");
var c=f.createDocumentFragment();
b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement;
}
g=b;
} catch (d){
g=j = !0;
}})();
var e={
elements: k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
version: "3.7.0",
shivCSS: !1!==k.shivCSS,
supportsUnknownElements: g,
shivMethods: !1!==k.shivMethods,
type: "default",
shivDocument: q,
createElement: p,
createDocumentFragment: function(a, b){
a||(a=f);
if(g) return a.createDocumentFragment();
for (var b=b||i(a), c=b.frag.cloneNode(), d=0, e=m(), h=e.length; d < h; d++) c.createElement(e[d]);
return c;
}};
l.html5=e;
q(f);
})(this, document);
var IASCallbacks=function(a){
return this.list=[], this.fireStack=[], this.isFiring = !1, this.isDisabled = !1,
this.fire=function(a){
var b=a[0], c=a[1], d=a[2];
this.isFiring = !0;
for (var e=0, f=this.list.length; f > e; e++) if(void 0!=this.list[e]&&!1===this.list[e].fn.apply(b, d)){
c.reject();
break;
}
this.isFiring = !1, c.resolve(), this.fireStack.length&&this.fire(this.fireStack.shift());
}, this.inList=function(a, b){
b=b||0;
for (var c=b, d=this.list.length; d > c; c++) if(this.list[c].fn===a||a.guid&&this.list[c].fn.guid&&a.guid===this.list[c].fn.guid) return c;
return -1;
}, this;
};
IASCallbacks.prototype={
add: function(a, b){
var c={
fn: a,
priority: b
};
b=b||0;
for (var d=0, e=this.list.length; e > d; d++) if(b > this.list[d].priority) return this.list.splice(d, 0, c),
this;
return this.list.push(c), this;
},
remove: function(a){
for (var b=0; (b=this.inList(a, b)) > -1;) this.list.splice(b, 1);
return this;
},
has: function(a){
return this.inList(a) > -1;
},
fireWith: function(a, b){
var c=$.Deferred();
return this.isDisabled ? c.reject():(b=b||[], b=[ a, c, b.slice ? b.slice():b ],
this.isFiring ? this.fireStack.push(b):this.fire(b), c);
},
disable: function(){
this.isDisabled = !0;
},
enable: function(){
this.isDisabled = !1;
}}, function(a){
"use strict";
var b=-1, c=function(c, d){
return this.itemsContainerSelector=d.container, this.itemSelector=d.item, this.nextSelector=d.next,
this.paginationSelector=d.pagination, this.$scrollContainer=c, this.$container=window===c.get(0) ? a(document):c,
this.defaultDelay=d.delay, this.negativeMargin=d.negativeMargin, this.nextUrl=null,
this.isBound = !1, this.isPaused = !1, this.isInitialized = !1, this.jsXhr = !1,
this.listeners={
next: new IASCallbacks(a),
load: new IASCallbacks(a),
loaded: new IASCallbacks(a),
render: new IASCallbacks(a),
rendered: new IASCallbacks(a),
scroll: new IASCallbacks(a),
noneLeft: new IASCallbacks(a),
ready: new IASCallbacks(a)
}, this.extensions=[], this.scrollHandler=function(){
if(this.isBound&&!this.isPaused){
var a=this.getCurrentScrollOffset(this.$scrollContainer), c=this.getScrollThreshold();
b!=c&&(this.fire("scroll", [ a, c ]), a >=c&&this.next());
}}, this.getItemsContainer=function(){
return a(this.itemsContainerSelector, this.$container);
}, this.getLastItem=function(){
return a(this.itemSelector, this.getItemsContainer().get(0)).last();
}, this.getFirstItem=function(){
return a(this.itemSelector, this.getItemsContainer().get(0)).first();
}, this.getScrollThreshold=function(a){
var c;
return a=a||this.negativeMargin, a=a >=0 ? -1 * a:a, c=this.getLastItem(),
0===c.length ? b:c.offset().top + c.height() + a;
}, this.getCurrentScrollOffset=function(a){
var b=0, c=a.height();
return b=window===a.get(0) ? a.scrollTop():a.offset().top, (-1!=navigator.platform.indexOf("iPhone")||-1!=navigator.platform.indexOf("iPod"))&&(c +=80),
b + c;
}, this.getNextUrl=function(b){
return b=b||this.$container, a(this.nextSelector, b).last().attr("href");
}, this.load=function(b, c, d){
var e, f, g=this, h=[], i=+new Date();
d=d||this.defaultDelay;
var j={
url: b
};
return g.fire("load", [ j ]), this.jsXhr=a.get(j.url, null, a.proxy(function(b){
e=a(this.itemsContainerSelector, b).eq(0), 0===e.length&&(e=a(b).filter(this.itemsContainerSelector).eq(0)),
e&&e.find(this.itemSelector).each(function(){
h.push(this);
}), g.fire("loaded", [ b, h ]), c&&(f=+new Date() - i, d > f ? setTimeout(function(){
c.call(g, b, h);
}, d - f):c.call(g, b, h));
}, g), "html"), this.jsXhr;
}, this.render=function(b, c){
var d=this, e=this.getLastItem(), f=0, g=this.fire("render", [ b ]);
g.done(function(){
a(b).hide(), e.after(b), a(b).fadeIn(400, function(){
++f < b.length||(d.fire("rendered", [ b ]), c&&c());
});
}), g.fail(function(){
c&&c();
});
}, this.hidePagination=function(){
this.paginationSelector&&a(this.paginationSelector, this.$container).hide();
}, this.restorePagination=function(){
this.paginationSelector&&a(this.paginationSelector, this.$container).show();
}, this.throttle=function(b, c){
var d, e, f=0;
return d=function(){
function a(){
f=+new Date(), b.apply(d, g);
}
var d=this, g=arguments, h=+new Date() - f;
e ? clearTimeout(e):a(), h > c ? a():e=setTimeout(a, c);
}, a.guid&&(d.guid=b.guid=b.guid||a.guid++), d;
}, this.fire=function(a, b){
return this.listeners[a].fireWith(this, b);
}, this.pause=function(){
this.isPaused = !0;
}, this.resume=function(){
this.isPaused = !1;
}, this;
};
c.prototype.initialize=function(){
if(this.isInitialized) return !1;
var a = !!("onscroll" in this.$scrollContainer.get(0)), b=this.getCurrentScrollOffset(this.$scrollContainer), c=this.getScrollThreshold();
return a ? (this.hidePagination(), this.bind(), this.fire("ready"), this.nextUrl=this.getNextUrl(),
b >=c ? (this.next(), this.one("rendered", function(){
this.isInitialized = !0;
})):this.isInitialized = !0, this):!1;
}, c.prototype.reinitialize=function(){
this.isInitialized = !1, this.unbind(), this.initialize();
}, c.prototype.bind=function(){
if(!this.isBound){
this.$scrollContainer.on("scroll", a.proxy(this.throttle(this.scrollHandler, 150), this));
for (var b=0, c=this.extensions.length; c > b; b++) this.extensions[b].bind(this);
this.isBound = !0, this.resume();
}}, c.prototype.unbind=function(){
if(this.isBound){
this.$scrollContainer.off("scroll", this.scrollHandler);
for (var a=0, b=this.extensions.length; b > a; a++) "undefined"!=typeof this.extensions[a].unbind&&this.extensions[a].unbind(this);
this.isBound = !1;
}}, c.prototype.destroy=function(){
try {
this.jsXhr.abort();
} catch (a){}
this.unbind(), this.$scrollContainer.data("ias", null);
}, c.prototype.on=function(b, c, d){
if("undefined"==typeof this.listeners[b]) throw new Error('There is no event called "' + b + '"');
return d=d||0, this.listeners[b].add(a.proxy(c, this), d), this;
}, c.prototype.one=function(a, b){
var c=this, d=function(){
c.off(a, b), c.off(a, d);
};
return this.on(a, b), this.on(a, d), this;
}, c.prototype.off=function(a, b){
if("undefined"==typeof this.listeners[a]) throw new Error('There is no event called "' + a + '"');
return this.listeners[a].remove(b), this;
}, c.prototype.next=function(){
var a=this.nextUrl, b=this;
if(this.pause(), !a) return this.fire("noneLeft", [ this.getLastItem() ]), this.listeners.noneLeft.disable(),
b.resume(), !1;
var c=this.fire("next", [ a ]);
return c.done(function(){
b.load(a, function(a, c){
b.render(c, function(){
b.nextUrl=b.getNextUrl(a), b.resume();
});
});
}), c.fail(function(){
b.resume();
}), !0;
}, c.prototype.extension=function(a){
if("undefined"==typeof a.bind) throw new Error('Extension doesn\'t have required method "bind"');
return "undefined"!=typeof a.initialize&&a.initialize(this), this.extensions.push(a),
this.isInitialized&&this.reinitialize(), this;
}, a.ias=function(b){
var c=a(window);
return c.ias.apply(c, arguments);
}, a.fn.ias=function(b){
var d=Array.prototype.slice.call(arguments), e=this;
return this.each(function(){
var f=a(this), g=f.data("ias"), h=a.extend({}, a.fn.ias.defaults, f.data(), "object"==typeof b&&b);
if(g||(f.data("ias", g=new c(f, h)), a(document).ready(a.proxy(g.initialize, g))),
"string"==typeof b){
if("function"!=typeof g[b]) throw new Error('There is no method called "' + b + '"');
d.shift(), g[b].apply(g, d);
}
e=g;
}), e;
}, a.fn.ias.defaults={
item: ".item",
container: ".listing",
next: ".next",
pagination: !1,
delay: 600,
negativeMargin: 10
};}(jQuery);
var IASHistoryExtension=function(a){
return a=jQuery.extend({}, this.defaults, a), this.ias=null, this.prevSelector=a.prev,
this.prevUrl=null, this.listeners={
prev: new IASCallbacks()
}, this.onPageChange=function(a, b, c){
if(window.history&&window.history.replaceState){
var d=history.state;
history.replaceState(d, document.title, c);
}}, this.onScroll=function(a, b){
var c=this.getScrollThresholdFirstItem();
this.prevUrl&&(a -=this.ias.$scrollContainer.height(), c >=a&&this.prev());
}, this.onReady=function(){
var a=this.ias.getCurrentScrollOffset(this.ias.$scrollContainer), b=this.getScrollThresholdFirstItem();
a -=this.ias.$scrollContainer.height(), b >=a&&this.prev();
}, this.getPrevUrl=function(a){
return a||(a=this.ias.$container), jQuery(this.prevSelector, a).last().attr("href");
}, this.getScrollThresholdFirstItem=function(){
var a;
return a=this.ias.getFirstItem(), 0===a.length ? -1:a.offset().top;
}, this.renderBefore=function(a, b){
var c=this.ias, d=c.getFirstItem(), e=0;
c.fire("render", [ a ]), jQuery(a).hide(), d.before(a), jQuery(a).fadeIn(400, function(){
++e < a.length||(c.fire("rendered", [ a ]), b&&b());
});
}, this;
};
IASHistoryExtension.prototype.initialize=function(a){
var b=this;
this.ias=a, jQuery.extend(a.listeners, this.listeners), a.prev=function(){
return b.prev();
}, this.prevUrl=this.getPrevUrl();
}, IASHistoryExtension.prototype.bind=function(a){
a.on("pageChange", jQuery.proxy(this.onPageChange, this)), a.on("scroll", jQuery.proxy(this.onScroll, this)),
a.on("ready", jQuery.proxy(this.onReady, this));
}, IASHistoryExtension.prototype.unbind=function(a){
a.off("pageChange", this.onPageChange), a.off("scroll", this.onScroll), a.off("ready", this.onReady);
}, IASHistoryExtension.prototype.prev=function(){
var a=this.prevUrl, b=this, c=this.ias;
if(!a) return !1;
c.pause();
var d=c.fire("prev", [ a ]);
return d.done(function(){
c.load(a, function(a, d){
b.renderBefore(d, function(){
b.prevUrl=b.getPrevUrl(a), c.resume(), b.prevUrl&&b.prev();
});
});
}), d.fail(function(){
c.resume();
}), !0;
}, IASHistoryExtension.prototype.defaults={
prev: ".prev"
};
var IASNoneLeftExtension=function(a){
return a=jQuery.extend({}, this.defaults, a), this.ias=null, this.uid=new Date().getTime(),
this.html=a.html.replace("{text}", a.text), this.showNoneLeft=function(){
var a=jQuery(this.html).attr("id", "ias_noneleft_" + this.uid), b=this.ias.getLastItem();
b.after(a), a.fadeIn();
}, this;
};
IASNoneLeftExtension.prototype.bind=function(a){
this.ias=a, a.on("noneLeft", jQuery.proxy(this.showNoneLeft, this));
}, IASNoneLeftExtension.prototype.unbind=function(a){
a.off("noneLeft", this.showNoneLeft);
}, IASNoneLeftExtension.prototype.defaults={
text: "You reached the end.",
html: '<div class="ias-noneleft" style="text-align: center;">{text}</div>'
};
var IASPagingExtension=function(){
return this.ias=null, this.pagebreaks=[ [ 0, document.location.toString() ] ],
this.lastPageNum=1, this.enabled = !0, this.listeners={
pageChange: new IASCallbacks()
}, this.onScroll=function(a, b){
if(this.enabled){
var c, d=this.ias, e=this.getCurrentPageNum(a), f=this.getCurrentPagebreak(a);
this.lastPageNum!==e&&(c=f[1], d.fire("pageChange", [ e, a, c ])), this.lastPageNum=e;
}}, this.onNext=function(a){
var b=this.ias.getCurrentScrollOffset(this.ias.$scrollContainer);
this.pagebreaks.push([ b, a ]);
var c=this.getCurrentPageNum(b) + 1;
this.ias.fire("pageChange", [ c, b, a ]), this.lastPageNum=c;
}, this.onPrev=function(a){
var b=this, c=b.ias, d=c.getCurrentScrollOffset(c.$scrollContainer), e=d - c.$scrollContainer.height(), f=c.getFirstItem();
this.enabled = !1, this.pagebreaks.unshift([ 0, a ]), c.one("rendered", function(){
for (var d=1, g=b.pagebreaks.length; g > d; d++) b.pagebreaks[d][0]=b.pagebreaks[d][0] + f.offset().top;
var h=b.getCurrentPageNum(e) + 1;
c.fire("pageChange", [ h, e, a ]), b.lastPageNum=h, b.enabled = !0;
});
}, this;
};
IASPagingExtension.prototype.initialize=function(a){
this.ias=a, jQuery.extend(a.listeners, this.listeners);
}, IASPagingExtension.prototype.bind=function(a){
try {
a.on("prev", jQuery.proxy(this.onPrev, this), this.priority);
} catch (b){}
a.on("next", jQuery.proxy(this.onNext, this), this.priority), a.on("scroll", jQuery.proxy(this.onScroll, this), this.priority);
}, IASPagingExtension.prototype.unbind=function(a){
try {
a.off("prev", this.onPrev);
} catch (b){}
a.off("next", this.onNext), a.off("scroll", this.onScroll);
}, IASPagingExtension.prototype.getCurrentPageNum=function(a){
for (var b=this.pagebreaks.length - 1; b > 0; b--) if(a > this.pagebreaks[b][0]) return b + 1;
return 1;
}, IASPagingExtension.prototype.getCurrentPagebreak=function(a){
for (var b=this.pagebreaks.length - 1; b >=0; b--) if(a > this.pagebreaks[b][0]) return this.pagebreaks[b];
return null;
}, IASPagingExtension.prototype.priority=500;
var IASSpinnerExtension=function(a){
return a=jQuery.extend({}, this.defaults, a), this.ias=null, this.uid=new Date().getTime(),
this.src=a.src, this.html=a.html.replace("{src}", this.src), this.showSpinner=function(){
var a=this.getSpinner()||this.createSpinner(), b=this.ias.getLastItem();
b.after(a), a.fadeIn();
}, this.showSpinnerBefore=function(){
var a=this.getSpinner()||this.createSpinner(), b=this.ias.getFirstItem();
b.before(a), a.fadeIn();
}, this.removeSpinner=function(){
this.hasSpinner()&&this.getSpinner().remove();
}, this.getSpinner=function(){
var a=jQuery("#ias_spinner_" + this.uid);
return a.length > 0 ? a:!1;
}, this.hasSpinner=function(){
var a=jQuery("#ias_spinner_" + this.uid);
return a.length > 0;
}, this.createSpinner=function(){
var a=jQuery(this.html).attr("id", "ias_spinner_" + this.uid);
return a.hide(), a;
}, this;
};
IASSpinnerExtension.prototype.bind=function(a){
this.ias=a, a.on("next", jQuery.proxy(this.showSpinner, this)), a.on("render", jQuery.proxy(this.removeSpinner, this));
try {
a.on("prev", jQuery.proxy(this.showSpinnerBefore, this));
} catch (b){}}, IASSpinnerExtension.prototype.unbind=function(a){
a.off("next", this.showSpinner), a.off("render", this.removeSpinner);
try {
a.off("prev", this.showSpinnerBefore);
} catch (b){}}, IASSpinnerExtension.prototype.defaults={
src: "data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==",
html: '<div class="ias-spinner" style="text-align: center;"><img src="{src}"/></div>'
};
var IASTriggerExtension=function(a){
return a=jQuery.extend({}, this.defaults, a), this.ias=null, this.html=a.html.replace("{text}", a.text),
this.htmlPrev=a.htmlPrev.replace("{text}", a.textPrev), this.enabled = !0, this.count=0,
this.offset=a.offset, this.$triggerNext=null, this.$triggerPrev=null, this.showTriggerNext=function(){
if(!this.enabled) return !0;
if(!1===this.offset||++this.count < this.offset) return !0;
var a=this.$triggerNext||(this.$triggerNext=this.createTrigger(this.next, this.html)), b=this.ias.getLastItem();
return b.after(a), a.fadeIn(), !1;
}, this.showTriggerPrev=function(){
if(!this.enabled) return !0;
var a=this.$triggerPrev||(this.$triggerPrev=this.createTrigger(this.prev, this.htmlPrev)), b=this.ias.getFirstItem();
return b.before(a), a.fadeIn(), !1;
}, this.onRendered=function(){
this.enabled = !0;
}, this.createTrigger=function(a, b){
var c, d=new Date().getTime();
return b=b||this.html, c=jQuery(b).attr("id", "ias_trigger_" + d), c.hide(),
c.on("click", jQuery.proxy(a, this)), c;
}, this;
};
IASTriggerExtension.prototype.bind=function(a){
this.ias=a, a.on("next", jQuery.proxy(this.showTriggerNext, this), this.priority),
a.on("rendered", jQuery.proxy(this.onRendered, this), this.priority);
try {
a.on("prev", jQuery.proxy(this.showTriggerPrev, this), this.priority);
} catch (b){}}, IASTriggerExtension.prototype.unbind=function(a){
a.off("next", this.showTriggerNext), a.off("rendered", this.onRendered);
try {
a.off("prev", this.showTriggerPrev);
} catch (b){}}, IASTriggerExtension.prototype.next=function(){
this.enabled = !1, this.ias.pause(), this.$triggerNext&&(this.$triggerNext.remove(),
this.$triggerNext=null), this.ias.next();
}, IASTriggerExtension.prototype.prev=function(){
this.enabled = !1, this.ias.pause(), this.$triggerPrev&&(this.$triggerPrev.remove(),
this.$triggerPrev=null), this.ias.prev();
}, IASTriggerExtension.prototype.defaults={
text: "Load more items",
html: '<div class="ias-trigger ias-trigger-next" style="text-align: center; cursor: pointer;"><a>{text}</a></div>',
textPrev: "Load previous items",
htmlPrev: '<div class="ias-trigger ias-trigger-prev" style="text-align: center; cursor: pointer;"><a>{text}</a></div>',
offset: 0
}, IASTriggerExtension.prototype.priority=1e3;
(function($){
var $window=$(window), _watch=[], _buffer;
function test($el){
var docViewTop=$window.scrollTop(), docViewBottom=docViewTop + $window.height(), elemTop=$el.offset().top, elemBottom=elemTop + $el.height();
return elemBottom >=docViewTop&&elemTop <=docViewBottom&&elemBottom <=docViewBottom&&elemTop >=docViewTop;
}
$window.on("scroll", function(e){
if(!_buffer){
_buffer=setTimeout(function(){
checkInView(e);
_buffer=null;
}, 300);
}});
function checkInView(e){
$.each(_watch, function(){
if(test(this.element)){
if(!this.invp){
this.invp=true;
if(this.options.scrolledin) this.options.scrolledin.call(this.element, e);
this.element.trigger("scrolledin", e);
}}else if(this.invp){
this.invp=false;
if(this.options.scrolledout) this.options.scrolledout.call(this.element, e);
this.element.trigger("scrolledout", e);
}});
}
function monitor(element, options){
var item={
element: element,
options: options,
invp: false
};
_watch.push(item);
return item;
}
function unmonitor(item){
for (var i=0; i < _watch.length; i++){
if(_watch[i]===item){
_watch.splice(i, 1);
item.element=null;
break;
}}
console.log(_watch);
}
var pluginName="scrolledIntoView", settings={
scrolledin: null,
scrolledout: null
};
$.fn[pluginName]=function(options){
var options=$.extend({}, settings, options);
this.each(function(){
var $el=$(this), instance=$.data(this, pluginName);
if(instance){
instance.options=options;
}else{
$.data(this, pluginName, monitor($el, options));
$el.on("remove", $.proxy(function(){
$.removeData(this, pluginName);
unmonitor(instance);
}, this));
}});
return this;
};})(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: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
autoplay: false,
autoplaySpeed: 3e3,
centerMode: false,
centerPadding: "50px",
cssEase: "ease",
customPaging: function(slider, i){
return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
},
dots: false,
dotsClass: "slick-dots",
draggable: true,
easing: "linear",
edgeFriction: .35,
fade: false,
focusOnSelect: false,
infinite: true,
initialSlide: 0,
lazyLoad: "ondemand",
mobileFirst: false,
pauseOnHover: true,
pauseOnFocus: 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,
useTransform: true,
variableWidth: false,
vertical: false,
verticalSwiping: false,
waitForAnimate: true,
zIndex: 1e3
};
_.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;
_.focussed=false;
_.interrupted=false;
_.hidden="hidden";
_.paused=true;
_.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, settings, dataSettings);
_.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, _);
_.autoPlayIterator=$.proxy(_.autoPlayIterator, _);
_.changeSlide=$.proxy(_.changeSlide, _);
_.clickHandler=$.proxy(_.clickHandler, _);
_.selectHandler=$.proxy(_.selectHandler, _);
_.setPosition=$.proxy(_.setPosition, _);
_.swipeHandler=$.proxy(_.swipeHandler, _);
_.dragHandler=$.proxy(_.dragHandler, _);
_.keyHandler=$.proxy(_.keyHandler, _);
_.instanceUid=instanceUid++;
_.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;
_.registerBreakpoints();
_.init(true);
}
return Slick;
}();
Slick.prototype.activateADA=function(){
var _=this;
_.$slideTrack.find(".slick-active").attr({
"aria-hidden": "false"
}).find("a, input, button, select").attr({
tabindex: "0"
});
};
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.getNavTarget=function(){
var _=this, asNavFor=_.options.asNavFor;
if(asNavFor&&asNavFor!==null){
asNavFor=$(asNavFor).not(_.$slider);
}
return asNavFor;
};
Slick.prototype.asNavFor=function(index){
var _=this, asNavFor=_.getNavTarget();
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;
_.autoPlayClear();
if(_.slideCount > _.options.slidesToShow){
_.autoPlayTimer=setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
}};
Slick.prototype.autoPlayClear=function(){
var _=this;
if(_.autoPlayTimer){
clearInterval(_.autoPlayTimer);
}};
Slick.prototype.autoPlayIterator=function(){
var _=this, slideTo=_.currentSlide + _.options.slidesToScroll;
if(!_.paused&&!_.interrupted&&!_.focussed){
if(_.options.infinite===false){
if(_.direction===1&&_.currentSlide + 1===_.slideCount - 1){
_.direction=0;
}else if(_.direction===0){
slideTo=_.currentSlide - _.options.slidesToScroll;
if(_.currentSlide - 1===0){
_.direction=1;
}}
}
_.slideHandler(slideTo);
}};
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, dot;
if(_.options.dots===true&&_.slideCount > _.options.slidesToShow){
_.$slider.addClass("slick-dotted");
dot=$("<ul />").addClass(_.options.dotsClass);
for (i=0; i <=_.getDotCount(); i +=1){
dot.append($("<li />").append(_.options.customPaging.call(this, _, i)));
}
_.$dots=dot.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")||"");
});
_.$slider.addClass("slick-slider");
_.$slideTrack=_.slideCount===0 ? $('<div class="slick-track"/>').appendTo(_.$slider):_.$slides.wrapAll('<div class="slick-track"/>').parent();
_.$list=_.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').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.empty().append(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.currentTarget), 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).off("mouseenter.slick", $.proxy(_.interrupt, _, true)).off("mouseleave.slick", $.proxy(_.interrupt, _, false));
}
_.$slider.off("focus.slick blur.slick");
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);
_.cleanUpSlideEvents();
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.cleanUpSlideEvents=function(){
var _=this;
_.$list.off("mouseenter.slick", $.proxy(_.interrupt, _, true));
_.$list.off("mouseleave.slick", $.proxy(_.interrupt, _, false));
};
Slick.prototype.cleanUpRows=function(){
var _=this, originalSlides;
if(_.options.rows > 1){
originalSlides=_.$slides.children().children();
originalSlides.removeAttr("style");
_.$slider.empty().append(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(_.$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");
_.$slider.removeClass("slick-dotted");
_.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){
_.$slidesCache=_.$slides;
_.unload();
_.$slideTrack.children(this.options.slide).detach();
_.$slidesCache.filter(filter).appendTo(_.$slideTrack);
_.reinit();
}};
Slick.prototype.focusHandler=function(){
var _=this;
_.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*:not(.slick-arrow)", function(event){
event.stopImmediatePropagation();
var $sf=$(this);
setTimeout(function(){
if(_.options.pauseOnFocus){
_.focussed=$sf.is(":focus");
_.autoPlay();
}}, 0);
});
};
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.slidesToScroll;
counter +=_.options.slidesToScroll <=_.options.slidesToShow ? _.options.slidesToScroll:_.options.slidesToShow;
}}else if(_.options.centerMode===true){
pagerQty=_.slideCount;
}else if(!_.options.asNavFor){
pagerQty=1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
}else{
while (breakPoint < _.slideCount){
++pagerQty;
breakPoint=counter + _.options.slidesToScroll;
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);
}
if(_.options.rtl===true){
if(targetSlide[0]){
targetLeft=(_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
}else{
targetLeft=0;
}}else{
targetLeft=targetSlide[0] ? targetSlide[0].offsetLeft * -1:0;
}
if(_.options.centerMode===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 + 1);
}
if(_.options.rtl===true){
if(targetSlide[0]){
targetLeft=(_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
}else{
targetLeft=0;
}}else{
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();
_.checkResponsive(true);
_.focusHandler();
}
if(creation){
_.$slider.trigger("init", [ _ ]);
}
if(_.options.accessibility===true){
_.initADA();
}
if(_.options.autoplay){
_.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.initArrowEvents=function(){
var _=this;
if(_.options.arrows===true&&_.slideCount > _.options.slidesToShow){
_.$prevArrow.off("click.slick").on("click.slick", {
message: "previous"
}, _.changeSlide);
_.$nextArrow.off("click.slick").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){
$("li", _.$dots).on("mouseenter.slick", $.proxy(_.interrupt, _, true)).on("mouseleave.slick", $.proxy(_.interrupt, _, false));
}};
Slick.prototype.initSlideEvents=function(){
var _=this;
if(_.options.pauseOnHover){
_.$list.on("mouseenter.slick", $.proxy(_.interrupt, _, true));
_.$list.on("mouseleave.slick", $.proxy(_.interrupt, _, false));
}};
Slick.prototype.initializeEvents=function(){
var _=this;
_.initArrowEvents();
_.initDotEvents();
_.initSlideEvents();
_.$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, _));
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();
}};
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: _.options.rtl===true ? "next":"previous"
}});
}else if(event.keyCode===39&&_.options.accessibility===true){
_.changeSlide({
data: {
message: _.options.rtl===true ? "previous":"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");
});
_.$slider.trigger("lazyLoaded", [ _, image, imageSource ]);
});
};
imageToLoad.onerror=function(){
image.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error");
_.$slider.trigger("lazyLoadError", [ _, image, imageSource ]);
};
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=Math.ceil(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;
_.autoPlay();
_.options.autoplay=true;
_.paused=false;
_.focussed=false;
_.interrupted=false;
};
Slick.prototype.postSlide=function(index){
var _=this;
if(!_.unslicked){
_.$slider.trigger("afterChange", [ _, index ]);
_.animating=false;
_.setPosition();
_.swipeLeft=null;
if(_.options.autoplay){
_.autoPlay();
}
if(_.options.accessibility===true){
_.initADA();
}}
};
Slick.prototype.prev=Slick.prototype.slickPrev=function(){
var _=this;
_.changeSlide({
data: {
message: "previous"
}});
};
Slick.prototype.preventDefault=function(event){
event.preventDefault();
};
Slick.prototype.progressiveLazyLoad=function(tryCount){
tryCount=tryCount||1;
var _=this, $imgsToLoad=$("img[data-lazy]", _.$slider), image, imageSource, imageToLoad;
if($imgsToLoad.length){
image=$imgsToLoad.first();
imageSource=image.attr("data-lazy");
imageToLoad=document.createElement("img");
imageToLoad.onload=function(){
image.attr("src", imageSource).removeAttr("data-lazy").removeClass("slick-loading");
if(_.options.adaptiveHeight===true){
_.setPosition();
}
_.$slider.trigger("lazyLoaded", [ _, image, imageSource ]);
_.progressiveLazyLoad();
};
imageToLoad.onerror=function(){
if(tryCount < 3){
setTimeout(function(){
_.progressiveLazyLoad(tryCount + 1);
}, 500);
}else{
image.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error");
_.$slider.trigger("lazyLoadError", [ _, image, imageSource ]);
_.progressiveLazyLoad();
}};
imageToLoad.src=imageSource;
}else{
_.$slider.trigger("allImagesLoaded", [ _ ]);
}};
Slick.prototype.refresh=function(initializing){
var _=this, currentSlide, lastVisibleIndex;
lastVisibleIndex=_.slideCount - _.options.slidesToShow;
if(!_.options.infinite&&_.currentSlide > lastVisibleIndex){
_.currentSlide=lastVisibleIndex;
}
if(_.slideCount <=_.options.slidesToShow){
_.currentSlide=0;
}
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();
_.cleanUpSlideEvents();
_.initSlideEvents();
_.checkResponsive(false, true);
if(_.options.focusOnSelect===true){
$(_.$slideTrack).children().on("click.slick", _.selectHandler);
}
_.setSlideClasses(typeof _.currentSlide==="number" ? _.currentSlide:0);
_.setPosition();
_.focusHandler();
_.paused = !_.options.autoplay;
_.autoPlay();
_.$slider.trigger("reInit", [ _ ]);
};
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(5e3 * _.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(){
var _=this, l, item, option, value, refresh=false, type;
if($.type(arguments[0])==="object"){
option=arguments[0];
refresh=arguments[1];
type="multiple";
}else if($.type(arguments[0])==="string"){
option=arguments[0];
value=arguments[1];
refresh=arguments[2];
if(arguments[0]==="responsive"&&$.type(arguments[1])==="array"){
type="responsive";
}else if(typeof arguments[1]!=="undefined"){
type="single";
}}
if(type==="single"){
_.options[option]=value;
}else if(type==="multiple"){
$.each(option, function(opt, val){
_.options[opt]=val;
});
}else if(type==="responsive"){
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]);
}}
}
if(refresh){
_.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=_.options.useTransform&&(_.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.interrupt=function(toggle){
var _=this;
if(!toggle){
_.autoPlay();
}
_.interrupted=toggle;
};
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, navTarget;
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){
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);
if(_.options.asNavFor){
navTarget=_.getNavTarget();
navTarget=navTarget.slick("getSlick");
if(navTarget.slideCount <=navTarget.options.slidesToShow){
navTarget.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 "down";
}else{
return "up";
}}
return "vertical";
};
Slick.prototype.swipeEnd=function(event){
var _=this, slideCount, direction;
_.dragging=false;
_.interrupted=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){
direction=_.swipeDirection();
switch (direction){
case "left":
case "down":
slideCount=_.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()):_.currentSlide + _.getSlideCount();
_.currentDirection=0;
break;
case "right":
case "up":
slideCount=_.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()):_.currentSlide - _.getSlideCount();
_.currentDirection=1;
break;
default:            }
if(direction!="vertical"){
_.slideHandler(slideCount);
_.touchObject={};
_.$slider.trigger("swipe", [ _, direction ]);
}}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;
_.interrupted=true;
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(_.options.autoplay){
if(document[_.hidden]){
_.interrupted=true;
}else{
_.interrupted=false;
}}
};
$.fn.slick=function(){
var _=this, opt=arguments[0], args=Array.prototype.slice.call(arguments, 1), l=_.length, i, ret;
for (i=0; 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 b, f;
b=this.jQuery||window.jQuery;
f=b(window);
b.fn.stick_in_parent=function(d){
var A, w, J, n, B, K, p, q, k, E, t;
null==d&&(d={});
t=d.sticky_class;
B=d.inner_scrolling;
E=d.recalc_every;
k=d.parent;
q=d.offset_top;
p=d.spacer;
w=d.bottoming;
null==q&&(q=0);
null==k&&(k=void 0);
null==B&&(B = !0);
null==t&&(t="is_stuck");
A=b(document);
null==w&&(w = !0);
J=function(a, d, n, C, F, u, r, G){
var v, H, m, D, I, c, g, x, y, z, h, l;
if(!a.data("sticky_kit")){
a.data("sticky_kit", !0);
I=A.height();
g=a.parent();
null!=k&&(g=g.closest(k));
if(!g.length) throw "failed to find stick parent";
v=m = !1;
(h=null!=p ? p&&a.closest(p):b("<div />"))&&h.css("position", a.css("position"));
x=function(){
var c, f, e;
if(!G&&(I=A.height(), c=parseInt(g.css("border-top-width"), 10), f=parseInt(g.css("padding-top"), 10),
d=parseInt(g.css("padding-bottom"), 10), n=g.offset().top + c + f, C=g.height(),
m&&(v=m = !1, null==p&&(a.insertAfter(h), h.detach()), a.css({
position: "",
top: "",
width: "",
bottom: ""
}).removeClass(t), e = !0), F=a.offset().top - (parseInt(a.css("margin-top"), 10)||0) - q,
u=a.outerHeight(!0), r=a.css("float"), h&&h.css({
width: a.outerWidth(!0),
height: u,
display: a.css("display"),
"vertical-align": a.css("vertical-align"),
float: r
}), e)) return l();
};
x();
if(u!==C) return D=void 0, c=q, z=E, l=function(){
var b, l, e, k;
if(!G&&(e = !1, null!=z&&(--z, 0 >=z&&(z=E, x(), e = !0)), e||A.height()===I||x(),
e=f.scrollTop(), null!=D&&(l=e - D), D=e, m ? (w&&(k=e + u + c > C + n,
v&&!k&&(v = !1, a.css({
position: "fixed",
bottom: "",
top: c
}).trigger("sticky_kit:unbottom"))), e < F&&(m = !1, c=q, null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
h.detach()), b={
position: "",
width: "",
top: ""
}, a.css(b).removeClass(t).trigger("sticky_kit:unstick")), B&&(b=f.height(),
u + q > b&&!v&&(c -=l, c=Math.max(b - u, c), c=Math.min(q, c), m&&a.css({
top: c + "px"
})))):e > F&&(m = !0, b={
position: "fixed",
top: c
}, b.width="border-box"===a.css("box-sizing") ? a.outerWidth() + "px":a.width() + "px",
a.css(b).addClass(t), null==p&&(a.after(h), "left"!==r&&"right"!==r||h.append(a)),
a.trigger("sticky_kit:stick")), m&&w && (null==k&&(k=e + u + c > C + n),
!v&&k))) return v = !0, "static"===g.css("position")&&g.css({
position: "relative"
}), a.css({
position: "absolute",
bottom: d,
top: "auto"
}).trigger("sticky_kit:bottom");
}, y=function(){
x();
return l();
}, H=function(){
G = !0;
f.off("touchmove", l);
f.off("scroll", l);
f.off("resize", y);
b(document.body).off("sticky_kit:recalc", y);
a.off("sticky_kit:detach", H);
a.removeData("sticky_kit");
a.css({
position: "",
bottom: "",
top: "",
width: ""
});
g.position("position", "");
if(m) return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h), h.remove()),
a.removeClass(t);
}, f.on("touchmove", l), f.on("scroll", l), f.on("resize", y), b(document.body).on("sticky_kit:recalc", y),
a.on("sticky_kit:detach", H), setTimeout(l, 0);
}};
n=0;
for (K=this.length; n < K; n++) d=this[n], J(b(d));
return this;
};}).call(this);
jQuery(document).ready(function($){
var access_token="";
var $window=$(window);
var ww=$window.width();
var desk=true;
if(ww < 768){
desk=false;
}
console.log("initialised");
/*
$('#main').append('<span class="load-more"></span>');
var button=$('#main .load-more');
button.attr('data-page', 1);
var page=1;
var loading=false;
var excludes=new Array();
var scrollHandling={
allow: true,
reallow: function(){
scrollHandling.allow=true;
},
delay: 50 //(milliseconds) adjust to the highest acceptable value
};
$window.scroll(function(){
if(! loading&&scrollHandling.allow&&$('body').hasClass('ajax_related')){
scrollHandling.allow=false;
setTimeout(scrollHandling.reallow, scrollHandling.delay);
if(isScrolledIntoView($(button), 70)&&$('body').hasClass('ajax_related')){
console.log(excludes);
loading=true;
button.parent().find('article').each(function(index, el){
var post_id=$(this).data('postid');
excludes.push(post_id);
});
var data={
action: 'be_ajax_load_more',
nonce: beloadmore.nonce,
page: page,
exclude: excludes,
query: beloadmore.query,
};
$.post(beloadmore.url, data, function(res){
if(res.success){
$('#main').delay(100).append(res.data);
page=page + 1;
button.attr('data-page', page);
$('#main').append(button);
loading=false;
console.log(res);
}else{
console.log(res);
}}).fail(function(xhr, textStatus, e){
console.log(xhr.responseText);
});
}}
});
*/
var page=1;
var loading=false;
var $content=$("body #loadMoreArticle");
var $urlborder=$(".urlBorder");
var excludes=$("#urlborder-" + page).data("exclude");
var current_position=1;
var autoload=true;
var autoloadnumber=2;
console.log(excludes);
var load_posts=function(){
$.ajax({
type: "POST",
data: {
numPosts: 1,
pageNumber: page,
exclude: excludes
},
dataType: "html",
url: "http://www.rudolfpasztor.com/playground/funzine/wp-content/themes/funzine/loopHandler.php",
beforeSend: function(){},
success: function(data){
$data=$(data);
$data.hide();
page++;
$content.append($data);
$data.fadeIn(150, function(){
loading=false;
console.log("page is:" + page);
});
var envira_container_id=$("#main article .envira-gallery-justified-public").not(".checked").attr("id");
var envira_id=envira_container_id.replace("envira-gallery-wrap-", "");
alert(envira_id);
envira_container_id.isotope("reLayout");
if(page >=autoloadnumber&&desk){
autoload=false;
$(".loadmore").show();
}},
error: function(jqXHR, textStatus, errorThrown){
alert(jqXHR + " :: " + textStatus + " :: " + errorThrown);
console.log(errorThrown);
console.log(jqXHR);
}});
};
var lastScrollTop=0;
$(window).on("scroll", $window, function(event){
if($("body").hasClass("single")&&autoload){
var content_offset=$content.offset();
var border=$("#urlborder-" + page);
if(border!=undefined){
var now=isScrolledIntoView(border, 100);
if(!loading&&isScrolledIntoView(border, 0)){
loading=true;
excludes=$("#urlborder-" + page).data("exclude");
}}
}else if($("body").hasClass("archive")){
console.log("checking archive loadmore");
}else if($("body").hasClass("search")){
console.log("checking search loadmore");
}
var st=window.pageYOffset||document.documentElement.scrollTop;
if(st > lastScrollTop){
var next=current_position + 1;
if(isScrolledIntoView($("#separator-" + next), 0)){
console.log("scrolled up --- to #separator-" + next);
current_position=current_position + 1;
var url=$("#separator-" + current_position).data("url");
var title=$("#separator-" + current_position).data("title");
history.pushState("page" + current_position, title, url);
}}else{
var previous=current_position - 1;
if(isScrolledIntoView($("#urlborder-" + previous), 0)){
console.log("scrolled up --- to #urlborder-" + previous);
current_position=current_position - 1;
var url=$("#urlborder-" + current_position).data("url");
var title=$("#urlborder-" + current_position).data("title");
history.pushState("page" + current_position, title, url);
}}
lastScrollTop=st;
});
$(document).on("click", ".loadmore span.button", function(e){
excludes=$("#urlborder-" + page).data("exclude");
loading=true;
$(".loadmore").hide();
});
$(document.body).on("post-load", function(){
console.log("loaded");
});
function isScrolledIntoView(elem, _before){
if(elem.length){
var docViewTop=$window.scrollTop() + _before;
var docViewBottom=docViewTop + $window.height();
var elemTop=$(elem).offset().top;
var elemBottom=elemTop + $(elem).height();
return elemBottom <=docViewBottom&&elemTop >=docViewTop;
}else{
return false;
}}
function fixDiv(){
var $cache=$("#site-navigation"),
billboardBannerHeight=$('.billboard-banner').height();
console.log(billboardBannerHeight);
if($window.scrollTop() > (50 + billboardBannerHeight)){
$cache.css({
position: "fixed",
top: "0px"
});
$("body").addClass("affix");
}else{
$cache.css({
position: "relative",
top: "0px"
});
$("body").removeClass("affix");
}}
$window.scroll(fixDiv);
if($('body').hasClass('single')){
$(".entry-content p > iframe").each(function(index){
var iframe=$(this);
var cv=iframe.width();
if(iframe){
var iw=iframe.attr('width');
console.log(iw);
if(iw===NaN||iw==='100%'){
iw=cv;
var ratio=cv/iw;
}else{
var ratio=cv/iw;
}
var ih=iframe.attr('height');
var nh=ih * ratio;
iframe.attr('height', nh);
}});
}
function statusChangeCallback(response){
console.log("statusChangeCallback");
console.log(response);
if(response.status==="connected"){
testAPI();
}else if(response.status==="not_authorized"){
console.log("not azthorized");
}else{
console.log("not logged in to facebook");
}}
function checkLoginState(){
FB.getLoginStatus(function(response){
statusChangeCallback(response);
});
}
window.fbAsyncInit=function(){
FB.init({
appId: "338562636521180",
cookie: true,
xfbml: true,
version: "v2.8"
});
FB.getLoginStatus(function(response){
statusChangeCallback(response);
});
$(document).on("click", "#fb_loginbutton", function(event){
event.preventDefault();
FB.login(function(response){}, {
scope: "public_profile,email, rsvp_event, user_events, user_friends"
});
});
if($("article.event").hasClass("connected-fb-event")){
init_event_details();
}};
console.log('beload:', beloadmore.lang, beloadmore);
var fbLang='en_US';
if(beloadmore.lang==='hu'){
var fbLang='hu_HU';
}
(function(d, s, id){
var js, fjs=d.getElementsByTagName(s)[0];
if(d.getElementById(id)) return;
js=d.createElement(s);
js.id=id;
js.src="//connect.facebook.net/" + fbLang + "/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
})(document, "script", "facebook-jssdk");
function testAPI(){
FB.api("/me", function(response){
console.log(response);
}, {
scope: "public_profile, email, rsvp_event, user_events, user_friends"
});
}
function init_event_details(){
var access_token=$("article.connected-fb-event").data("at");
var event_id=$("article.connected-fb-event").data("fb-event-id");
console.log("access_token: " + access_token);
get_event_details(event_id, access_token);
}
function get_event_details(event_id, token){
FB.api("/" + event_id, function(response){
console.log(response);
if(response.error){}}, {
access_token: token
});
}
$(document).on("click", "#placeventfinder .tabs li", function(event){
event.stopPropagation();
event.preventDefault();
console.log("switch");
$("#placeventfinder .tabs li").removeClass("active");
$(this).addClass("active");
$("#placefinder, #eventfinder").prop("hidden", true);
$("#" + $(this).attr("data-target")).prop("hidden", false);
});
var $daynight=$.cookie("daynight");
if(!$daynight){
$daynight="day";
$.cookie("daynight", "day");
}
if($daynight){
$("#daynight .switch").addClass($daynight);
$("body").addClass($daynight);
if($daynight==="night"){
$("#daynight .switch input").prop("checked", true);
}else{
$("#daynight .switch input").prop("checked", false);
}}
$(document).on("click", "#daynight", function(event){
event.stopPropagation();
event.preventDefault();
var dn=$.cookie("daynight");
if(!dn){
dn="day";
$.cookie("daynight", "day");
}
console.log(dn);
console.log("clicked, current is: " + dn);
if(dn==="night"){
console.log("day");
$.cookie("daynight", "day");
$("#daynight .switch").addClass("day").removeClass("night");
$("body").addClass("day").removeClass("night");
$("#daynight .switch input").prop("checked", false);
}else if(dn==="day"){
console.log("night");
$.cookie("daynight", "night");
$("#daynight .switch").addClass("night").removeClass("day");
$("body").addClass("night").removeClass("day");
$("#daynight .switch input").prop("checked", true);
}else{}});
$(document).on("click", "#search_btn, #site_search .mdi", function(event){
event.preventDefault();
event.stopPropagation();
$("body").toggleClass("searchOpen");
});
$(document).on("click", ".mobile-menu-toggle", function(event){
event.preventDefault();
event.stopPropagation();
$("body").toggleClass("menuOpen");
});
$(".twitter.share").click(function(event){
event.preventDefault();
var width=575, height=400, left=($(window).width() - width) / 2, top=($(window).height() - height) / 2, url=this.href, opts="status=1" + ",width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
window.open(url, "twitter", opts);
return false;
});
if(ww > 1005){
$("#event_finder").stick_in_parent().on("sticky_kit:bottom", function(e){
$(this).parent().css("position", "static");
}).on("sticky_kit:unbottom", function(e){
$(this).parent().css("position", "relative");
});
}else{
$(".entry-content > p > img").unwrap().css("width", "100%");
$(".entry-content > figure").css("width", "100%");
}
if(ww > 767){
var eventh=$(".home #front_events .content-area").height();
$(".home #front_events #event_finder").height(eventh);
}
var single=false;
if($("body").hasClass("single")){
single=true;
}
if(single){
loadSingleBanner();
}
function loadSingleBanner(){
var adstr=$("#main > article").not(".bannerinserted").attr("data-adcode");
var adstr_b=$("#main > article").not(".bannerinserted").attr("data-adcode_b");
var madstr=$("#main > article").not(".bannerinserted").attr("data-mobile_adcode");
var madstr_b=$("#main > article").not(".bannerinserted").attr("data-mobile_adcode_b");
var postid=$("#main > article").not(".bannerinserted").attr("data-postid");
var adcode=adstr.replace("zone", "");
var adcode_b=adstr_b.replace("zone", "");
var madcode=madstr.replace("zone", "");
var madcode_b=madstr_b.replace("zone", "");
adcode=parseInt(adcode);
adcode_b=parseInt(adcode_b);
madcode=parseInt(madcode);
madcode_b=parseInt(madcode_b);
console.log(adcode);
console.log(adcode_b);
console.log(madcode);
console.log(madcode_b);
console.log("1.single, and ajax loaded v1.0:" + adcode + " postid: " + postid);
$("#zone-" + postid + ".desktop.azone").insertAfter("#main > #post-" + postid + " .entry-content p:eq(0)");
$("#zone-" + postid + ".mobile.azone").insertAfter("#main > #post-" + postid + " .entry-content p:eq(0)");
$("#main > article ").not(".bannerinserted").addClass("bannerinserted");
}
function zoneCallback(e){
console.log(e);
}});
!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n(require,exports,module):e.ouibounce=n()}(this,function(e,n,o){return function(e,n){"use strict";function o(e,n){return"undefined"==typeof e?n:e}function i(e){var n=24*e*60*60*1e3,o=new Date;return o.setTime(o.getTime()+n),"; expires="+o.toUTCString()}function t(){s()||(L.addEventListener("mouseleave",u),L.addEventListener("mouseenter",r),L.addEventListener("keydown",c))}function u(e){e.clientY>k||(D=setTimeout(m,y))}function r(){D&&(clearTimeout(D),D=null)}function c(e){g||e.metaKey&&76===e.keyCode&&(g=!0,D=setTimeout(m,y))}function d(e,n){return a()[e]===n}function a(){for(var e=document.cookie.split("; "),n={},o=e.length-1;o>=0;o--){var i=e[o].split("=");n[i[0]]=i[1]}return n}function s(){return d(T,"true")&&!v}function m(){s()||(e&&(e.style.display="block"),E(),f())}function f(e){var n=e||{};"undefined"!=typeof n.cookieExpire&&(b=i(n.cookieExpire)),n.sitewide===!0&&(w=";path=/"),"undefined"!=typeof n.cookieDomain&&(x=";domain="+n.cookieDomain),"undefined"!=typeof n.cookieName&&(T=n.cookieName),document.cookie=T+"=true"+b+x+w,L.removeEventListener("mouseleave",u),L.removeEventListener("mouseenter",r),L.removeEventListener("keydown",c)}var l=n||{},v=l.aggressive||!1,k=o(l.sensitivity,20),p=o(l.timer,1e3),y=o(l.delay,0),E=l.callback||function(){},b=i(l.cookieExpire)||"",x=l.cookieDomain?";domain="+l.cookieDomain:"",T=l.cookieName?l.cookieName:"viewedOuibounceModal",w=l.sitewide===!0?";path=/":"",D=null,L=document.documentElement;setTimeout(t,p);var g=!1;return{fire:m,disable:f,isDisabled:s}}});
jQuery(function($){
$('.post-listing').append('<span class="load-more">Click here to load earlier stories</span>');
var button=$('.post-listing .load-more');
var page=2;
var loading=false;
$('body').on('click', '.load-more', function(){
if(! loading){
loading=true;
var data={
action: 'be_ajax_load_more',
nonce: loadmorelist.nonce,
page: page,
query: loadmorelist.query,
};
$.post(loadmorelist.url, data, function(res){
if(res.success){
$('.post-listing').append(res.data);
$('.post-listing').append(button);
page=page + 1;
loading=false;
}else{
}}).fail(function(xhr, textStatus, e){
});
}});
});
var advanced_ads_adblocker_test=true;