function HorizontalSlider(n,t=""){function i(){$(`.${this.slider.className}`).scrollLeft()<=this.itemWidth&&$(`${this.parent} #leftArrowControl`).css("visibility","hidden");$(`.${this.slider.className}`).width()+$(`.${this.slider.className}`).scrollLeft()>=($(`.${this.slider.className} ${this.itemProps.selector}`).length-1)*this.itemWidth?$(`${this.parent} #rightArrowControl`).css("visibility","hidden"):$(`${this.parent} #rightArrowControl`).css("visibility","visible")}function r(n){n.target.id==="leftArrowControl"&&(this.hideArrowsControls(),this.scrollLeft());n.target.id==="rightArrowControl"&&(this.hideArrowsControls(),this.scrollRight())}function u(){$(`${this.parent} #leftArrowControl`).css("visibility","visible");$(`.${this.slider.className}`).animate({scrollLeft:$(`.${this.slider.className}`).scrollLeft()+this.itemWidth})}function f(){$(`${this.parent} #rightArrowControl`).css("visibility","visible");$(`.${this.slider.className}`).animate({scrollLeft:$(`.${this.slider.className}`).scrollLeft()-this.itemWidth})}function e(){this.slider=document.createElement("DIV");this.slider.className="horizontal-slider";this.arrowsControls=document.createElement("DIV");this.arrowsControls.className="arrowsControls";this.arrowsControls.innerHTML=`<div id="rightArrowControl" class="rightArrow arrowControl"></div><div id="leftArrowControl" class="leftArrow arrowControl"></div>`;this.itemWidth=n.width+n.margin*2;isMobile||(this.slider.style.width=this.setWidth(this.parent)+"px");this.slider.innerHTML+=this.itemProps.customList;$(this.parent).append(this.arrowsControls.outerHTML);$(this.parent).append(this.slider.outerHTML)}function o(n){return Math.floor($(n).width()/this.itemWidth)*this.itemWidth}this.itemProps=n;this.parent=t;this.scroll=r.bind(this);this.scrollRight=u.bind(this);this.scrollLeft=f.bind(this);this.setWidth=o.bind(this);this.hideArrowsControls=i.bind(this);this.render=e.bind(this);this.render();window.addEventListener("click",n=>this.scroll(n))}function SliderFunctionality(n){function t(n){n.target.id==="leftArrowControl"&&(n.target.disabled=!0,n.preventDefault(),this.scrollLeft());n.target.id==="rightArrowControl"&&(n.target.disabled=!0,n.preventDefault(),this.scrollRight())}function i(){$(this.slidesContainer).animate({scrollLeft:Math.ceil($(this.slidesContainer).scrollLeft()+$(this.lastVisibleSlide).width())},{complete:()=>this.rightArrow[0].disabled=!1});this.firstVisibleSlide.prev().length===0?this.rightArrow.hide():(this.leftArrow.show(),this.lastVisibleSlide=$(this.lastVisibleSlide).prev(),this.firstVisibleSlide=$(this.firstVisibleSlide).prev())}function r(){$(this.slidesContainer).animate({scrollLeft:Math.ceil($(this.slidesContainer).scrollLeft()-$(this.lastVisibleSlide).next().width())},{complete:()=>this.leftArrow[0].disabled=!1});this.lastVisibleSlide.next().length===0?this.leftArrow.hide():(this.leftArrow.show(),this.rightArrow.show(),this.lastVisibleSlide=$(this.lastVisibleSlide).next(),this.firstVisibleSlide=$(this.firstVisibleSlide).next())}function u(){if(isMobile==!1){this.visibleWidth=0;for(var n=0;n<this.slidesList.length;n++)if(this.sliderWidth+=$(this.slidesList[n]).width(),$(this.slidesContainer).parent().width()>=$(this.slidesList[n]).next().width()+this.visibleWidth)this.visibleWidth+=$(this.slidesList[n]).width(),this.lastVisibleSlide=$(this.slidesList[n]);else break;this.lastVisibleSlide.next().length===0&&this.leftArrow.hide();this.firstVisibleSlide.prev().length===0&&this.rightArrow.hide()}}this.slidesContainer=n.parent;this.slidesList=$(`${n.parent} ${n.itemName}`);this.leftArrow=$(n.leftArrow);this.rightArrow=$(n.rightArrow);this.visibleWidth=0;this.firstSlide=$(this.slidesList[0]);this.firstSlideInitPos=this.firstSlide.position().left;this.lastSlide=$(this.slidesList[this.slidesList.length-1]);this.lastVisibleSlide;this.firstVisibleSlide=$(this.slidesList[0]);this.nextSlide;this.prevSlide;this.calculateWidth=u.bind(this);this.scroll=t.bind(this);this.scrollRight=i.bind(this);this.scrollLeft=r.bind(this);this.calculateWidth();$(window).click(n=>this.scroll(n));$(window).resize(()=>this.calculateWidth())}function display_cate(){return}function changeSearchTab(n,t){n=="business"?(t||($(".bezekDrop").click(),location.href="#txtCat"),$("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue-light.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue.svg")):n=="private"?(t||($("#people").click(),location.href="#txtNamePrivate"),$("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue-light.svg")):(location.href="#",$("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue.svg"));isMobile!==!0||t?t||$(window).scrollTop(0):$(window).scrollTop(0)}function changeZipSearchTab(n,t){n=="business"?(t||($(".business").click(),location.href="#txtCat"),isMobile===!0&&($("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue-light.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue.svg"),$("a.zipcode-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/mikud-blue.svg"))):n=="private"?(t||($("#people").click(),location.href="#txtNamePrivate"),isMobile===!0&&($("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue.svg"),$("a.zipcode-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/mikud-blue.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue-light.svg"))):n=="zipCode"?(t||($("#zipcode").click(),location.href="#city_input"),isMobile===!0&&($("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue.svg"),$("a.zipcode-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/mikud-blue-light.svg"))):(location.href="#",$("a.business-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/bussines-blue.svg"),$("a.private-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/man-blue.svg"),$("a.zipcode-link .search-item-icon-blue").attr("src","Images/Icons/hompePageIcons/mikud-blue.svg"));isMobile!==!0||t?t||$(window).scrollTop(0):window.scrollTo(0,120)}function stickyElement(){var n=$(window).scrollTop(),t=$(".preFooter"),c=t.css("marginTop"),i=c.slice(0,c.length-2)*1,o=$(".main-content-wrapper").outerHeight(),r=$(".story-navbar"),s=r.offset().top,l=r.offset().left,f=t.offset().top-r.outerHeight()-i,u=$(".search-navbar"),h=u.offset().top,a=u.offset().left,e=t.offset().top-u.outerHeight()-i,v=$(".hp-side-banner"),p=v.offset().top,y=t.offset().top-v.outerHeight()-i;n>=h&&n<=e&&$(".search-navbar").css({position:"fixed",top:0,marginTop:"20px",left:`${a}px`});n>=s&&n<=f&&$(".story-navbar").css({position:"fixed",top:0,marginTop:"20px",left:`${l}px`});$(window).scroll(function(){f=t.offset().top-r.outerHeight()-i;e=t.offset().top-u.outerHeight()-i;o=$(".main-content-wrapper").outerHeight();n=$(window).scrollTop();var c=o-r.outerHeight(),v=o-u.outerHeight();n>=s&&n<=f&&$(".story-navbar").css({position:"fixed",top:0,marginTop:"20px",left:`${l}px`});n>f&&$(".story-navbar").css({position:"absolute",top:`${c}px`,left:"initial"});n<s&&($(".story-navbar").css({position:"relative",top:"initial",marginTop:"unset",left:0}),$(".show-side-banner").css({position:"absolute",top:"initial"}));n>=h&&n<=e&&($(".search-navbar").css({position:"fixed",top:0,marginTop:"20px",left:`${a}px`}),$(".show-side-banner").css({position:"fixed",top:0,marginTop:"20px"}));n>e&&$(".search-navbar").css({position:"absolute",top:`${v}px`,left:0});n<h&&$(".search-navbar").css({position:"absolute",top:"initial",marginTop:"unset",left:0});n>=p&&n<=y;n>y&&$(".show-side-banner").css({position:"absolute",top:"initial",marginTop:"0"})})}function isAndroid(){return/Android/i.test(navigator.userAgent)}function toggleClass(n,t,i){n.preventDefault();$("#"+t).toggle(i)}function isInViewport(n){var t=$(n).offset().top,r=t+$(n).outerHeight(),i=$(window).scrollTop(),u=i+$(window).height();return r>i&&t<u}function setWidth(n,t,i,r,u){var f;f=i?Math.round(($(i).width()-r)/n)*n:Math.round(($(window).width()-r)/n)*n;u&&f>u&&(f=u);$(t).css("width",f)}function horizontalScroll(n,t,i,r){var u=$(i);u.scrollLeft()<=t&&$(`${r} .move-left`).hide();u.width()+u.scrollLeft()>=($(`${i} .scroll-item`).length-1)*t?$(`${r} .move-right`).hide():$(`${r} .move-right`).show();n=="left"?($(`${r} .move-right`).show(),u.animate({scrollLeft:u.scrollLeft()-t})):($(`${r} .move-left`).show(),u.animate({scrollLeft:u.scrollLeft()+t}))}function showGoogleBanner(){var t=$(".search-navbar"),n=$(".main-content");t.offset().left>360||n.offset()&&n.offset().left>550?$(".hp-side-banner").addClass("show-side-banner"):$(".hp-side-banner").removeClass("show-side-banner")}function sendCoupon(){var t=$("#phone-num-input").val(),n;if(phoneNumberObj=whatIsMyPhone(t),!(typeof phoneNumberObj!="undefined"&&phoneNumberObj.error.trim()==""&&phoneNumberObj.isMobile==!0)){$("#sendCouponPhoneResult").text("שדה מספר טלפון אינו תקין.");return}n={MID:_memberId,phoneNum:phoneNumberObj.areaCode+phoneNumberObj.number,token:unescape(_couponToken),MemberName:unescape(_memberName),couponId:_couponId};$.ajax({url:"/Services/Coupons.asmx/realizeCouponAndSendSMS",data:JSON.stringify(n),dataType:"json",type:"POST",async:!1,contentType:"application/json; charset=utf-8",error:function(){$("#sendCouponPhoneResult").text("ישנה שגיאה")},success:function(n){n.d=="-1"?($(".coupon-code").css("display","none"),$("#sendCouponResultInfo").css("display","none"),$("#couponPhoneNumber").text(phoneNumberObj.areaCode+phoneNumberObj.number),$("#sendCouponResult").text("מספר הטלפון מימש את הקופון. לא ניתן לממש יותר מפעם אחת."),openResultCouponPopup()):n.d=="-2"?$("#sendCouponPhoneResult").text("מספר הקופון לא שייך לבית העסק."):n.d!="0"?($("#couponResponseId").text(n.d),$("#couponPhoneNumber").text(phoneNumberObj.areaCode+"-"+phoneNumberObj.number),$("#sendCouponResultInfo").css("display","block"),$(".cp-business-info").html(_memberImage+_memberName),dataLayer.push({event:"coupons",category:_memberCategory,city:_memberCity}),openResultCouponPopup()):n.d=="0"?($("#sendCouponPhoneResult").text("לא ניתן לממש עוד קופונים"),$("#sendCouponPhoneResult").attr("role","alert")):($("#sendCouponPhoneResult").text("ישנה שגיאה"),$("#sendCouponPhoneResult").attr("role","alert"))}})}function openResultCouponPopup(){$("#couponPopupContainer").css("display","none");$("#couponResultPopupContainer").css("display","block")}function openCouponPopup(couponOriginal,couponId,couponTitle,couponDesc,memberId,memberName,token,memberPhone,memberCategory,memberCity,memberLink,quantity,additionalInfo,fromDate,toDate,hashedMemberId,exclusiveB144,image){if(_couponId=couponId,_memberId=memberId,_memberName=unescape(memberName),_couponToken=unescape(token),_memberCategory=memberCategory,_memberCity=memberCity,_memberPhone=memberPhone,_memberLink=memberLink,_memberImage=image!=null&&image!=""?"<img class='icon-category' src='"+image+"'/>":"<img class='icon-category' src='/Images/Icons/SVG/Blue_default_suitcase.svg' alt=''>",$(".site-masking").show(),$("#phone-num-input").val(""),isMobile==!1){_couponTitleNew=couponOriginal.replace("&#39;","'").replace(/&quot;/g,'"').replace(/quot;/g,'"').replace("&amp;","");$("#phone-num-input").val("");$("#sendCouponPhoneResult").text("");$("#couponPopupContainer").css("display","block");$("#couponMemberName").text(memberName);$("#couponPopupTitle").text(_couponTitleNew);$("#couponPopupTitle").text(_couponTitleNew.length>170?_couponTitleNew.substring(0,170)+"...":_couponTitleNew);$("#couponPopupDesc").text(couponDesc);typeof additionalInfo!="undefined"&&additionalInfo!=""?$("#additionalInfo").text(additionalInfo):($("#couponInfo").css("display","none"),$("#hrLine").css("display","none"));exclusiveB144=="True"&&$(".exclusiveB144").show();(typeof quantity=="undefined"||quantity==""||quantity<0)&&(typeof toDate=="undefined"||toDate==""||toDate=="01/01/0001"||toDate=="01/01/1900")?($("#couponLimit").css("display","none"),$("#hrLine").css("display","none")):(typeof quantity!="undefined"&&quantity!=""&&quantity>0?$("#couponQuantity").text($("#couponQuantity").text().replace("#quantity#",quantity)):($("#seperator").css("display","none"),$("#couponQuantity").css("display","none"),quantity!=-1&&$("#sendCouponPhoneResult").text("לא ניתן לממש עוד קופונים")),typeof toDate!="undefined"&&toDate!=""&&toDate!="01/01/0001"&&toDate!="01/01/1900"?$("#couponValid").text($("#couponValid").text().replace("#date#",toDate)):($("#seperator").css("display","none"),$("#couponValid").css("display","none")));var bsoftMemberCoupon=eval("member_"+memberId);bsoftMemberCoupon&&bsoftMemberCoupon.ReportClick(25,null)}else $("body").css("overflow","hidden"),$("#txtCouponPhone").val(""),$("#sendCouponResult").text(""),$("#couponPopupContainer").css("display","block"),$("#couponPopupTitle").text(couponDesc),$("#footerTextComment").css("display","block"),$("#hrLine").css("display","block"),$(".declaration-star").css("display","inline-block"),$("#couponQuantity").css("display","block"),$("#couponValid").css("display","block"),additionalInfo.length>5?$("#additionalInfo").html(additionalInfo):($("#footerTextComment").css("display","none"),$("#hrLine").css("display","none"),$(".declaration-star").css("display","none"),$("#couponInfo").css("display","none")),(typeof quantity=="undefined"||quantity==""||quantity<0)&&(typeof toDate=="undefined"||toDate==""||toDate=="01/01/0001"||toDate=="01/01/1900")?($("#couponQuantity").css("display","none"),$("#couponValid").css("display","none"),$("#hrLine").css("display","none"),$("#couponLimit").css("display","none")):(typeof quantity!="undefined"&&quantity!=""&&quantity>0?$("#couponQuantity").html("מוגבל עד "+quantity+" מימושים לקופון."):$("#couponQuantity").css("display","none"),typeof toDate!="undefined"&&toDate!=""&&toDate!="01/01/0001"&&toDate!="01/01/1900"?$("#couponValid").html("<b>תוקף:<\/b> עד "+toDate+" או עד גמר המלאי, המוקדם מביניהם."):$("#couponValid").css("display","none"),$("#couponValid").css("display")=="none"&&$("#couponQuantity").css("display")=="none"&&($("#hrLine").css("display","none"),$("#couponLimit").css("display","none"))),$("#couponPopupContainer div").focus()}function closeCouponPopup(){$("body").css("overflow","scroll");$(".site-masking").hide();$("#couponPopupContainer").css("display","none");$("#sendCouponPhoneResult").text("");$("#sendCouponResult").removeAttr("role")}function loadMoreCoupons(n,t,i,r,u){function h(){var t=this;this.Data={PageIndex:typeof n!="undefined"?n:1,Category:typeof _CouponsSearchCategoryName!="undefined"?_CouponsSearchCategoryName:"",MemberName:typeof _CouponsSearchMemberName!="undefined"?_CouponsSearchMemberName:"",City:typeof _CouponsSearchCity!="undefined"?_CouponsSearchCity:"",cx:typeof _CouponsSearchCx!="undefined"?_CouponsSearchCx:"",cy:typeof _CouponsSearchCy!="undefined"?_CouponsSearchCy:"",advcategories:typeof _CouponsSearchAdvCategories!="undefined"?_CouponsSearchAdvCategories:""};this.successCallBack=function(n){if(typeof n=="undefined"||n==""){console.log("------------- success! but no results ------------------");endOfResults=!0;$(".site-footer").css("display","block");$(".load-container.load").hide();return}showMoreResults=!0;$(".load-container.load").hide();$("#div_ListResult").append(n);typeof u=="function"&&u.call()};this.errorCallBack=function(){showMoreResults=!0;$(".load-container.load").hide();typeof u=="function"&&u.call()};this.url="/Coupons/couponsList.aspx/GetCouponsAsync"}var e=0,o=0,s=!1,f;return typeof t=="undefined"||t=="0"||isNaN(t)||(e=t),typeof i=="undefined"||i=="0"||isNaN(i)||(o=i),s=typeof r!="undefined"&&r==!0?r:typeof queryStringObj.allResults=="undefined"?!1:!0,f=new h,$(".load-container.load").show(),setTimeout(function(){NewAjaxCall(f.Data,f.successCallBack,f.errorCallBack,f.url,"POST")},100),!1}function closeResultCouponPopup(){$("#sendCouponResult").text("");$("body").css("overflow","scroll");$(".site-masking").hide();$("#couponResultPopupContainer").css("display","none")}function SuggestedCouponsClick(n){if(typeof n!="undefined"&&n.trim()!=""){ShowLoader();var t=BusinessRootDirectory+"coupons/CouponsList.aspx?_business="+n,i=!0,r=new GeoLocationObj,u=r.GetCurrentLocation(function(n){n.XCoord!="0.0"&&n.YCoord!="0.0"&&(i=!0,hidCurrY=n.YCoord,hidCurrX=n.XCoord,t+="&cx="+hidCurrX+"&cy="+hidCurrY,window.location=t)},function(){ShowNotificationWithCallBack("GPS  כבוי וגם שדה עיר ריק","אין אפשרות לזהות את מיקומך הנוכחי. אנא בדוק את חיבור ה - GPS במכשיר וכן את הגדרות המיקום בדפדפן. לחילופין, ניתן להזין חיפוש ע&quot;פ יישוב.",function(){$(this).click(function(){window.location.href=window.location.href})})})}HideLoader()}function ValidateCharacters(n){var t=!0,i,r;return n.length>0&&(i=new RegExp("[0-9א-תa-zA-Z'\":,.-]{2,}$"),r=new RegExp("[a-zא-תA-Z]{2,}"),t=i.test(n)&&r.test(n)),t}function coupon_world_aspx_js(){this.couponsSearch=function(){var u,f,t,e,o,s;ShowLoader();event.preventDefault();var r=document.getElementById("NameBusiness_after_split").value.trim(),i=$.trim($("#txtCategoryInput").val()),n=$.trim($("#txtBusinessCityInput").val());if(n=n=="באזור שלי"?"":n,i=="")return ShowNotification("שגיאה","יש להזין עסק/תחום לחיפוש"),!1;if(ValidateCharacters(i)==!1||ValidateCharacters(i)==!1)return ShowNotification("שגיאה","הוזנו תווים לא חוקיים בשדה שם עסק/תחום."),!1;if(ValidateCharacters(n)==!1||ValidateCharacters(n)==!1)return ShowNotification("שגיאה","הוזנו תווים לא חוקיים בשדה אזור."),!1;if(ValidateBusinessCityExists(n)==!1)return ShowNotification("עיר לא קיימת","העיר שנבחרה לא קיימת. אנא נסה שוב."),!1;t="/coupons/CouponsList.aspx?";t+=i!=""&&i!="הזן תחום"?"_business="+encodeURIComponent(i):"";t+=r!=""&&r!="ו/או שם עסק"?"&_business_name="+encodeURIComponent(r):"";window.location.hash="";e=!1;n!=""?(t+="&_city="+encodeURIComponent(n),window.location.href=t):(o=new GeoLocationObj,s=o.GetCurrentLocation(function(i){i.XCoord!="0.0"&&i.YCoord!="0.0"&&n==""?(u=i.YCoord,f=i.XCoord):n==""&&(e=!0);t+="&cx="+f+"&cy="+u;window.location.href=t},function(n){var t,i;switch(n.code){case PERMISSION_DENIED:t="GPS  כבוי וגם שדה עיר ריק";i="אין אפשרות לזהות את מיקומך הנוכחי. אנא בדוק את חיבור ה - GPS במכשיר וכן את הגדרות המיקום בדפדפן. לחילופין, ניתן להזין חיפוש ע&quot;פ יישוב.";break;case POSITION_UNAVAILABLE:t="GPS  כבוי וגם שדה עיר ריק";i="אין אפשרות לזהות את מיקומך הנוכחי. אנא בדוק את חיבור ה - GPS במכשיר וכן את הגדרות המיקום בדפדפן. לחילופין, ניתן להזין חיפוש ע&quot;פ יישוב.";break;case TIMEOUT:t="GPS  כבוי וגם שדה עיר ריק";i="אין אפשרות לזהות את מיקומך הנוכחי. אנא בדוק את חיבור ה - GPS במכשיר וכן את הגדרות המיקום בדפדפן. לחילופין, ניתן להזין חיפוש ע&quot;פ יישוב."}HideLoader();ShowNotification(t,i)}))};this.BusinessSearch=function(){var i;ShowLoader();var r=document.getElementById("NameBusiness_after_split").value.trim(),t=$.trim($("#txtCategoryInput").val()),n=$.trim($("#txtBusinessCityInput").val());if(n=n=="באזור שלי"?"":n,t=="")return ShowNotification("לא הוזן ערך לחיפוש","לא הוזן ערך בשדה שם עסק/תחום."),!1;if(ValidateCharacters(t)==!1||ValidateCharacters(t)==!1)return ShowNotification("יש להזין תווים חוקיים בלבד.","הוזנו תווים לא חוקיים בשדה שם עסק/תחום."),!1;if(ValidateCharacters(n)==!1||ValidateCharacters(n)==!1)return ShowNotification("יש להזין תווים חוקיים בלבד.","הוזנו תווים לא חוקיים בשדה אזור."),!1;if(ValidateBusinessCityExists(n)==!1)return ShowNotification("עיר לא קיימת","העיר שנבחרה לא קיימת. אנא נסה שוב."),!1;i="/coupons/CouponsList.aspx?";i+=t!=""&&t!="הזן תחום"?"_business="+cleanString.fixedEncodeURIComponent(t):"";i+=r!=""&&r!="ו/או שם עסק"?"&_business_name="+cleanString.fixedEncodeURIComponent(r):"";window.location.hash="";i+="&_city="+cleanString.fixedEncodeURIComponent(n);window.location.href=i}}function SetInputCity(n,t){var r=$("#"+n).val(),i="";try{i=$("#"+n).val(t.split("-")[0]);$("#"+n).parent().find(".x-icon").show();typeof i=="undefined"&&(i=t)}catch(u){i=t}$("#ul_cities").html("");r!==""&&$("#"+n).parent().parent().find("a").trigger("click")}function SetInput(n,t){var i="";$("#"+n).val(t.split("-")[0]);$("#"+n).parent().find(".x-icon").show();try{i=t.split("-")[1];typeof i=="undefined"&&(i=t)}catch(r){i=t}i!=""&&i!=";"?(i.split(";")[0]!=null&&i.split(";")[0]!=""&&(document.getElementById("category_after_split").value=i.split(";")[0]),i.split(";")[1]!=null&&i.split(";")[1]!=""&&(document.getElementById("NameBusiness_after_split").value=i.split(";")[1])):document.getElementById("NameBusiness_after_split").value=i.value;$("#ul_business_category").html("")}function getTiny(n){var t={MID:_memberId};$.ajax({url:"/Services/Coupons.asmx/getTiny",data:JSON.stringify(t),dataType:"json",type:"POST",contentType:"application/json; charset=utf-8",error:function(){$("#sendCouponPhoneResult").text("ישנה שגיאה")},success:function(t){t.d.length>0&&n(t.d)}})}function shareCoupon(n){var i=$("#popUpNotificationInput").val(),t;if(phoneNumberObj=whatIsMyPhone(i),!(typeof phoneNumberObj!="undefined"&&phoneNumberObj.error.trim()==""&&phoneNumberObj.isMobile==!0)){$("#popupResponseText").html("שדה מספר טלפון אינו תקין.");$("#popupResponseText").attr("role","alert");return}t={msg:n,phoneNumber:phoneNumberObj.areaCode+phoneNumberObj.number,memberId:_memberId};$.ajax({url:"/Services/Coupons.asmx/shareSms",data:JSON.stringify(t),dataType:"json",type:"POST",async:!1,contentType:"application/json; charset=utf-8",error:function(){$("#"+responseElementId).text("ישנה שגיאה")},success:function(n){n.d!=!1?($("#popupResponseText").html("ההודעה נשלחה."),$("#popupResponseText").attr("role","alert")):($("#popupResponseText").html("ישנה שגיאה"),$("#popupResponseText").attr("role","alert"))}})}function shortenTitle(){$(".cw-coupon-item.coupon-shadow").each(function(){var n=$(this).find(".coupon-title"),t=65,i,r;n!=null&&n.text().length>t&&(i=n.text().substring(0,t).lastIndexOf(" "),i<t&&(t=i),r=n.text().substring(0,t)+"...",n.text(r))})}var loadComments,animateSectionNumber,coupon_world_search;$(window).load(function(){$(".opening-wrapper").css("opacity","1")});$(document).ready(function(){var t,n;animateSectionNumber(".recommendations-wrapper .section-counter");isMobile==!0&&$(".main-footer").css("margin-bottom","45px");$(".accordion-menu").accordion({header:".pricelist-title",active:0,collapsible:!0,icons:null});isMobile&&!isAndroid()&&($("#mainPage").addClass("main-page-ios"),$("#zuck-modal").addClass("zuck-modal-ios"));t=new SliderFunctionality({parent:"#category_list",leftArrow:"#leftArrowControl",rightArrow:"#rightArrowControl",itemName:".scroll-item"});display_cate();isMobile==!1&&($(".bdigital .move-right").click(()=>horizontalScroll("right",124,".offers-nav",".bdigital")),$(".bdigital .move-left").click(()=>horizontalScroll("left",124,".offers-nav",".bdigital")),$(".bdigital .move-right").hide(),setWidth(124,".offers-nav",".section-content",50,620),n=($(".bdigital").width()-$(".offers-nav").width())/2-20,$(".bdigital .move-right").css({right:`${n}px`}),$(".bdigital .move-left").css({left:`${n}px`}),$(".story-navbar").length>0&&stickyElement(),showGoogleBanner());$(window).scroll(()=>{var i=Array.from($(".section-counter,.offers-nav")),n,t;i.forEach(n=>{if(isInViewport(n)&&(animateSectionNumber(n),n.parentElement.parentElement.className.split(" ").indexOf("loadedImages")<0)){n.parentElement.parentElement.classList.add("loadedImages");var t=n.parentElement.parentElement,i=Array.from($(t).find("img[data-src]"));i.forEach(n=>{$(n).attr("src",$(n).attr("data-src"))})}});n=$("#popup_miZamin");t=accessCookie("popupMiPanoey");typeof n=="undefined"||n==null||isMobile!=!0||t||(n.css("display","block"),setTimeout(function(){n.remove();createCookie("popupMiPanoey","1",150)},1e4))})});$(window).resize(function(){if(isMobile==!1){setWidth(124,".offers-nav",".section-content",50,620);var n=($(".bdigital").width()-$(".offers-nav").width())/2-20;$(".bdigital .move-right").css({right:`${n}px`});$(".bdigital .move-left").css({left:`${n}px`});showGoogleBanner()}});animateSectionNumber=function(n){if(typeof $.animateNumber!="undefined"){var i=$.animateNumber.numberStepFactories.separator(","),t=$(n);t.animateNumber({number:t.data("counter"),numberStep:i},400)}};var isSearchResults=!0,queryStringObj=null,isRadiusSearch=!1,showMoreResults=!0,endOfResults=!1,resultsCount=1,orderByNewCoupons=[],orderByPopularCoupons=[],filterByFriendBringsFriendCoupon=[],filterByPercentageCouponsCoupon=[],_couponId="",_memberId="",_memberName="",_memberPhone="",_couponToken="",_memberCategory="",_memberCity="",_memberLink="",_memberImage="";coupon_world_search=new coupon_world_aspx_js;$(function(){$("#txtBusinessCityInput").focusin(function(){$("#txtBusinessCityInput").val()=="באזור שלי"&&$("#txtBusinessCityInput").val("")});$(".site-footer").css("position","absolute");$("#coupon_b_BusinessSearch").click(function(){isMobile==!1?coupon_world_search.BusinessSearch():coupon_world_search.couponsSearch()});$("#txtCategoryInput").focusout(function(){window.setTimeout(function(){$("#ul_business_category").html("")},100)});$("#txtBusinessCityInput").focusout(function(){window.setTimeout(function(){$("#ul_cities").html("")},100)});$("#txtBusinessCityInput").keypress(function(n){n.which==13&&(n.preventDefault(),coupon_world_search.BusinessSearch())});$("#phone-num-input").on("keydown",function(n){n.which==13&&(n.preventDefault(),n.stopPropagation(),sendCoupon())});$("#txtCategoryInput").keypress(function(n){n.which==13&&(n.preventDefault(),coupon_world_search.BusinessSearch())});queryStringObj=UserQueryStringObj.getQueryStringJsonObj(",")});$("#twitterShare").click(function(n){n.preventDefault();var t=_memberLink.replace("http://","https://");return window.open("https://twitter.com/share?url="+t,"","menubar=no,toolbar=no,resizable=no,scrollbars=yes,height=600,width=600"),!1});$("#faceBookShare").click(function(){var n=_memberLink.replace("http://","https://"),t=document.title.replace(re,"");return window.open("https://www.facebook.com/sharer/sharer.php?u="+n+"&title="+t,"","menubar=no,toolbar=no,resizable=no,scrollbars=yes,height=600,width=600"),!1});$(document).ready(shortenTitle);$(window).scroll(shortenTitle)