var LLMS=window.LLMS||{};!function(l){"use strict";var t,e,n;LLMS.Achievements={init:function(){var t;l(".llms-achievement").length&&(t=this,l(function(){t.bind(),t.maybe_open()}))},bind:function(){var n=this;l(".llms-achievement").each(function(){n.create_modal(l(this))}),l(".llms-achievement").on("click",function(){var t=l(this),e="achievement-"+t.attr("data-id"),e=l("#"+e);e.length||n.create_modal(t),e.iziModal("open")})},create_modal:function(e){var t="achievement-"+e.attr("data-id"),n=l("#"+t);n.length||(n=l('
'),l("body").append(n)),n.iziModal({headerColor:"#3a3a3a",group:"achievements",history:!0,loop:!0,overlayColor:"rgba( 0, 0, 0, 0.6 )",transitionIn:"fadeInDown",transitionOut:"fadeOutDown",width:340,onOpening:function(t){t.setTitle(e.find(".llms-achievement-title").html()),t.setSubtitle(e.find(".llms-achievement-date").html()),t.setContent('
'+e.html()+"
")},onClosing:function(){window.history.pushState("",document.title,window.location.pathname+window.location.search)}})},maybe_open:function(){var t=window.location.hash.split("-");2===t.length&&(t[1]=parseInt(t[1]),"#achievement-"===t[0]&&Number.isInteger(t[1])&&(t=document.querySelector(`a[href="${t.join("-")}"]`))&&t.click())}},LLMS.Ajax={url:window.ajaxurl||window.llms.ajaxurl,type:"post",data:[],cache:!1,dataType:"json",async:!0,response:[],init:function(t){if(null===t||"object"!=typeof t)return!1;t.url=("url"in t?t:this).url,t.type=("type"in t?t:this).type,t.data=("data"in t?t:this).data,t.cache=("cache"in t?t:this).cache,t.dataType=("dataType"in t?t:this).dataType,t.async=("async"in t?t:this).async,t.data._ajax_nonce=window.llms.ajax_nonce||wp_ajax_data.nonce;var e=LLMS.Rest.get_query_vars();return t.data.post_id="post"in e?e.post:null,!t.data.post_id&&l("input#post_ID").length&&(t.data.post_id=l("input#post_ID").val()),t},call:function(t){t=this.init(t);return!!t&&(this.request(t),this)},request:function(t){return l.ajax(t),this}},LLMS.Donut=function(t){function e(t){this.settings=l.extend({element:t.element,percent:100},t),this.circle=this.settings.element.find("path"),this.settings.stroke_width=parseInt(this.circle.css("stroke-width")),this.radius=(parseInt(this.settings.element.css("width"))-this.settings.stroke_width)/2,this.angle=l("body").hasClass("rtl")?82.5:97.5,this.i=Math.round(.75*this.settings.percent),this.first=!0,this.increment=l("body").hasClass("rtl")?-5:5,this.animate=function(){this.timer=setInterval(this.loop.bind(this),10)},this.loop=function(){this.angle+=this.increment,this.angle%=360;var t,e=this.angle/180*Math.PI,n=this.radius+this.settings.stroke_width/2+Math.cos(e)*this.radius,e=this.radius+this.settings.stroke_width/2+Math.sin(e)*this.radius;!0===this.first?(t=this.circle.attr("d")+" M "+n+" "+e,this.first=!1):t=this.circle.attr("d")+" L "+n+" "+e,this.circle.attr("d",t),this.i--,this.i<=0&&clearInterval(this.timer)}}(t=t).append(''),new e({element:t,percent:t.attr("data-perc")}).animate()},LLMS.Forms={address_info:{},$cities:null,$countries:null,$states:null,$states_holder:null,init:function(){var t;l("body").hasClass("wp-admin")&&!l("body").hasClass("profile-php")&&!l("body").hasClass("user-edit-php")||((t=this).bind_matching_fields(),t.bind_voucher_field(),t.bind_edit_account(),t.bind_l10n_selects())},bind_edit_account:function(){l("form.llms-person-form.edit-account").length&&l(".llms-toggle-fields").on("click",this.handle_toggle_click)},bind_l10n_selects:function(){var e=this;e.$cities=l("#llms_billing_city"),e.$countries=l(".llms-l10n-country-select select"),e.$states=l(".llms-l10n-state-select select"),e.$zips=l("#llms_billing_zip"),e.$countries.length&&LLMS.wait_for(function(){return void 0!==l.fn.llmsSelect2},function(){e.$states.length&&e.prep_state_field(),e.$countries.add(e.$states).llmsSelect2({width:"100%"}),window.llms.address_info&&(e.address_info=JSON.parse(window.llms.address_info)),e.$countries.on("change",function(){var t=l(this).val();e.update_locale_info(t)}).trigger("change")},"llmsSelect2")},bind_matching_fields:function(){l("input[data-match]").not('[type="password"]').each(function(){var n,i=l(this),s=l("#"+i.attr("data-match"));s.length&&(n=i.closest(".llms-form-field").add(s.closest(".llms-form-field")),i.on("input change",function(){var t=i.val(),e=s.val();t&&e&&t!==e?n.addClass("invalid"):n.removeClass("invalid")}))})},bind_voucher_field:function(){l("#llms-voucher-toggle").on("click",function(t){t.preventDefault(),l("#llms_voucher").toggle()})},get_field_parent:function(t){return t.closest(".llms-form-field")},get_label_text:function(t){t=t.clone();return t.find("*").remove(),t.text().trim()},handle_toggle_click:function(t){t.preventDefault();var t=l(this),e=l(l(this).attr("data-fields")),n=t.attr("data-is-showing")||"no",i="yes"===n?"hide":"show",s="yes"===n?"disabled":null,o="yes"===n?"data-change-text":"data-cancel-text";e.each(function(){l(this).closest(".llms-form-field")[i](),l(this).attr("disabled",s)}),t.text(t.attr(o)),t.attr("data-is-showing","yes"===n?"no":"yes")},prep_state_field:function(){var t=this.$states.closest(".llms-form-field");this.$holder=l('",{name:t.attr("name"),class:t.attr("class")+" hidden",type:"hidden"}).insertAfter(t),t.attr("disabled","disabled"),this.get_field_parent(t).hide()},enable_field:function(t){t.removeAttr("disabled"),t.next(".hidden[name="+t.attr("name")+"]").detach(),this.get_field_parent(t).show()}},LLMS.Instructors={init:function(){var t=this;l("body").hasClass("wp-admin")||l(".llms-instructors").length&&LLMS.wait_for_matchHeight(function(){t.bind()})},bind:function(){l(".llms-instructors .llms-author").matchHeight()}},LLMS.l10n=LLMS.l10n||{},LLMS.l10n.translate=function(t){return this.strings[t]||t},LLMS.l10n.replace=function(t,e){var n=this.translate(t);return l.each(e,function(t,e){-1!==t.indexOf("s")?e=e.toString():-1!==t.indexOf("d")&&(e=+e),n=n.replace(t,e)}),n},LLMS.LessonPreview={$els:null,init:function(){var t=this;this.$locked=l(".llms-lesson-locked"),this.$locked.length&&t.bind(),l(".llms-course-navigation").length&&LLMS.wait_for_matchHeight(function(){t.match_height()})},bind:function(){var n=this;this.$locked.on("mouseenter",function(){var t,e=l(this).find(".llms-tooltip");e.length||(t=(t=l(this).attr("data-tooltip-msg"))||LLMS.l10n.translate("You do not have permission to access this content"),e=n.get_tooltip(t),l(this).append(e)),setTimeout(function(){e.addClass("show")},10)}),this.$locked.on("mouseleave",function(){l(this).find(".llms-tooltip").removeClass("show")})},match_height:function(){l(".llms-course-navigation .llms-lesson-link").matchHeight()},get_tooltip:function(t){var e=l('
');return e.append(l("
",{class:"llms-tooltip-content","aria-hidden":"true"}).text(t)),e}},LLMS.OutlineCollapse={$outlines:null,init:function(){this.$outlines=l(".llms-widget-syllabus--collapsible"),this.$outlines.length&&this.bind()},bind:function(){var i=this;this.$outlines.each(function(){var t=l(this),e=t.find(".llms-section .section-header");e.on("click",function(t){t.preventDefault();var e=l(this).closest(".llms-section");switch(i.get_section_state(e)){case"closed":i.open_section(e);break;case"opened":i.close_section(e)}}),t.find(".llms-collapse-toggle").on("click",function(t){t.preventDefault();var n="close"===l(this).attr("data-action")?"opened":"closed";e.each(function(){var t=l(this).closest(".llms-section"),e=i.get_section_state(t);if(n!==e)return!0;switch(e){case"closed":i.close_section(t);break;case"opened":i.open_section(t)}l(this).trigger("click")})})})},close_section:function(t){t.removeClass("llms-section--opened").addClass("llms-section--closed")},open_section:function(t){t.removeClass("llms-section--closed").addClass("llms-section--opened")},get_section_state:function(t){return t.hasClass("llms-section--opened")?"opened":"closed"}},l.extend(LLMS.PasswordStrength,{$meter:l(".llms-password-strength-meter"),$pass:null,$conf:null,$form:null,init:function(){var t;l("body").hasClass("wp-admin")||this.setup_references()&&(t=this,LLMS.wait_for(function(){return"undefined"!=typeof wp&&void 0!==wp.passwordStrength},function(){t.bind(),t.$form.trigger("llms-password-strength-ready")}))},bind:function(){var t=this;this.$form.hasClass("llms-checkout")||t.$form.on("submit",t,t.submit),t.$pass.add(t.$conf).on("keyup",function(){t.check_strength()})},check_strength:function(){var t=this.$pass.closest(".llms-form-field"),e=this.$conf&&this.$conf.length?this.$conf.closest(".llms-form-field"):null,n=this.$pass.val().length,i=this.$conf&&this.$conf.length?this.$conf.val().length:0;n||i?(this.get_current_strength_status()?(t.removeClass("invalid").addClass("valid"),i&&e.removeClass("invalid").addClass("valid")):(t.removeClass("valid").addClass("invalid"),i&&e.removeClass("valid").addClass("invalid")),this.$meter.removeClass("too-short very-weak weak medium strong mismatch"),this.$meter.show().addClass(this.get_current_strength("slug")),this.$meter.html(this.get_current_strength("text"))):(t.removeClass("valid invalid"),e&&e.removeClass("valid invalid"),this.$meter.hide())},checkout:function(t,e){t.get_current_strength_status()?e(!0):e(LLMS.l10n.translate("There is an issue with your chosen password."))},get_blocklist:function(){var e=wp.passwordStrength.userInputDisallowedList().concat(this.get_setting("blocklist",[]));return this.$form.find('input[type="text"], input[type="email"], input[type="tel"], input[type="number"]').each(function(){var t=l(this).val();t&&e.push(t)}),e},get_current_strength:function(t){t=t||"int";var e,n=this.$pass.val(),i=this.$conf&&this.$conf.length?this.$conf.val():"";return n.length');return e.append(t.$element.closest(".llms-access-plan").find(".llms-access-plan-restrictions ul").clone()),e},placement:"top",style:"inverse",title:LLMS.l10n.translate("Members Only Pricing"),width:"280px"})})}},LLMS.Quiz_Attempt={init:function(){l(".llms-quiz-attempt-question-header a.toggle-answer").on("click",function(t){t.preventDefault();t=l(this).closest("header").next(".llms-quiz-attempt-question-main");l(this).closest("li").siblings().find(".llms-quiz-attempt-question-main").slideUp(200),t.is(":visible")?t.slideUp(200):t.slideDown(200)})}},LLMS.Review={init:function(){this.bind()},bind:function(){l("#llms_review_submit_button").click(function(){""!==l("#review_title").val()&&""!==l("#review_text").val()?jQuery.ajax({type:"post",dataType:"json",url:window.llms.ajaxurl,data:{action:"LLMSSubmitReview",review_title:l("#review_title").val(),review_text:l("#review_text").val(),pageID:l("#post_ID").val(),llms_review_nonce:l("#llms_review_nonce").val()},success:function(){console.log("Review success"),l("#review_box").hide("swing"),l("#thank_you_box").show("swing")},error:function(t,e,n){console.log(t),console.log(e),console.log(n)}}):(""===l("#review_title").val()?l("#review_title_error").show("swing"):l("#review_title_error").hide("swing"),""===l("#review_text").val()?l("#review_text_error").show("swing"):l("#review_text_error").hide("swing"))}),l("#_llms_display_reviews").attr("checked")?(l(".llms-num-reviews-top").addClass("top"),l(".llms-num-reviews-bottom").show()):l(".llms-num-reviews-bottom").hide(),l("#_llms_display_reviews").change(function(){l("#_llms_display_reviews").attr("checked")?(l(".llms-num-reviews-top").addClass("top"),l(".llms-num-reviews-bottom").show()):(l(".llms-num-reviews-top").removeClass("top"),l(".llms-num-reviews-bottom").hide())})}},t=function(){function a(){for(var t=0,e={};ts.get("events",[]).length)&&(e=s.getAll(),s.clear("events"),e.events.push(t),LLMS.Ajax.call({data:{action:"persist_tracking_events","llms-tracking":JSON.stringify(e)},error:function(t,e,n){console.log(t,e,n)},success:function(t){"error"===t.code&&console.log(t.code,t.message)}})))},this.getSettings=function(){return n},this.makeEventObj=function(t){return l.extend(t,{url:window.location.href,time:Math.round((new Date).getTime()/1e3)})},l("body").hasClass("wp-admin")||(i.addEvent("page.load"),window.addEventListener("beforeunload",t),window.addEventListener("pagehide",e),document.addEventListener("visibilitychange",o))},llms.tracking=new LLMS.Tracking(llms.tracking),LLMS.PasswordVisibility={init:function(){this.$toggleButtons=l(".llms-visibility-toggle button"),this.$toggleButtons.length&&(this.$toggleButtons.removeClass("hide-if-no-js"),this.bind())},bind:function(){var e=this;this.$toggleButtons.off("click").on("click",function(t){e.toggleVisibility(l(this))})},toggleVisibility:function(t){var e=parseInt(t.attr("data-toggle"),10),n=t.closest(".llms-form-fields").find("input.llms-field-input"),i=t.find("i"),s=t.find(".llms-visibility-toggle-state");1===e?(n.filter('[type="password"]').attr("type","text"),t.attr("data-toggle",0),i.removeClass("fa-eye").addClass("fa-eye-slash"),s.text(LLMS.l10n.translate("Hide Password"))):(n.filter('[type="text"]').attr("type","password"),t.attr("data-toggle",1),i.removeClass("fa-eye-slash").addClass("fa-eye"),s.text(LLMS.l10n.translate("Show Password")))}},jQuery(document).ready(function(t){LLMS.PasswordVisibility.init()}),LLMS.Rest={init:function(){this.bind()},bind:function(){},is_path:function(t){for(var e=!1,n=window.location.href,i=0;i{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};i.r(s),i.d(s,{get:()=>o,start:()=>function(t){let e=1{t=o(t,e,!1);t&&(t.style.display="block")})},stop:()=>function(t){a(t).forEach(t=>{t=o(t,c,!1);t&&(t.style.display="none")})}});const r="llms-spinning",c="default",d=window.wp.i18n;function a(t){if((t="string"==typeof t?document.querySelectorAll(t):t)instanceof NodeList)return Array.from(t);const e=[];return t instanceof Element?e.push(t):"undefined"!=typeof jQuery&&t instanceof jQuery&&t.toArray().forEach(t=>e.push(t)),e}function o(t){var e,n,i=1n===t.parentNode):null)||function(t,e){var e=1${i}`,n.classList.add(r),t.appendChild(n),n}(e,i),s&&"undefined"!=typeof jQuery?jQuery(o):o):null}window.LLMS=window.LLMS||{},window.LLMS.Spinner=s}LLMS.init=function(){for(var t in LLMS)"object"==typeof LLMS[t]&&null!==LLMS[t]&&void 0!==LLMS[t].init&&"function"==typeof LLMS[t].init&&LLMS[t].init()},LLMS.is_touch_device=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)||(t=["(",t.join("touch-enabled),("),"heartz",")"].join(""),window.matchMedia(t).matches)},LLMS.wait_for_matchHeight=function(t){this.wait_for(function(){return void 0!==l.fn.matchHeight},t,"matchHeight")},LLMS.wait_for_popover=function(t){this.wait_for(function(){return void 0!==l.fn.webuiPopover},t,"webuiPopover")},LLMS.wait_for=function(t,e,n){var i,s=0;n=n||"unnamed",i=setInterval(function(){if(300<=s)console.log("Unable to load dependency: "+n);else{if(!t())return void s++;e()}clearInterval(i)},100)},LLMS.init(l)}(jQuery); //# sourceMappingURL=../maps/js/llms.min.js.map ; function Ajax(t,a,c){this.type=t,this.data=a,this.cache=c,this.dataType="json",this.url=window.ajaxurl||window.llms.ajaxurl}Ajax.prototype.check_voucher_duplicate=function(){jQuery.ajax({type:this.type,url:this.url,data:this.data,cache:this.cache,dataType:this.dataType,success:function(t){llms_on_voucher_duplicate(t.duplicates)}})}; //# sourceMappingURL=../maps/js/llms-ajax.min.js.map ; !function(l){window.llms=window.llms||{},window.llms.checkout=new function(){var s=[],o=[];return this.$checkout_form=l("#llms-product-purchase-form"),this.$confirm_form=l("#llms-product-purchase-confirm-form"),this.$form_sections=!1,this.form_action=!1,this.init=function(){var e=this;l(".llms-checkout-wrapper").length&&this.bind_login(),this.$checkout_form.length?(this.form_action="checkout",this.$form_sections=this.$checkout_form.find(".llms-checkout-section"),this.$checkout_form.on("submit",this,this.submit),document.querySelector("html").style.scrollBehavior="auto",l(".llms-password-strength-meter").length&&this.add_before_submit_event({data:LLMS.PasswordStrength,handler:LLMS.PasswordStrength.checkout}),this.bind_coupon(),this.bind_gateways(),l(document).trigger("llms-checkout-refreshed")):this.$confirm_form.length&&(this.form_action="confirm",this.$form_sections=this.$confirm_form.find(".llms-checkout-section"),this.$confirm_form.on("submit",function(){e.processing("start")}))},this.add_before_submit_event=function(e){e.handler&&"function"==typeof e.handler&&(e.data||(e.data=null),s.push(e))},this.add_error=function(e,t){var o="llms-checkout-errors";($err=l("#"+o)).length||($err=l('
    '),l(".llms-checkout-wrapper").prepend($err)),$err.append("
  • "+e+"
  • "),t&&console.error(t)},this.add_gateway=function(e){o.push(e)},this.bind_coupon=function(){var t=this;l('a[href="#llms-coupon-toggle"]').on("click",function(e){e.preventDefault(),l(".llms-coupon-entry").slideToggle(400)}),l("#llms-apply-coupon").on("click",function(e){e.preventDefault(),t.coupon_apply(l(this))}),l("#llms-remove-coupon").on("click",function(e){e.preventDefault(),t.coupon_remove(l(this))})},this.bind_gateways=function(){this.load_gateways(),l('input[name="llms_payment_gateway"]').length||l("#llms_create_pending_order").removeAttr("disabled"),l('input[name="llms_payment_gateway"]').on("change",function(){l('input[name="llms_payment_gateway"]').each(function(){var e=l(this),t=e.closest(".llms-payment-gateway"),o=t.find(".llms-gateway-fields").find("input, textarea, select"),s=e.is(":checked");t[s?"addClass":"removeClass"]("is-selected"),s?(o.removeAttr("disabled"),l(".llms-payment-gateways").trigger("llms-gateway-selected",{id:e.val(),$selector:t})):o.attr("disabled","disabled")})}),l(".llms-payment-gateways").on("llms-gateway-selected",function(e,t){var o=l("#llms_create_pending_order");t.$selector&&t.$selector.find(".llms-gateway-fields .invalid").length?o.attr("disabled","disabled"):o.removeAttr("disabled")})},this.bind_login=function(){l('a[href="#llms-show-login"]').on("click",function(e){e.preventDefault(),l(this).closest(".llms-info,.llms-notice").slideUp(400),l("form.llms-login").slideDown(400)})},this.clear_errors=function(){l("#llms-checkout-errors").remove()},this.coupon_apply=function(e){var o=this,t=l("#llms_coupon_code").val(),s=l(".llms-coupon-messages"),n=s.find(".llms-error"),r=l("form.llms-checkout");LLMS.Spinner.start(r),window.LLMS.Ajax.call({data:{action:"validate_coupon_code",code:t,plan_id:l("#llms-plan-id").val()},beforeSend:function(){n.hide()},success:function(e){var t;LLMS.Spinner.stop(r),"error"===e.code?(t=l("
  • "+e.message+"
  • "),n.length?n.empty():(n=l('
      '),s.append(n)),t.appendTo(n),n.show()):e.success&&(l(".llms-coupon-wrapper").replaceWith(e.data.coupon_html),o.bind_coupon(),l(".llms-payment-gateways").replaceWith(e.data.gateways_html),o.bind_gateways(),l(".llms-order-summary").replaceWith(e.data.summary_html),l(document).trigger("llms-checkout-refreshed"))}})},this.coupon_remove=function(e){var t=this,o=l("form.llms-checkout");LLMS.Spinner.start(o),window.LLMS.Ajax.call({data:{action:"remove_coupon_code",plan_id:l("#llms-plan-id").val()},success:function(e){LLMS.Spinner.stop(o),e.success&&(l(".llms-coupon-wrapper").replaceWith(e.data.coupon_html),t.bind_coupon(),l(".llms-order-summary").replaceWith(e.data.summary_html),l(".llms-payment-gateways").replaceWith(e.data.gateways_html),t.bind_gateways(),l(document).trigger("llms-checkout-refreshed"))}})},this.focus_errors=function(){l("html, body").animate({scrollTop:l("#llms-checkout-errors").offset().top-50},200)},this.load_gateways=function(){for(var e=0;e<=o.length;e++){var t=o[e];"object"==typeof t&&null!==t&&void 0!==t.bind&&"function"==typeof t.bind&&t.bind()}},this.processing=function(e){var t,o="stop"===e?"removeClass":"addClass";"checkout"===this.form_action?t=this.$checkout_form:"confirm"===this.form_action&&(t=this.$confirm_form),t[o]("llms-is-processing"),LLMS.Spinner[e](this.$form_sections)},this.submit=async function(e){var t=e.data;e.preventDefault(),t.processing("start"),t.clear_errors();try{for(const o of s)await function({handler:e,data:n}){return new Promise((t,o)=>{const s=setTimeout(()=>{o(new Error(LLMS.l10n.translate("Operation timed out, please try again")))},6e4);e(n,e=>{clearTimeout(s),!0===e?t():o("string"==typeof e?new Error(e):new Error(LLMS.l10n.translate("Unknown response")))})})}(o);t.$checkout_form.off("submit",t.submit),t.$checkout_form.trigger("submit"),t.processing("stop")}catch(e){t.add_error(e.message),t.focus_errors(),t.processing("stop")}},this.init(),this}}(jQuery); //# sourceMappingURL=../maps/js/llms-form-checkout.min.js.map ; var thirstyFunctions;jQuery(document).ready((function(t){thirstyFunctions={recordLinkStatEvents:function(){"yes"==thirsty_global_vars.enable_record_stats&&t("body").on("click","a",thirstyFunctions.recordLinkStat)},recordLinkStat:function(r){var a,e,i,o=t(this),n=o.attr("href"),s=o.data("linkid"),l=o[0].innerText,c=n?n.split("?")[1]:"";l||(l=o.text()),(thirstyFunctions.isThirstyLink(n)||s)&&(o.data("thirstypay")||(o.data("clicked")?r.preventDefault():(o.data("clicked",!0),!l&&o.find("img").length&&(l=(a=o.find("img").prop("src").split("/"))[a.length-1]),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(r.preventDefault(),"_blank"!=o.prop("target")||thirstyFunctions.disableNewWindow()?window.MonsterInsightsObject&&setTimeout((function(){"function"==typeof window.onbeforeunload&&(i=window.onbeforeunload)}),50):e=window.open("","_blank")),t.post(thirsty_global_vars.ajax_url,{action:"ta_click_data_redirect",href:n,page:window.location.href,link_id:s,keyword:l,qs:c},(function(t){o.data("clicked",!1),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(e?e.location.href=t||n:("function"==typeof i&&null===window.onbeforeunload&&(window.onbeforeunload=i),window.location.href=t||n))})).fail((function(){o.data("clicked",!1),"yes"===thirsty_global_vars.enable_js_redirect&&1!=o.data("nojs")&&(e?e.location.href=n:("function"==typeof i&&null===window.onbeforeunload&&(window.onbeforeunload=i),window.location.href=n))})))))},disableNewWindow:function(){var t=["FBAN","MessengerForiOS","FBAV","Instagram","Pinterest","Twitter","Electron","Steam"];for(var r in t)if(navigator.userAgent.indexOf(t[r])>=0)return!0;return!1},isThirstyLink:function(a){if(a){var e,i,o=(a=a.replace("http:","{protocol}").replace("https:","{protocol}")).replace(thirsty_global_vars.home_url,"").replace("{protocol}","");return e=(o=0==o.indexOf("/")?o.replace("/",""):o).substr(0,o.indexOf("/")),i=a.replace("/"+e+"/","/"+thirsty_global_vars.link_prefix+"/").replace("{protocol}",window.location.protocol),!!(e&&t.inArray(e,r)>-1)&&i}},linkFixer:function(){if("yes"===thirsty_global_vars.link_fixer_enabled){var r,a,e,i,o,n=t("body a"),s=[];for(o=0;o