function setNotificationBarPadding(e){var t=jQuery(".js-notification-bar"),a=jQuery("body");if(!t.length)return!1;var r=t.outerHeight();r=parseInt(r,10),e?(a.css("padding-bottom",""),t.css("bottom",-r)):(a.css("padding-bottom",r),t.css("bottom",""))}function throttleFn(e,t){var a=0;return function(){var r=new Date;r-a>=t&&(e(),a=r)}}function getKartraPage(){var e=jQuery('.js_kartra_trackable_object[data-kt-type="kartra_page_tracking"]'),t="";return e&&(t=e.attr("data-kt-value")),t||!1}function checkForAffiliate(e){var t,a="kaff_"+e,r=function(e){const t=document.cookie.match("(?:(?:^|.*; *)"+e+" *= *([^;]*).*$)|^.*$")[1];if(t)return decodeURIComponent(t)}(a),i=new URLSearchParams(window.location.search),o=i.get("kaff"),n=i.get("kmid");return o&&n&&n===e?t=r&&o===r?r:o:r&&(t=r),t}jQuery(document).ready(function(){function e(){var e=o(".kartra-sticking-topmenu");d.on("scroll",function(){e.each(function(e,t){var a=o(t);a.attr("is-hidden-section")||a.attr("is-delayed-section")||(d.scrollTop()>300&&!a.hasClass("kartra-floating-topmenu")?(n.css("top",a.height()),n.css("position","relative"),a.addClass("kartra-floating-topmenu"),a.hide(),a.fadeIn()):d.scrollTop()<300&&a.hasClass("kartra-floating-topmenu")&&(a.removeClass("kartra-floating-topmenu"),n.css("top",0)))})})}function t(e){var t=1e3*parseInt(e.attr("data-delay-duration"),10),a=isFirstVisit(),r=function(e){e.addClass("js_delay_loaded"),e[0].dispatchEvent(new Event("kartra_show_hidden_asset")),e.find(".js_delayed").each(function(e,t){var a=jQuery(t);try{window.kartra.pages.init[a.attr("data-delayed-type")](a)}catch(e){}}),e.find("*[delay-replace-src]").each(function(e,t){var a=jQuery(t);a.attr("src",a.attr("delay-replace-src")),a.attr("delay-replace-src","")})};a&&"first"===e.attr("data-delay-reocur")?(e.show(),e.removeAttr("is-delayed-section"),r(e)):setTimeout(function(){e.fadeIn(500),e.removeAttr("is-delayed-section"),r(e)},t)}function a(e){return e.className.split(" ").filter(function(e){return-1!==e.indexOf("_share")})[0]}function r(e){var t={facebook_share:{winHeight:400,winWidth:555,link:"http://www.facebook.com/sharer/sharer.php?u="},twitter_share:{winHeight:350,winWidth:520,link:"http://twitter.com/intent/tweet?text="},pinterest_share:{winHeight:450,winWidth:770,link:"http://pinterest.com/pin/create/button?url="},google_share:{winHeight:500,winWidth:400,link:"https://plus.google.com/share?url="},linkedin_share:{winHeight:460,winWidth:550,link:"http://www.linkedin.com/shareArticle?mini=true&url="},whatsapp_share:{winHeight:460,winWidth:550,link:"https://api.whatsapp.com/send?text="}},a=t[e],r=screen.height/2-a.winHeight/2,i=screen.width/2-a.winWidth/2;window.open(a.link+window.location.href,"sharer","top="+r+",left="+i+",toolbar=0,status=0,width="+a.winWidth+",height="+a.winHeight)}function i(){jQuery(".row--full-screen,.content--full-screen").each(function(){jQuery(this).css({"min-height":window.innerHeight+"px"}),jQuery(this).css({height:"auto"})})}var o=jQuery,n=o("body"),d=o(window),s=getKartraPage(),c=window.kuuid,u="",l="";u=s||window.location.href.split("?")[0],l+="&referrer="+encodeURIComponent(u),l+="&kuid="+encodeURIComponent(c),o('[id^="checkout_frame_"], [id^="checkoutform_frame_"]').each(function(e,t){var a,r=o(t),i=r.parents(".checkout_form_container").first(),n=r.attr("src"),d="function"==typeof uniqueString?uniqueString():e,s=i.length&&i.attr("data-kt-owner")||"",c="";if(r.addClass("js_checkout_"+d),window.location.search&&(c=window.location.search.substring(1)),s){var u=checkForAffiliate(s);u&&(l+="&kaff="+encodeURIComponent(u))}var h=c+l+"#js_checkout_"+d;if(""===n){var p=r.attr("delay-replace-src");void 0!==p&&(a=-1!==p.indexOf("?")?"&":"?",r.attr("delay-replace-src",p+a+h))}else a=-1!==n.indexOf("?")?"&":"?",r.attr("src",n+a+h)}),"function"!=typeof window.onMessage_frame&&(window.onMessage_frame=function(e){if(void 0!==e.data&&"close"===e.data.func&&void 0===e.data.pop&&jQuery('[id^="checkoutform_"]').hide(),void 0!==e.data&&"on"===e.data.redirect&&(window.parent.location=e.data.url),void 0!==e.data&&"resize"==e.data.func&&void 0!==e.data["unique-id"]&&""!==e.data["unique-id"]){var t=o("."+e.data["unique-id"]);t.length&&(t.css("height",e.data.height+"px"),t.parent().css("height",e.data.height+"px"))}if(void 0!==e.data&&"kartra_reference_id_loaded"==e.data.func&&void 0!==e.data["unique-id"]&&""!==e.data["unique-id"]){var t=jQuery("."+e.data["unique-id"]);t.length&&(actionEvent=new CustomEvent("kartraReferenceIdLoaded",{detail:e.data.uuid}),t.parents(".checkout_form_container")[0].dispatchEvent(actionEvent))}void 0!==e.data&&e.data.message&&"kt-frame-reload"===e.data.message&&window.location.reload()}),"undefined"!=typeof Porthole&&"undefined"!=typeof windowProxy&&setTimeout(function(){windowProxy.addEventListener(window.onMessage_frame)},0),o.PubSub("hidden-query-complete").subscribe(function(){e(),o(".content").each(function(e,a){var r=o(a);r.attr("is-hidden-section")||(r.attr("is-delayed-section")?t(r):r.show())})}),o('script[src$="hiddensections.js"]').length||o.PubSub("hidden-query-complete").publish();var h=o(".google-map");h.length&&h.each(function(e,t){var a=o(t),r=a.find("#map");r.html("<iframe width='100%' height='100%' frameborder='0' style='border:0' src='https://www.google.com/maps/embed/v1/place?key=AIzaSyBlge9UR69rmWsHb7V7-dGDFOv9etdsHPs&q="+encodeURI(r.attr("location"))+"&zoom=15' allowfullscreen></iframe>")}),jQuery(".js_payment_method").parent().on("click",function(){jQuery(this).find(".js_payment_method")[0].click()});var p=jQuery("#disqus");p.length&&void 0!==p.attr("data-code")&&p.append(decodeURI(p.attr("data-code")));var f=jQuery("#facebook");f.length&&(f.find(".fb-comments").attr("data-href",window.location.href),function(e,t,a){var r,i=e.getElementsByTagName(t)[0];e.getElementById(a)||(r=e.createElement(t),r.id=a,r.src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.3",i.parentNode.insertBefore(r,i))}(document,"script","facebook-jssdk")),jQuery(document).on("click",".facebook_share, .twitter_share, .pinterest_share, .google_share, .linkedin_share, .whatsapp_share",function(e){e.preventDefault(),r(a(this))}),jQuery(".cross_btn > a").on("click",function(){jQuery(".footer-spacer").remove(),setNotificationBarPadding(!0)}),jQuery('[data-dismiss="modal"], [data-dismiss="popup-video"]').click(function(e){jQuery(this).closest(".modal").find(".kartra_video").each(function(e,t){var a=jQuery(this).find("iframe")[0];(a.contentWindow?a.contentWindow:a.contentDocument.defaultView).postMessage({func:"pause"},"*")})}),jQuery(".dg_optin").on("click",function(){jQuery(".show_modal_"+jQuery(this).attr("data-optin-pop")).length>0&&window["jquery_"+jQuery(this).attr("data-optin-pop")](".show_modal_"+jQuery(this).attr("data-optin-pop")).trigger("click"),jQuery(".show_modal_own_"+jQuery(this).attr("data-optin-pop")).length>0&&window["jquery_"+jQuery(this).attr("data-optin-pop")](".show_modal_own_"+jQuery(this).attr("data-optin-pop")).trigger("click")});var y=jQuery(".videoWrapper");if(y.length&&-1!==y.find("iframe").attr("src").indexOf("playlist")){var g=y.find("iframe"),m=g.attr("src"),_=m.indexOf("&ratio="),w=m.indexOf("&const="),v=parseFloat(m.slice(_+7,w+1)),j=parseInt(m.slice(w+7,m.length));jQuery(window).on("resize",function(){var e=y.width()*v+j;y.height(e)})}jQuery(".accordion-indicator-icon-element").on("click",function(){jQuery(this).closest(".panel").toggleClass("active-panel"),jQuery(this).closest(".panel").siblings(".panel").removeClass("active-panel")}),jQuery(".panel-title .panel-title-container > a").on("click",function(){jQuery(this).closest(".panel").toggleClass("active-panel"),jQuery(this).closest(".panel").siblings(".panel").removeClass("active-panel")}),i();var k=o(window).width();jQuery(window).on("resize",throttleFn(function(){var e=o(window).width();k!==e&&(k=e,i(),setNotificationBarPadding())},100)),window.self!==window.top&&-1===document.referrer.indexOf("kartra")&&jQuery("head").append('<base target="_parent">');var Q=document.querySelectorAll("[data-effect]");if("undefined"!=typeof IntersectionObserver&&"undefined"!=typeof MutationObserver)observer=new IntersectionObserver(function(e){function t(e){jQuery(e).addClass(jQuery(e).attr("data-effect")),observer.unobserve(e)}e.forEach(function(e){if(e.intersectionRatio>.5)if("IMG"===e.target.tagName)if(e.target.getAttribute("src")===e.target.getAttribute("data-original"))t(e.target);else{var a=new MutationObserver(function(r){r.forEach(function(r){"src"===r.attributeName&&(t(e.target),a.disconnect())})});a.observe(e.target,{attributes:!0,childList:!1,characterData:!1})}else t(e.target)})},{threshold:[0,.25,.5,.75,1]}),Q.forEach(function(e){observer.observe(e)});else for(var b=0,C=Q.length;b<C;b++)Q[b].style.visibility="visible"}),jQuery(window).on("load",function(){isPageFullyLoaded=!0;var e=isFirstVisit();if(setNotificationBarPadding(),jQuery('[data-screenshot="true"]').each(function(e,t){var a=jQuery("iframe",this).height(),r=jQuery("iframe",this).width(),i=jQuery(this).attr("data-thumbnail");jQuery(this).html('<div class="kartra_video"><img src="'+i+'" width="'+r+'" height="'+a+'"></div>')}),jQuery("a").click(function(e){if(jQuery(this).hasClass("toggle_optin")||jQuery(this).hasClass("toggle_contentbox")){var t=jQuery(this).attr("id");jQuery('[data-button="'+t+'"]').modal("show"),jQuery(".modal-backdrop").addClass("popup-modal")}}),Cookies.set(cookieLocation,!0,{expires:30}),jQuery("#popup_landing").length>0){if("every"===jQuery("#popup_landing").attr("data-reocur")||!0!==e){var t=1e3*parseInt(jQuery("#popup_landing").attr("data-delay"));setTimeout(function(){jQuery("#popup_landing").modal("show"),jQuery(".modal-backdrop").addClass("popup-modal")},t)}}if(jQuery("#popup_exit").length>0){if("every"===jQuery("#popup_exit").attr("data-reocur")||!0!==e)if("close"===jQuery("#popup_exit").attr("data-trigger"))window.onbeforeunload=function(){return jQuery("#popup_landing").modal("hide"),jQuery("#popup_exit").modal("show"),jQuery(".modal-backdrop").addClass("popup-modal"),window.onbeforeunload=null,!1};else{var a=!1;!function(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent&&e.attachEvent("on"+t,a)}(document,"mouseout",function(e){if(e=e||window.event,"input"!=e.target.tagName.toLowerCase()){var t=Math.max(document.documentElement.clientWidth,window.innerWidth||0);if(!(e.clientX>=t-50||e.clientY>=50)){e.relatedTarget||e.toElement||r()}}});var r=function(){!1===a&&(jQuery("#popup_landing").modal("hide"),jQuery("#popup_exit").modal("show"),jQuery(".modal-backdrop").addClass("popup-modal"),a=!0)}}}if(jQuery("body").on("show.bs.modal",function(e){"true"!==jQuery(e.target).attr("data-autoplay-triggered")&&(jQuery(e.target).attr("data-autoplay-triggered","true"),jQuery(e.target).find("iframe").each(function(e,t){if(jQuery(t).attr("src").indexOf("autop")>-1){var a=jQuery(t).attr("src");a=a.replace(/autoplay=false&amp;/g,""),a=a.replace(/autoplaceholder/g,"autoplay"),a=a.replace(/noautoplay/g,"autoplay"),jQuery(t).attr("src",a)}}))}),jQuery(".toggle_video").on("click",function(){var e=jQuery(this).attr("data-video");if("true"!==jQuery(this).attr("data-video-external"))jQuery(".hidden_video_holder_"+e).find("#preview_video_button").length?jQuery(".hidden_video_holder_"+e).find("#preview_video_button").trigger("click"):jQuery(".popup_trigger_"+e).trigger("click");else{var t=!1,a=function(){if(!t)return!1;var e=.5625*t.width();t.css("height",e+"px"),t[0].contentWindow.postMessage({func:"getSize"},"*")};jQuery(".popup_video_"+e).first().modal("show").off("hide.bs.modal").on("hide.bs.modal",function(){jQuery(this).find("iframe")[0].contentWindow.postMessage({func:"pause"},"*"),jQuery(window).off("resize",a)}).off("shown.bs.modal").on("shown.bs.modal",function(){t=jQuery(this).find("iframe"),a(),jQuery(window).on("resize",a),jQuery(".modal-backdrop").css("opacity",.7),jQuery(".modal-backdrop:not(.popup-modal)").css("z-index",1052),jQuery(this).css("z-index",1053)})}}),jQuery('[data-dismiss="popup-video"]').click(function(e){jQuery(this).parents(".popup-video").modal("hide")}),jQuery(".toggle_playlist").on("click",function(){var e=jQuery(this).attr("data-video");jQuery(".hidden_video_holder_"+e).find("#preview_playlist_button").length?jQuery(".hidden_video_holder_"+e).find("#preview_playlist_button").trigger("click"):jQuery(".popup_trigger_"+e).trigger("click")}),jQuery(".js_checkout_template").length>0){const i={Small:"kartra_checkout_small",Medium:"kartra_checkout_medium",Large:"kartra_checkout_large",Giant:"kartra_checkout_giant"};jQuery(".js_checkout_template").each(function(e,t){var a=jQuery(t).attr("data-kt-value"),r=jQuery(t).attr("class").match(/checkout_tpl_[\w-]*\b/)[0];""!=a&&jQuery.ajax({url:secureBaseUrl+"resource/generateCheckoutForm",type:"POST",xhrFields:{withCredentials:!0},data:{template:r,encrypted_button:a,is_dark:jQuery(t).hasClass("checkout_tpl_dark")}}).done(function(e){var r=jQuery.parseHTML(e.html),o=jQuery(t).attr("data-color"),n=void 0==jQuery(t).attr("data-buttonsize")?"Small":jQuery(t).attr("data-buttonsize"),d=jQuery(r);d.removeClass("kartra_checkout_giant").removeClass("kartra_checkout_large").removeClass("kartra_checkout_small"),d.addClass(i[n]),d.find(".js_theme_border").css("border-color",o),d.find(".js_theme_background").css("background",o),d.find(".js_theme_border_bottom").css("border-bottom-color",o),d.find(".js_theme_color").css("color",o),d.addClass("form_holder"),d.find('*[class*="col-"], .row').addClass("js_checkout-grid-element");var s=d.find(".js_kartra_reference_id").val();jQuery(t).html(d),attachKartraCheckoutFormEvents(d.find("form")),kartra_form_init_event(a),actionEvent=new CustomEvent("kartraReferenceIdLoaded",{detail:s}),jQuery(t)[0].dispatchEvent(actionEvent)})})}});