var CHERRY_API;!function(e){"use strict";CHERRY_API={name:"Cherry Js API",varsion:"1.0.0",author:"Cherry Team",variable:{$document:e(document),$window:e(window),browser:e.browser,browser_supported:!0,security:cherry_ajax,loaded_assets:{script:wp_load_style,style:wp_load_script}},status:{on_load:!1,is_ready:!1},init:function(){CHERRY_API.set_variable(),e(document).ready(CHERRY_API.ready),e(window).load(CHERRY_API.load)},set_variable:function(){CHERRY_API.variable.browser_supported=function(){var e=CHERRY_API.variable.browser,r={msie:[8]};for(var s in r)if("undefined"!=e.browser)for(var a in r[s])if(e.version<=r[s][a])return!1;return!0}()},ready:function(){CHERRY_API.status.is_ready=!0},load:function(){CHERRY_API.status.on_load=!0},utilites:{namespace:function(e){var r=e.split("."),s=CHERRY_API,a=r.length,t=0;for(t=0;a>t;t+=1)"undefined"==typeof s[r[t]]&&(s[r[t]]={}),s=s[r[t]];return s},get_compress_assets:function(r,s){var a={action:"get_compress_assets",security:CHERRY_API.variable.security,style:[],script:[]},t=/([\S.]+\/)/gim,i=/(\.js|\.css)/gim,n=s||function(){};e.isArray(r)||(r=[r]);for(var o in r){var d=r[o],u=d.replace(t,""),c=d.match(i)[0];".js"===c&&-1==e.inArray(u,CHERRY_API.variable.loaded_assets.script)&&(a.script.push(d),CHERRY_API.variable.loaded_assets.script.push(u)),".css"===c&&-1==e.inArray(u,CHERRY_API.variable.loaded_assets.style)&&(a.style.push(d),CHERRY_API.variable.loaded_assets.style.push(u))}e.get(ajaxurl,a,function(r){var s=e.parseJSON(r),a=s.style,t=s.script;if(a){var i=document.createElement("style");i.type="text/css",i.media="all",i.innerHTML=a,e("body",document).append(i)}if(t){new Function(t)()}return n()})}}},CHERRY_API.init()}(jQuery); var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith(''):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); !function(e){"use strict";CHERRY_API.utilites.namespace("tools.popup"),CHERRY_API.utilites.namespace("tools.slider"),CHERRY_API.utilites.namespace("tools.stickup"),CHERRY_API.utilites.namespace("tools.navigation"),CHERRY_API.tools.popup={init:function(e){var t=this;CHERRY_API.status.document_ready?t.render(e):CHERRY_API.variable.$document.on("ready",t.render(e))},render:function(){e.isFunction(jQuery.fn.magnificPopup)&&(e(".popup-img").each(function(){var t=e(this),n=t.data("init");(null==n||void 0==n)&&(n=new Object,n.type="image"),t.magnificPopup(n)}),e(".popup-gallery").each(function(){var t=e(this),n=t.data("popup-init");t.magnificPopup(n)}),1==cherry_data.use_lightbox&&0<=e(".single-popup-image").length&&e(".single-popup-image").magnificPopup({type:"image"}),1==cherry_data.use_lightbox&&0<=e(".single-popup-video").length&&e(".single-popup-video").magnificPopup({type:"iframe"}))}},CHERRY_API.tools.slider={init:function(e){var t=this;CHERRY_API.status.document_ready?t.render(e):CHERRY_API.variable.$document.on("ready",t.render(e))},render:function(){e.isFunction(jQuery.fn.slick)&&e(".post-gallery").each(function(){var t=e(this),n=t.data("init");n.customPaging=function(){return n.dotsFormat},t.slick(n)})}},CHERRY_API.tools.stickup={init:function(e){var t=this;CHERRY_API.status.document_ready?t.render(e):CHERRY_API.variable.$document.on("ready",t.render(e))},render:function(){e.isFunction(jQuery.fn.CherryStickUp)&&e(sticky_data.selector).CherryStickUp(sticky_data.args)}},CHERRY_API.tools.navigation={init:function(e){var t=this;CHERRY_API.status.document_ready?t.render(e):CHERRY_API.variable.$document.on("ready",t.render(e))},render:function(){var t,n,i,a,o,s=this;if(t=document.getElementById("menu-primary"),t&&(n=t.getElementsByTagName("button")[0],"undefined"!=typeof n)){if(i=t.getElementsByTagName("ul")[0],"undefined"==typeof i)return void(n.style.display="none");i.setAttribute("aria-expanded","false"),-1===i.className.indexOf("nav-menu")&&(i.className+=" nav-menu"),n.onclick=function(){-1!==t.className.indexOf("toggled")?(t.className=t.className.replace(" toggled",""),n.setAttribute("aria-expanded","false"),i.setAttribute("aria-expanded","false")):(t.className+=" toggled",n.setAttribute("aria-expanded","true"),i.setAttribute("aria-expanded","true"))},a=i.getElementsByTagName("a"),o=i.getElementsByTagName("ul");for(var r=0,u=o.length;u>r;r++)o[r].parentNode.setAttribute("aria-haspopup","true");for(r=0,u=a.length;u>r;r++)a[r].addEventListener("focus",s.toggle_focus,!0),a[r].addEventListener("blur",s.toggle_focus,!0);s.double_tap_to_go(e("li",e(i))),e("li",e(i)).hover(function(){s.show_sub(e(this))},function(){s.hide_sub(e(this))})}},show_sub:function(e){e.addClass("menu-hover")},hide_sub:function(e){var t;clearTimeout(t),t=setTimeout(function(){e.removeClass("menu-hover")},400)},double_tap_to_go:function(t){return"ontouchstart"in window||navigator.msMaxTouchPoints||navigator.userAgent.toLowerCase().match(/windows phone os 7/i)?void t.each(function(){var t=!1;e(this).on("click",function(n){var i=e(this);i[0]!=t[0]&&(n.preventDefault(),t=i)}),e(document).on("click touchstart MSPointerDown",function(n){for(var i=!0,a=e(n.target).parents(),o=0;o").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i').val(m.extraData[d].value).appendTo(w)[0]:e('').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand ("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;Ec;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;li;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); (function($){ 'use strict'; if(typeof _wpcf7=='undefined'||_wpcf7===null){ return; } _wpcf7=$.extend({ cached: 0 }, _wpcf7); $.fn.wpcf7InitForm=function(){ this.ajaxForm({ beforeSubmit: function(arr, $form, options){ $form.wpcf7ClearResponseOutput(); $form.find('[aria-invalid]').attr('aria-invalid', 'false'); $form.find('.ajax-loader').addClass('is-active'); return true; }, beforeSerialize: function($form, options){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val(''); }); return true; }, data: { '_wpcf7_is_ajax_call': 1 }, dataType: 'json', success: $.wpcf7AjaxSuccess, error: function(xhr, status, error, $form){ var e=$('
').text(error.message); $form.after(e); }}); if(_wpcf7.cached){ this.wpcf7OnloadRefill(); } this.wpcf7ToggleSubmit(); this.find('.wpcf7-submit').wpcf7AjaxLoader(); this.find('.wpcf7-acceptance').click(function(){ $(this).closest('form').wpcf7ToggleSubmit(); }); this.find('.wpcf7-exclusive-checkbox').wpcf7ExclusiveCheckbox(); this.find('.wpcf7-list-item.has-free-text').wpcf7ToggleCheckboxFreetext(); this.find('[placeholder]').wpcf7Placeholder(); if(_wpcf7.jqueryUi&&! _wpcf7.supportHtml5.date){ this.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(_wpcf7.jqueryUi&&! _wpcf7.supportHtml5.number){ this.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } this.find('.wpcf7-character-count').wpcf7CharacterCount(); this.find('.wpcf7-validates-as-url').change(function(){ $(this).wpcf7NormalizeUrl(); }); this.find('.wpcf7-recaptcha').wpcf7Recaptcha(); }; $.wpcf7AjaxSuccess=function(data, status, xhr, $form){ if(! $.isPlainObject(data)||$.isEmptyObject(data)){ return; } var $responseOutput=$form.find('div.wpcf7-response-output'); $form.wpcf7ClearResponseOutput(); $form.find('.wpcf7-form-control').removeClass('wpcf7-not-valid'); $form.removeClass('invalid spam sent failed'); if(data.captcha){ $form.wpcf7RefillCaptcha(data.captcha); } if(data.quiz){ $form.wpcf7RefillQuiz(data.quiz); } if(data.invalids){ $.each(data.invalids, function(i, n){ $form.find(n.into).wpcf7NotValidTip(n.message); $form.find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid'); $form.find(n.into).find('[aria-invalid]').attr('aria-invalid', 'true'); }); $responseOutput.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); $(data.into).trigger('wpcf7:invalid'); $(data.into).trigger('invalid.wpcf7'); }else if(1==data.spam){ $form.find('[name="g-recaptcha-response"]').each(function(){ if(''==$(this).val()){ var $recaptcha=$(this).closest('.wpcf7-form-control-wrap'); $recaptcha.wpcf7NotValidTip(_wpcf7.recaptcha.messages.empty); }}); $responseOutput.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); $(data.into).trigger('wpcf7:spam'); $(data.into).trigger('spam.wpcf7'); }else if(1==data.mailSent){ $responseOutput.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); if(data.onSentOk){ $.each(data.onSentOk, function(i, n){ eval(n) }); } $(data.into).trigger('wpcf7:mailsent'); $(data.into).trigger('mailsent.wpcf7'); }else{ $responseOutput.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); $(data.into).trigger('wpcf7:mailfailed'); $(data.into).trigger('mailfailed.wpcf7'); } if(data.onSubmit){ $.each(data.onSubmit, function(i, n){ eval(n) }); } $(data.into).trigger('wpcf7:submit'); $(data.into).trigger('submit.wpcf7'); if(1==data.mailSent){ $form.resetForm(); } $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); $responseOutput.append(data.message).slideDown('fast'); $responseOutput.attr('role', 'alert'); $.wpcf7UpdateScreenReaderResponse($form, data); }; $.fn.wpcf7ExclusiveCheckbox=function(){ return this.find('input:checkbox').click(function(){ var name=$(this).attr('name'); $(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); }; $.fn.wpcf7Placeholder=function(){ if(_wpcf7.supportHtml5.placeholder){ return this; } return this.each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')) $(this).val('').removeClass('placeheld'); }); $(this).blur(function(){ if(''==$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); }; $.fn.wpcf7AjaxLoader=function(){ return this.each(function(){ $(this).after(''); }); }; $.fn.wpcf7ToggleSubmit=function(){ return this.each(function(){ var form=$(this); if(this.tagName.toLowerCase()!='form'){ form=$(this).find('form').first(); } if(form.hasClass('wpcf7-acceptance-as-validation')){ return; } var submit=form.find('input:submit'); if(! submit.length) return; var acceptances=form.find('input:checkbox.wpcf7-acceptance'); if(! acceptances.length) return; submit.removeAttr('disabled'); acceptances.each(function(i, n){ n=$(n); if(n.hasClass('wpcf7-invert')&&n.is(':checked') || ! n.hasClass('wpcf7-invert')&&! n.is(':checked')){ submit.attr('disabled', 'disabled'); }}); }); }; $.fn.wpcf7ToggleCheckboxFreetext=function(){ return this.each(function(){ var $wrap=$(this).closest('.wpcf7-form-control'); if($(this).find(':checkbox, :radio').is(':checked')){ $(this).find(':input.wpcf7-free-text').prop('disabled', false); }else{ $(this).find(':input.wpcf7-free-text').prop('disabled', true); } $wrap.find(':checkbox, :radio').change(function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); var $freetext=$(':input.wpcf7-free-text', $wrap); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); }; $.fn.wpcf7CharacterCount=function(){ return this.each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function($target){ var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $count.closest('form').find(':input[name="' + name + '"]').each(function(){ updateCount($(this)); $(this).keyup(function(){ updateCount($(this)); }); }); }); }; $.fn.wpcf7NormalizeUrl=function(){ return this.each(function(){ var val=$.trim($(this).val()); if(val&&! val.match(/^[a-z][a-z0-9.+-]*:/i)){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; $.fn.wpcf7NotValidTip=function(message){ return this.each(function(){ var $into=$(this); $into.find('span.wpcf7-not-valid-tip').remove(); $into.append('' + message + ''); if($into.is('.use-floating-validation-tip *')){ $('.wpcf7-not-valid-tip', $into).mouseover(function(){ $(this).wpcf7FadeOut(); }); $(':input', $into).focus(function(){ $('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut(); }); }}); }; $.fn.wpcf7FadeOut=function(){ return this.each(function(){ $(this).animate({ opacity: 0 }, 'fast', function(){ $(this).css({'z-index': -100}); }); }); }; $.fn.wpcf7OnloadRefill=function(){ return this.each(function(){ var url=$(this).attr('action'); if(0 < url.indexOf('#')){ url=url.substr(0, url.indexOf('#')); } var id=$(this).find('input[name="_wpcf7"]').val(); var unitTag=$(this).find('input[name="_wpcf7_unit_tag"]').val(); $.getJSON(url, { _wpcf7_is_ajax_call: 1, _wpcf7: id, _wpcf7_request_ver: $.now() }, function(data){ if(data&&data.captcha){ $('#' + unitTag).wpcf7RefillCaptcha(data.captcha); } if(data&&data.quiz){ $('#' + unitTag).wpcf7RefillQuiz(data.quiz); }} ); }); }; $.fn.wpcf7RefillCaptcha=function(captcha){ return this.each(function(){ var form=$(this); $.each(captcha, function(i, n){ form.find(':input[name="' + i + '"]').clearFields(); form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]); }); }); }; $.fn.wpcf7RefillQuiz=function(quiz){ return this.each(function(){ var form=$(this); $.each(quiz, function(i, n){ form.find(':input[name="' + i + '"]').clearFields(); form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]); form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]); }); }); }; $.fn.wpcf7ClearResponseOutput=function(){ return this.each(function(){ $(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked').removeAttr('role'); $(this).find('span.wpcf7-not-valid-tip').remove(); $(this).find('.ajax-loader').removeClass('is-active'); }); }; $.fn.wpcf7Recaptcha=function(){ return this.each(function(){ var events='wpcf7:spam wpcf7:mailsent wpcf7:mailfailed'; $(this).closest('div.wpcf7').on(events, function(e){ if(recaptchaWidgets&&grecaptcha){ $.each(recaptchaWidgets, function(index, value){ grecaptcha.reset(value); }); }}); }); }; $.wpcf7UpdateScreenReaderResponse=function($form, data){ $('.wpcf7 .screen-reader-response').html('').attr('role', ''); if(data.message){ var $response=$form.siblings('.screen-reader-response').first(); $response.append(data.message); if(data.invalids){ var $invalids=$('
    '); $.each(data.invalids, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }}; $.wpcf7SupportHtml5=function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=['email', 'url', 'tel', 'number', 'range', 'date']; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[value]=input.type!=='text'; }); return features; }; $(function(){ _wpcf7.supportHtml5=$.wpcf7SupportHtml5(); $('div.wpcf7 > form').wpcf7InitForm(); }); })(jQuery); jQuery(document).ready(function(){ jQuery(window).scroll(function (){ if(jQuery(this).scrollTop() > 100){ jQuery('#back-top').addClass('show-totop'); }else{ jQuery('#back-top').removeClass('show-totop'); }}); jQuery('#back-top a').click(function (){ jQuery('body,html').stop(false, false).animate({ scrollTop: 0 }, 800); return false; }); }); jQuery(document).ready(function(){ add_drop_event(jQuery("#static-area-header-top .searchform-wrapper-head .icon-wrap"), jQuery("#static-area-header-top .searchform-wrapper-head, #static-area-header-top .searchform ")); function add_drop_event(drop_btn, drop_block){ if(drop_btn.length&&drop_block.length){ drop_btn.click(function(event){ if(drop_block.hasClass('active')){ drop_block.removeClass("active"); }else{ drop_block.addClass("active"); }}); jQuery(document).click(function(event){ if(jQuery(event.target).closest(drop_btn).length||jQuery(event.target).closest(drop_block).length) return; if(drop_block.hasClass('active')) drop_block.removeClass("active"); event.stopPropagation(); }); }} }); !function(t){t.fn.CherryStickUp=function(e){function o(){a=parseInt(n.offset().top),f=parseInt(n.css("margin-top")),u=parseInt(n.outerHeight(!0)),i.pseudo&&(t('
    ').insertAfter(n),c=t(".pseudoStickyBlock"),c.css({position:"relative",display:"block"})),i.active&&s()}function s(){p.on("scroll",function(){r=t(this).scrollTop(),h=r>S?"down":"up",S=r,correctionValue=0!=k.length?k.outerHeight(!0):0,d=parseInt(l.scrollTop()),d>a-correctionValue?(n.addClass("isStick"),v.addClass("isStick"),i.pseudo?(n.css({position:"fixed",top:correctionValue}),c.css({height:u})):n.css({position:"fixed",top:correctionValue})):(n.removeClass("isStick"),v.removeClass("isStick"),i.pseudo?(n.css({position:"relative",top:0}),c.css({height:0})):n.css({position:"absolute",top:0}))}).trigger("scroll"),p.on("resize",function(){n.hasClass("isStick")?a!=parseInt(c.offset().top)&&(a=parseInt(c.offset().top)):a!=parseInt(n.offset().top)&&(a=parseInt(n.offset().top))})}var i={correctionSelector:".correctionSelector",listenSelector:".listenSelector",active:!1,pseudo:!0};t.extend(i,e);var c,r,n=t(this),l=t(window),p=t(document),a=0,u=0,f=0,d=0,S=0,h="",k=t(i.correctionSelector),v=t(i.listenSelector);0!=n.length&&o()}}(jQuery); !function(a){a.fn.hoverIntent=function(b,c,d){var e={interval:100,sensitivity:6,timeout:0};e="object"==typeof b?a.extend(e,b):a.isFunction(c)?a.extend(e,{over:b,out:c,selector:d}):a.extend(e,{over:b,out:b,selector:c});var f,g,h,i,j=function(a){f=a.pageX,g=a.pageY},k=function(b,c){return c.hoverIntent_t=clearTimeout(c.hoverIntent_t),Math.sqrt((h-f)*(h-f)+(i-g)*(i-g))0||navigator.msMaxTouchPoints>0},h=function(e){return e.parents("li.item-type-megamenu").length?!0:!1},i=function(){var e=window.innerWidth;e<=m.settings.mobile?s():r()},s=function(){m.addClass("mega-menu-mobile-on").css("display","none").siblings(".cherry-mega-menu-mobile-trigger").addClass("mega-menu-mobile-on"),m.find(".cherry-mega-menu-sub").each(function(){e(this).css("display","none")}),m.find(".cherry-mega-menu-has-children").each(function(){var t=e(this).data("hide-mobile");e(this).addClass(t)}),v=!0},r=function(){m.removeClass("mega-menu-mobile-on").css("display","block").siblings(".cherry-mega-menu-mobile-trigger").removeClass("mega-menu-mobile-on"),m.find(".cherry-mega-menu-sub").each(function(){e(this).css("display","block")}),m.find(".cherry-mega-menu-has-children").each(function(){var t=e(this).data("hide-mobile");e(this).removeClass(t)}),v=!1},g=function(t){if(t.indexOf("%")>=0){var n=e(m.settings.parent).width();return n=n*parseInt(t)/100}if(t.indexOf("px")>=0){var n=parseInt(t);return n}return 0},o=function(){e(".mega-toggle-on > a",m).each(function(){c(e(this),!0)})},c=function(e){e.parent().removeClass("mega-toggle-on cherry-mega-menu-hover").triggerHandler("close_panel"),e.siblings(".cherry-mega-menu-sub").removeClass("active-sub").addClass("in-transition"),clearTimeout(n),n=setTimeout(function(){e.siblings(".cherry-mega-menu-sub").removeClass("in-transition")},cherry_mega_menu_data.duration),1==v&&e.siblings(".cherry-mega-menu-sub").slideUp("fast")},l=function(t){if(!v){var n=t.parent();n.addClass("cherry-mega-menu-hover").siblings().find(".mega-toggle-on").addBack(".mega-toggle-on").children("a").each(function(){c(e(this),!0)});var a="100%",i=n.data("sub-type"),s=n.data("width-fullscreen"),r=n.data("width-desktop"),o=n.data("width-tablet"),l=e(document).width(),u=n.data("sub-hr-position"),d=n.data("sub-vr-position"),h=u,f=new Object,y=cherry_mega_menu_data.duration;switch(f["-webkit-transition-duration"]=y+"ms",f["-moz-transition-duration"]=y+"ms",f["transition-duration"]=y+"ms","vertical"==m.settings.direction&&(h=d),"fullwidth"!=h&&l>=p?a=s:"fullwidth"!=h&&l>=b&&p>l?a=r:"fullwidth"!=h&&b>l&&(a=o),h){case"fullwidth":if("standard"==i){a=null;break}var a=g(a),k=a/2,w=e(m.settings.parent).offset().left-m.offset().left+parseInt(e(m.settings.parent).css("padding-left"))+parseInt(e(m.settings.parent).css("border-left-width"));f.left=w+"px";break;case"center":if("standard"==i){a=null;break}var C=g(a),k=C/2;f.left="50%",f["margin-left"]="-"+k+"px";break;case"left-container":if("standard"==i){a=null;break}f.left="0",f.right="auto";break;case"right-container":if("standard"==i){a=null;break}f.left="auto",f.right="0";break;case"left-parent":if("standard"==i){a=null;break}var w=n.position().left;f.left=w+"px",f.right="auto","100%"==a&&w>0&&(a="auto",f.right="0");break;case"right-parent":if("standard"==i){a=null;break}var x=m.offset().left+parseInt(m.css("border-left-width"))+m.width()-n.offset().left-n.width();f.left="auto",f.right=x+"px","100%"==a&&x>0&&(a="auto",f.left="0");break;case"vertical-full":var _=0;"standard"==i&&(_=e(m.settings.parent).offset().top-n.offset().top),f.top=_+"px",f.left="100%",f.right="auto";break;case"vertical-parent":var _=n.offset().top-m.offset().top;"standard"==i&&(_=0),f.top=_+"px",f.left="100%",f.right="auto"}void 0!=a&&"vertical"==m.settings.direction&&a.indexOf("%")>=0&&(a="auto"),null!=a&&(f.width=a),n.addClass("mega-toggle-on").triggerHandler("open_panel"),t.siblings(".cherry-mega-menu-sub").css(f).addClass("active-sub"),1==v&&t.siblings(".cherry-mega-menu-sub").slideDown("fast")}},u=function(){e(document).on("click touchstart",function(t){e(t.target).closest(".cherry-mega-menu li").length||(e(".mega-click-click-go").each(function(){e(this).removeClass("mega-click-click-go")}),o())}),e("li.cherry-mega-menu-has-children > a",m).on({click:function(t){e(this).parent().hasClass("item-hide-mobile")||(e(this).parent().hasClass("mega-click-click-go")?e(this).parent().removeClass("mega-click-click-go"):(t.preventDefault(),e(this).parent().hasClass("mega-toggle-on")?c(e(this),!1):l(e(this)),e(this).parent().addClass("mega-click-click-go")))}})},d=function(){e("li.cherry-mega-menu-has-children",m).hoverIntent({over:function(){var t=h(e(this));t||l(e(this).children("a"))},out:function(){var t=h(e(this));t||e(this).hasClass("mega-toggle-on")&&c(e(this).children("a"),!1)},timeout:800})},(f=function(){m.removeClass("cherry-mega-no-js"),a()||"click"===m.settings.event?u():d(),e(window).on("debouncedresize",function(){i()}).trigger("debouncedresize")})()}}(jQuery),jQuery(document).ready(function(){"use strict";jQuery(".cherry-mega-menu").each(function(){jQuery(this).megaMenu()})}); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); !function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()},setCookie:function(e,t,i,n,o,s){var c=new Date;c.setHours(c.getHours()+24*(i||365));var a=[e+"="+t,"expires="+c.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss",allowall:"allowall",savesettings:"savesettings",detailed:"detailed"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",savesettings:"Save Settings",link:"Learn more",href:"https://www.cookiesandyou.com",close:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}} {{link}}',messageswitchlink:'{{message}} {{link}}
    {{allswitches}}
    ',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',savesettings:'{{savesettings}}',allowall:'{{allow}}',link:'{{link}}',close:'{{close}}',switch:'{{label}}'},window:'',revokeBtn:'
    {{policy}}
    ',blockingScreen:'
    ',blockScreen:!1,compliance:{info:'
    {{dismiss}}
    ',"opt-in":'
    {{deny}}{{allow}}
    ',"opt-out":'
    {{deny}}{{allow}}
    ',detailed:'
    {{savesettings}}
    ',detailedRev:'
    {{savesettings}}{{allowall}}
    '},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}",detailed:"{{messageswitchlink}}{{compliance}}"},cookietypes:null,layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!0,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function c(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function r(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";return t.isMobile()&&(i="floating"),i}function l(n){var o=this.options,s=document.createElement("div"),c=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),c=s&&s[1]||!1;c&&(this.setStatus(c),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)),a}function h(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options;positionStyle=r.call(this);var n=["cc-"+positionStyle,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&n.push("cc-static");n.push.apply(n,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},c=n.popup,a=n.button,r=n.highlight,l=n.switches;c&&(c.text=c.text?c.text:t.getContrast(c.background),c.link=c.link?c.link:c.text,s[o+".cc-window"]=["color: "+c.text,"background-color: "+c.background],s[o+".cc-revoke"]=["color: "+c.text,"background-color: "+c.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+c.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||h(a.background))]),r?(r.text=r.text?r.text:t.getContrast(r.background),r.border=r.border?r.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text]));l&&(s[".cc-slider"]=["background-color: "+l.background+"!important"],s[".cc-slider:before"]=["background-color: "+l.switch+"!important"],s[".cc-switch-label"]=["color: "+l.text],s["input:checked+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"],s["input:focus+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"]);var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var d=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++d)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&n.push(this.customStyleSelector);return n}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);if(i.cookietypes){var n="",o=this.options.cookie;i.cookietypes.forEach(function(e){var s=e.checked,c=t.getCookie(o.name+"_"+e.cookie_suffix);"deny"===c&&(s=""),"allow"===c&&(s="checked"),n+=i.elements.switch.replace(/\{\{cc\-cookietype\-id\}\}/g,e.cookie_suffix).replace(/\{\{label\}\}/g,e.label).replace(/\{\{checked\}\}/g,s).replace(/\{\{disabled\}\}/g,e.disabled).replace(/\{\{theme\}\}/g,i.theme)}),i.elements.messageswitchlink=i.elements.messageswitchlink.replace(/\{\{allswitches\}\}/g,n).replace("{{allswitchesclasses}}",function(){positionStyle=r.call(this);var e=["cc-"+positionStyle];this.customStyleSelector&&e.push(this.customStyleSelector);return e}.call(this).join(" "))}Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var s=i.compliance[i.type];s||(s=i.compliance.info);e.compliance=t.interpolateString(s,function(t){return e[t]});var c=i.layouts[i.layout];c||(c=i.layouts.basic);return t.interpolateString(c,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var c=l.call(this,'
    '+o+"
    ");c.style.display="",this.element=c.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=l.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var c=function(t){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",c,{passive:!0}),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=c,window.addEventListener("scroll",c,{passive:!0}))}var a=this.options.dismissOnWindowClick,r=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,c=o.path.length,a=r.length,h=0;ho&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen(),function(){try{link=document.getElementById("nsc_bar_link_show_banner")}catch(e){link=null}this.shortCodeLink=function(){this.revokeChoice()}.bind(this),link&&link.addEventListener("click",this.shortCodeLink)}.call(this)},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(function(){if(1!=this.options.blockScreen)return!1;var e=this.options.blockingScreen;this.blockingScreen=l.call(this,e),this.blockingScreen.style.display=""}.call(this),e.hasTransition?this.fadeIn():this.element.style.display="",1==this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,t&&1==this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&c.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=c.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss||i==e.status.allowall},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&1==this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),function(e){var i=this.options,n=this.options.cookie;i.cookietypes&&i.cookietypes.forEach(function(i){try{var o;o="allowall"==e?"allow":document.querySelector("input[id="+i.cookie_suffix+"]").checked?"allow":"deny",t.setCookie(n.name+"_"+i.cookie_suffix,o,n.expiryDays,n.domain,n.path,n.secure)}catch(e){}})}.call(this,i),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var c=0,a=o.length;c3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);"detailed"!=i.type&&"detailedRev"!=i.type||(i.layout="detailed"),n||(n=function(){}),o||(o=function(){});var c=Object.keys(e.status),a=t.getCookie("cookieconsent_status");c.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});