function callcaptcha(){if(console.log("invisible"),!recaptchaLoadComplete){var e=[],r=jQuery(".btn-recaptcha").parents("form");if(r.each(function(r,a){if("undefined"!=typeof recaptchaSiteKey){var o=jQuery(a),i=o.find(".btn-recaptcha").hasClass("btn-recaptcha-invisible"),n="undefined"!=typeof requiredText?requiredText:"Required",d=o.find("#divDynamicRecaptcha .g-recaptcha"),t=o.find(".recaptcha-container"),u=o;t.length&&(u=t),d.length||(u.append('
'),d=u.find("#divDynamicRecaptcha")),i?"invisible"!==d.data("size")&&d.attr("data-size","invisible"):d.hide(),d.attr("data-sitekey",recaptchaSiteKey);var s=o.find("input[name='submit']");if(s.length){var c=o.prop("action");o.prop("action",c+"&submit=1"),s.remove()}var m="recaptchaCallback"+r;window[m]=function(){i&&o.submit()},d.attr("data-callback",m),i?o.on("submit",function(e){grecaptcha.getResponse().trim()||(e.preventDefault(),grecaptcha.execute())}):(e.push(function(){d.slideDown("fast",function(){d.find(":first").addClass("center-block")})}),e.push(function(){d.find(":first").addClass("center-block")}))}else console.log("Recaptcha site key not defined")}),r.length){jQuery.getScript("https://www.google.com/recaptcha/api.js",function(){for(var r=e.length-1;r>=0;r--)e[r]()})}return recaptchaLoadComplete=!0,this}}function recalcsummary(){jQuery("#ordersummary").addClass("cartsummary_loader"),jQuery.post("cart.php","a=view&ajax=1&checkcredit=0&onepageorder=1",function(e){jQuery("#ordersummary").removeClass("cartsummary_loader"),jQuery("#ordersummary").html(e),jQuery("#applyCreditContainer").length>0&&jQuery.post("cart.php","a=checkout&ajax=1&checkcredit=1&onepageorder=1",function(e){jQuery("#applyCreditContainer").html(e),jQuery("#applyCreditContainer").html(e),jQuery(".cccheckdb").iCheck({inheritID:!0,checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue",increaseArea:"20%"}),jQuery(".cccheckdb").on("ifChecked",function(e){"1"===jQuery(this).val()&&"useFullCreditOnCheckout"===jQuery(this).attr("id")?jQuery("#paymentGatewaysContainer , #creditCardInputFields").hide():jQuery("#paymentGatewaysContainer").show()})}),!recaptchaLoadComplete&&jQuery("#order_submit").hasClass("btn-recaptcha-invisible")&&callcaptcha()}),"stripe"===jQuery('input[name="paymentmethod"]').val()&&recalcheckout()}function recalcheckout(){jQuery("#ws-ajax-order-form").html('
'),jQuery.post("cart.php","a=checkout&ajax=1&checkcredit=0&onepageorder=1",function(e){jQuery("#ws-ajax-order-form").html(e)})}function addToCart(){jQuery("#subdomain").is(":checked")&&"0"===jQuery('input[name="pid"]:checked').data("havesubdomain")&&(jQuery("#subdomain").prop("checked",!1),jQuery("#domainname").val("")),jQuery.post("","customaction=addtocart&"+jQuery("#coniguration_form").serialize(),function(e){""!=e&&recalcsummary()})}function triggerProduct(){1===jQuery('input[name="pid"]:checked').data("havesubdomain")?(window.subdomainslist=jQuery('input[name="pid"]:checked').data("subdomain"),jQuery(".domain-subdomain").removeClass("hidden"),jQuery(".domain-subdomain").show()):(window.subdomainslist="",jQuery("#domainsubdomain").addClass("hidden"),jQuery(".domain-subdomain").addClass("hidden"),jQuery(".domain-subdomain").hide(),jQuery("#domainsubdomain").hide()),getProductConfig(jQuery('input[name="pid"]:checked').val(),jQuery("#billingcycle_"+jQuery('input[name="pid"]:checked').val()+" input:checked").val()),jQuery(".p_error").hide().removeClass("validation_error"),jQuery(".empty_p").removeClass("required_input"),jQuery('input[name="pid"]').each(function(){jQuery(".div_billingcyle").hide(),jQuery("#products-billingcycle").show(),jQuery("#billingcycle_"+jQuery('input[name="pid"]:checked').val()).show()}),triggerBillingCycle()}function getProducts(){jQuery("#product_config").html(""),jQuery(".product_config").hide(),jQuery("#products-billingcycle").hide(),jQuery("#product_body").html('
'),jQuery.post("","customaction=getproducts&gid="+jQuery("#gid").val(),function(e){""!==e&&(jQuery("#product_body").html(e),jQuery.post("","customaction=getbillingcycle&gid="+jQuery("#gid").val(),function(e){""!==e&&(jQuery("#products-billingcycle .no-padding-bottom").html(e),recalcsummary())}))})}function getProductConfig(e,r){"undefined"==r&&(r=""),jQuery(".product_config").show(),jQuery("#product_config").html('
'),jQuery.post("","customaction=getproductconfiguration&pid="+e+"&billingcycle="+r,function(e){var r=jQuery.parseJSON(e);""!=r.html?(jQuery(".product_config").show(),jQuery("#product_config").html(r.html),recalcsummary()):(jQuery("#product_config").html(""),jQuery(".product_config").hide())})}function triggerBillingCycle(){var e=jQuery("#billingcycle_"+jQuery('input[name="pid"]:checked').val()+" input:checked").val();if(getProductConfig(jQuery('input[name="pid"]:checked').val(),e),$("#freedomainpaymentterms"+jQuery('input[name="pid"]:checked').val()).length){var r=$("#freedomainpaymentterms"+jQuery('input[name="pid"]:checked').val()).val();$("#freetlds").html($("#freedomaintlds"+jQuery('input[name="pid"]:checked').val()).val()),-1==r.indexOf(e)?$(".domain_spcl_offer").hide():$(".domain_spcl_offer").show()}else $(".domain_spcl_offer").hide()}function emptyCart(){jQuery.post("","customaction=cartempty",function(e){recalcsummary()})}function productValidate(){var e=!1;return jQuery("#product_body").find('input[name="pid"]:checked').val()||"productdomain"!==jQuery(".ortype:checked").val()?(jQuery(".p_error").removeClass("validation_error"),jQuery(".p_error").html(""),jQuery(".empty_p").removeClass("required_input"),e=!1):(jQuery(".p_error").addClass("validation_error"),jQuery(".empty_p").addClass("required_input"),jQuery(".p_error").html("You should choose a service plan before submitting your order. "),e=!0),e}function productConfigValidate(){var e="",r=!1;return jQuery(".pconfigrequired").each(function(){jQuery(this).removeClass("p_config_input_error"),""==jQuery(this).val()&&(e+=""+jQuery(this).prev("label").text()+" is required. ",jQuery(this).addClass("p_config_input_error"))}),""!=e?(jQuery(".p_config_error").addClass("validation_error").html(""),r=!0):(jQuery(".p_config_error").removeClass("validation_error").html(),r=!1),r}function formValidate(){jQuery("#stateinput").attr("required",!1),jQuery("#product_body").find('input[name="pid"]:checked').val()?(jQuery(".p_error").removeClass("validation_error"),jQuery(".p_error").html(""),jQuery(".empty_p").removeClass("required_input")):(jQuery(".p_error").addClass("validation_error"),jQuery(".empty_p").addClass("required_input"),jQuery(".p_error").html("You should choose a service plan before submitting your order. "))}function validateOrderForm(){jQuery("#stateinput").attr("required",!1),jQuery("#stateselect").attr("required",!1);var e=productValidate(),r=productConfigValidate();return jQuery(".validation_error").html()&&jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500),{pValidate:e,pCValidate:r}}function completeorder(){if("stripe"===jQuery('input[name="paymentmethod"]').val()){jQuery("#stateinput").attr("required",!1);(e=validateOrderForm()).pValidate||e.pCValidate||(jQuery(".cat-loader").show(),jQuery.post("","customaction=checkdomainincart&ordertype="+ccdordertype+"&"+jQuery("#coniguration_form").serialize(),function(e){""!==e?"domain"===e?(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html(""),jQuery("#domainname").addClass("input_req_error"),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):"addons"===e?(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html("Addons is required to complete purchasing. "),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):"domainrenewals"===e&&(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html("Domain is required to complete purchasing. "),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):(jQuery(".domain_error").removeClass("validation_error").html(""),jQuery("#domainname").removeClass("input_req_error"),jQuery.post("cart.php","a=checkout&checkcredit=0&onepageorder=1&onepageorderdone=1&$checkout=1&ajax=1&"+jQuery("#frmCheckout").serialize(),function(e){""!=e?(jQuery(".cat-loader").hide(),jQuery(".customer_error").addClass("validation_error").html(""),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-50},500)):jQuery.post("","customaction=deletecart",function(e){window.location="cart.php?a=fraudcheck"})}))}))}else{jQuery("#stateinput").attr("required",!1);var e=validateOrderForm();e.pValidate||e.pCValidate||(jQuery(".cat-loader").show(),jQuery.post("","customaction=checkdomainincart&ordertype="+ccdordertype+"&"+jQuery("#coniguration_form").serialize(),function(e){""!==e?"domain"===e?(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html(""),jQuery("#domainname").addClass("input_req_error"),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):"addons"===e?(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html("Addons is required to complete purchasing. "),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):"domainrenewals"===e&&(jQuery(".cat-loader").hide(),jQuery(".domain_error").addClass("validation_error").html("Domain is required to complete purchasing. "),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-30},500)):(jQuery(".domain_error").removeClass("validation_error").html(""),jQuery("#domainname").removeClass("input_req_error"),jQuery.post("cart.php","a=checkout&checkcredit=0&onepageorder=1&onepageorderdone=1&$checkout=1&ajax=1&"+jQuery("#frmCheckout").serialize(),function(e){""!=e?(jQuery(".cat-loader").hide(),jQuery(".customer_error").addClass("validation_error").html(""),jQuery("html, body").animate({scrollTop:jQuery(".validation_error").offset().top-50},500)):jQuery.post("","customaction=deletecart",function(e){window.location="cart.php?a=fraudcheck"})}))}))}}function togglesignupform(e){jQuery(".signupfields").each(function(){jQuery(this).hide()}),"existing"==jQuery(e).val()&&(jQuery("#loginfrm").show(),jQuery("#inputCustType").val("existing"),jQuery("#loginfrm").removeClass("hidden"),jQuery(".customer_error, .security_error, .password_error").removeClass("validation_error"),jQuery(".accountpw, .customer_error, .security_error, .securityques").hide()),"new"==jQuery(e).val()&&(jQuery("#signupfrm").show(),jQuery("#inputCustType").val("new"),jQuery(".customer_error").removeClass("validation_error"),jQuery(".password_error").removeClass("validation_error"),jQuery(".customer_error").hide(),jQuery(".accountpw, .securityques").show()),jQuery("#account_pw").find(".inputrequired").each(function(){jQuery(this).removeClass("pw_req_error")}),jQuery("#customer_info").find(".inputrequired").each(function(){jQuery(this).removeClass("input_req_error")}),jQuery("#securityqans").removeClass("sec_req_error")}function applyPromo(){""==jQuery("#promocode").val()?(jQuery("#promocode").addClass("promo_req").focus(),jQuery(".promo-msg").addClass("promo_error").html("If you have a promo code, enter it in the box above to receive your discount.")):(jQuery("#promocode").removeClass("promo_req"),jQuery(".promo-msg").removeClass("promo_error"),jQuery(".promo-msg").removeClass("promo_success").show().html('
'),jQuery(".applypromo").css("pointer-events","none"),jQuery.post("cart.php",{a:"applypromo",promocode:jQuery("#promocode").val()},function(e){jQuery(".applypromo").css("pointer-events","visible"),e?jQuery(".promo-msg").addClass("promo_error").html(e):(jQuery(".promo-msg").addClass("promo_success").html("Promocode has been applied."),jQuery(".applypromo").hide(),jQuery(".removepromo").show()),recalcsummary()}))}function removePromo(){jQuery(".removepromo").css("pointer-events","none"),jQuery(".promo-msg").removeClass("promo_success").show().html('
'),jQuery.post("cart.php",{a:"removepromo",ajax:1},function(e){jQuery(".removepromo").css("pointer-events","visible"),jQuery(".applypromo").show(),jQuery(".removepromo").hide(),recalcsummary(),jQuery(".promo-msg").addClass("promo_success").html("Promocode has been removed.")})}function domainSearch(){if(jQuery(".domain_config").hide(),jQuery("#domain_config").html(""),""===jQuery("#domainname").val())return jQuery("#domainname").focus(),!1;jQuery(".domainloaderi").show();var e="",r="";if("register"===jQuery('input[name="domaintype"]:checked').val()&&(e=jQuery("#domainname").val()+jQuery('select[name="tld"]').val()),"transfer"===jQuery('input[name="domaintype"]:checked').val()){if(""===(r=jQuery("#eppcode").val()))return jQuery(".domainloaderi").hide(),jQuery("#eppcode").focus(),!1;jQuery("#domain_msg").hide(),jQuery("#domain_msg").removeClass("domain_error"),e=jQuery("#domainname").val()+jQuery('select[name="tld"]').val()}"owndomain"===jQuery('input[name="domaintype"]:checked').val()&&(e=jQuery("#domainname").val());var a=0;"register"===jQuery('input[name="domaintype"]:checked').val()&&(a=jQuery("#domain_msg").find(".domainresuc").length),jQuery.post("","customaction=domainsearch&domain="+e+"&domaintype="+jQuery('input[name="domaintype"]:checked').val()+"&eppcode="+r+"&suggestion="+a,function(r){"register"===jQuery('input[name="domaintype"]:checked').val()&&(suggestion=WHMCS.http.jqClient.post(WHMCS.utils.getRouteUrl("/domain/check"),{token:csrfToken,type:"suggestions",domain:jQuery("#domainname").val()+jQuery('select[name="tld"]').val(),sld:jQuery("#domainname").val(),tld:jQuery('select[name="tld"]').val(),source:"cartAddDomain"},"json"),suggestion.done(function(e){if("object"!=typeof e||0==e.result.length||e.result.error)jQuery(".suggested-domains").fadeOut("fast",function(){jQuery(this).addClass("hidden")});else{jQuery(".suggested-domains").removeClass("hidden");var r=1;jQuery("#domainSuggestions").html(jQuery("#domainSuggestionsbackup").html());var a=jQuery("#domainSuggestions");jQuery.each(e.result,function(e,o){var i=o.tld,n=o.pricing;a.find("li:first").clone(!0,!0).appendTo(a);var d=a.find("li.domain-suggestion").last();d.addClass("clone").find("span.domain").html(o.sld).end().find("span.extension").html("."+i).end(),"string"==typeof n?(d.find("button.btn-add-to-cart2").remove(),""!=n?d.find("button.domain-contact-support").removeClass("hidden").end().find("span.price").hide():d.remove()):d.find("button.btn-add-to-cart2").attr("data-domain",o.idnDomainName).end().find("span.price").html(n[Object.keys(n)[0]].register).end(),r<=10&&d.removeClass("hidden"),r++,o.group&&d.find("span.promo").addClass(o.group).html(o.group.toUpperCase()).removeClass("hidden").end(),furtherSuggestions=a.find("li.domain-suggestion.clone.hidden").length,furtherSuggestions>0&&jQuery("div.more-suggestions").removeClass("hidden")}),jQuery(".domain-lookup-suggestions-loader").hide(),jQuery("#domainSuggestions").removeClass("hidden")}}).always(function(){}));var o=jQuery.parseJSON(r);"success"===o.status&&"register"===jQuery('input[name="domaintype"]:checked').val()?(jQuery("#domain_msg").children(".domainnotresuc").each(function(){jQuery(this).remove()}),jQuery("#domain_msg").children(".domainresuc").each(function(){jQuery(this).data("domain")===e&&jQuery(this).remove()}),jQuery("#domain_msg").show(),jQuery("#domain_msg").html(""),jQuery("#domain_msg").removeClass("domain_error"),jQuery("#domain_msg").append(''),jQuery(".domain_config").show(),jQuery("#domain_config").html('
'),jQuery("#hiddendomainname").val(e),jQuery.post("cart.php","a=confdomains&checkcredit=0&onepageorder=1&ajax=1",function(e){e?(jQuery(".domain_config").show(),jQuery("#domain_config").html(e)):(jQuery(".domain_config").hide(),jQuery("#domain_config").html("")),recalcsummary()})):"success"===o.status&&"transfer"===jQuery('input[name="domaintype"]:checked').val()?(jQuery("#domain_msg").show(),jQuery("#domain_msg").html(""),jQuery("#domain_msg").removeClass("domain_error"),jQuery("#domain_msg").addClass("domain_success"),jQuery("#domain_msg").html(o.msg),jQuery(".domain_config").show(),jQuery("#domain_config").html('
'),jQuery("#hiddendomainname").val(e),jQuery.post("cart.php","a=confdomains&checkcredit=0&onepageorder=1&ajax=1",function(e){e?(jQuery(".domain_config").show(),jQuery("#domain_config").html(e)):(jQuery(".domain_config").hide(),jQuery("#domain_config").html("")),recalcsummary()})):(jQuery("#hiddendomainname").val(""),jQuery("#domain_msg").show(),0===a?(jQuery("#domain_msg").removeClass("domain_success"),jQuery("#domain_msg").addClass("domain_error"),jQuery("#domain_msg").text(o.msg)):jQuery("#domain_msg").append(''+e+" - "+o.msg+"
")),jQuery(".domainloaderi").hide()})}function checksubdomain(){if(""===jQuery("#subdomainsld").val())return alert("Please choose any subdomain name first"),"";jQuery.post("","customaction=getcartdomain",function(e){e!==jQuery("#subdomainsld").val()+jQuery("#subdomaintld option:selected").val()?(subdomaincheck=WHMCS.http.jqClient.post(WHMCS.utils.getRouteUrl("/domain/check"),{token:csrfToken,type:"subdomain",domain:jQuery("#subdomainsld").val()+jQuery("#subdomaintld").val(),sld:jQuery("#subdomainsld").val(),tld:jQuery("#subdomaintld option:selected").val(),pid:jQuery('input[name="pid"]:checked').val(),source:"cartAddDomain"},"json"),subdomaincheck.done(function(e){if("object"!=typeof e||0==e.result.length||e.result.error)return jQuery("#domain_msg1").html(''+e.result.error+"
"),void jQuery("#domain_msg1").show();!0!==e.result[0].status||jQuery.post("","customaction=domainsearch&domain="+jQuery("#subdomainsld").val()+jQuery("#subdomaintld option:selected").val()+"&domaintype=subdomain",function(e){var r=JSON.parse(e);jQuery("#domain_msg1").html(''+r.msg+"
"),jQuery("#domain_msg1").show(),recalcsummary()})}).always(function(){})):recalcsummary()})}window.subdomainslist="",jQuery(document).ready(function(){jQuery("body").on("change","#inputCountry",function(){jQuery(this).val();if(jQuery("#stateselect").length>0)jQuery("#stateselect").val();else jQuery("#stateinput").val();jQuery.post("","customaction=updatetax&"+jQuery("#frmCheckout").serialize(),function(e){jQuery("#ordersummary").addClass("cartsummary_loader"),jQuery.post("cart.php","a=view&ajax=1&checkcredit=0&onepageorder=1",function(e){jQuery("#ordersummary").removeClass("cartsummary_loader"),jQuery("#ordersummary").html(e)})})}),jQuery(document).on("submit","form#frmCheckout",function(e){return e.stopPropagation(),e.preventDefault(),completeorder(),!1}),jQuery("body").on("change","#stateinput",function(){var e=jQuery("#inputCountry").val();if(jQuery("#stateselect").length>0)r=jQuery("#stateselect").val();else var r=jQuery("#stateinput").val();jQuery.post("","customaction=updatetax&country="+e+"&state="+r,function(e){jQuery("#ordersummary").addClass("cartsummary_loader"),jQuery.post("cart.php","a=view&ajax=1&checkcredit=0&onepageorder=1",function(e){jQuery("#ordersummary").removeClass("cartsummary_loader"),jQuery("#ordersummary").html(e)})})}),jQuery("body").on("change","#stateselect",function(){var e=jQuery("#inputCountry").val();if(jQuery("#stateselect").length>0)r=jQuery("#stateselect").val();else var r=jQuery("#stateinput").val();jQuery.post("","customaction=updatetax&country="+e+"&state="+r,function(e){jQuery("#ordersummary").addClass("cartsummary_loader"),jQuery.post("cart.php","a=view&ajax=1&checkcredit=0&onepageorder=1",function(e){jQuery("#ordersummary").removeClass("cartsummary_loader"),jQuery("#ordersummary").html(e)})})}),jQuery("#domain_msg").on("click",".deletedod",function(e){var r=jQuery(this);if(e.preventDefault(),confirm("Are you sure?")){var a=jQuery(this).attr("data-domain");return jQuery.post("","customaction=removedomain&domain="+a,function(e){r.parents(".domainresuc").remove();var o=0;"register"===jQuery('input[name="domaintype"]:checked').val()&&(o=jQuery("#domain_msg").find(".domainresuc").length),0===o?(jQuery(".domain_error").hide(),jQuery(".domain_config").hide()):jQuery("#domain_config").children(".configdrow").each(function(){jQuery(this).data("domain")===a&&jQuery(this).remove()}),recalcsummary()}),!1}}),jQuery("body").on("click",".btn-add-to-cart2",function(){var e=jQuery(this),r=jQuery(this).attr("data-domain"),a=jQuery('button[data-domain="'+r+'"]');a.children(".added").is(":visible")?jQuery.post("","customaction=removedomain&domain="+r,function(o){a.children(".to-add").show(),e.children(".added").hide(),e.children(".unavailable").hide();var i=0;"register"===jQuery('input[name="domaintype"]:checked').val()&&(i=jQuery("#domain_msg").find(".domainresuc").length),0===i?(jQuery(".domain_error").hide(),jQuery(".domain_config").hide()):jQuery("#domain_config").children(".configdrow").each(function(){jQuery(this).data("domain")===r&&jQuery(this).remove()}),recalcsummary()}):a.children(".unavailable").is(":visible")||jQuery.post("","customaction=domainsearch&domain="+r+"&domaintype=register&suggestion=1&eppcode=",function(o){"success"===jQuery.parseJSON(o).status?(jQuery(".domain_config").show(),jQuery("#domain_config").html('
'),jQuery("#hiddendomainname").val(r),a.children(".to-add").hide(),e.children(".added").show(),jQuery.post("cart.php","a=confdomains&checkcredit=0&onepageorder=1&ajax=1",function(e){e?(jQuery(".domain_config").show(),jQuery("#domain_config").html(e)):(jQuery(".domain_config").hide(),jQuery("#domain_config").html("")),recalcsummary()})):(a.find("span.to-add").hide(),a.find("span.unavailable").show())})}),jQuery("#owndomain").is(":checked")&&jQuery(".authcode, .tld, .domain_search, #domain_msg").hide(),jQuery(".ortype").on("change",function(){"domain"===jQuery(this).val()?(jQuery.post("","customaction=ordertype&type=domain",function(e){}),jQuery(".productsbody").hide(),jQuery(".domain-own").hide(),jQuery(".domain_cont").show(),jQuery("#domainsubdomain").hide(),jQuery("#domainsubdomain").addClass("hidden")):(jQuery.post("","customaction=ordertype&type=orderproducts",function(e){}),jQuery("#domainname").val(""),jQuery(".productsbody").show(),jQuery(".domainareadata").hide()),jQuery("#domain_msg").hide()}),jQuery(document).on("click",".domain_sec",function(e){if(jQuery(this).hasClass("domain-subdomain")){jQuery(".domain-input").hide(),jQuery("#subdomaintld").children("option").remove();var r=jQuery('input[name="pid"]:checked').data("subdomains").split(",");jQuery.each(r,function(e,r){var a=jQuery(" ");a.attr("value",r),a.text(r),jQuery("#subdomaintld").append(a)}),jQuery("#domainsubdomain").removeClass("hidden"),jQuery("#domainsubdomain").show()}else jQuery("#domainsubdomain").hide(),jQuery("#domainsubdomain").addClass("hidden"),jQuery(".domain-input").show()}),jQuery(".domaincheckhaveit").click(function(){jQuery(".domain_error").hide(),jQuery(".domain_config").hide(),jQuery(this).data("havedomain")?(jQuery(".domain-own").show(),jQuery(".domainareadata").show()):jQuery(".domainareadata").hide(),"on"==jQuery(this).data("freedomain")?(jQuery(".domainareadata").addClass("freedomain"),jQuery(".domainareadata").removeClass("freeonce")):"once"==jQuery(this).data("freedomain")?(jQuery(".domainareadata").addClass("freeonce"),jQuery(".domainareadata").removeClass("freedomain")):(jQuery(".domainareadata").removeClass("freeonce"),jQuery(".domainareadata").removeClass("freedomain"))}),jQuery("#coniguration_form").on("ifChecked",".addon-selector",function(e){addToCart()}),jQuery("#domainname").keyup(function(){""!=jQuery(this).val()&&(jQuery(".domain_error").removeClass("validation_error").html(""),jQuery("#domainname").removeClass("input_req_error"))}),jQuery("#domainname").blur(function(){""!=jQuery(this).val()&&"owndomain"==jQuery('input[name="domaintype"]:checked').val()&&addToCart()}),jQuery(".domain_sec").click(function(){jQuery("#domain_msg").hide(),jQuery("#domain_msg").removeClass("domain_success"),jQuery("#domain_msg").removeClass("domain_error"),jQuery("#domain_msg").html(""),jQuery('input[name="domaintype"]').each(function(){jQuery(this).prop("checked",!1)}),jQuery(".domain_sec").each(function(){jQuery(this).removeClass("domain_sec_active")}),jQuery(this).find('input[name="domaintype"]').prop("checked",!0),jQuery(this).addClass("domain_sec_active");var e=jQuery(this).find('input[name="domaintype"]').val();jQuery(".domain_config").hide(),jQuery("#domain_config").html(""),"register"==e&&(jQuery(".domain-input").removeClass("domain-transfer"),jQuery(".domain-input").removeClass("owndomain"),jQuery(".dt-desc, .do-desc").addClass("hidden"),jQuery(".dr-desc").removeClass("hidden"),jQuery(".authcode").hide(),jQuery(".tld, .domain_search").show(),jQuery("#domainname").val(jQuery("#domainname").val().split(".")[0])),"transfer"==e&&(jQuery(".domain-input").removeClass("owndomain"),jQuery(".domain-input").addClass("domain-transfer"),jQuery(".dr-desc, .do-desc").addClass("hidden"),jQuery(".dt-desc").removeClass("hidden"),jQuery(".authcode, .tld, .domain_search").show(),jQuery("#domainname").val(jQuery("#domainname").val().split(".")[0])),"owndomain"==e&&(jQuery(".domain-input").removeClass("domain-transfer"),jQuery(".domain-input").addClass("owndomain"),jQuery(".dr-desc, .dt-desc").addClass("hidden"),jQuery(".do-desc").removeClass("hidden"),jQuery("#domainname").val()&&(jQuery("#domainname").val().split(".")[1]||jQuery("#domainname").val(jQuery("#domainname").val()+jQuery('select[name="tld"]').val()),addToCart()),jQuery(".authcode, .tld, .domain_search, #domain_msg").hide())}),!recaptchaLoadComplete&&jQuery("#order_submit").hasClass("btn-recaptcha-invisible")&&callcaptcha()}),jQuery(document).ready(function(){isextradomain=jQuery("#domain_msg").find(".domainresuc").length,jQuery("#register").is(":checked")&&""!==jQuery("#domainname").val()&&domainSearch(),jQuery("#register").is(":checked")&&isextradomain>0&&(jQuery("#domain_msg").show(),jQuery(".domain_config").show(),jQuery("#domain_config").html('
'),jQuery.post("cart.php","a=confdomains&checkcredit=0&onepageorder=1&ajax=1",function(e){e?(jQuery(".domain_config").show(),jQuery("#domain_config").html(e)):(jQuery(".domain_config").hide(),jQuery("#domain_config").html("")),recalcsummary()})),"domain"===jQuery(".ortype:checked").val()||jQuery(".ortype:checked").length<=0?(jQuery.post("","customaction=ordertype&type=domain",function(e){}),jQuery(".productsbody").hide(),jQuery(".domain-own").hide(),jQuery(".domain_cont").show()):(jQuery.post("","customaction=ordertype&type=orderproducts",function(e){}),jQuery(".productsbody").show())});