function sleep(n){for(var i=(new Date).getTime(),t=0;t<1e7;t++)if((new Date).getTime()-i>n)break}function SetItemText(n,t){$(t).length>0&&$(t).text(n)}function SetItemvalue(n,t){$(t).length>0&&$(t).val(n)}function StartGMap(){autocomplete=new google.maps.places.Autocomplete(document.getElementById("City"),{types:["geocode"]});autocomplete.addListener("place_changed",function(){var n=autocomplete.getPlace();n.place_id!=null&&($('input[name="location_id"]').val(n.place_id),$('input[name="location_lat"]').val(n.geometry.location.lat()),$('input[name="location_lng"]').val(n.geometry.location.lng()),$('input[name="location_country"]').val(findComponent(n,"country")),$('input[name="location_state"]').val(findComponent(n,"administrative_area_level_1")),$('input[name="location_city"]').val(findComponent(n,"administrative_area_level_3")||findComponent(n,"locality")),SetItemvalue(n.formatted_address,$('input[name="formated"]')))});navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&setTimeout(function(){var n=document.getElementsByClassName("pac-container")[0];n.addEventListener("touchstart",function(n){n.stopImmediatePropagation();setTimeout(function(){alert("j");document.activeElement.blur()},300)})},500)}function findComponent(n,t){var i=_.find(n.address_components,function(n){return _.include(n.types,t)});return i&&i.short_name}$(document).ready(function(){$("img[usemap]").length&&$("img[usemap]").rwdImageMaps();$(".mouses a").click(function(n){n.stopPropagation()});$(".tizkorarrowup").click(function(){var n=+$(this).closest("div").find("input").val()+1;n<=24&&$(this).closest("div").find("input").val(n)});$(".tizkorarrowdown").click(function(){var n=+$(this).closest("div").find("input").val()-1;n>=-24&&$(this).closest("div").find("input").val(n)});$(".tiz").each(function(n,t){$(t).children("input").is(":checked")&&($(document).width()<400?$(t).find(".rem").css({display:"inline-block",width:"100%"}):$(t).find(".rem").css({display:"inline-block"}))});$("label").click(function(){if(stringStartsWith($(this).prev("input").attr("inc"),"Tiz")){var n=$(this).prev("input").attr("inc");$(this).prev("input").is(":checked")?($(this).closest("div").find(".rem").css({display:"none"}),$("[minc='"+n+"']").val(-200)):($(document).width()<400?$(this).closest("div").find(".rem").css({display:"inline-block",width:"100%"}):$(this).closest("div").find(".rem").css({display:"inline-block"}),$("[minc='"+n+"']").val(0));return}$(this).attr("adit-att")!="notog"&&($(this).prev("input").is(":checked")?$(this).closest("div").find(".rem").css({display:"none"}):$(document).width()<400?$(this).closest("div").find(".rem").css({display:"inline-block",width:"100%"}):$(this).closest("div").find(".rem").css({display:"inline-block"}))});$(".content li").click(function(){$(this).children("div").animate({height:"toggle"});$(this).children("h2").hasClass("bluearrow")?$(this).children("h2").removeClass("bluearrow"):$(this).children("h2").addClass("bluearrow")});$("#myModal").on("shown.bs.modal",function(){$("#myInput").focus()});$(".currentmonth").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".lock").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".flag-he").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".flag-en").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".share").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".contactus").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".twitter").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".facebook").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".whatsup").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".pinterest").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(".istagram").mouseover(function(){$(this).prev().show()}).mouseout(function(){$(this).prev().hide()});$(window).scroll(function(){var t=$(window).scrollTop(),n=$(window).height(),i=$(window).width();t>400?($(".header .scrollup").css("display","block"),$(".header .scrollup").css("margin-top",n-n*.2)):$(".header .scrollup").css("display","none");i>1220?Culture=="he"?$(".header .scrollup").css("margin-right","-100px"):$(".header .scrollup").css({"margin-left":"-100px","margin-right":"0"}):$(".header .scrollup").css({"margin-left":"0","margin-right":"0"})});$(".scrollup").click(function(){$(window.opera?"html":"html, body").animate({scrollTop:0},"fast");$(".header .scrollup").css("display","none")});$("[rel='tooltip']").tooltip({trigger:"manual"});$("[rel='tooltip']").on("click",function(){$(this).next(".tooltip").length?$(this).tooltip("hide"):$(this).tooltip("show");$("[rel='tooltip']").not(this).tooltip("hide")});$(".dropdown-menu li a").click(function(){if($(this).attr("adit-att")!="notog"){var n=$(this).text();$(this).parents(".btn-group").find(".dropdown-toggle").html(n+' <span class="caret"><\/span>');$(this).parents("#LeadsCheck").length>0&&SetItemvalue(n,$("#Lead"));$(this).parents("#SpharaAshkeCheck").length>0&&$("#RelSelected").val($(this).attr("data-val"));SetItemvalue($(this).attr("r-data"),$("#SelectedRabiId"));SetItemvalue(n,$("#MahzorDifference"))}});$(".reset").click(function(){$(".regform")[0].reset();document.location=CancelLocation})});!function(n){"use strict";var t=function(n,t){this.init("tooltip",n,t)},i;t.prototype={constructor:t,init:function(t,i,r){var u,f;if(this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(this.options.trigger!="manual"){u=this.options.trigger=="hover"?"mouseenter":"focus";f=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(f+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=n.extend({},n.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var i=n(t.currentTarget)[this.type](this._options).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout);i.hoverState="in";this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var i=n(t.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!i.options.delay||!i.options.delay.hide)return i.hide();i.hoverState="out";this.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)},show:function(){var t,e,n,u,f,i,r;if(this.hasContent()&&this.enabled){t=this.tip();this.setContent();this.options.animation&&t.addClass("fade");i=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement;e=/in/.test(i);t.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element);n=this.getPosition(e);u=t[0].offsetWidth;f=t[0].offsetHeight;switch(e?i.split(" ")[1]:i){case"bottom":r={top:n.top+n.height,left:n.left+n.width/2-u/2};break;case"top":r={top:n.top-f,left:n.left+n.width/2-u/2};break;case"left":r={top:n.top+n.height/2-f/2,left:n.left-u};break;case"right":r={top:n.top+n.height/2-f/2,left:n.left+n.width}}t.offset(r).addClass(i).addClass("in")}},setContent:function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"html"](t);n.removeClass("fade in top bottom left right")},hide:function(){function i(){var i=setTimeout(function(){t.off(n.support.transition.end).detach()},500);t.one(n.support.transition.end,function(){clearTimeout(i);t.detach()})}var r=this,t=this.tip();return t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?i():t.detach(),this},fixTitle:function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(t){return n.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||n(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var i=n(t.currentTarget)[this.type](this._options).data(this.type);i[i.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("tooltip"),f=typeof i=="object"&&i;r||u.data("tooltip",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.tooltip.Constructor=t;n.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover",title:"",delay:0,html:!1};n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(window.jQuery);var autocomplete