(function(root,factory){if(typeof define==='function'&&define.amd){}else if(typeof exports==='object'){}else{root.tingle=factory()}}(this,function(){var isBusy=!1;function Modal(options){var defaults={onClose:null,onOpen:null,beforeOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:'Close',closeMethods:['overlay','button','escape']};this.opts=extend({},defaults,options);this.init()}
Modal.prototype.init=function(){if(this.modal){return}
_build.call(this);_bindEvents.call(this);document.body.insertBefore(this.modal,document.body.firstChild);if(this.opts.footer){this.addFooter()}
return this}
Modal.prototype._busy=function(state){isBusy=state}
Modal.prototype._isBusy=function(){return isBusy}
Modal.prototype.destroy=function(){if(this.modal===null){return}
if(this.isOpen()){this.close(!0)}
_unbindEvents.call(this)
this.modal.parentNode.removeChild(this.modal)
this.modal=null}
Modal.prototype.isOpen=function(){return!!this.modal.classList.contains('tingle-modal--visible')}
Modal.prototype.open=function(){if(this._isBusy())return
this._busy(!0)
var self=this
if(typeof self.opts.beforeOpen==='function'){self.opts.beforeOpen()}
if(this.modal.style.removeProperty){this.modal.style.removeProperty('display')}else{this.modal.style.removeAttribute('display')}
this._scrollPosition=window.pageYOffset
document.body.classList.add('tingle-enabled')
document.body.style.top=-this._scrollPosition+'px'
this.setStickyFooter(this.opts.stickyFooter)
this.modal.classList.add('tingle-modal--visible')
if(typeof self.opts.onOpen==='function'){self.opts.onOpen.call(self)}
self._busy(!1)
this.checkOverflow()
return this}
Modal.prototype.close=function(force){if(this._isBusy())return
this._busy(!0)
force=force||!1
if(typeof this.opts.beforeClose==='function'){var close=this.opts.beforeClose.call(this)
if(!close){this._busy(!1)
return}}
document.body.classList.remove('tingle-enabled')
window.scrollTo({top:this._scrollPosition,behavior:'instant'})
document.body.style.top=null
this.modal.classList.remove('tingle-modal--visible')
var self=this
self.modal.style.display='none'
if(typeof self.opts.onClose==='function'){self.opts.onClose.call(this)}
self._busy(!1)}
Modal.prototype.setElement=function(element,contents){let div=document.createElement("div");div.className='tingle-modal-box-content';if(typeof contents==='string'){div.innerHTML=contents}else{div.appendChild(contents)}
element.innerHTML="";element.appendChild(div);if(this.isOpen()){this.checkOverflow()}
return this};Modal.prototype.setContentType=function(content_type){this.content_type=content_type};Modal.prototype.setContent=function(contents){this.setElement(this.modalBoxContent,contents);if(this.content_type){let div=document.createElement("div");div.className="tingle-modal-box-icon";this.modalBoxContent.prepend(div);div.innerHTML=this.content_type}
this.content_type=undefined;return this};Modal.prototype.setTitle=function(title){return this.setElement(this.modalBoxTitle,title)};Modal.prototype.getContent=function(){return this.modalBoxContent}
Modal.prototype.addFooter=function(){_buildFooter.call(this)
return this}
Modal.prototype.setFooterContent=function(content){this.modalBoxFooter.innerHTML=content
return this}
Modal.prototype.getFooterContent=function(){return this.modalBoxFooter}
Modal.prototype.setStickyFooter=function(isSticky){if(!this.isOverflow()){isSticky=!1}
if(isSticky){if(this.modalBox.contains(this.modalBoxFooter)){this.modalBox.removeChild(this.modalBoxFooter)
this.modal.appendChild(this.modalBoxFooter)
this.modalBoxFooter.classList.add('tingle-modal-box__footer--sticky')
_recalculateFooterPosition.call(this)
this.modalBoxContent.style['padding-bottom']=this.modalBoxFooter.clientHeight+20+'px'}}else if(this.modalBoxFooter){if(!this.modalBox.contains(this.modalBoxFooter)){this.modal.removeChild(this.modalBoxFooter)
this.modalBox.appendChild(this.modalBoxFooter)
this.modalBoxFooter.style.width='auto'
this.modalBoxFooter.style.left=''
this.modalBoxContent.style['padding-bottom']=''
this.modalBoxFooter.classList.remove('tingle-modal-box__footer--sticky')}}
return this}
Modal.prototype.addFooterBtn=function(label,cssClass,callback){var btn=document.createElement('button')
btn.innerHTML=label
btn.addEventListener('click',callback)
if(typeof cssClass==='string'&&cssClass.length){cssClass.split(' ').forEach(function(item){btn.classList.add(item)})}
this.modalBoxFooter.appendChild(btn)
return btn}
Modal.prototype.resize=function(){console.warn('Resize is deprecated and will be removed in version 1.0')}
Modal.prototype.isOverflow=function(){var viewportHeight=window.innerHeight
var modalHeight=this.modalBox.clientHeight
return modalHeight>=viewportHeight}
Modal.prototype.checkOverflow=function(){if(this.modal.classList.contains('tingle-modal--visible')){if(this.isOverflow()){this.modal.classList.add('tingle-modal--overflow')}else{this.modal.classList.remove('tingle-modal--overflow')}
if(!this.isOverflow()&&this.opts.stickyFooter){this.setStickyFooter(!1)}else if(this.isOverflow()&&this.opts.stickyFooter){_recalculateFooterPosition.call(this)
this.setStickyFooter(!0)}}}
function closeIcon(){return'<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z" fill="#000" fill-rule="nonzero"/></svg>'}
function _recalculateFooterPosition(){if(!this.modalBoxFooter){return}
this.modalBoxFooter.style.width=this.modalBox.clientWidth+'px'
this.modalBoxFooter.style.left=this.modalBox.offsetLeft+'px'}
function _build(){this.modal=document.createElement('div')
this.modal.classList.add('tingle-modal')
if(this.opts.closeMethods.length===0||this.opts.closeMethods.indexOf('overlay')===-1){this.modal.classList.add('tingle-modal--noOverlayClose')}
this.modal.style.display='none'
this.opts.cssClass.forEach(function(item){if(typeof item==='string'){this.modal.classList.add(item)}},this)
if(this.opts.closeMethods.indexOf('button')!==-1){this.modalCloseBtn=document.createElement('button')
this.modalCloseBtn.type='button'
this.modalCloseBtn.classList.add('tingle-modal__close')
this.modalCloseBtnIcon=document.createElement('span')
this.modalCloseBtnIcon.classList.add('tingle-modal__closeIcon')
this.modalCloseBtnIcon.innerHTML=closeIcon()
this.modalCloseBtnLabel=document.createElement('span')
this.modalCloseBtnLabel.classList.add('tingle-modal__closeLabel')
this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel
this.modalCloseBtn.appendChild(this.modalCloseBtnIcon)
this.modalCloseBtn.appendChild(this.modalCloseBtnLabel)}
this.modalBox=document.createElement('div')
this.modalBox.classList.add('tingle-modal-box')
this.modalBoxTitle=document.createElement("div");this.modalBoxTitle.classList.add('tingle-modal-box__title')
this.modalBox.appendChild(this.modalBoxTitle);this.modalBoxContent=document.createElement('div')
this.modalBoxContent.classList.add('tingle-modal-box__content')
this.modalBox.appendChild(this.modalBoxContent)
if(this.opts.closeMethods.indexOf('button')!==-1){this.modal.appendChild(this.modalCloseBtn)}
this.modal.appendChild(this.modalBox)}
function _buildFooter(){this.modalBoxFooter=document.createElement('div')
this.modalBoxFooter.classList.add('tingle-modal-box__footer')
this.modalBox.appendChild(this.modalBoxFooter)}
function _bindEvents(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:_handleClickOutside.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:_handleKeyboardNav.bind(this)}
if(this.opts.closeMethods.indexOf('button')!==-1){this.modalCloseBtn.addEventListener('click',this._events.clickCloseBtn)}
this.modal.addEventListener('mousedown',this._events.clickOverlay)
window.addEventListener('resize',this._events.resize)
document.addEventListener('keydown',this._events.keyboardNav)}
function _handleKeyboardNav(event){if(this.opts.closeMethods.indexOf('escape')!==-1&&event.which===27&&this.isOpen()){this.close()}}
function _handleClickOutside(event){if(this.opts.closeMethods.indexOf('overlay')!==-1&&!_findAncestor(event.target,'tingle-modal')&&event.clientX<this.modal.clientWidth){this.close()}}
function _findAncestor(el,cls){while((el=el.parentElement)&&!el.classList.contains(cls));return el}
function _unbindEvents(){if(this.opts.closeMethods.indexOf('button')!==-1){this.modalCloseBtn.removeEventListener('click',this._events.clickCloseBtn)}
this.modal.removeEventListener('mousedown',this._events.clickOverlay)
window.removeEventListener('resize',this._events.resize)
document.removeEventListener('keydown',this._events.keyboardNav)}
function extend(){for(var i=1;i<arguments.length;i++){for(var key in arguments[i]){if(arguments[i].hasOwnProperty(key)){arguments[0][key]=arguments[i][key]}}}
return arguments[0]}
return{modal:Modal}}));(function(){function ha_a(a){var e=0;return function(){return e<a.length?{done:!1,value:a[e++]}:{done:!0}}}function ha_b(a){var e="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return e?e.call(a):{next:ha_a(a)}}
function ha_c(){function a(){return window.scrollY||c.scrollTop}function e(b,f,k){function r(p,q,t){B(Math.max(0,b.v(p)-k),q,t)}function B(p,q,t){x();if(0===q||q&&0>q||g(b.body))b.K(p),t&&t();else{var v=b.G(),u=Math.max(0,p)-v,w=(new Date).getTime();q=q||Math.min(Math.abs(u),f);(function C(){y=setTimeout(function(){var z=Math.min(1,((new Date).getTime()-w)/q),F=Math.max(0,Math.floor(v+u*(.5>z?2*z*z:z*(4-2*z)-1)));b.K(F);1>z&&b.P()+F<b.body.scrollHeight?C():(setTimeout(x,99),t&&t())},9)})()}}function x(){clearTimeout(y);y=0}f=f||999;k||0===k||(k=9);var y;return{setup:function(p,q){if(0===p||p)f=p;if(0===q||q)k=q;return{Ua:f,la:k}},to:r,toY:B,intoView:function(p,q,t){var v=p.getBoundingClientRect().height,u=b.v(p)+v,w=b.P(),D=b.G(),C=D+w;Math.max(0,b.v(p)-k)<D||v+k>w?r(p,q,t):u+k>C?B(u-w+k,q,t):t&&t()},center:function(p,q,t,v){B(Math.max(0,b.v(p)-b.P()/2+(t||p.getBoundingClientRect().height/2)),q,v)},stop:x,moving:function(){return!!y},getY:b.G,getTopOf:b.v}}function g(b){return b&&"getComputedStyle"in window&&"smooth"===window.getComputedStyle(b)["scroll-behavior"]}if("undefined"===typeof window||!("document"in window))return{};var c=document.documentElement,h=e({body:document.scrollingElement||document.body,K:function(b){window.scrollTo(0,b)},G:a,P:function(){return window.innerHeight||c.clientHeight},v:function(b){return b.getBoundingClientRect().top+a()-c.offsetTop}});h.Ta=function(b,f,k){return e({body:b,K:function(r){b.scrollTop=r},G:function(){return b.scrollTop},P:function(){return Math.min(b.clientHeight,window.innerHeight||c.clientHeight)},v:function(r){return r.offsetTop}},f,k)};if("addEventListener"in window&&!window.Qa&&!g(document.body)){var d="history"in window&&"pushState"in history,n=d&&"scrollRestoration"in history;n&&(history.scrollRestoration="auto");window.addEventListener("load",function(){n&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(b){b.state&&"zenscrollY"in b.state&&h.K(b.state.Pa)},!1));window.location.hash&&setTimeout(function(){var b=h.La().la;if(b){var f=document.getElementById(window.location.href.split("#")[1]);f&&(b=Math.max(0,h.v(f)-b),f=h.G()-b,0<=f&&9>f&&window.scrollTo(0,b))}},9)},!1);var l=/(^|\s)noZensmooth(\s|$)/;window.addEventListener("click",function(b){for(var f=b.target;f&&"A"!==f.tagName;)f=f.parentNode;if(!(!f||1!==b.which||b.shiftKey||b.metaKey||b.ctrlKey||b.altKey)){if(n){var k=history.state&&"object"===typeof history.state?history.state:{};k.Pa=h.G();try{history.replaceState(k,"")}catch(B){}}var r=f.getAttribute("href")||"";if(0===r.indexOf("#")&&!l.test(f.className)){f=0;k=document.getElementById(r.substring(1));if("#"!==r){if(!k)return;f=h.v(k)}b.preventDefault();b=function(){window.location=r};if(k=h.La().la)f=Math.max(0,f-k),d&&(b=function(){history.pushState({},"",r)});h.K(f,null,b)}}},!1)}return h}
var ha_d=function(){function a(l){this.c=d({},{qa:null,ra:null,ha:null,ga:null,U:!1,na:!1,Ba:[],Y:"Close",u:["overlay","button","escape"]},l);this.Ea()}function e(){this.f&&(this.f.style.width=this.h.clientWidth+"px",this.f.style.left=this.h.offsetLeft+"px")}function g(){this.b=document.createElement("div");this.b.classList.add("tingle-modal");0!==this.c.u.length&&-1!==this.c.u.indexOf("overlay")||this.b.classList.add("tingle-modal--noOverlayClose");this.b.style.display="none";this.c.Ba.forEach(function(l){"string"===typeof l&&this.b.classList.add(l)},this);-1!==this.c.u.indexOf("button")&&(this.I=document.createElement("button"),this.I.type="button",this.I.classList.add("tingle-modal__close"),this.ba=document.createElement("span"),this.ba.classList.add("tingle-modal__closeIcon"),this.ba.innerHTML='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z" fill="#000" fill-rule="nonzero"/></svg>',this.ca=document.createElement("span"),this.ca.classList.add("tingle-modal__closeLabel"),this.ca.innerHTML=this.c.Y,this.I.appendChild(this.ba),this.I.appendChild(this.ca));this.h=document.createElement("div");this.h.classList.add("tingle-modal-box");this.aa=document.createElement("div");this.aa.classList.add("tingle-modal-box__title");this.h.appendChild(this.aa);this.H=document.createElement("div");this.H.classList.add("tingle-modal-box__content");this.h.appendChild(this.H);-1!==this.c.u.indexOf("button")&&this.b.appendChild(this.I);this.b.appendChild(this.h)}function c(l){-1!==this.c.u.indexOf("escape")&&27===l.which&&this.pa()&&this.close()}function h(l){var b;if(b=-1!==this.c.u.indexOf("overlay")){for(b=l.target;(b=b.parentElement)&&!b.classList.contains("tingle-modal"););b=!b}b&&l.clientX<this.b.clientWidth&&this.close()}function d(){for(var l=1;l<arguments.length;l++)for(var b in arguments[l])arguments[l].hasOwnProperty(b)&&(arguments[0][b]=arguments[l][b]);return arguments[0]}var n=!1;a.prototype.Ea=function(){this.b||(g.call(this),this.O={ya:this.close.bind(this),za:h.bind(this),resize:this.X.bind(this),Ha:c.bind(this)},-1!==this.c.u.indexOf("button")&&this.I.addEventListener("click",this.O.ya),this.b.addEventListener("mousedown",this.O.za),window.addEventListener("resize",this.O.resize),document.addEventListener("keydown",this.O.Ha),document.body.insertBefore(this.b,document.body.firstChild),this.c.na&&this.wa())};a.prototype.N=function(l){n=l};a.prototype.ea=function(){return n};a.prototype.pa=function(){return!!this.b.classList.contains("tingle-modal--visible")};a.prototype.open=function(){if(!this.ea())return this.N(!0),"function"===typeof this.c.ha&&this.c.ha(),this.b.style.removeProperty?this.b.style.removeProperty("display"):this.b.style.removeAttribute("display"),this.fa=window.pageYOffset,document.body.classList.add("tingle-enabled"),document.body.style.top=-this.fa+"px",this.da(this.c.U),this.b.classList.add("tingle-modal--visible"),"function"===typeof this.c.ra&&this.c.ra.call(this),this.N(!1),this.X(),this};a.prototype.close=function(){if(!this.ea()){this.N(!0);if("function"!==typeof this.c.ga||this.c.ga.call(this))document.body.classList.remove("tingle-enabled"),window.scrollTo({top:this.fa,behavior:"instant"}),document.body.style.top=null,this.b.classList.remove("tingle-modal--visible"),this.b.style.display="none","function"===typeof this.c.qa&&this.c.qa.call(this);this.N(!1)}};a.prototype.ua=function(l,b){var f=document.createElement("div");f.className="tingle-modal-box-content";"string"===typeof b?f.innerHTML=b:f.appendChild(b);l.innerHTML="";l.appendChild(f);this.pa()&&this.X()};a.prototype.Ja=function(l){this.D=l};a.prototype.Ia=function(l){this.ua(this.H,l);this.D&&(l=document.createElement("div"),l.className="tingle-modal-box-icon",this.H.prepend(l),l.innerHTML=this.D);this.D=void 0};a.prototype.Ka=function(l){this.ua(this.aa,l)};a.prototype.wa=function(){this.f=document.createElement("div");this.f.classList.add("tingle-modal-box__footer");this.h.appendChild(this.f)};a.prototype.da=function(l){this.R()||(l=!1);l?this.h.contains(this.f)&&(this.h.removeChild(this.f),this.b.appendChild(this.f),this.f.classList.add("tingle-modal-box__footer--sticky"),e.call(this),this.H.style["padding-bottom"]=this.f.clientHeight+20+"px"):this.f&&!this.h.contains(this.f)&&(this.b.removeChild(this.f),this.h.appendChild(this.f),this.f.style.width="auto",this.f.style.left="",this.H.style["padding-bottom"]="",this.f.classList.remove("tingle-modal-box__footer--sticky"))};a.prototype.xa=function(l,b,f){var k=document.createElement("button");k.innerHTML=l;k.addEventListener("click",f);"string"===typeof b&&b.length&&b.split(" ").forEach(function(r){k.classList.add(r)});this.f.appendChild(k)};a.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")};a.prototype.R=function(){return this.h.clientHeight>=window.innerHeight};a.prototype.X=function(){this.b.classList.contains("tingle-modal--visible")&&(this.R()?this.b.classList.add("tingle-modal--overflow"):this.b.classList.remove("tingle-modal--overflow"),!this.R()&&this.c.U?this.da(!1):this.R()&&this.c.U&&(e.call(this),this.da(!0)))};return{b:a}}();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function ha_e(a){function e(m){m.preventDefault();if(!n.disabled){var A=m;m.touches&&(A=m.touches[0]);b=this===p?p.offsetLeft:q.offsetLeft;l=A.pageX-b;E=this;document.addEventListener("mousemove",g);document.addEventListener("mouseup",c);document.addEventListener("touchmove",g);document.addEventListener("touchend",c)}}function g(m){if(!n.disabled){var A=m;m.touches&&(A=m.touches[0]);b=A.pageX-l;m=q?q.offsetLeft:v.offsetWidth;E===p?(b>m?b=m:0>b&&(b=0),E.style.left=b+"px"):E===q&&(b<p.offsetLeft+p.offsetWidth-10?b=p.offsetLeft+p.offsetWidth-10:b>F&&(b=F),E.style.left=b+"px");t.style.marginLeft=p.offsetLeft-p.offsetWidth/2+"px";t.style.width=m-p.offsetLeft+"px";d();if(a.onchange&&k)a.onchange(f.getAttribute("se-min-value"),f.getAttribute("se-max-value"),f.dataset.id)}}function c(){document.removeEventListener("mousemove",g);document.removeEventListener("mouseup",c);document.removeEventListener("touchmove",g);document.removeEventListener("touchend",c);n.disabled||(E=null,d(),n.Da&&k&&n.Da(f.getAttribute("se-min-value"),f.getAttribute("se-max-value")))}function h(){x.style.opacity="1";setTimeout(function(){x.style.opacity="0"},3E3)}function d(){var m=p.offsetLeft/H*(w-u)+u;var A=0*(w-u)+u;if(0!==z){var G=Math.floor(m/z);m=z*G;G=Math.floor(A/z);A=z*G}m>=w&&(B||h(),B=!0);m<=u&&(r||h(),r=!0);n.va(m);f.setAttribute("se-min-value",m);f.setAttribute("se-max-value",A)}var n=this,l=0,b=0,f=a.T,k=!1,r=!1,B=!1,x=document.createElement("div");x.classList.add("slider-input-tooltip");x.innerHTML="ניתן להזין את הערך ידנית";setTimeout(function(){y.parentNode.appendChild(x);x.style.left=y.parentNode.offsetWidth/2-x.offsetWidth/2+"px"},1);if(a.l)var y=a.l;else a.i&&(y=a.i);y.appendChild(x);var p=f.querySelector(".zb-slider-touch-left"),q=f.querySelector(".zb-slider-touch-right"),t=f.querySelector(".zb-non-active-slider-bar"),v=f.querySelector(".zb-slider-bar"),u=parseFloat(f.getAttribute("se-min")),w=parseFloat(f.getAttribute("se-max"));n.Ya=function(m){u=m};n.Wa=function(m){w=m};n.enable=function(m){n.disabled=!m;m?(a.T.classList.remove("disabled"),y&&(y.classList.remove("disabled"),a.l?a.l.setAttribute("contenteditable",!0):a.i&&a.i.setAttribute("readonly",!1))):(a.T.classList.add("disabled"),y&&(y.classList.add("disabled"),a.l?a.l.setAttribute("contenteditable","false"):a.i&&a.i.setAttribute("readonly",!0)))};var D=u;f.hasAttribute("se-min-value")&&(D=parseFloat(f.getAttribute("se-min-value")));var C=w;f.hasAttribute("se-max-value")&&(C=parseFloat(f.getAttribute("se-max-value")));D<u&&(D=u);C>w&&(C=w);D>C&&(D=C);var z=0;f.getAttribute("se-step")&&(z=Math.abs(parseFloat(f.getAttribute("se-step"))));n.T=f;n.reset=function(){p.style.left="0px";q&&(q.style.left=v.offsetWidth-p.offsetWidth+"px");t.style.marginLeft="0px";t.style.width=v.offsetWidth-p.offsetWidth+"px";b=l=0;g({pageX:0})};n.S=function(m,A){(void 0===A||A)&&n.va(m);m>w&&(m=w);m<u&&(m=u);p.style.left=Math.ceil((m-u)/(w-u)*(v.offsetWidth-(p.offsetWidth+0)))+"px";t.style.marginLeft=p.offsetLeft+"px";t.style.width=q?q.offsetLeft-p.offsetLeft+"px":v.offsetWidth-p.offsetLeft+"px";f.setAttribute("se-min-value",m)};n.Xa=function(m){q&&(q.style.left=Math.ceil((m-u)/(w-u)*(v.offsetWidth-(p.offsetWidth+0)))+"px",t.style.marginLeft=p.offsetLeft+"px",t.style.width=q.offsetLeft-p.offsetLeft+"px",f.setAttribute("se-max-value",m))};n.va=function(m){.01>Math.abs(Math.floor(100*m)-100*m)&&(m=Math.floor(1E3*m)/1E3);a.i?a.i.value=m:a.l.innerHTML=m};n.reset();var F=v.offsetWidth-(q?q.offsetWidth:0),E=null,H=v.offsetWidth;n.S(D);p.addEventListener("mousedown",e);p.addEventListener("touchstart",e);q&&(q.addEventListener("mousedown",e),q.addEventListener("touchstart",e));a.l?a.l.addEventListener("keyup",function(m){n.S(parseInt(m.target.innerHTML,10),!1);a.onchange(f.getAttribute("se-min-value"),f.getAttribute("se-max-value"),f.dataset.id)}):a.i&&a.i.addEventListener("change",function(m){n.S(parseInt(m.target.value,10),!1);a.onchange(f.getAttribute("se-min-value"),f.getAttribute("se-max-value"),f.dataset.id)});p.style.left=p.offsetLeft-10+"px";setTimeout(function(){H=v.offsetWidth;n.S(f.getAttribute("se-min-value"))},100);k=!0}var ha_f={1:"\u2757",2:"\u2714\ufe0f",3:"\u2753",4:"\u2049\ufe0f",5:"\ud83d\uddd1\ufe0f",6:"",7:"\u2699\ufe0f",8:"\u26d4"},ha_g={},ha_=void 0;function ha_h(a){var e=void 0===e?{}:e;e.title="בעיה בשימוש במחשבון";e.content=a;e.D=1;e.buttons=[{text:"אישור",ka:!0,click:function(){},ja:"tingle-btn--primary"}];ha_i(e)}
function ha_j(a){var e=new ha_d.b({na:!0,U:!1,u:["overlay","button","escape"],Y:a.Y||"ביטול"});a.title&&e.Ka(a.title);a.D&&e.Ja(ha_f[a.D]);e.Ia(a.content||"");var g={};a=ha_b(a.buttons);for(var c=a.next();!c.done;g={B:g.B},c=a.next())g.B=c.value,(c=g.B.ja||"")&&(c+=" "),c+="tingle-btn",e.xa(g.B.text,c,function(h){return function(){h.B.click&&h.B.click();h.B.ka&&e.close()}}(g));e.open();return e}
function ha_i(a){a.buttons||(a.buttons=[{ka:!0,text:"אישור",ja:"tingle-btn--primary"}]);void 0===ha_g.alert&&(ha_g.alert=[]);ha_g.alert.push(ha_j(a))}function ha_k(a,e){if(void 0!==e){if("int"===e)return parseInt(a,10);if("float"===e)return parseFloat(a)}return a}function ha_l(){return ha_k(document.querySelectorAll("input[name=medicine_type][type=radio]:checked")[0].value,void 0)}
function ha_m(a){var e=document.createElement("div");e.style.width=a.width;e.className="slider-container";var g=document.createElement("div");e.appendChild(g);g.className="zb-slider";a.step&&g.setAttribute("se-step",a.step);g.setAttribute("se-min",a.min);g.setAttribute("se-max",a.max);a.F&&g.setAttribute("se-min-value",a.F);a.Ca&&g.setAttribute("se-min-max",a.Ca);var c=document.createElement("div");c.className="zb-slider-touch-left";g.appendChild(c);c.appendChild(document.createElement("span"));c=document.createElement("div");c.className="zb-slider-bar";g.appendChild(c);var h=document.createElement("span");h.className="zb-non-active-slider-bar";c.appendChild(h);a.parent&&(a.parent.appendChild(e),new ha_e({T:g,i:a.i,l:a.l,onchange:a.onchange}));return{Sa:e,Ma:g}}function ha_n(a){ha_o({Na:{step:1,min:a.min||40,max:a.max||180,F:a.F||60,width:"100%"},oa:'ק"ג',V:a.V||"משקל",name:a.name||"weight_input",J:a.name||"weight_input",parent:a.parent})}
function ha_p(a){var e=document.createElement("div");e.className="animated-calculator-button";e.innerHTML=a.caption||"";a.onclick&&(e.onclick=a.onclick);return e}var ha_q=0;function ha_o(a){var e=document.createElement("div");e.className="text-slider-container";a.Z&&(e.id=a.Z);a.parent.appendChild(e);var g=document.createElement("div");e.appendChild(g);g.className="slider-and-label-container";var c=document.createElement("label");c.className=a.Oa||"slider-label";c.innerHTML=a.V||"";g.appendChild(c);void 0===a.J&&(a.J="___running_text_id_"+ha_q++);a.type?(c=document.createElement("input"),c.className="slider-text-field",c.type=a.type||"text",a.Va&&(c.pattern="\\d*")):(c=document.createElement("div"),c.setAttribute("contenteditable",!0),c.setAttribute("inputmode","decimal"),c.onfocus=function(n){window.getSelection().selectAllChildren(n.target)},c.className="slider-text-div");a.Fa&&(c.onchange=a.Fa);a.Ga&&(c.onkeyup=a.Ga);c.id=a.J;c.name=a.name;var h=a.Na;if(a.type){h.i=c;var d="slider-text-field-container"}else h.l=c,d="slider-text-div-container";h.parent=g;ha_m(h).Ma.dataset.id=a.J;g=document.createElement("div");g.className=d;e.appendChild(g);g.appendChild(c);a.oa&&(e=document.createElement("label"),e.className="slider-text-field-label",e.innerHTML=a.oa||"",e.setAttribute("for",a.J),g.appendChild(e))}function ha_r(a){var e=document.createElement("div");a.Z&&(e.id=a.Z);e.className="animated-popup-button-set-container";a.Aa&&e.classList.add(a.Aa);var g=document.createElement("label");g.className=a.Oa||"animated-popup-button-set-container-label";g.innerHTML=a.V||"";e.appendChild(g);a=ha_s(a.ia);e.appendChild(a);return e}
function ha_t(){var a=document.getElementById("overlay_div");a||(a=document.createElement("div"),a.id="overlay_div",a.className="overlay_div",document.body.appendChild(a));return a}
function ha_s(a){function e(k){k.preventDefault();document.getElementById("overlay_div").style.display="";n.style.display=""}function g(k){k.preventDefault();k=document.getElementById("overlay_div");k.style.height=document.body.scrollHeight+"px";k.style.display="block";n.style.display=a.sa;mobileBrowser&&500<n.offsetHeight&&(n.style.top=-document.documentElement.scrollTop+"px")}a.sa=a.sa||"block";a.ma=a.ma||"";var c=document.createElement("div");c.className="animated popup-button-set-div popup-button-set-div-"+a.name+" "+a.ma;var h=document.createElement("div");h.className="value-caption";h.innerHTML="בחירה";var d=document.createElement("div");d.className="visual-cue upside-down-triangle";d.innerHTML="\u25bc";c.appendChild(h);c.appendChild(d);var n=document.createElement("div");n.className="popup-div above-overlay";var l=ha_t();l.onclick=e;l.addEventListener("click",e);d.onclick=g;h.onclick=g;c.appendChild(n);var b=[];d={};l=ha_b(a.ta);for(var f=l.next();!f.done;d={C:d.C,M:d.M,s:d.s,W:d.W,j:d.j,L:d.L,m:d.m},f=l.next())d.C=f.value,d.s=document.createElement("div"),d.s.className="popup-button-set-div-button",d.m=document.createElement("label"),d.m.innerHTML=d.C.caption,d.m.className=d.C.Ra||"",d.j=document.createElement("input"),d.j.type="radio",d.j.name=a.name,d.j.value=d.C.value,d.W=a.onclick||function(){},d.M=function(k){return function(){return h.innerHTML=k.C.caption}}(d),d.L=function(k){return function(r,B){k.M();b.map(function(x){x.classList.remove("selected-popup-button-in-set")});k.s.classList.add("selected-popup-button-in-set");B&&k.W(r,k.j.value);e(r)}}(d),d.j.onchange=function(k){return function(r){k.L(r,!0)}}(d),d.m.onmouseup=function(k){return function(r){k.m.dataset.disabled&&"false"!==k.m.dataset.disabled?r.preventDefault():k.j.checked&&k.L(r,!1)}}(d),a.F===d.C.value&&(d.j.checked=!0,d.s.classList.add("selected-popup-button-in-set"),d.M()),d.m.appendChild(d.j),d.s.appendChild(d.m),d.j.style.display="none",n.appendChild(d.s),b.push(d.s);return c}
function ha_u(){var a=a||["animated-calendar-container","animated-popup-button-set-container","text-slider-container","animated-select-container","quick-nav-container"];a=ha_b(a);for(var e=a.next();!e.done;e=a.next())Array.prototype.map.call(document.getElementsByClassName(e.value),function(g){g.classList.add("popup_with_separator")})}(function(){function a(){try{var c=ha_l()}catch(l){ha_h("לא בחרת תרופה. אנא בחרי תרופה לפני הלחיצה על כפתור החישוב");return}c=g[c];var h;(h=document.getElementById("weight_input"))||(h=document.getElementsByName("weight_input")[0]);var d=h.value;void 0===d&&(d=h.innerHTML);h=ha_k(d,"int");if("number"===typeof c.g)if(c.A<=h&&h<=c.w)h=c.g*h;else{ha_h("המשקל שבחרת לא נמצא בטווח עבור התרופה שנבחרה. אנא התייעצי עם רופא");return}else{for(d=0;d<c.g.length&&!(c.g[d].min<h&&h<c.g[d].max);)d++;if(d===c.g.length){ha_h("המשקל שבחרת לא נמצא בטווח עבור התרופה שנבחרה. אנא התייעצי עם רופא");return}h=c.g[d].a}d="<div class='notes-title'>דגשים: <ul>";for(var n=0;n<c.o.length;n++)d+="<li>"+c.o[n]+"</li>";d+='<li>בכל מקרה, אין להשתמש בתרופה לפני התייעצות עם רופא, וקריאה מקיפה של <a href="'+c.href+'">עלון הצרכן</a>.</li>';d+='<li>לתרופות שונות תופעות לוואי שונות המופיעות ב<a href="'+c.href+'">עלון הצרכן</a>. אנא קראו לפני שימוש בתרופה.</li>';document.getElementById("medicine-notes").innerHTML=d+"</ul></div>";document.getElementById("result").innerHTML="המינון הדרוש לילדך הינו <span class='themed-text'>"+h+" מיליליטר</span>";mobileBrowser&&(c=document.getElementById("calculator_center_ad"),ha_||(ha_=ha_c()),ha_.to(c))}function e(){var c=g[ha_l()];document.getElementById("result-image").innerHTML="<img src='calculators/child-medicine-calculator/images/"+c.image+"-resized.png' style=\"width:114px;\" title='"+c.name+"' alt='"+c.name+"' />"}var g=[{name:"נובימול",g:.15,A:3,w:20,o:["מינון: 0.15 מ\u201dל לק\u201dג למנה. עד 5 מנות ביממה לפי הצורך במרווח של 4 שעות לפחות","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: paracetamol 100 mg/ml"],href:"https://data.health.gov.il/drugs/alonim/Tiptipot-heb_1462204384889.pdf",image:"novimol"},{name:"אקמולי",g:.6,A:3,w:20,o:["מינון: 0.6 מ\u201dל לק\u201dג למנה. עד 5 מנות ביממה לפי הצורך במרווח של 4 שעות לפחות","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: paracetamol 125 mg/5ml"],href:"https://www.maxpharm.co.il/GoopSitesFiles/77471/User/Upload/acam.pdf",image:"acamoli_2"},{name:"אקמולי פורטה",g:.3,A:3,w:20,o:["מינון: 0.3 מ\u201dל לק\u201dג למנה. עד 5 מנות ביממה לפי הצורך במרווח של 4 שעות לפחות","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: paracetamol 250 mg/5ml"],href:"https://data.health.gov.il/drugs/alonim/Rishum_5_81505817.PDF",image:"acamoli-forte"},{name:"אקמולי לילדים גדולים",g:.3,A:16,w:30,o:["מינון: 0.3 מ\u201dל לק\u201dג למנה. עד 5 מנות ביממה לפי הצורך במרווח של 4 שעות לפחות","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: paracetamol 250 mg/5ml"],href:"https://www.maxpharm.co.il/GoopSitesFiles/77471/User/Upload/Acamoli-for-Big-Kids-Syrup-pt_1358681655149.pdf",image:"acamoli-big-kids"},{name:"אדויל לילדים",g:[{min:5,max:5.499999,a:2},{min:5.5,max:8.199999,a:2.5},{min:8.2,max:10.99999,a:3.75},{min:11,max:15.99999,a:5},{min:16,max:21.99999,a:7.5},{min:22,max:26.99999,a:10},{min:27,max:32.99999,a:12.5},{min:33,max:43.99999,a:15}],A:5,w:43,o:'<b>השימוש מתחת לגיל 6 חודשים - רק ע"פ מרשם רופא</b>;מינון: ניתן לקחת מנה נוספת כל 6-8 שעות, בהתאם לצורך, אולם אין ליטול יותר מ-4 פעמים ב-24 שעות.;כוסית המדידה המצורפת: 5 מיליליטר;ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם;חומר פעיל: Ibuprofen 100mg/5ml;<b>תופעות לוואי</b>: שלשול, בחילה, כאב בטן, סחרחורת או נמנום.'.split(";"),href:"https://www.pharmonline.co.il/files/products/brochure/51853.pdf",image:"advil-kids"},{name:"נורופן לילדים",g:[{min:5,max:5.499999,a:2},{min:5.5,max:8.199999,a:2.5},{min:8.2,max:10.99999,a:3.75},{min:11,max:15.99999,a:5},{min:16,max:21.99999,a:7.5},{min:22,max:26.99999,a:10},{min:27,max:32.99999,a:12.5},{min:33,max:43.99999,a:15}],A:5,w:43,o:['<b>השימוש מתחת לגיל 6 חודשים - רק ע"פ מרשם רופא</b>',"מינון: ניתן לקחת מנה נוספת כל 6-8 שעות, בהתאם לצורך, אולם אין ליטול יותר מ-4 פעמים ב-24 שעות.","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: Ibuprofen 100mg/5ml","<b>תופעות לוואי</b>: שלשול, בחילה, כאב בטן, סחרחורת או נמנום."],href:"https://data.health.gov.il/drugs/alonim/Rishum_10_428749419.pdf",image:"nurofen-children"},{name:"אייבו לילדים (2%)",g:[{min:5,max:5.499999,a:2},{min:5.5,max:8.199999,a:2.5},{min:8.2,max:10.99999,a:3.75},{min:11,max:15.99999,a:5},{min:16,max:21.99999,a:7.5},{min:22,max:26.99999,a:10},{min:27,max:32.99999,a:12.5},{min:33,max:43.99999,a:15}],A:5,w:43,o:['<b>השימוש מתחת לגיל 6 חודשים - רק ע"פ מרשם רופא</b>',"מינון: ניתן לקחת מנה נוספת כל 6-8 שעות, בהתאם לצורך, אולם אין ליטול יותר מ-4 פעמים ב-24 שעות.","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: Ibuprofen 100mg/5ml"],href:"https://www.old.health.gov.il/units/pharmacy/trufot/alonim/Rishum_8_88429018.pdf",image:"Ibo2"},{name:"אייבו לילדים (4%)",g:[{min:5,max:5.499999,a:1},{min:5.5,max:8.199999,a:1.25},{min:8.2,max:10.99999,a:1.75},{min:11,max:15.99999,a:2.5},{min:16,max:21.99999,a:3.75},{min:22,max:26.99999,a:5},{min:27,max:32.99999,a:6.25},{min:33,max:43.99999,a:7.5}],A:5,w:43,o:['<b>השימוש מתחת לגיל 6 חודשים - רק ע"פ מרשם רופא</b>',"מינון: ניתן לקחת מנה נוספת כל 6-8 שעות, בהתאם לצורך, אולם אין ליטול יותר מ-4 פעמים ב-24 שעות.","ניתן לרכוש ללא מרשם רופא בכל בתי המרקחת ורשתות הפארם","חומר פעיל: Ibuprofen 200mg/5ml"],href:"https://data.health.gov.il/drugs/alonim/Rishum_8_88410618.pdf",image:"Ibo4"}];(function(){for(var c=document.getElementById("selection_panel"),h={ia:{F:-1,name:"medicine_type",ta:[],onclick:e},V:"סוג התרופה"},d=0;d<g.length;d++)h.ia.ta.push({caption:g[d].name,value:d});h=ha_r(h);c.appendChild(h);ha_n({F:10,parent:c,min:3,max:30});c=ha_p({caption:"כמה תרופה לתת?"});c.onclick=a;document.getElementById("calculator_buttons").appendChild(c);ha_u();mobileBrowser&&(c=ha_p({caption:"חישוב נוסף"}),c.onclick=function(){var n=document.getElementsByClassName("calculator_wrapper")[0];ha_||(ha_=ha_c());ha_.to(n)},document.getElementById("result_buttons").appendChild(c))})()})()})();(function(){function menu_(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}}(function(){function b(a){this.c=g({},{w:null,R:null,P:null,u:null,B:!1,K:!1,J:[],I:"Close",g:["overlay","button","escape"]},a);this.L()}function d(){this.b&&(this.b.style.width=this.f.clientWidth+"px",this.b.style.left=this.f.offsetLeft+"px")}function e(){this.a=document.createElement("div");this.a.classList.add("tingle-modal");0!==this.c.g.length&&-1!==this.c.g.indexOf("overlay")||this.a.classList.add("tingle-modal--noOverlayClose");this.a.style.display="none";this.c.J.forEach(function(a){"string"===typeof a&&this.a.classList.add(a)},this);-1!==this.c.g.indexOf("button")&&(this.h=document.createElement("button"),this.h.type="button",this.h.classList.add("tingle-modal__close"),this.m=document.createElement("span"),this.m.classList.add("tingle-modal__closeIcon"),this.m.innerHTML='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z" fill="#000" fill-rule="nonzero"/></svg>',this.o=document.createElement("span"),this.o.classList.add("tingle-modal__closeLabel"),this.o.innerHTML=this.c.I,this.h.appendChild(this.m),this.h.appendChild(this.o));this.f=document.createElement("div");this.f.classList.add("tingle-modal-box");this.v=document.createElement("div");this.v.classList.add("tingle-modal-box__title");this.f.appendChild(this.v);this.l=document.createElement("div");this.l.classList.add("tingle-modal-box__content");this.f.appendChild(this.l);-1!==this.c.g.indexOf("button")&&this.a.appendChild(this.h);this.a.appendChild(this.f)}function f(a){-1!==this.c.g.indexOf("escape")&&27===a.which&&this.M()&&this.close()}function m(a){var c;if(c=-1!==this.c.g.indexOf("overlay")){for(c=a.target;(c=c.parentElement)&&!c.classList.contains("tingle-modal"););c=!c}c&&a.clientX<this.a.clientWidth&&this.close()}function g(){for(var a=1;a<arguments.length;a++)for(var c in arguments[a])arguments[a].hasOwnProperty(c)&&(arguments[0][c]=arguments[a][c]);return arguments[0]}var h=!1;b.prototype.L=function(){this.a||(e.call(this),this.i={G:this.close.bind(this),H:m.bind(this),resize:this.F.bind(this),N:f.bind(this)},-1!==this.c.g.indexOf("button")&&this.h.addEventListener("click",this.i.G),this.a.addEventListener("mousedown",this.i.H),window.addEventListener("resize",this.i.resize),document.addEventListener("keydown",this.i.N),document.body.insertBefore(this.a,document.body.firstChild),this.c.K&&this.D())};b.prototype.s=function(a){h=a};b.prototype.C=function(){return h};b.prototype.M=function(){return!!this.a.classList.contains("tingle-modal--visible")};b.prototype.close=function(){if(!this.C()){this.s(!0);if("function"!==typeof this.c.u||this.c.u.call(this))document.body.classList.remove("tingle-enabled"),window.scrollTo({top:this.O,behavior:"instant"}),document.body.style.top=null,this.a.classList.remove("tingle-modal--visible"),this.a.style.display="none","function"===typeof this.c.w&&this.c.w.call(this);this.s(!1)}};b.prototype.D=function(){this.b=document.createElement("div");this.b.classList.add("tingle-modal-box__footer");this.f.appendChild(this.b)};b.prototype.A=function(a){this.j()||(a=!1);a?this.f.contains(this.b)&&(this.f.removeChild(this.b),this.a.appendChild(this.b),this.b.classList.add("tingle-modal-box__footer--sticky"),d.call(this),this.l.style["padding-bottom"]=this.b.clientHeight+20+"px"):this.b&&!this.f.contains(this.b)&&(this.a.removeChild(this.b),this.f.appendChild(this.b),this.b.style.width="auto",this.b.style.left="",this.l.style["padding-bottom"]="",this.b.classList.remove("tingle-modal-box__footer--sticky"))};b.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")};b.prototype.j=function(){return this.f.clientHeight>=window.innerHeight};b.prototype.F=function(){this.a.classList.contains("tingle-modal--visible")&&(this.j()?this.a.classList.add("tingle-modal--overflow"):this.a.classList.remove("tingle-modal--overflow"),!this.j()&&this.c.B?this.A(!1):this.j()&&this.c.B&&(d.call(this),this.A(!0)))};return{a:b}})();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function menu_a(b){var d=new XMLHttpRequest;d.addEventListener("load",function(f){4===f.target.readyState&&b(f.target.responseText,0,f.target.responseXML)});var e=menu_b();""!==e&&(e="?"+e);d.open("GET","panel_content/print_menu_contents.php"+e);d.send("")}function menu_b(){var b={},d=[],e;for(e in b)d.push(e+"="+b[e]);return d.join("&")}
function menu_c(){"images/square_articles/food-bag_200_200-125.png images/square_articles/lettuce_with_measure_200_200-125.jpg images/square_articles/pregnant_apple_200_200-125.jpg images/square_articles/drinks_200_200-125.jpg images/calculators/house_dollar_swing_125_125.jpg images/calculators/tax_receipt_125_125.jpg images/calculators/coins3_125_125.jpg images/square_articles/calculator_10_200_200-125.jpg images/square_articles/dog_200_200-125.jpg images/square_articles/woman_weight_200_200-125.jpg images/square_articles/fruit_basket_2_200_200-125.jpg images/square_articles/housing_200_200-125.jpg images/square_articles/woman_belly_measure_200_200-125.jpg images/square_articles/pregnant_mirror_200_200-125.jpg images/square_articles/man_suit_watch_200_200-125.jpg images/square_articles/strawberris_200_200-125.jpg images/square_articles/wallet_200_200-125.jpg images/square_articles/dollar_house_200_200-125.jpg images/square_articles/kojak_200_200-125.jpg images/square_articles/graph_up_200_200-125.jpg images/square_articles/freud_200_200-125.jpg images/square_articles/pregnant_cyan_1_200_200-125.jpg images/square_articles/yellow_pepper_200_200-125.jpg images/square_articles/yin_yang_200_200-125.jpg images/square_articles/yellow_car_200_200-125.jpg images/square_articles/hitech_gym_200_200-125.jpg images/square_articles/fruit_basket_200_200-125.jpg images/square_articles/books_200_200-125.jpg images/categories/affiliates_200_200-125.jpg images/categories/gear_200_200-125.jpg images/authors/ami_and_reut2.jpg".split(" ").map(function(b,d){document.querySelector(".lazy_loaded_image_"+d).src=b})}(function(){function b(f){function m(){h();a=setTimeout(function(){k.classList.remove("visible");c=setTimeout(function(){k.classList.remove("top-visible");c=-1},200);a=-1},1E3)}function g(){n||(menu_c(),n=!0);Array.prototype.map.call(document.querySelectorAll("div.mbmenu.boxMenu"),function(l){l!==k&&(l.classList.remove("top-visible"),l.classList.remove("visible"))});h();k.classList.add("top-visible");k.classList.add("visible")}function h(){var l=[a,c];var p="undefined"!=typeof Symbol&&Symbol.iterator&&l[Symbol.iterator];l=p?p.call(l):{next:menu_(l)};for(p=l.next();!p.done;p=l.next())clearTimeout(p.value)}var a=-1,c=-1,k=document.getElementById(f.id.substr(0,f.id.indexOf("-header"))),n=!1;f.onmouseenter=g;f.onmouseleave=m;k.onmouseenter=g;k.onmouseleave=m}var d=document.getElementsByClassName("desktop-menu-item"),e;menu_a(function(f){f=(new DOMParser).parseFromString(f,"text/xml");var m=[];Array.prototype.map.call(f.childNodes[0].childNodes,function(g){return m.push(g)});m.map(function(g){var h=document.createElement("div"),a=g.getAttribute("id");h.className=g.getAttribute("class");h.id=a;if(g.innerHTML)h.innerHTML=g.innerHTML;else{e||(e=new XMLSerializer);var c=e;for(var k="",n=0;n<g.childNodes.length;n++)k+=c.serializeToString(g.childNodes[n]);h.innerHTML=k}document.getElementById(a+"-header").appendChild(h)});Array.prototype.map.call(d,b)})})({})})()