function ShowCaptcha(n,t,i){tmpOrgCallBack=i;nativeAppProxyEx.IsInNativeApp()||($(".site-masking").show(),HideLoader(),$("#captchaPopUp").css("display","block"),captcha1==undefined&&(captcha1=grecaptcha.render("recaptch1",{sitekey:"6Lcqs9ESAAAAAPEpodHxOQ70PKVwRyL8U3YG07t9",callback:function(n){t(n,tmpOrgCallBack)}})),grecaptcha.reset(captcha1))}function ShowGetPhoneCaptcha(n,t,i,r){tmpOrgCallBack=r;nativeAppProxyEx.IsInNativeApp()||(tmpOrigCaptchaToken=t,$(".site-masking").show(),HideLoader(),$("#captchaPopUp").css("display","block"),captcha1==undefined&&(captcha1=grecaptcha.render("recaptch1",{sitekey:"6Lcqs9ESAAAAAPEpodHxOQ70PKVwRyL8U3YG07t9",callback:function(n){i(n,tmpOrgCallBack,tmpOrigCaptchaToken)}})),grecaptcha.reset(captcha1))}function HideCaptcha(){$(".site-masking").hide();$("#captchaPopUp").fadeOut()}function ShowNotificationWithInput(n,t,i,r,u){u&&popUpNotificationWithInput_captcha==undefined&&createPopUpNotificationWithInput_captcha();latestElementBeforePopUp=$(this);$("#popUpNotificationWithInputClose").off();$("#sendInputData").off();$("#popUpNotificationInput").off();$("#popUpNotificationInput").unbind("keypress");$("#sendInputData").unbind("click");$("#popUpNotificationInput").val("");$("#popupResponseText").text("");$("#popupResponseText").removeAttr("role");$(".site-masking").show();$("#popUpNotificationWithInput").css("display","block");$("#popUpNotificationWithInputTitle").html(n);$(".popup-instruct").html(t);$("#popUpNotificationWithInput .popup-instruct").height()>300?$("#popUpNotificationWithInput").css("top","-170px"):$("#popUpNotificationWithInput").css("top","");$("#popUpNotificationInput").attr("placeholder",i);$("#popUpNotificationInputLabel").html(i);$("#sendInputData").css("display","block");$("#sendInputData").prop("disabled",!1).text("שלח").removeClass("btn btn--orange").addClass("btn btn--blue");$("#popUpNotificationInput").focus();var f=function(){$("#sendInputData").css("display","none");$("#popUpNotificationInput").unbind("keypress");HideLoader()},e=function(){HideLoader()};$("#sendInputData").on("click",function(n){n.preventDefault();n.stopPropagation();typeof r=="function"&&r.call($("#popUpNotificationInput"),"popupResponseText",f,e)});$("#popUpNotificationInput").on("keypress",function(n){n.which==13&&(n.preventDefault(),n.stopPropagation(),typeof r=="function"&&r.call($("#popUpNotificationInput"),"popupResponseText",f,e))});$("#popUpNotificationInput").on("keydown",function(n){n.which==27&&(n.preventDefault(),n.stopPropagation(),HideNotification())});$("#popUpNotificationWithInputClose").on("click",function(n){n.preventDefault();n.stopPropagation();HideNotification();$("body").css("overflow","");typeof u!="undefined"&&u==!0&&typeof popUpNotificationWithInput_captcha!="undefined"&&grecaptcha.reset(popUpNotificationWithInput_captcha)});$("#popUpNotificationWithInput :input:last").on("keydown",function(n){$("this:focus")&&n.which==9&&(n.preventDefault(),$("#popUpNotificationWithInput :input:first").focus())});typeof u!="undefined"&&u==!0?$("#popUpNotificationWithInput_captchaContainer").css("display","block"):$("#popUpNotificationWithInput_captchaContainer").css("display","none")}function ShowNotificationWithAutoComplete(n,t,i,r,u,f){var e,o;latestElementBeforePopUp=$(this);$("#popUpNotificationWithAutoCompleteClose").off();$("#sendInputDataAutoComplete").off();$("#popUpNotificationAutoComplete").off();$("#popUpNotificationAutoComplete").unbind("keypress");$("#sendInputDataAutoComplete").unbind("click");$("#popUpNotificationAutoComplete").val("");$("#popupResponseTextAutoComplete").text("");$("#popupResponseTextAutoComplete").removeAttr("role");$(".site-masking").show();$("#popUpNotificationWithAutoComplete").css("display","block");$("#popUpNotificationWithAutoCompleteTitle").html(n);$(".popup-instruct").html(t);$("#popUpNotificationWithAutoComplete .popup-instruct").height()>300?$("#popUpNotificationWithAutoComplete").css("top","-170px"):$("#popUpNotificationWithAutoComplete").css("top","");$("#popUpNotificationAutoComplete").attr("placeholder",i);$("#popUpNotificationAutoCompleteLabel").html(i);$("#sendInputDataAutoComplete").css("display","block");$("#popUpNotificationAutoComplete").focus();e=function(){$("#sendInputDataAutoComplete").css("display","none");$("#popUpNotificationAutoComplete").unbind("keypress");HideLoader()};o=function(){HideLoader()};$("#sendInputDataAutoComplete").on("click",function(n){n.preventDefault();n.stopPropagation();typeof r=="function"&&r.call($("#popUpNotificationAutoComplete"),"popupResponseTextAutoComplete",e,o)});$("#sendDataWithoutInput").on("click",function(n){n.preventDefault();n.stopPropagation();typeof r=="function"&&($("#txtCat").val(f),$("#txtCity").val(""),default_aspx_js1.BusinessSearch(!1))});$("#popUpNotificationAutoComplete").on("keypress",function(n){n.which==13&&(n.preventDefault(),n.stopPropagation(),typeof r=="function"&&r.call($("#popUpNotificationAutoComplete"),"popupResponseTextAutoComplete",e,o))});$("#popUpNotificationAutoComplete").on("keydown",function(n){n.which==27&&($("#popUpNotification").css("display","none"),n.preventDefault(),n.stopPropagation(),HideNotification())});$("#popUpNotificationWithAutoCompleteClose").on("click",function(n){$("#popUpNotification").css("display","none");n.preventDefault();n.stopPropagation();HideNotification()});$("#popUpNotificationWithAutoComplete :input:last").on("keydown",function(n){$("this:focus")&&n.which==9&&(n.preventDefault(),$("#popUpNotificationWithAutoComplete :input:first").focus())});if(u){var s=function(){setAutoComplete.call($("input[id$='popUpNotificationAutoComplete']"),$("input[id$='popUpNotificationAutoComplete']"),u,"",10,undefined,{prefixText:"",count:10})},h=BusinessRootDirectory+"Scripts/Classes/Autocomplete.js"+currentVersion;loadScript("scriptLoaded_autoComplete",h,s)}}function ShowNotificationWithInputAndCaptcha(n,t,i){$(".site-masking").show();$("#notificationWithInputAndCaptcha_sendCode").off();$("#notificationWithInputAndCaptcha_resendCode").off();$("#notificationWithInputAndCaptcha_input").off();$("#notificationWithInputAndCaptcha").css("display","block");$("#notificationWithInputAndCaptcha_title").text(n);$("#notificationWithInputAndCaptcha_responseText").text("");$("#notificationWithInputAndCaptcha").focus();$("#notificationWithInputAndCaptcha_input").val("");$("#notificationWithInputAndCaptcha_sendCode").on("click",function(n){n.preventDefault();n.stopPropagation();typeof t=="function"&&t.call($("#notificationWithInputAndCaptcha_input"),"notificationWithInputAndCaptcha_responseText")});$("#notificationWithInputAndCaptcha_input").on("keypress",function(n){n.which==13&&(n.preventDefault(),n.stopPropagation(),t.call($("#notificationWithInputAndCaptcha_input"),"notificationWithInputAndCaptcha_responseText"))});$("#notificationWithInputAndCaptcha_resendCode").on("click",function(n){$("#didntRecivedCode").css("display","block");n.preventDefault();n.stopPropagation();typeof i=="function"&&i.call($("#notificationWithInputAndCaptcha_input"),"notificationWithInputAndCaptcha_responseText")})}function ShowNotification(n,t,i,r){HideLoader();$(".site-masking-grey").css("display")!="block"&&$(".site-masking").show();$("#popUpNotification").css("display","block");$("#popUpNotificationTitle").html(n);$(".popup-instruct").html(t);i!=""&&$("#popUpNotificationButton").text(i);r!=""&&$("#popUpadditionalBody").html(r);$("#popUpNotificationButton").focus();$("#popUpNotification").on("keydown",function(n){n.which==27&&(n.preventDefault(),n.stopPropagation(),HideNotification())});$("#popUpNotification :input:last").on("keydown",function(n){$("this:focus")&&n.which==9&&(n.preventDefault(),$("#popUpNotification :input:first").focus())})}function ResetPopUpNotificationButtonCallback(){$("#popUpNotificationButton").attr("onclick","");$("#popUpNotificationButton").removeAttr("onclick","");$("#popUpNotificationButton").unbind("click")}function ShowNotificationWithCallBack(n,t,i){if(HideLoader(),$("#popUpNotification").css("display","block"),$("#popUpNotificationTitle").html(n),$(".popup-instruct").html(t),$(".site-masking").show(),$("#popUpNotificationButton").focus(),lastNotificationWithCallback_Callback=i,typeof lastNotificationWithCallback_Callback=="function"){ResetPopUpNotificationButtonCallback();$("#popUpNotificationButton").on("click",function(){lastNotificationWithCallback_Callback.call($("#popUpNotificationButton"))})}$("#popUpNotification").on("keydown",function(n){n.which==27&&(n.preventDefault(),n.stopPropagation(),HideNotification())});$("#popUpNotification :input:last").on("keydown",function(n){$("this:focus")&&n.which==9&&(n.preventDefault(),$("#popUpNotification :input:first").focus())})}function ShowNotificationWithOptions(n,t,i,r,u,f){if(HideLoader(),$("#popUpNotificationWithOptions").css("display","block"),$("#popUpNotificationTitle").html(n),$("#popUpNotificationWithOptionsTitle").html(n),$(".popup-instruct").html(t),$(".site-masking").show(),u&&$("#popUpNotificationWithOptionsBtn1").text(u),f&&$("#popUpNotificationWithOptionsBtn2").text(f),$("#popUpNotificationWithOptionsBtn1").focus(),lastNotificationWithCallback_Callback=i,typeof lastNotificationWithCallback_Callback=="function"){$("#popUpNotificationWithOptionsBtn1").attr("onclick","");$("#popUpNotificationWithOptionsBtn1").removeAttr("onclick","");$("#popUpNotificationWithOptionsBtn1").unbind("click");$("#popUpNotificationWithOptionsBtn1").on("click",function(){lastNotificationWithCallback_Callback.call($("#popUpNotificationWithOptionsBtn1"))})}if($("#popUpNotificationWithOptionsBtn2").focus(),lastNotification2WithCallback_Callback=r,typeof lastNotification2WithCallback_Callback=="function"){$("#popUpNotificationWithOptionsBtn2").attr("onclick","");$("#popUpNotificationWithOptionsBtn2").removeAttr("onclick","");$("#popUpNotificationWithOptionsBtn2").unbind("click");$("#popUpNotificationWithOptionsBtn2").on("click",function(){lastNotification2WithCallback_Callback.call($("#popUpNotificationWithOptionsBtn2"))})}$("#popUpNotificationWithOptions").on("keydown",function(n){n.which==27&&(n.preventDefault(),n.stopPropagation(),HideNotification())});$("#popUpNotificationWithOptions :input:last").on("keydown",function(n){$("this:focus")&&n.which==9&&(n.preventDefault(),$("#popUpNotification :input:first").focus())})}function HideNotification(){$("#popUpNotification").length>0&&$("#popUpNotification").css("display")!="none"?($("#popUpadditionalBody").html(""),$("#popUpNotification").css("display","none")):$("#popUpNotificationWithOptions").length>0&&$("#popUpNotificationWithOptions").css("display")!="none"?$("#popUpNotificationWithOptions").css("display","none"):$("#popUpNotificationWithInput").length>0&&$("#popUpNotificationWithInput").css("display")!="none"?($("#popUpNotificationInput").unbind("keypress"),$("#sendInputData").unbind("click"),$("#popUpNotificationWithInput").css("display","none")):$("#popUpNotificationWithReferencedBody").length>0&&$("#popUpNotificationWithReferencedBody").css("display")!="none"?$("#popUpNotificationWithReferencedBody").css("display","none"):$("#popUpOrangeNotificationWithInput").length>0&&$("#popUpOrangeNotificationWithInput").css("display")!="none"?$("#popUpOrangeNotificationWithInput").css("display","none"):$("#NotificationWithInputs").length>0&&$("#NotificationWithInputs").css("display")!="none"?$("#NotificationWithInputs").css("display","none"):$("#notificationWithInputAndCaptcha").length>0&&$("#notificationWithInputAndCaptcha").css("display")!="none"?$("#notificationWithInputAndCaptcha").css("display","none"):$("#popUpNotificationWithAutoComplete").length>0&&$("#popUpNotificationWithAutoComplete").css("display")!="none"?($("#popUpNotificationAutoComplete").unbind("keypress"),$("#sendInputDataAutoComplete").unbind("click"),$("#txtCat").val(""),$("#txtCity").val(""),$("#popUpNotificationWithAutoComplete").css("display","none"),$("#popUpNotificationAutoComplete").remove(),$(".popAutoComplete").append("<input id='popUpNotificationAutoComplete' autocomplete='off' aria-invalid='false' type='text' placeholder=''>")):$("#popUpMobileDown").length>0&&$("#popUpMobileDown").css("display")!="none"?($("#popUpMobileDown").css("display","none"),$("#popUpMobileDownTitle").text(""),$("#popUpMobileDownBody").empty()):$("#couponPopupContainer").length>0&&$("#couponPopupContainer").css("display")!="none"?closeCouponPopup():$("#couponResultPopupContainer").length>0&&$("#couponResultPopupContainer").css("display")!="none"?closeResultCouponPopup():$("#bp_image_slider").length>0&&$("#bp_image_slider").css("display")!="none"?closePopup():$("#sendDetailsPopUp").length>0&&$("#sendDetailsPopUp").css("display")!="none"&&clearDetails();$(".tnx-popup-headline").html("");$(".popup-messege").html("");var n=!1;$(".popup").each(function(){($(this).css("display")=="block"||$(this).css("display")=="flex")&&(n=!0,this.id=="moreDetailsPopup"&&($(".site-masking").css("z-index","180"),n=!1))});n==!1&&$(".site-masking").hide();$(".loader3Dots").hide();$("#reviewSent").hide();typeof latestElementBeforePopUp!="undefined"&&$(latestElementBeforePopUp).length>0&&latestElementBeforePopUp.focus()}function ShowNotificationWithReferencedBody(n,t,i){var u=$("#"+t),r;if($(u).length>0){$(".site-masking").show();$("#popUpNotificationWithReferencedBody").css("display","block");$("#popUpHeaderWithReferencedBody").html(n);$("#popUpNotificationWithReferencedBody #popupBody").html($(u).html());$("#popupBody").children().hasClass("self-service-popup")==!0&&$("#popupBody").css("padding","0");$("#popUpNotificationButtonWithReferencedBody").off();$("#popUpNotificationWithReferencedBody .popup-messege").focus();$("#popUpNotificationButtonWithReferencedBody").focusout(function(){$("#popUpNotificationWithReferencedBody .popup-messege").focus()});isMobile==!0?$("#popUpNotificationWithReferencedBody").width("90%"):$("#popUpNotificationWithReferencedBody").width("30%");$("#popUpNotificationWithReferencedBody .card-hdr h4").css("width","80%");$("#popUpNotificationWithReferencedBody #popupBody").css("text-align","center");r=$("#"+t).css("background-color");r!="rgba(0, 0, 0, 0)"&&$("#popUpNotificationWithReferencedBody #popupBody").css("background-color",r);$("#popUpNotificationWithReferencedBody button").on("click",function(n){var t=$(this).attr("callbackfunc");typeof t!="undefined"&&t=="true"&&(n.preventDefault(),n.stopPropagation(),$(".site-masking").hide(),$("#popUpNotificationWithReferencedBody").css("display","none"),$(this).attr("id")=="selfRegisterNavigateToCardButton"&&($("#popUpNotificationWithReferencedBody").css("display","block"),$(".site-masking").show()),typeof i!="undefined"&&typeof i=="function"&&i(this))})}}function insertLeadMsg(n){n=="OK"?($("#saveMessageLeaveDetails").show(),$("#saveMessageLeaveDetails").text("הפרטים נשלחו בהצלחה"),window.setTimeout(function(){clearDetails()},1500)):($("#saveMessageLeaveDetails").show(),$("#saveMessageLeaveDetails").text("ישנה שגיאה, אנא נסה שנית").css("color","red !important;"),window.setTimeout(function(){$("#saveMessageLeaveDetails").val("").css("color","green !important;");$("#saveMessageLeaveDetails").hide()},1500))}function clearDetails(){$("#sendDetailsPopUp").hide();$("#businessName_SendDetails").css("border","").val("");$("#contactName_SendDetails").css("border","").val("");$("#mobileNumber_SendDetails").css("border","").val("");$("#requiredBusinessName").val("").css("display","none");$("#requiredContactName").val("").css("display","none");$("#requiredMobileNumber").val("").css("display","none");$("#requiredDetails").css("color","");$("#saveMessageLeaveDetails").hide();$(".site-masking").hide()}function openDetailsPopUp(){$("#sendDetailsPopUp").show();$(".site-masking").show()}function publishYourBusinessBtn(){var n=!0,u=!0,t=$("#businessName_SendDetails"),i=$("#contactName_SendDetails"),r=$("#mobileNumber_SendDetails"),f,e,o;if(t.val()==""?(t.css("border","1px solid red"),n=!1,u=!1):ValidateCharactersInputForBusinessName(t.val())?(t.css("border",""),$("#requiredBusinessName").val("").css("display","none")):(t.css("border","1px solid red"),$("#requiredBusinessName").text("שם העסק לא תקין").css("display","block"),n=!1),i.val()==""?(i.css("border","1px solid red"),n=!1,u=!1):ValidateCharactersInputForBusinessName(i.val())?(i.css("border",""),$("#requiredContactName").val("").css("display","none")):(i.css("border","1px solid red"),$("#requiredContactName").text("שם איש קשר לא תקין").css("display","block"),n=!1),r.val()==""?(r.css("border","1px solid red"),n=!1,u=!1):(f=whatIsMyPhone(r.val()),f.error==""&&f.isMobile==!0?(r.css("border",""),$("#requiredMobileNumber").val("").css("display","none")):(r.css("border","1px solid red"),$("#requiredMobileNumber").text("מספר נייד אינו תקין").css("display","block"),n=!1)),n==!1){u==!1?$("#requiredDetails").css("color","red"):$("#requiredDetails").css("color","");return}$("#requiredDetails").css("color","");e=window.location.pathname;o=e=="/"||e=="/default.aspx"?!0:!1;$.ajax({url:"/BusinessResults.aspx/insertLeadPublishYourBusiness",data:JSON.stringify({businessName:t.val(),contactName:i.val(),mobileNumber:r.val(),isHomePage:o}),contentType:"application/json; charset=utf-8",type:"POST",success:function(n){insertLeadMsg(n.d);dataLayer.push({event:"b2bformb144"})},error:function(n,t,i){insertLeadMsg("error");alert("Request: "+n.toString()+"\n\nStatus: "+t+"\n\nError: "+i)}})}function HideSlidingPopup(){isMobile&&$("#popUpMobileDown").length>0&&$("#popUpMobileDown").css("display")!="none"?($("#popUpMobileDown").css("display","none"),$("#popUpMobileDownTitle").text(""),$("#popUpMobileDownBody").empty(),$("body").css("overflow",""),$(".site-masking").hide()):$("[id^='shareContentContainer']:visible").length>0&&closeAllShareContainerPopUp("closePopUp")}var createPopUpNotificationWithInput_captcha,captcha1,tmpOrgCallBack,tmpOrigCaptchaToken;scriptLoaded_PopUp=!1;var google_captcha_code="",popUpNotificationWithInput_captcha,selfRegister_recaptchSt1_code="",selfRegister_recaptchSt1_captcha,latestElementBeforePopUp,selfRegister_captcha=function(){var n=new bsoftNativeAppProxy;n.IsInNativeApp()||$("#selfRegister_recaptchSt1").length&&(selfRegister_recaptchSt1_captcha=grecaptcha.render("selfRegister_recaptchSt1",{sitekey:"6Lcqs9ESAAAAAPEpodHxOQ70PKVwRyL8U3YG07t9",callback:function(n){selfRegister_recaptchSt1_code=n}}),grecaptcha.reset(selfRegister_recaptchSt1_captcha))},createPopUpMobileDown=function(n,t){var r,i,u,f;for(HideNotification(),$("#popUpMobileDownTitle").text(n),r=0;r<t.length;r++)i=t[r],i.showInMobile==!0&&(u=i.id+"_moreOption",f="<div onclick='"+i.function+"' id="+u+"><img src='"+i.imageMobile+"'/>"+i.name+"<\/div>",$("#popUpMobileDownBody").append(f));$("#popUpMobileDown").slideDown();$(".site-masking").show();$("body").css("overflow","hidden")},createSharePopUpDesktop=function(n,t,i){var f="",u,r,e;if($("#"+i).is(":empty")==!1){closeAllShareContainerPopUp("closePopUp",i);toggleMyClass(event,i,"closePopUp");return}for(closeAllShareContainerPopUp("closePopUp"),u=0;u<t.length;u++)r=t[u],r.showInDesktop==!0&&(e=r.id+"_moreOption",f+="<a onclick='"+r.function+"' id="+e+"><img src='"+r.imageDesktop+"'/> <span>"+r.name+"<\/span> <\/a>");$("#"+i).append(f);toggleMyClass(event,i,"closePopUp")};$("#popUpMobileDownClose, .site-masking").on("click",function(n){n.preventDefault();n.stopPropagation();HideNotification();$("body").css("overflow","");$(".numbersPopup").hide()});createPopUpNotificationWithInput_captcha=function(){var n=new bsoftNativeAppProxy;n.IsInNativeApp()||popUpNotificationWithInput_captcha==undefined&&(popUpNotificationWithInput_captcha=grecaptcha.render("popUpNotificationWithInput_recaptch",{sitekey:"6Lcqs9ESAAAAAPEpodHxOQ70PKVwRyL8U3YG07t9",callback:function(n){google_captcha_code=n}}),grecaptcha.reset(popUpNotificationWithInput_captcha))}