function initFloatAd(){try{$.ajax({cache:!1,url:"/Messages/InitFloatAD",dataType:"json",success:function(n){n.ShowAd&&(floatAdTimeout=setTimeout(function(){$("#floatAd").html(n.Html);$("#floatAd").css("right","-10px");$.get("/Messages/TrackOpenFloatAd?name="+n.Name+"&timeToShow="+n.TimeToShow,{},function(){})},n.TimeToShow*1e3))},error:function(){}})}catch(n){}}function showAjaxError(){alert("אירעה שגיאה")}function hideBrokenImages(){$("img").on("error",function(){$(this).hide()});$('img[src=""]').hide();$("img").filter(function(){return $(this).attr("src")===""}).hide();$("img").each(function(){this.src||$(this).hide()})}function bindOrderingEvents(){$(".ordering_link").click(function(){$(".ordering_link").removeClass("active");$(this).addClass("active");var n=$(this),t=$("#OrderBy");t.val()==""?t.val(n.data("orderByKey")+"_"+n.data("firstDirection")):t.val().indexOf(n.data("orderByKey"))>-1?t.val().indexOf("Desc")>-1?t.val(n.data("orderByKey")+"_Asc"):t.val(n.data("orderByKey")+"_Desc"):t.val(n.data("orderByKey")+"_"+n.data("firstDirection"));SubmitComparisonForm()})}function addRegulaarSelectItem(n,t,i){var u,r,f;n.addClass("selected");u=$(".reg_selected_items_container[data-guid='"+i+"']");r=$("select[data-guid='"+i+"']");r.find($("option[value="+t+"]")).prop("selected",!0);f='<span data-id="'+t+'">'+n.html()+"<\/span>";u.append(f);bindRegSelectEvents();$(r).valid()}function removeRegullarSelectItem(n,t,i){var f=$(".reg_options_container[data-guid='"+i+"']"),u,r;f.find("span[data-id='"+t+"']").removeClass("selected");n.removeClass("selected");u=$(".reg_selected_items_container[data-guid='"+i+"']");u.find('span[data-id="'+t+'"]').remove();r=$("select[data-guid='"+i+"']");r.find($("option[value="+t+"]")).prop("selected",!1);$(r).valid()}function bindRegSelectEvents(){$(".reg_option_name_wrapper").unbind("click").click(function(){$(this).next().hasClass("active")?($(this).next().removeClass("active"),clearShowOperator()):($(this).next().addClass("active"),setShowOperator($(this),$(this).next()))});$(".reg_options_container span").unbind("click").click(function(){var n=$(this).dataid(),t=$(this).parent().parent().dataGuid();$(this).hasClass("selected")?removeRegullarSelectItem($(this),n,t):addRegulaarSelectItem($(this),n,t)});$(".reg_selected_items_container span").unbind("click").click(function(){var n=$(this).dataid(),t=$(this).parent().dataGuid();removeRegullarSelectItem($(this),n,t)})}function bindTwoLevelSelectEvents(){$(".hrch_option_name_wrapper").unbind("click").click(function(){$(this).next().hasClass("active")?($(this).next().removeClass("active"),clearShowOperator()):($(this).next().addClass("active"),setShowOperator($(this),$(this).next()))});$(".hrch_right_labels > label").unbind("click").click(function(){$(this).siblings().removeClass("active");$(this).addClass("active");var n=$(this).dataid();$.each($(".hrch_group_list_container"),function(t,i){if($(i).dataid()==n)$(i).addClass("active");else{$(i).removeClass("active");var r=$(i).dataid()}})});$(".hrch_list_column > span").unbind("click").click(function(){var n=$(this).dataid(),t=$(this).dataParentId(),i=$(this).parent().parent().dataGuid();$(this).hasClass("selected")?removeTwoLevelSelectItem($(this),n,t,i):addTwoLevelSelectItem($(this),n,t,i)});$(".group_list_select_all").unbind("click").click(function(){$(this).parent().parent().find("span").each(function(n,t){addTwoLevelSelectItem($(t),$(t).dataid(),$(t).dataParentId(),$(t).parent().parent().dataGuid())})});$(".group_list_clear_all").unbind("click").click(function(){$(this).parent().parent().find("span").each(function(n,t){removeTwoLevelSelectItem($(t),$(t).dataid(),$(t).dataParentId(),$(t).parent().parent().dataGuid())})});$(".group_list_close").unbind("click").click(function(){$(".hrch_options_container[data-guid='"+$(this).dataGuid()+"']").removeClass("active");clearShowOperator()});$(".hrch_selected_items_container > span").unbind("click").click(function(){var n=$(this).dataid(),t=$(this).dataParentId(),i=$(this).parent().dataGuid();removeTwoLevelSelectItem($(this),n,t,i)})}function addTwoLevelSelectItem(n,t,i,r){var u;if(!n.hasClass("selected")){n.addClass("selected");var f=$(".hrch_right_labels[data-guid='"+r+"']").find($("label[data-id='"+i+"']")),e=$(".hrch_selected_items_container[data-guid='"+r+"']"),o=$("select[data-guid='"+r+"']");o.find($("option[value="+t+"]")).prop("selected",!0);u='<span data-id="'+t+'" data-parent-id="'+i+'">'+f.text()+" "+n.html()+"<\/span>";e.append(u);setTwoLevelSelectParent(r);bindTwoLevelSelectEvents()}}function removeTwoLevelSelectItem(n,t,i,r){var e=$(".hrch_group_list_container[data-guid='"+r+"']"),u,f;e.find("span[data-id='"+t+"']").removeClass("selected");n.removeClass("selected");u=$(".hrch_selected_items_container[data-guid='"+r+"']");u.find('span[data-id="'+t+'"]').remove();f=$("select[data-guid='"+r+"']");f.find($("option[value="+t+"]")).prop("selected",!1);setTwoLevelSelectParent(r)}function setTwoLevelSelectParent(n){var t=$(".hrch_right_labels[data-guid='"+n+"']"),i=$(".hrch_group_list_container[data-guid='"+n+"']");i.each(function(n,i){var e=$(i).dataid(),f=$(i).find("span").length,r=$(i).find("span.selected").length,u=t.find('label[data-id="'+e+'"]');u.removeClass("semi_selected").removeClass("selected");r==0||(f>r?u.addClass("semi_selected"):f==r&&u.addClass("semi_selected").addClass("selected"))})}function setShowOperator(n,t){currentOperator=n;currentShowableElement=t}function clearShowOperator(){currentOperator=null;currentShowableElement=null}function setNeedsToRefreshPage(n){needsToRefreshPage=n}function closePopup(){clearPopUp();needsToRefreshPage?location.reload():($(".popup_div").hide(),$(".screen_blocker").hide(),$(".popup_div_content").html(""))}function SubmitComparisonForm(){var n=$("#ComparisonForm");n&&n.submit()}function openRegisterLoginPopup(n){$(".only_show_phone").removeClass("only_show_phone");openPopUp("/Account/RegisterLogin");try{var t=n==null?"Other":n;window.dataLayer.push({event:"googleAnalyticsEvent",eventCategory:"RegisterPage",eventAction:t,eventLabel:location.href,eventValue:0})}catch(i){}}function clearPopUp(){$(".only_show_phone").removeClass("only_show_phone");clearTimeout(chooseMoreTimeout)}function openStarTablePopup(){clearPopUp();openPopUp("/Contact/StarTable")}function openAffiliateContactForm(n){clearPopUp();openPopUp(n)}function openContactForm(n){clearPopUp();openPopUp(n)}function openDirectCallPopup(n){clearPopUp();clearTimeout(chooseMoreTimeout);$(".popup_div_box").addClass("only_show_phone");openPopUp(n,chooseMoreDelay)}function openPopUp(n,t){$(".popup_div").hide();$(".screen_blocker").hide();$(".popup_div_content").html("");centerPopup();$(".popup_div").fadeIn("fast");$(".screen_blocker").show();$(".popup_div_loading").show();$(".popup_div_content").load(n,function(){$(".popup_div_loading").hide();t&&typeof t=="function"&&t()})}function chooseMoreDelay(){chooseMoreTimeout=setTimeout(function(){$(".only_show_phone").removeClass("only_show_phone")},1e4)}function openMoreCompaniesFromSmallForm(n){$(".only_show_phone").removeClass("only_show_phone");var t=$("#"+n).html();$("#"+n).html("");$(".popup_div").hide();$(".screen_blocker").hide();$(".popup_div_content").html("");centerPopup();$(".popup_div").show();$(".screen_blocker").show();$(".popup_div_content").html(t);$(".popup_div_loading").hide()}function centerPopup(){$(".popup_div").css("top",$(window).scrollTop()+100)}function openPlanInner(n){var i=$("#planOpenLink_"+n),t,r;i.hasClass("plan_open_link_closed")?(i.html("סגור<span><\/span>"),i.removeClass("plan_open_link_closed"),i.addClass("plan_open_link_opened"),t=$("#planInner_"+n),t.show(),$.trim(t.html()).length||(r=$("<div/>",{id:"planInnerLoader_"+n,style:"text-align:center;"}),r.append('<img src="/img/page_load.gif"/>'),t.append(r),t.load("/Ajax/GetPlanMoreDetails/"+n,function(){$("planInnerLoader_"+n).hide()})),$("#plan_"+n).addClass("opened")):closePlanInner(n)}function closePlanInner(n){var t=$("#planOpenLink_"+n);t.html("קרא עוד<span><\/span>");t.removeClass("plan_open_link_opened");t.addClass("plan_open_link_closed");$("#planInner_"+n).hide();$("#plan_"+n).removeClass("opened")}function getMorePlansForSection(n,t,i,r){var u=$("#"+t);u.load("/Ajax/GetSectionMorePlans/",{sectionID:i,arrCurrentPlans:r},function(){n.hide()})}function showfilter(){var n=$("#devices_filter");n.is(":visible")?($(".devices_filter_content").slideUp("fast",function(){n.hide()}),$("#devices_search_button").removeClass("active")):(n.show(),$(".devices_filter_content").slideDown("fast"),$("#devices_search_button").addClass("active"))}function setFloatAd(){}function closeFloatAd(n,t){try{$.get("/Messages/TrackCloseFloatAd?name="+n+"&timeToShow="+t,{},function(){})}catch(i){}$("#floatAd").css("opacity","0")}function GetMetaUrl(){var n=$("meta[property='og:url']");return n&&n.attr("content")?n.attr("content"):location.href}function checkCompaniesMultipleForm(n){return $("#moreCompanies_"+n+" input:checkbox:checked").length==0?($("#err_companies_"+n).show(),!1):($("#err_companies_"+n).hide(),!0)}function GetMetaTitle(){var n=document.getElementsByTagName("title");return n?n[0].innerHTML:""}function GetMetaDescription(){var n=$("meta[name='description']");return n&&n.attr("content")?n.attr("content"):""}function sendShareEvent(n){try{window.dataLayer.push({event:"googleAnalyticsEvent",eventCategory:"Share",eventAction:n,eventLabel:GetMetaUrl(),eventValue:0})}catch(t){}}function sendShareEventInner(n,t){try{window.dataLayer.push({event:"googleAnalyticsEvent",eventCategory:"Share",eventAction:n,eventLabel:t,eventValue:0})}catch(i){}}function shareOnFacebook(){return sendShareEvent("facebook"),window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(GetMetaUrl()),"popup","width=635,height=342,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnTwitter(){return sendShareEvent("twitter"),window.open("https://twitter.com/share?text="+encodeURIComponent(GetMetaTitle())+"&url="+encodeURIComponent(GetMetaUrl()),"popup","width=635,height=342,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnGooglePlus(){return!1}function shareOnMail(){return sendShareEvent("mail"),window.location.href="mailto:?subject="+GetMetaTitle()+"&body="+encodeURIComponent(GetMetaDescription())+"%0D%0A"+GetMetaUrl()+"%0D%0A",!1}function shareOnWhatsupWeb(){return sendShareEvent("whatsapp"),window.open("https://web.whatsapp.com/send?text="+encodeURIComponent(GetMetaUrl()),"popup","width=735,height=842,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnWhatsup(){return sendShareEvent("whatsapp"),window.location.href="whatsapp://send?text="+GetMetaTitle()+" "+GetMetaUrl(),!1}function shareOnFacebookInner(n){return sendShareEventInner("facebook",n),window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(n),"popup","width=635,height=342,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnTwitterInner(n,t){return sendShareEventInner("twitter",n),window.open("https://twitter.com/share?text="+encodeURIComponent(t)+"&url="+encodeURIComponent(n),"popup","width=635,height=342,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnGooglePlusInner(){return!1}function shareOnMailInner(n,t,i){return sendShareEventInner("mail",n),window.location.href="mailto:?subject="+t+"&body="+encodeURIComponent(i)+"%0D%0A"+n+"%0D%0A",!1}function shareOnWhatsupWebInner(n){return sendShareEventInner("whatsapp",n),window.open("https://web.whatsapp.com/send?text="+encodeURIComponent(n),"popup","width=735,height=842,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1}function shareOnWhatsupInner(n,t){return sendShareEventInner("whatsapp",n),window.location.href="whatsapp://send?text="+t+" "+n,!1}function toggleAnswer(n){$(n).parent().toggleClass("qna_active")}function validateContactForm(n){var u;try{var t=n.target,r=!0,i=$(t).find("[id^=comboCity_]");return i.length>0&&($.fn.scombobox.validate(i),$(i).find(".input-validation-error").length>0&&(r=!1)),u=$(t).valid()&&r,u?($(t).find(":submit").attr("disabled","disabled"),!0):(n.preventDefault(),n.stopPropagation(),!1)}catch(f){return!0}}var currentOperator,currentShowableElement,chooseMoreTimeout,needsToRefreshPage;floatAdTimeout=null;$(document).ready(function(){function u(){var u=r.scrollTop(),i=u>o;i&&!t?(n.addClass("fixednav"),t=!0):!i&&t&&(n.removeClass("fixednav"),t=!1)}var n=$("#topnav"),o=n.length?n.offset().top:0,t=!1,r=$(window),f,e,i;r.scroll(function(){u()});$(function(){u()});$(document).ajaxError(function(){showAjaxError()});SubmitComparisonForm();bindOrderingEvents();$(".popup_div_close_button").click(function(){closePopup()});$(".popup_div_close_button2").click(function(){closePopup()});$(".popup_div_close_button3").click(function(){closePopup()});$("nav > ul > li").hover(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});$("nav > ul > li").click(function(){$(this).hasClass("active")||($(this).siblings().removeClass("active"),$(this).addClass("active"))});f=$("#hdnShowPopup");e=$("#hdnPopupTarget");f.val()=="true"&&openPopUp(e.val());$(".screen_blocker").click(function(){closePopup()});bindTwoLevelSelectEvents();bindRegSelectEvents();$(".reg_select_holder_div.with_search").OptListSearch();$(".open_hidden_filter").click(function(){$(this).toggleClass("active");$(".hidden_option").toggleClass("active")});hideBrokenImages();initFloatAd();$.url().attr("fragment")==="register"&&(i=$("#registerAction").val(),i==="register"?openRegisterLoginPopup():i==="account"&&(window.location="/Account"))});$.fn.OptListSearch=function(){var n=$(this),t=$('<input type="text" name=""/>'),i=$('<div class="SelectSearch"><\/div>');t.keyup(function(){n.find(".reg_options_container span").css({display:"inherit"});var t=$(this).val().toLowerCase();t!=""&&$.each(n.find(".reg_options_container span"),function(n,i){var r=$(i).html().toLowerCase().replace("<i><\/i>","");r.indexOf(t)==0||$(i).css({display:"none"})})});n.click(function(){t.focus()});i.append(t);n.find(".reg_options_container").prepend(i)};$(document).mouseup(function(n){currentOperator&&(currentOperator.is(n.target)||currentOperator.has(n.target).length>0||currentShowableElement&&(currentShowableElement.is(n.target)||currentShowableElement.has(n.target).length>0)||currentShowableElement.removeClass("active"))});needsToRefreshPage=!1,function(n){n.each(["show","hide"],function(t,i){var r=n.fn[i];n.fn[i]=function(){return this.trigger(i),r.apply(this,arguments)}})}(jQuery);$.fn.dataid=function(){return $(this).attr("data-id")};$.fn.dataParentId=function(){return $(this).attr("data-parent-id")};$.fn.dataGuid=function(){return $(this).attr("data-guid")},function(n){typeof define=="function"&&define.amd?define(n):window.purl=n()}(function(){function c(n,t){for(var u=decodeURI(n),e=h[t||!1?"strict":"loose"].exec(u),i={attr:{},param:{},seg:{}},r=14;r--;)i.attr[o[r]]=e[r]||"";return i.param.query=f(i.attr.query),i.param.fragment=f(i.attr.fragment),i.seg.path=i.attr.path.replace(/^\/+|\/+$/g,"").split("/"),i.seg.fragment=i.attr.fragment.replace(/^\/+|\/+$/g,"").split("/"),i.attr.base=i.attr.host?(i.attr.protocol?i.attr.protocol+"://"+i.attr.host:i.attr.host)+(i.attr.port?":"+i.attr.port:""):"",i}function l(n){var t=n.tagName;return typeof t!="undefined"?e[t.toLowerCase()]:t}function u(n,t){var i,r;if(n[t].length===0)return n[t]={};i={};for(r in n[t])i[r]=n[t][r];return n[t]=i,i}function r(t,f,e,o){var h=t.shift(),s;h?(s=f[e]=f[e]||[],"]"==h?n(s)?""!==o&&s.push(o):"object"==typeof s?s[w(s).length]=o:s=f[e]=[f[e],o]:~h.indexOf("]")?(h=h.substr(0,h.length-1),!i.test(h)&&n(s)&&(s=u(f,e)),r(t,s,h,o)):(!i.test(h)&&n(s)&&(s=u(f,e)),r(t,s,h,o))):n(f[e])?f[e].push(o):f[e]="object"==typeof f[e]?o:"undefined"==typeof f[e]?o:[f[e],o]}function a(t,u,f){var s,e,o;if(~u.indexOf("]"))s=u.split("["),r(s,t,"base",f);else{if(!i.test(u)&&n(t.base)){e={};for(o in t.base)e[o]=t.base[o];t.base=e}u!==""&&v(t.base,u,f)}return t}function f(n){return p(String(n).split(/&|;/),function(n,t){try{t=decodeURIComponent(t.replace(/\+/g," "))}catch(e){}var u=t.indexOf("="),f=y(t),r=t.substr(0,f||u),i=t.substr(f||u,t.length);return i=i.substr(i.indexOf("=")+1,i.length),r===""&&(r=t,i=""),a(n,r,i)},{base:{}}).base}function v(t,i,r){var u=t[i];typeof u=="undefined"?t[i]=r:n(u)?u.push(r):t[i]=[u,r]}function y(n){for(var u=n.length,r,t,i=0;i<u;++i)if(t=n[i],"]"==t&&(r=!1),"["==t&&(r=!0),"="==t&&!r)return i}function p(n,t){for(var i=0,u=n.length>>0,r=arguments[2];i<u;)i in n&&(r=t.call(undefined,r,n[i],i,n)),++i;return r}function n(n){return Object.prototype.toString.call(n)==="[object Array]"}function w(n){var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(i);return t}function t(n,t){return arguments.length===1&&n===!0&&(t=!0,n=undefined),t=t||!1,n=n||window.location.toString(),{data:c(n,t),attr:function(n){return n=s[n]||n,typeof n!="undefined"?this.data.attr[n]:this.data.attr},param:function(n){return typeof n!="undefined"?this.data.param.query[n]:this.data.param.query},fparam:function(n){return typeof n!="undefined"?this.data.param.fragment[n]:this.data.param.fragment},segment:function(n){return typeof n=="undefined"?this.data.seg.path:(n=n<0?this.data.seg.path.length+n:n-1,this.data.seg.path[n])},fsegment:function(n){return typeof n=="undefined"?this.data.seg.fragment:(n=n<0?this.data.seg.fragment.length+n:n-1,this.data.seg.fragment[n])}}}var e={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href",embed:"src",object:"data"},o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"],s={anchor:"fragment"},h={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},i=/^[0-9]+$/;return t.jQuery=function(n){n!=null&&(n.fn.url=function(i){var r="";return this.length&&(r=n(this).attr(l(this[0]))||""),t(r,i)},n.url=t)},t.jQuery(window.jQuery),t})