PageSourceSearch

https://luxholod.ru/bitrix/cache/js/s1/lux/template_e0128fc626b287…87eb2b0eb892938ed901_v1.js?1782309681117718

js luxholod.ru collected 2026-10-05 19:20:11 UTC 117,718 bytes, 1,804 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:59:"/local/templates/lux/js/jquery.cookie.min.js?17274388781300";s:6:"source";s:44:"/local/templates/lux/js/jquery.cookie.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3/*! jquery.cookie v1.4.1 | MIT */
4!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
5/* End */
6;
7; /* Start:"a:4:{s:4:"full";s:59:"/local/templates/lux/js/owl.carousel.min.js?172743887844342";s:6:"source";s:43:"/local/templates/lux/js/owl.carousel.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
vendor: 36,085 bytes, lines 8-14
8/**
9 * Owl Carousel v2.3.4
10 * Copyright 2013-2018 David Deutsch
11 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
12 */
13!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
14animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to}
vendor: 5,569 bytes, line 14
14,this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(
14window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
15/* End */
16;
17; /* Start:"a:4:{s:4:"full";s:55:"/local/templates/lux/js/inputmask.min.js?17274388785446";s:6:"source";s:40:"/local/templates/lux/js/inputmask.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
18!function(t){"use strict";var e=void 0!==window.orientation,s=navigator.userAgent.toLowerCase().indexOf("android")>-1,i="Microsoft Internet Explorer"==window.navigator.appName,n=function(e,i){s||(this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.mask=String(this.options.mask),this.init(),this.listen(),this.checkVal())};n.DEFAULTS={mask:"",placeholder:"_",definitions:{9:"[0-9]",a:"[A-Za-z]",w:"[A-Za-z0-9]",h:"[A-Fa-f0-9]","*":"."}},n.prototype.init=function(){var e=this.options.definitions;this.mask.length;this.tests=[],this.partialPosition=this.mask.length,this.firstNonMaskPos=null,t.each(this.mask.split(""),t.proxy(function(t,s){"?"==s?(0,this.partialPosition=t):e[s]?(this.tests.push(new RegExp(e[s])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1)):this.tests.push(null)},this)),this.buffer=t.map(this.mask.split(""),t.proxy(function(t,s){if("?"!=t)return e[t]?this.options.placeholder:t},this)),this.focusText=this.$element.val(),this.$element.data("rawMaskFn",t.proxy(function(){return t.map(this.buffer,function(t,e){return this.tests[e]&&t!=this.options.placeholder?t:null}).join("")},this))},n.prototype.listen=function(){if(!this.$element.attr("readonly")){var e=(i?"paste":"input")+".bs.inputmask";this.$element.on("unmask.bs.inputmask",t.proxy(this.unmask,this)).on("focus.bs.inputmask",t.proxy(this.focusEvent,this)).on("blur.bs.inputmask",t.proxy(this.blurEvent,this)).on("keydown.bs.inputmask",t.proxy(this.keydownEvent,this)).on("keypress.bs.inputmask",t.proxy(this.keypressEvent,this)).on(e,t.proxy(this.pasteEvent,this))}},n.prototype.caret=function(t,e){if(0!==this.$element.length){if("number"==typeof t)return e="number"==typeof e?e:t,this.$element.each(function(){if(this.setSelectionRange)this.setSelectionRange(t,e);else if(this.createTextRange){var s=this.createTextRange();s.collapse(!0),s.moveEnd("character",e),s.moveStart("character",t),s.select()}});if(this.$element[0].setSelectionRange)t=this.$element[0].selectionStart,e=this.$element[0].selectionEnd;else if(document.selection&&document.selection.createRange){var s=document.selection.createRange();t=0-s.duplicate().moveStart("character",-1e5),e=t+s.text.length}return{begin:t,end:e}}},n.prototype.seekNext=function(t){for(var e=this.mask.length;++t<=e&&!this.tests[t];);return t},n.prototype.seekPrev=function(t){for(;--t>=0&&!this.tests[t];);return t},n.prototype.shiftL=function(t,e){var s=this.mask.length;if(!(t<0)){for(var i=t,n=this.seekNext(e);i<s;i++)if(this.tests[i]){if(!(n<s&&this.tests[i].test(this.buffer[n])))break;this.buffer[i]=this.buffer[n],this.buffer[n]=this.options.placeholder,n=this.seekNext(n)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,t))}},n.prototype.shiftR=function(t){for(var e=this.mask.length,s=t,i=this.options.placeholder;s<e;s++)if(this.tests[s]){var n=this.seekNext(s),r=this.buffer[s];if(this.buffer[s]=i,!(n<e&&this.tests[n].test(r)))break;i=r}},n.prototype.unmask=function(){this.$element.unbind(".bs.inputmask").removeData("bs.inputmask")}
18,n.prototype.focusEvent=function(){this.focusText=this.$element.val();var t=this.mask.length,e=this.checkVal();this.writeBuffer();var s=this,i=function(){e==t?s.caret(0,e):s.caret(e)};i(),setTimeout(i,50)},n.prototype.blurEvent=function(){this.checkVal(),this.$element.val()!==this.focusText&&(this.$element.trigger("change"),this.$element.trigger("input"))},n.prototype.keydownEvent=function(t){var s=t.which;if(8==s||46==s||e&&127==s){var i=this.caret(),n=i.begin,r=i.end;return r-n==0&&(n=46!=s?this.seekPrev(n):r=this.seekNext(n-1),r=46==s?this.seekNext(r):r),this.clearBuffer(n,r),this.shiftL(n,r-1),!1}if(27==s)return this.$element.val(this.focusText),this.caret(0,this.checkVal()),!1},n.prototype.keypressEvent=function(t){var e=this.mask.length,s=t.which,i=this.caret();if(t.ctrlKey||t.altKey||t.metaKey||s<32)return!0;if(s){i.end-i.begin!=0&&(this.clearBuffer(i.begin,i.end),this.shiftL(i.begin,i.end-1));var n=this.seekNext(i.begin-1);if(n<e){var r=String.fromCharCode(s);if(this.tests[n].test(r)){this.shiftR(n),this.buffer[n]=r,this.writeBuffer();var h=this.seekNext(n);this.caret(h)}}return!1}},n.prototype.pasteEvent=function(){var t=this;setTimeout(function(){t.caret(t.checkVal(!0))},0)},n.prototype.clearBuffer=function(t,e){for(var s=this.mask.length,i=t;i<e&&i<s;i++)this.tests[i]&&(this.buffer[i]=this.options.placeholder)},n.prototype.writeBuffer=function(){return this.$element.val(this.buffer.join("")).val()},n.prototype.checkVal=function(t){for(var e=this.mask.length,s=this.$element.val(),i=-1,n=0,r=0;n<e;n++)if(this.tests[n]){for(this.buffer[n]=this.options.placeholder;r++<s.length;){var h=s.charAt(r-1);if(this.tests[n].test(h)){this.buffer[n]=h,i=n;break}}if(r>s.length)break}else this.buffer[n]==s.charAt(r)&&n!=this.partialPosition&&(r++,i=n);return!t&&i+1<this.partialPosition?(this.$element.val(""),this.clearBuffer(0,e)):(t||i+1>=this.partialPosition)&&(this.writeBuffer(),t||this.$element.val(this.$element.val().substring(0,i+1))),this.partialPosition?n:this.firstNonMaskPos};var r=t.fn.inputmask;t.fn.inputmask=function(e){return this.each(function(){var s=t(this),i=s.data("bs.inputmask");i||s.data("bs.inputmask",i=new n(this,e))})},t.fn.inputmask.Constructor=n,t.fn.inputmask.noConflict=function(){return t.fn.inputmask=r,this},t(document).on("focus.bs.inputmask.data-api","[data-mask]",function(e){var s=t(this);s.data("bs.inputmask")||s.inputmask(s.data())})}(window.jQuery);
19/* End */
20;
21; /* Start:"a:4:{s:4:"full";s:52:"/local/templates/lux/js/functions.js?176291978122384";s:6:"source";s:36:"/local/templates/lux/js/functions.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
22function changeGeoCity() {
23    getAjax({
24        url: '/local/ajax/geocity.php',
25        success: function(data) {
26            let result = BX.processHTML(data);
27            popupResult(result.HTML, false);
28            ajaxJCSS(result.SCRIPT[0].JS);
29        },
30    })
31    getAjax({
32        url: '/local/ajax/geocity.css',
33        success: function(data) {
34            ajaxJCSS(data, 'style');
35        },
36    })
37}
38
39// function changeGeoCityNew() {
40//     getAjax({
41//         url: '/local/ajax/geocity-new.php',
42//         success: function(data) {
43//             let result = BX.processHTML(data);
44//             popupResult(result.HTML, false);
45//             ajaxJCSS(result.SCRIPT[0].JS);
46//         },
47//     })
48//     getAjax({
49//         url: '/local/ajax/geocity-new.css',
50//         success: function(data) {
51//             ajaxJCSS(data, 'style');
52//         },
53//     })
54// }
55
56function askGeoCity() {
57    /* defaultCity = defaultCity || {};
58    if (typeof defaultCity.id === 'undefined') {
59        getAjax({
60            url: '/local/ajax/geocity.php',
61            datatype: 'json',
62            data: {default: 'Y'},
63            success: function(data) {
64                defaultCity = JSON.parse(data);
65            },
66        })
67    } */
68    let outStr = '<div class="popup-small"><div class="popup-close js-geo-submit"></div><div class="popup-small__inner">';
69    outStr = `${outStr}<div class="popup-small__title">Ваш город <span>${$('.geocity').text()}</span>?</div>`;
70    outStr = `${outStr}<button class="btn-std btn-blue js-geo-submit">Да</button>`;
71    outStr = `${outStr}<button class="btn-std btn-blue-empty js-geo-choose">Нет</button>`;
72    outStr = `${outStr}</div></div>`;
73    $('.nav-geo').append(outStr);
74    $('.js-geo-submit').click(function(){
75        $('.popup-small').animate({'opacity':0},200);
76        setTimeout(function(){
77            $('.popup-small').detach();
78        }, 200);
79    })
80    $('.js-geo-choose').click(function(){
81        $('.popup-small').animate({'opacity':0},200);
82        setTimeout(function(){
83            $('.popup-small').detach();
84        }, 200);
85        changeGeoCity();
86    })
87}
88
89function getAjax(options) {
90    if (typeof options.url === 'undefined') return;
91    let defaultOptions = {
92        type: 'GET',
93        datatype: 'text',
94        error: function(jqXHR, exception) {
95            console.log(jqXHR);
96            console.log(exception);
97        }
98    };
99    $.ajax({...defaultOptions, ...options});
100}
101
102function ajaxJS(js) {
103  const newScript = document.createElement("script");
104  newScript.type = "text/javascript";
105  newScript.text = js;
106  document.getElementsByTagName("head")[0].appendChild(newScript);
107}
108
109function checkIfShown(element, func) {
110    setTimeout(function(){
111        let divPos = {
112            top: $(element).offset().top,
113            bottom:  $(element).offset().top + $(element).outerHeight()
114        };
115        let winPos = {
116            top: $(document).scrollTop(),
117            bottom: $(document).scrollTop() + $(window).height()
118        }
119        funcDelay = docDelay;
120        if ((divPos.top > winPos.top && divPos.top < winPos.bottom) || (divPos.bottom < winPos.top && divPos.bottom > winPos.bottom))
121            funcDelay = 0;
122        setTimeout(function(){
123            func();
124        }, funcDelay);
125    },100);
126}
127
128function linkScrollTo(href) {
129    topOffset = $(href).offset().top - 190;
130    $("html, body").animate({
131        scrollTop: topOffset + "px"
132    }, {
133        duration: 500,
134        easing: "swing"
135    });
136}
137
138function scrollWindow() {
139    let scrollBase = $('#bx-panel').height();
140    if ($(window).scrollTop() > scrollBase) {
141        $('body').addClass('fixed');
142        $('#toTop').fadeIn();
143    } else {
144        $('body').removeClass('fixed');
145        $('#toTop').fadeOut();
146    }
147}
148
149function resizeWindow() {
150    if (window.innerWidth >= 1200) {
151        $('#top-cart').appendTo('.basketbox');
152    } else {
153        $('#top-cart').appendTo('.basket-mobile');
154    }
155    set768Carousel();
156}
157
158function updateBasket() {
159    $.ajax('/local/ajax/updateBasket.php').always(function(data){
160        $('#top-cart').html($($.parseHTML(data)).html());
161    });
162    return true;
163}
164
165function updateCompare() {
166    $.ajax('/local/ajax/updateCompare.php').always(function(data){
167        $('.comparebox').html(data);
168    });
169    return true;
170}
171
172function showModalForm(formType, formTemplate = '', arOptions = {}, showSpasibo = true) {
173    if (!formType) return false;
174    let sendData = {
175        WEB_FORM_ID: formType,
176        ajax: 'Y',
177        step: 'q'
178    };
179    if (formTemplate != '') {
180        sendData.template = formTemplate;
181    }
182    if (arOptions != {}) {
183        for (key in arOptions) {
184            sendData[key] = arOptions[key];
185        }
186    }
187    $.ajax({
188        url: '/local/ajax/formajax.php',
189        method: 'POST',
190        data: sendData,
191        success: function(result) {
192            if (formTemplate == '' || formTemplate == 'lux-popup' || formTemplate == 'lux-popup-predzakaz') {
193                popupResult(result, true, showSpasibo);
194            } else {
195                $('.embed-form-place').append(result);
196                setFormHandler();
197                setLabelActive();
198            }
199        },
200        error: function(jqXHR, exception) {
201            console.log(jqXHR);
202            console.log(exception);
203        }
204    })
205}
206
207function setLabelActive() {
208    $('label').click(function(){
209        if (!$(this).hasClass('active')) {
210            $(this).addClass('active').siblings('input, textarea').focus();
211        }
212    })
213    $('input.inputtext, .inputtextarea').focus(function(){
214        if ($(this).siblings('label').length) {
215            $(this).siblings('label').addClass('active');
216        }
217    });
218
219    $('input.inputtext, .inputtextarea').blur(function(){
220        let notPassed = false;
221        if ($(this).data('type') == 'phone' && !validatePhone($(this).val())) notPassed = true;
222        if ((notPassed || $(this).val() == '' || $(this).val() == '  ') && $(this).siblings('label').length) {
223            $(this).siblings('label').removeClass('active');
224            $(this).val('');
225        }
226    });
227}
228
229function popupResult(result, isForm = true, showSpasibo = true, setWrapper = false, additionalClass = "") {
230    if (setWrapper) {
231        result = `<div class="popup-bg"></div><div class="popup-block ${additionalClass}"><div class="popup-close"></div><div class="popup-inner">${result}</div></div>`;
232    }
233    $('#modalWindow').html(result).css('display','flex').animate({'opacity':'1'},300);
234    if (Object.keys(formValues).length) {
235        for (const key of Object.keys(formValues)) {
236            $(`#${key}`).val(formValues[key]).prop('readonly',true).siblings('label').addClass('active');
237        }
238    }
239    formValues = {};
240    $('body').addClass('popup-no-overflow');
241    if (isForm) {
242        setFormHandler(showSpasibo);
243        setLabelActive();
244    }
245
246    $('.popup-close, .popup-bg').click(function(){
247        closePopupResult();
248    });
249}
250
251function closePopupResult() {
252    $('#modalWindow').animate({'opacity':'0'},300);
253    setTimeout(function(){
254        $('#modalWindow').css('display','none').html('');
255        $('body').removeClass('popup-no-overflow');
256    },305);
257}
258
259function validatePhone(phone) {
260    if (phone.length > 19) return false;
261    let pattern = /^[\+\(\)\-0-9 ]+$/;
262    return pattern.test(phone);
263}
264
265function validateEmail(email) {
266    let pattern  = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
267    return pattern.test(String(email).toLowerCase());
268}
269
270function validateForm(options, errorStrings = []) {
271    if (options.length == 0) return false;
272    for (let i=0; i < options.length; i++) {
273        if (options[i].name == "NAME" || options[i].name.indexOf('select') != -1 || options[i].name.indexOf('[') != -1) continue;
274        if ($('#'+options[i].name).data('type') !== undefined) {
275            let isRequired = false;
276            if ($('#'+options[i].name).data('req') !== undefined && $('#'+options[i].name).data('req') == 'Y')
277                isRequired = true;
278            switch ($('#'+options[i].name).data('type')) {
279                case 'phone':
280                    if (isRequired && (options[i].value == '' || options[i].value.length < 7 || !validatePhone(options[i].value))) {
281                        if (errorStrings['phone'] === undefined) errorStrings['phone'] = 'Check the field';
282                        showNotFilledModalWindow(options[i].name, errorStrings['phone']);
283                        return false;
284                    }
285                    break;
286                case 'email':
287                    if (isRequired && (options[i].value == '' || !validateEmail(options[i].value))) {
288                        if (errorStrings['email'] === undefined) errorStrings['email'] = 'Check the field';
289                        showNotFilledModalWindow(options[i].name, errorStrings['email']);
290                        return false;
291                    }
292                    break;
293                default:
294                    if (isRequired && options[i].value == '') {
295                        if (errorStrings['common'] === undefined) errorStrings['common'] = 'Check the field';
296                        showNotFilledModalWindow(options[i].name, errorStrings['common']);
297                        return false;
298                    }
299            }
300        }
301    }
302    return true;
303}
304
305function showNotFilledModalWindow(fieldName, alertString) {
306    let modalAgree = '';
307    let modalAlertWin = `<div class="modal_alert${modalAgree}">${alertString}</div>`;
308    $('div.input-box.' + fieldName).append(modalAlertWin);
309    setTimeout(function(){
310        $('.modal_alert').detach();
311    }, 2000);
312}
313
314function consolidateInput(enable_privacy_policy, checkman, formID) {
315    if (enable_privacy_policy && !checkman) {
316        $(`.btn-submit-${formID}, button.js-submit[data-webform="${formID}"]`).prop('disabled', false);
317    } else {
318        $(`.btn-submit-${formID}, button.js-submit[data-webform="${formID}"]`).prop('disabled', true);
319    }
320    if (!checkman) {
321        $('#robot-'+formID).val('a-man');
322    } else {
323        $('#robot-'+formID).val('not-a-man');
324    }
325}
326
327function buyOnline(elementID) {
328    let options = {
329        elementID: elementID,
330        ajax: 'N'
331    };
332    $.ajax({
333        url: '/local/ajax/buyonline.php',
334        type: 'GET',
335        dataType: 'text',
336        data: options,
337        success: function(data) {
338            $('body').append(`<div id="online-modal">${data}</div>`);
339            $('#online-modal').css('display','flex').animate({'opacity':'1'},300);
340            $('body').addClass('popup-no-overflow');
341            //buyOnlineModal();
342            //setLabelActive();
343        },
344        error: function(jqXHR, exception) {
345            console.log(jqXHR);
346            console.log(exception);
347        }
348    })
349}
350
351/**
352 * Yandex map section
353 */
354
355function attachMap() {
356    ymaps.ready(function() {
357        let myIcon = {
358            iconLayout: 'default#imageWithContent',
359            iconImageHref: '/images/map-point.png',
360            iconImageSize: [51, 62],
361            iconImageOffset: [-17, -62]
362        };
363        myMap = new ymaps.Map('footer-map', {
364            center: [45.094058, 38.951670],
365            zoom: 11,
366            controls: ['zoomControl', 'fullscreenControl',]
367        }, {
368            searchControlProvider: 'yandex#search'
369        });
370        for (let point of arOffices) {
371            myPlacemark = new ymaps.Placemark(point.coord.map((elem) => parseFloat(elem)), {
372                hintContent: `${point.name}, ${point.address}<br>${point.phone}`,
373                balloonContent: `${point.name}, ${point.address}<br>${point.phone}`
374            }, myIcon),
375            myMap.geoObjects.add(myPlacemark);
376        }
377    });
378    yandexMapLoaded = true;
379}
380
381// функция ожидания загрузки и инициализации объекта ymaps
382function waitTheInit(func, timeout = 100, counter = 0) {
383    if (typeof ymaps === 'object') {
384        func();
385    } else if (counter < 20) {
386        setTimeout(function(){
387            waitTheInit(func, timeout, counter+1);
388        },timeout);
389    } else {
390        console.log('Ymaps error. May be it did not start');
391    }
392}
393
394// Отправка целей в Я.Метрику
395function sendGoal(goal) {
396    ym(44248079, 'reachGoal', goal);
397}
398
399function ajaxJCSS(fill, type = 'script') {
400    const newComponent = document.createElement(type);
401    if (type === 'script') {
402        newComponent.text = fill;
403    } else {
404        newComponent.innerHTML = fill;
405    }
406    document.head.appendChild(newComponent);
407}
408
409function showAjaxPreloader(hide = false) {
410    if (hide) {
411        $('.ajax_preloader').animate({"opacity":"0"}, 150);
412        setTimeout(function(){
413            $('.ajax_preloader').detach();
414        })
415    } else {
416        let outHtml = '<div class="ajax_preloader"></div>';
417        $('body').append(outHtml);
418        $('.ajax_preloader').animate({"opacity":"1"}, 150);
419    }
420}
421
422function set768Carousel(carouselClass = 'js-carousel') {
423    if (window.innerWidth < 768 && !$(`.${carouselClass}.owl-carousel`).length) {
424        $(`.${carouselClass}`).each(function(){
425            if (!$(this).hasClass('owl-carousel')) {
426                $(this).addClass('owl-carousel').owlCarousel({
427                    loop: true,
428                    margin: 0,
429                    lazyLoad: false,
430                    items: 1,
431                    dots: true,
432                    nav: false
433                });
434            }
435        })
436    } else if (window.innerWidth >= 768 && $(`.${carouselClass}.owl-carousel`).length) {
437        $(`.${carouselClass}`).each(function(){
438            if ($(this).hasClass('owl-carousel'))
439                $(this).trigger('destroy.owl.carousel').removeClass('owl-carousel').removeClass('owl-loaded').removeClass('owl-drag');
440        })
441    }
442}
443
444function showGallery(index, items, parent = '', func = '', options = {}, tmOut = 150) {
445    if (!items.length) return;
446    const gallery = items.length > 1;
447    if (!$('#modalWindow').length) $('body').append('<div id="modalWindow" class="gallery-popup"></div>');
448    else ($('#modalWindow').addClass('gallery-popup'));
449    $('body').addClass('fixed');
450    let outStr = `<div class="gallery-popup-box"><div class="popup-close js-close-popup"></div>`;
451    outStr = `${outStr}<div class="gallery-popup-slider">`;
452    items.forEach(function(el, i){
453        pic = typeof el.image !== 'undefined' ? el.image : el;
454        outStr = `${outStr}<div class="gallery-img" data-index="${i}">`;
455        if (typeof el.name !== 'undefined') outStr = `${outStr}<div class="gallery-img__title">${el.name}</div>`;
456        outStr = `${outStr}<img src="${pic}" class="img-contain"></div>`;
457    })
458    outStr = `${outStr}</div></div>`;
459    $('#modalWindow').html(outStr).animate({'opacity':'1'}, tmOut);
460    if (gallery) {
461        let goalIndex = 0;
462        $('.gallery-popup-slider').on('initialized.owl.carousel', function(e) {
463            for (let i = 0; i < e.item.count; i += 1) {
464                let dataIndex = $('.gallery-popup-slider .owl-item:eq(' + i + ') .gallery-img').data('index');
465                if (parseInt(index) === parseInt(dataIndex)) {
466                    goalIndex = i;
467                    break;
468                }
469            }
470            setTimeout(function(){
471                $(e.target).trigger('to.owl.carousel', [goalIndex, 0]);
472            }, 100);
473        });
474        $('.gallery-popup-slider').addClass("owl-carousel").owlCarousel({
475            margin: 20,
476            dots: false,
477            nav: true,
478            rewind: true,
479            items: 1
480        });
481        $('.popup-btn').click(function(){
482            $('.gallery-popup-slider').trigger('to.owl.carousel', [7]);
483        })
484    }
485    $('.js-close-popup').off('click').click(function(){
486        closeModalWindow(parent);
487        if (typeof func === 'function') {
488            func(options);
489        }
490    })
491}
492
493function closeModalWindow(parent = '') {
494    $('#modalWindow').animate({'opacity':'0'},150);
495    setTimeout(function(){
496        if ($('.gallery-popup-slider.owl-carousel').length) $('.gallery-popup-slider').trigger('destroy.owl.carousel');
497        $('#modalWindow').html('').removeClass('gallery-popup').css('display','none');
498        $('body').removeClass('fixed').removeClass('popup-no-overflow');;
499        if (parent !== '') {
500            parent.trigger('play.owl.autoplay');
501        }
502    },150);
503}
504
505function setCalcRatingMouseMove() {
506    $('.calc__rating').on('mousemove', function(e){
507        let proc = e.offsetX / $(this).width() * 100;
508        if (proc >= 95) {
509            proc = 100;
510        } else if (proc < 0) {
511            proc = 0;
512        } else {
513            proc = Math.floor( proc / 10 ) * 10;
514        }
515        $('.calc_progress').css('width', `${proc}%`);
516        $(this).data('rating', proc);
517    })
518}
519
520var leaveLuxWindow = {
521  cookName: 'goOutLux',
522  /**
523   * Время существования куки в секундах
524   * 86400 - сутки
525   * 60 - 1 минута
526   */
527  maxAge: 86400,
528  inner: '',
529  checkCook: function() {
530    const isCook = document.cookie.split(';').map((el) => el.trim().split('=')).filter((e) => e[0] === this.cookName);
531    return isCook?.length === 1;
532  },
533  showPopupWIndow: function() {
534    if (this.checkCook()) return;
535    this.getData();
536    const _this = this;
537    $(document).mouseleave(function(e){
538      if (_this.checkCook()) return;
539      const age = _this.maxAge;
540      document.cookie = `goOutLux=1; max-age=${age}; path=/; samesite=strict`;
541      _this.getData().then(() => {
542        popupResult(_this.inner, false, false, true, 'goaway-popup');
543        if (typeof setFormHandler !== "undefined") {
544          setFormHandler();
545        }
546      })
547    })
548  },
549  getData: function() {
550    const _this = this;
551    return new Promise((resolve, reject) => {
552      if (_this.inner !== '') resolve(true);
553      
554      const data = {
555        code: 'sobiraetes-ukhodit-s-nami-nuzhno-torgovatsya',
556      };
557      getAjax({
558        url: '/local/ajax/getPopupWindow.php',
559        type: 'POST',
560        data: data,
561        success: function(res) {
562          if (res === '') return;
563          const resJson = BX.processHTML(res);
564          const inJs = resJson?.SCRIPT[0]?.JS;
565          if (typeof inJs !== 'undefined') ajaxJS(inJs);
566          _this.inner = res;
567          resolve(true);
568        }
569      })
570    })
571  }
572}
573
574var urlHandler = {
575  url: {},
576  init: function(loc) {
577    this.url = {
578      href: loc.href,
579      protocol: loc.protocol,
580      hostname: loc.hostname,
581      pathname: loc.pathname,
582      search: loc.search ?? '',
583      objSearch: new URLSearchParams(loc.search ?? ''),
584      hash: loc.hash ?? '',
585    };
586  },
587  setNewUrl: function(url, isPage = false) {
588    this.url.pathname = isPage ? `${this.url.pahtname}${url}` : url;
589  },
590  getSearchParam: function(key) {
591    if (!this.url.objSearch.has(key)) return false;
592    return this.url.objSearch.get(key);
593  },
594  getSearchParamList: function() {
595    return this.url.objSearch.keys();
596  },
597  setSearchParam: function(obj = {}) {
598    if (!Object.keys(obj).length) return false;
599    for (let key in obj) {
600      if (this.url.objSearch.has(key)) {
601        this.url.objSearch.set(key, obj[key]);
602      } else {
603        this.url.objSearch.append(key, obj[key]);
604      }
605    }
606    const searchString = this.url.objSearch.toString();
607    this.url.search = searchString.length ? `?${searchString}` : '';
608    return true;
609  },
610  removeSearchParam: function(obj) {
611    if (!obj.length) return false;
612    if (typeof obj === 'string' || obj instanceof String) obj = [obj];
613    for (let key of obj) {
614      if (this.url.objSearch.has(key)) {
615        this.url.objSearch.delete(key);
616      }
617    }
618    const searchString = this.url.objSearch.toString();
619    this.url.search = searchString.length ? `?${searchString}` : '';
620    return true;
621  },
622  toString: function(showHost = false) {
623    const host = showHost ? `${this.url.protocol}://${this.url.hostname}` : '';
624    const hash = this.url.hash?.length ? `#${this.url.hash}` : '';
625    return `${host}${this.url.pathname}${this.url.search}${this.url.hash}`;
626  },
627  clearParams: function(){
628    const list = this.getSearchParamList();
629    this.removeSearchParam(list);
630  }
631}
632
633var popup = {
634  preparePopup: function(data) {
635    let styleClass = data.classes?.wrapper ?? '';
636    let outStr = `<div class="popupbox__wrapper ${styleClass}">`;
637    if (data.title !== undefined) {
638      styleClass = data.classes?.title ?? '';
639      outStr = `${outStr}<div class="popupbox__title ${styleClass}">${data.title}</div>`;
640    }
641    if (data.body !== undefined) {
642      styleClass = data.classes?.body ?? '';
643      outStr = `${outStr}<div class="popupbox__body ${styleClass}">${data.body}</div>`;
644    }
645    if (data.btns !== undefined) {
646      outStr = `${outStr}<div class="popupbox__btnrow">`;
647      for (let btn of data.btns) {
648        outStr = `${outStr}<button class="${btn.classes ?? ''}"${btn.action ?? ''}>${btn.title}</button>`;
649      }
650      outStr = `${outStr}</div>`;
651    }
652    outStr = `${outStr}</div>`;
653    return outStr;
654  },
655  showPopup: function(data) {
656    const outStr = this.preparePopup(data);
657    const _this = this;
658    if (!$('#modalWindow').length) $('body').append('<div id="modalWindow"></div>');
659    const closeAppend = data.closeAppend ?? '';
660    let styleClass = data.classes?.popupblock ?? '';
661    $('#modalWindow').html(`<div class="popup-bg"></div><div class="popup-block ${styleClass}"><div class="popup-close ${closeAppend}"></div><div class="popup-inner">${outStr}</div></div>`);
662    $('#modalWindow').css('display','flex').animate({'opacity':'1'},300);
663    $('body').addClass('popup-no-overflow');
664
665    $('.popup-close, .popup-bg').click(function(){
666      _this.closePopup();
667    })
668  
669    if (data.timeOut !== undefined) {
670      setTimeout(() => _this.closePopup(), data.timeOut);
671    }
672  },
673  closePopup: function(popup = '#modalWindow') {
674    $(popup).animate({'opacity':'0'},300);
675    setTimeout(function(){
676      if (popup == '#modalWindow')
677        $(popup).css('display','none').html('');
678      else
679        $(popup).detach();
680      $('body').removeClass('popup-no-overflow');
681    },305);
682  }
683}
684/* End */
685;
686; /* Start:"a:4:{s:4:"full";s:49:"/local/templates/lux/js/custom.js?176708196615494";s:6:"source";s:33:"/local/templates/lux/js/custom.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
687var formValues = {};
688var multi = false;
689var yandexMapLoaded = false;
690var loadGeoScript = true;
691var commonData = {};
692var dataDivOpened = false;
693
694$(document).ready(function(){
695    $('a').click(function(e){
696        if ($(this).attr('href') == '')
697            e.preventDefault();
698        if ($(this).attr('href').substring(0, 1) === '#') {
699            e.preventDefault();
700            $('body,html').animate({scrollTop:($($(this).attr('href')).offset().top - $('.mainmenu').height()) + 'px'},500);
701        }
702    })
703
704    $(function(){
705        if (typeof domReadyQueue != 'undefined')
706            while (domReadyQueue.length) {
707                domReadyQueue.shift()($);
708            }
709    });
710
711    /**
712     * Загрузка окна "Вы уже уходите?"
713     */
714    leaveLuxWindow.showPopupWIndow();
715
716    scrollWindow();
717    $(window).scroll(function(){
718        scrollWindow();
719    });
720
721    $('.mobile-open').click(function(){
722        $('body').addClass('fixScroll');
723        $('.mobile-menu-box').addClass('opened');
724    });
725    $('.btn-close').click(function(){
726        $('.mobile-menu-box').removeClass('opened');
727        $('body').removeClass('fixScroll');
728    })
729    $('.has-child').click(function(e){
730        e.stopPropagation();
731        if ($(this).hasClass('opened')) {
732            $(this).removeClass('opened');
733        } else {
734            $(this).addClass('opened');
735        }
736    })
737
738    $('.btn-std').click(function(e){
739        if (typeof $(this).data('btntype') !== 'undefined') {
740            e.preventDefault();
741            showModalForm($(this).data('btntype'));
742        }
743    })
744
745    resizeWindow();
746    $(window).resize(function(){
747        resizeWindow();
748    })
749
750    // Подключение 3D-тура на главной странице сайта
751    /* if ($('#google-3d-tour').length) {
752        checkIfShown('#google-3d-tour', function(){
753            $('#google-3d-tour').append(`<iframe src="https://www.google.com/maps/embed?pb=!4v1594242926271!6m8!1m7!1sCAoSLEFGMVFpcFBMS0hrWFh5SWRjWFFlTnBXRnl0U1JuV3ZsMEE4WjNHQWZMQzJE!2m2!1d45.08598556607712!2d38.90273766008545!3f258.9580809691802!4f-7.327085253069811!5f0.7820865974627469" class="three-d-tour" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>`);
754        })
755    } */
756
757    $('.current-sort-tab').click(function(){
758        if ($('.sort-box').hasClass('opened')) {
759            $('.sort-box').removeClass('opened');
760        } else {
761            $('.sort-box').addClass('opened');
762        }
763    });
764
765    $('.current-show-tab').click(function(){
766        if ($('.show-qty-box').hasClass('opened')) {
767            $('.show-qty-box').removeClass('opened');
768        } else {
769            $('.show-qty-box').addClass('opened');
770        }
771    });
772
773    $('.mini-menu a').click(function(e){
774        e.preventDefault();
775        linkScrollTo($(this).attr('href'));
776    })
777    
778    $('#toTop, .logo-img').on("click",function(e) {
779      if ($('.logo-img').is(e.target) && !$(e.target).parent().hasClass('logo')) return;
780      $('body,html').animate({scrollTop:0},500);
781    });
782
783    $('body').click(function(e){
784        if (!$('.current-sort-tab').is(e.target) && $('.sort-box').hasClass('opened')) $('.sort-box').removeClass('opened');
785        if (!$('.current-show-tab').is(e.target) && $('.show-qty-box').hasClass('opened')) $('.show-qty-box').removeClass('opened');
786    });
787
788    $('.authbox').click(function(){
789        if ($(this).data('auth') !== undefined && $(this).data('auth') == 'Y') {
790            document.location.assign('/personal/');
791        } else {
792            document.location.assign('/auth/');
793        }
794    })
795
796    if ($('.embed-form-place').length) {
797        $('.embed-form-place').each(function(){
798            let formClass = 'lux-embed';
799            if (!!$(this).data('class')) {
800                formClass = $(this).data('class');
801            }
802            let formId = $(this).data('formid');
803            showModalForm(formId, formClass);
804        });
805    }
806
807    if ($('.popup-form-place').length) {
808        $('.popup-form-place').each(function(){
809            $(this).click(function(){
810                showModalForm($(this).data('formid'), 'lux-popup')
811            });
812        });
813    }
814
815    if ($('.product-item-detail-buy-credit-button').length) {
816        $('.product-item-detail-buy-credit-button').click(function(){
817            let options = {
818                itemID : $(this).data('itemid'),
819                itemName : $(this).data('itemname')
820            };
821            showModalForm($(this).data('formid'), 'lux-popup', options);
822        })
823    }
824
825    $('.header__phone-box a, .header__phone-mobile a').click(function(){
826        sendGoal('header_phone_click_8800');
827    })
828    
829    $('#ORDER_CONFIRM_BUTTON').click(function(){
830        sendGoal('pay_click');
831    })
832    
833    if ($('.product-item').length) {
834        $('.product-item').click(function(e) {
835            if (!$('a, button, input[data-entity="compare-checkbox"]').is(e.target) && typeof $(this).data('link') !== 'undefined') {
836                window.location.href = $(this).data('link');
837            } 
838        });
839    }
840
841    /**
842     * Отключаем карту в подвале - переносим подключение в шаблон вывода контактных данных
843     */
844    /*
845    setTimeout(function(){
846        if (!yandexMapLoaded) {
847            $.getScript('https://api-maps.yandex.ru/2.1/?lang=ru_RU', waitTheInit(attachMap));
848        } else {
849            waitTheInit(attachMap);
850        }
851    }, docDelay);
852    */
853
854    /**
855     * Переносим в шаблон показа адреса в подвале
856     */
857    /*
858    if ($('.show-popup-map').length) {
859        $('.show-popup-map').click(function(){
860          if ($(this).data('link') != '') {
861            $('#modalWindow').append('<div class="popup-close map-close"></div>' + $(this).data('link')).css('display','flex').animate({'opacity':'1'},300);
862            $('.popup-close').click(function(){
863                $('#modalWindow').animate({'opacity':'0'},300);
864                setTimeout(function(){
865                    $('#modalWindow').css('display','none').html('');
866                    $('body').removeClass('popup-no-overflow');
867                },305);
868            });
869          }
870        })
871    }
872    */
873
874    $('.js-geocity').click(function(){
875        changeGeoCity();
876    })
877    $('.js-geocity-new').click(function(){
878        changeGeoCityNew();
879    })
880
881    if ($.cookie("BITRIX_SM_geo_asked") === undefined || $.cookie("BITRIX_SM_geo_asked") !== "1") {
882        askGeoCity();
883        $.cookie("BITRIX_SM_geo_asked", 1, {expires: 7, path: '/', sameSite: 'strict'});
884    }
885  });
886
887$(document).on('click', (e) => {
888    if ($('.js-multi-section').is(e.target) || $('.js-multi-section *').is(e.target)) {
889        multi = true;
890    }
891    if ($('.btn-buyonline, .product-item-detail-buy-online-button').is(e.target)) {
892        // $('.btn-buyonline, .product-item-detail-buy-online-button').click(function(e){
893      e.preventDefault();
894      e.stopPropagation();
895      buyOnline($(e.target).data('elementid'));
896        // })
897    }
898    if ($('.btn-buyoffline').is(e.target) || $('.btn-buyoffline-item').is(e.target)) {
899        let name = '';
900        let price = '';
901        if ($('.btn-buyoffline').is(e.target)) {
902            const itemBoxID = $(e.target).data('id');
903            name = typeof $(`#${itemBoxID} .product-item-title a`).prop('title') !== 'undefined' ? $(`#${itemBoxID} .product-item-title a`).prop('title') : $(`#${itemBoxID} .product-title a`).prop('title');
904            price = $(`#${itemBoxID} .product-item-price-current`).html() ? $(`#${itemBoxID} .product-item-price-current`).html() : $(`#${itemBoxID} .product-item-current.price`).html();
905        } else {
906            name = $('h1').text();
907            price = $('.product-item-detail-price-current').html();
908        }
909        let outStr = '<div class="popup-bg"></div><div class="popup-block"><div class="popup-close"></div><div class="popup-inner"><div class="popup-offline">';
910        outStr = `${outStr}${name}<br>за ${price}<br>вы можете приобрести<br>только <a href="/about/contacts/" target="_new">в розничном магазине</a>.`;
911        outStr = `${outStr}<div class="popup-btn-row"><div class="btn-std btn-blue offline-close">Продолжить покупки</div>`;
912        outStr = `${outStr}<div class="btn-std btn-green offline-request">Заказать звонок (бесплатно)</div></div>`;
913        outStr = `${outStr}</div></div>`;
914        popupResult(outStr, false);
915        $('.offline-close').click(function(){
916            closePopupResult();
917        })
918        $('.offline-request').click(function() {
919            if ($('.btn-buyoffline-item').is(e.target)) price = `${$('.btn-buyoffline-item').data('price')} руб.`;
920            formValues = {form_text_50: name, form_text_51: price};
921            showModalForm(14);
922        })
923    }
924    if ($('.js-not-avail').is(e.target)) {
925        showModalForm($(e.target).data('webform') ?? 23, 'lux-popup-predzakaz', {item: $(e.target).data('item')}, false);
926    }
927    if ($('.js-gallery-show').is(e.target)) {
928        const startId = $(e.target).data('id');
929        const arGallery = gallery[ $(e.target).data('gallery') ];
930        const parent = $($(e.target).parents('.owl-carousel')[0]);
931        parent.trigger('stop.owl.autoplay');
932        showGallery(startId, arGallery, parent);
933        // if ($(e.target).hasClass('js-type-img')) {}
934    }
935    if ($('.js-item-rating').is(e.target)) {
936        let rateData = rating[ $(e.target).data('rating') ];
937        rateData.id = $(e.target).data('id');
938        let value = parseInt($(e.target).data('value'));
939        let outStr = `<div class="rating-popup-title">${itemTexts.RATING_POPUP_TITLE}</div><div class="rating-popup-body">${$($(e.target).parents('.rating_person_item')[0]).html()}`;
940        outStr = `${outStr}<div class="about__rating"><div class="about__rating_container"><div class="about__rating_bg calc__rating"></div><div class="about__rating_progress calc_progress"></div></div></div>`;
941        outStr = `${outStr}<div class="btn-std btn-blue js-rating-accept">${itemTexts.RATING_POPUP_SET}</div></div>`;
942        popupResult(outStr, false, false, true);
943        var setMouseMove = true;
944        setCalcRatingMouseMove();
945        $('.calc__rating').click(function(e){
946            if (setMouseMove) {
947                $(this).off('mousemove');
948            } else {
949                setCalcRatingMouseMove();
950            }
951            setMouseMove = !setMouseMove;
952        })
953        $('.js-rating-accept').click(function(){
954            getAjax({
955                url: '/local/ajax/setrating.php',
956                data: {
957                    rate: $('.calc__rating').data('rating'),
958                    oldvalue: value,
959                    ratedata: rateData,
960                },
961                success: function(res) {
962                    if (res.substring(0, 5) === 'ERROR') {
963                        console.log(res);
964                    } else {
965                        let newRate = parseInt($('.calc__rating').data('rating'));
966                        let newWidth = value === 0 ? newRate : Math.floor((newRate + value) / 20) * 10;
967                        $(`.about__rating_progress[data-id="${rateData.id}"]`).css('width', `${newWidth}%`);
968                    }
969                    closeModalWindow();
970                }
971            })
972        })
973    }
974    if ($('.js-popup-video').is(e.target)) {
975        const item = window[$(e.target).data('array')][$(e.target).data('id')].VIDEO;
976        if (typeof item.PATH !== 'undefined') {
977            const outStr = `<div class="video-block"><video id="video_frame"></video>
978            <div class="video__action">
979                <div class="video__action-inner clearfix">
980                    <div class="video__sound_level video__hide" id="video__sound_level" title="Level">
981                        <input type="range" id="video__sound_level_input" min="0.1" max="1.0" step="0.1" value="
9810.2">
982                    </div>
983                    <div class="video__control video__sound video__muted" id="video__sound" title="Sound">Sound</div>
984                    <div class="video__control video__stop" id="video__stop" title="Stop">Stop</div>
985                    <div class="video__control video__play video__hide" id="video__play" title="Play">Play</div>
986                </div>
987            </div></div>`;
988            popupResult(outStr, false, false, true, 'video-popup');
989            loadLocalVideo(`<source src="${item.PATH}" type="${item.TYPE}">`, {width: item.WIDTH, height: item.HEIGHT});
990        } else {
991            let outStr = `<iframe width="854" height="480" src="https://www.youtube.com/embed/${item.YOUTUBE}" frameborder="0" allowfullscreen></iframe>`;
992            popupResult(outStr, false, false, true, 'video-popup');
993        }
994    }
995  if ($('.js-montag-free').is(e.target)) {
996    const data = {
997      addToBasket: {
998        id: $(e.target).prop('id'),
999        onclick: $(e.target).attr('onclick'),
1000        obname: $(e.target).data('obname'),
1001      },
1002      code: 'besplatnaya-ustanovka', // 'sobiraetes-ukhodit-s-nami-nuzhno-torgovatsya', //
1003    };
1004    getAjax({
1005      url: '/local/ajax/getPopupWindow.php',
1006      type: 'POST',
1007      data: data,
1008      success: function(res) {
1009        const resJson = BX.processHTML(res);
1010        const inJs = resJson?.SCRIPT[0]?.JS;
1011        if (typeof inJs !== 'undefined') ajaxJS(inJs);
1012        popupResult(res, false, false, true, 'nocost-popup');
1013        if (typeof setFormHandler !== "undefined") {
1014          setFormHandler();
1015        }
1016      }
1017    })
1018  }
1019  if ($('.data-input-value').is(e.target)) {
1020    let thisParent = $(e.target).parent();
1021    let openedInput = $(thisParent.find('.data-input-outer')[0]);
1022    if (thisParent.hasClass('opened')) {
1023      openedInput.animate({height: '0'},300);
1024      thisParent.removeClass('opened');
1025    } else {
1026      let newHeight = $(thisParent.find('.data-input-div')[0]).height() + 28;
1027      $('.data-input-wrapper.opened .data-input-outer').animate({height: '0'},300);
1028      $('.data-input-wrapper.opened').removeClass('opened');
1029      thisParent.addClass('opened');
1030      openedInput.animate({height: newHeight + 'px'},300);
1031      if (newHeight > 300)  openedInput.addClass('scrolldiv').addClass('scrolldiv_vert');
1032    }
1033  } else if (
1034      $('.data-input-wrapper').hasClass('opened')
1035      && !$('.js-filter-clicker').is(e.target)
1036      && !$('.data-input-wrapper input').is(e.target)
1037      && !$('.data-input-wrapper label').is(e.target)
1038  ) {
1039    $('.data-input-wrapper.opened').each(function(){
1040      $(this).find('.data-input-value').trigger('click');
1041      $(this).find('.data-input-outer').removeClass('scrolldiv').removeClass('scrolldiv_vert');
1042    })
1043  }
1044})
1045
1046$(document).on('change', '.data-input-wrapper input', function(e) {
1047  const parent = $($(e.target).parents('.data-input-wrapper')[0]);
1048  let outStr = [];
1049  for (const item of parent.find('input')) {
1050    if ($(item).prop('checked')) {
1051      outStr.push($(item).val());
1052    }
1053  }
1054  parent.children('.data-input-value').text( outStr.join(', ') );
1055});
1056
1057document.addEventListener("DOMContentLoaded", function() {
1058    var links = document.querySelectorAll("#catalog-mobile-menu a");
1059
1060    links.forEach(function(link) {
1061        if (link.textContent.trim() === "Акции") {
1062            link.classList.add("specials_red");
1063        }
1064    });
1065});
1066/* End */
1067;
1068; /* Start:"a:4:{s:4:"full";s:48:"/local/templates/lux/js/custom2.js?1747313848359";s:6:"source";s:34:"/local/templates/lux/js/custom2.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1069$(document).ready(function(){
1070    $(document).on("click", "[data-change-title]", function(e){
1071        $(document).find("h1").html($(this).data('changeTitle'));
1072        let state = $(this).attr('href');
1073        if(typeof state != "undefined") {
1074            state = state.split("?")[0];
1075            history.pushState('', '', state);
1076        }
1077    })
1078})
1079/* End */
1080;
1081; /* Start:"a:4:{s:4:"full";s:73:"/bitrix/components/arturgolubev/search.title/script.min.js?17672717036313";s:6:"source";
1081s:54:"/bitrix/components/arturgolubev/search.title/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1082function JCTitleSearch(t){var e=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN)};if(t.WAIT_IMAGE)this.arParams.WAIT_IMAGE=t.WAIT_IMAGE;if(t.MIN_QUERY_LEN<=0)t.MIN_QUERY_LEN=1;this.cache=[];this.cache_key=null;this.startText="";this.running=false;this.currentRow=-1;this.RESULT=null;this.CONTAINER=null;this.INPUT=null;this.WAIT=null;this.ShowResult=function(t){if(BX.type.isString(t)){e.RESULT.innerHTML=t}e.RESULT.style.display=e.RESULT.innerHTML!==""?"block":"none";var s=e.adjustResultNode();var i;var n;var r=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(r){n=BX.findChild(r,{tag:"th"},true)}if(n){var l=BX.pos(r);l.width=l.right-l.left;var a=BX.pos(n);a.width=a.right-a.left;n.style.width=a.width+"px";e.RESULT.style.width=s.width+a.width+"px";e.RESULT.style.left=s.left-a.width-1+"px";if(l.width-a.width>s.width)e.RESULT.style.width=s.width+a.width-1+"px";l=BX.pos(r);i=BX.pos(e.RESULT);if(i.right>l.right){e.RESULT.style.width=l.right-l.left+"px"}}var o;if(r)o=BX.findChild(e.RESULT,{class:"title-search-fader"},true);if(o&&n){i=BX.pos(e.RESULT);o.style.left=i.right-i.left-18+"px";o.style.width=18+"px";o.style.top=0+"px";o.style.height=i.bottom-i.top+"px";o.style.display="block"}};this.onKeyPress=function(t){var s=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(!s)return false;var i;var n=s.rows.length;switch(t){case 27:e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll();return true;case 40:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var r=-1;for(i=0;i<n;i++){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(r==-1)r=i;if(e.currentRow<i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i==n&&e.currentRow!=i)e.currentRow=r;s.rows[e.currentRow].className="title-search-selected";return true;case 38:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var l=-1;for(i=n-1;i>=0;i--){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(l==-1)l=i;if(e.currentRow>i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i<0&&e.currentRow!=i)e.currentRow=l;s.rows[e.currentRow].className="title-search-selected";return true;case 13:if(e.RESULT.style.display=="block"){for(i=0;i<n;i++){if(e.currentRow==i){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){var a=BX.findChild(s.rows[i],{tag:"a"},true);if(a){window.location=a.href;return true}}}}}return false}return false};this.onTimeout=function(){e.onChange(function(){setTimeout(e.onTimeout,500)})};this.onChange=function(t){if(e.running)return;e.running=true;if(e.INPUT.value!=e.oldValue&&e.INPUT.value!=e.startText){e.oldValue=e.INPUT.value;if(e.INPUT.value.length>=e.arParams.MIN_QUERY_LEN){e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value;if(e.cache[e.cache_key]==null){if(e.WAIT){var s=BX.pos(e.INPUT);var i=s.bottom-s.top-2;e.WAIT.style.top=s.top+1+"px";e.WAIT.style.height=i+"px";e.WAIT.style.width=i+"px";e.WAIT.style.left=s.right-i+2+"px";e.WAIT.style.display="block"}BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParam
1082s.INPUT_ID,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN},function(s){e.cache[e.cache_key]=s;e.ShowResult(s);e.currentRow=-1;e.EnableMouseEvents();if(e.WAIT)e.WAIT.style.display="none";if(!!t)t();e.running=false});return}else{e.ShowResult(e.cache[e.cache_key]);e.currentRow=-1;e.EnableMouseEvents()}}else{e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll()}}if(!!t)t();e.running=false};this.onScroll=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.UnSelectAll=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++)t.rows[i].className=""}};this.EnableMouseEvents=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++)if(!BX.findChild(t.rows[i],{class:"title-search-separator"},true)){t.rows[i].id="row_"+i;t.rows[i].onmouseover=function(t){if(e.currentRow!=this.id.substr(4)){e.UnSelectAll();this.className="title-search-selected";e.currentRow=this.id.substr(4)}};t.rows[i].onmouseout=function(t){this.className="";e.currentRow=-1}}}};this.onFocusLost=function(t){setTimeout(function(){e.RESULT.style.display="none"},250)};this.onFocusGain=function(){if(e.RESULT.innerHTML.length)e.ShowResult()};this.onKeyDown=function(t){if(!t)t=window.event;if(e.RESULT.style.display=="block"){if(e.onKeyPress(t.keyCode))return BX.PreventDefault(t)}};this.adjustResultNode=function(){if(!(BX.type.isElementNode(e.RESULT)&&BX.type.isElementNode(e.CONTAINER))){return{top:0,right:0,bottom:0,left:0,width:0,height:0}}var t=BX.pos(e.CONTAINER);e.RESULT.style.position="absolute";e.RESULT.style.top=t.bottom+2+"px";e.RESULT.style.left=t.left+"px";e.RESULT.style.width=t.width+"px";return t};this._onContainerLayoutChange=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID);BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange);this.RESULT=document.body.appendChild(document.createElement("DIV"));this.RESULT.className="title-search-result";this.INPUT=document.getElementById(this.arParams.INPUT_ID);this.startText=this.oldValue=this.INPUT.value;BX.bind(this.INPUT,"focus",function(){e.onFocusGain()});BX.bind(this.INPUT,"blur",function(){e.onFocusLost()});this.INPUT.onkeydown=this.onKeyDown;if(this.arParams.WAIT_IMAGE){this.WAIT=document.body.appendChild(document.createElement("DIV"));this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')";if(!BX.browser.IsIE())this.WAIT.style.backgroundRepeat="none";this.WAIT.style.display="none";this.WAIT.style.position="absolute";this.WAIT.style.zIndex="1100"}BX.bind(this.INPUT,"bxchange",function(){e.onChange()});var t=BX.findParent(this.CONTAINER,BX.is_fixed);if(BX.type.isElementNode(t)){BX.bind(window,"scroll",BX.throttle(this.onScroll,100,this))}};BX.ready(function(){e.Init(t)})}
1083/* End */
1084;
1085; /* Start:"a:4:{s:4:"full";s:96:"/local/templates/lux/components/arturgolubev/search.title/top-menu-new/script.js?176708836512145";s:6:"source";s:80:"/local/templates/lux/components/arturgolubev/search.title/top-menu-new/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1086function JCTitleSearchAG(arParams)
1087{
1088	var _this = this;
1089
1090	this.arParams = {
1091		'AJAX_PAGE': arParams.AJAX_PAGE,
1092		'CONTAINER_ID': arParams.CONTAINER_ID,
1093		'INPUT_ID': arParams.INPUT_ID,
1094		'MIN_QUERY_LEN': parseInt(arParams.MIN_QUERY_LEN)
1095	};
1096	if(arParams.WAIT_IMAGE)
1097		this.arParams.WAIT_IMAGE = arParams.WAIT_IMAGE;
1098	
1099	if(arParams.PRELODER_ID)
1100		this.arParams.PRELODER_ID = arParams.PRELODER_ID;
1101	
1102	if(arParams.MIN_QUERY_LEN <= 0)
1103		arParams.MIN_QUERY_LEN = 1;
1104
1105	this.cache = [];
1106	this.cache_key = null;
1107
1108	this.startText = '';
1109	this.running = false;
1110	
1111	this.currentRow = -1;
1112	this.RESULT = null;
1113	this.CONTAINER = null;
1114	this.INPUT = null;
1115	this.WAIT = null;
1116
1117	this.ShowResult = function(result)
1118	{
1119		if(BX.type.isString(result))
1120		{
1121			_this.RESULT.innerHTML = result;
1122		}
1123
1124		_this.RESULT.style.display = _this.RESULT.innerHTML !== '' ? 'block' : 'none';
1125		var pos = _this.adjustResultNode();
1126
1127		//adjust left column to be an outline
1128		var res_pos;
1129		var th;
1130		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
1131		if(tbl)
1132		{
1133			th = BX.findChild(tbl, {'tag':'th'}, true);
1134		}
1135
1136		if(th)
1137		{
1138			var tbl_pos = BX.pos(tbl);
1139			tbl_pos.width = tbl_pos.right - tbl_pos.left;
1140
1141			var th_pos = BX.pos(th);
1142			th_pos.width = th_pos.right - th_pos.left;
1143			th.style.width = th_pos.width + 'px';
1144
1145			_this.RESULT.style.width = (pos.width + th_pos.width) + 'px';
1146
1147			//Move table to left by width of the first column
1148			_this.RESULT.style.left = (pos.left - th_pos.width - 1)+ 'px';
1149
1150			//Shrink table when it's too wide
1151			if((tbl_pos.width - th_pos.width) > pos.width)
1152				_this.RESULT.style.width = (pos.width + th_pos.width -1) + 'px';
1153
1154			//Check if table is too wide and shrink result div to it's width
1155			tbl_pos = BX.pos(tbl);
1156			res_pos = BX.pos(_this.RESULT);
1157			if(res_pos.right > tbl_pos.right)
1158			{
1159				_this.RESULT.style.width = (tbl_pos.right - tbl_pos.left) + 'px';
1160			}
1161		}
1162
1163		var fade;
1164		if(tbl) fade = BX.findChild(_this.RESULT, {'class':'title-search-fader'}, true);
1165		if(fade && th)
1166		{
1167			res_pos = BX.pos(_this.RESULT);
1168			fade.style.left = (res_pos.right - res_pos.left - 18) + 'px';
1169			fade.style.width = 18 + 'px';
1170			fade.style.top = 0 + 'px';
1171			fade.style.height = (res_pos.bottom - res_pos.top) + 'px';
1172			fade.style.display = 'block';
1173		}
1174	};
1175
1176	this.onKeyPress = function(keyCode)
1177	{
1178		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
1179		if(!tbl)
1180			return false;
1181
1182		var i;
1183		var cnt = tbl.rows.length;
1184
1185		switch (keyCode)
1186		{
1187		case 27: // escape key - close search div
1188			_this.RESULT.style.display = 'none';
1189			_this.currentRow = -1;
1190			_this.UnSelectAll();
1191		return true;
1192
1193		case 40: // down key - navigate down on search results
1194			if(_this.RESULT.style.display == 'none')
1195				_this.RESULT.style.display = 'block';
1196
1197			var first = -1;
1198			for(i = 0; i < cnt; i++)
1199			{
1200				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
1201				{
1202					if(first == -1)
1203						first = i;
1204
1205					if(_this.currentRow < i)
1206					{
1207						_this.currentRow = i;
1208						break;
1209					}
1210					else if(tbl.rows[i].className == 'title-search-selected')
1211					{
1212						tbl.rows[i].className = '';
1213					}
1214				}
1215			}
1216
1217			if(i == cnt && _this.currentRow != i)
1218				_this.currentRow = first;
1219
1220			tbl.rows[_this.currentRow].className = 'title-search-selected';
1221		return true;
1222
1223		case 38: // up key - navigate up on search results
1224			if(_this.RESULT.style.display == 'none')
1225				_this.RESULT.style.display = 'block';
1226
1227			var last = -1;
1228			for(i = cnt-1; i >= 0; i--)
1229			{
1230				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
1231				{
1232					if(last == -1)
1233						last = i;
1234
1235					if(_this.currentRow > i)
1236					{
1237						_this.currentRow = i;
1238						break;
1239					}
1240					else if(tbl.rows[i].className == 'title-search-selected')
1241					{
1242						tbl.rows[i].className = '';
1243					}
1244				}
1245			}
1246
1247			if(i < 0 && _this.currentRow != i)
1248				_this.currentRow = last;
1249
1250			tbl.rows[_this.currentRow].className = 'title-search-selected';
1251		return true;
1252
1253		case 13: // enter key - choose current search result
1254			if(_this.RESULT.style.display == 'block')
1255			{
1256				for(i = 0; i < cnt; i++)
1257				{
1258					if(_this.currentRow == i)
1259					{
1260						if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
1261						{
1262							var a = BX.findChild(tbl.rows[i], {'tag':'a'}, true);
1263							if(a)
1264							{
1265								window.location = a.href;
1266								return true;
1267							}
1268						}
1269					}
1270				}
1271			}
1272		return false;
1273		}
1274
1275		return false;
1276	};
1277
1278	this.onTimeout = function()
1279	{
1280		_this.onChange(function(){
1281			setTimeout(_this.onTimeout, 500);
1282		});
1283	};
1284	
1285	this.onChange = function(callback)
1286	{
1287		if (_this.running)
1288			return;
1289		_this.running = true;
1290
1291		if(_this.INPUT.value != _this.oldValue && _this.INPUT.value != _this.startText)
1292		{
1293			_this.oldValue = _this.INPUT.value;
1294			if(_this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN)
1295			{
1296				_this.cache_key = _this.arParams.INPUT_ID + '|' + _this.INPUT.value;
1297				if(_this.cache[_this.cache_key] == null)
1298				{
1299					if(_this.WAIT)
1300					{
1301						var pos = BX.pos(_this.INPUT);
1302						var height = (pos.bottom - pos.top)-2;
1303						_this.WAIT.style.top = (pos.top+1) + 'px';
1304						_this.WAIT.style.height = height + 'px';
1305						_this.WAIT.style.width = height + 'px';
1306						_this.WAIT.style.left = (pos.right - height + 2) + 'px';
1307						_this.WAIT.style.display = 'block';
1308					}
1309					
1310					if(_this.arParams.PRELODER_ID)
1311					{
1312						BX.show(BX(_this.arParams.PRELODER_ID));
1313					}
1314					
1315					// console.log('ajax call ' + _this.INPUT.value)!!;
1316					 
1317
1318					BX.ajax.post(
1319						_this.arParams.AJAX_PAGE,
1320						{
1321							'ajax_call':'y',
1322							'INPUT_ID':_this.arParams.INPUT_ID,
1323							'q':_this.INPUT.value,
1324							'l':_this.arParams.MIN_QUERY_LEN
1325						},
1326						function(result)
1327						{
1328							_this.cache[_this.cache_key] = result;
1329							_this.ShowResult(result);
1330							_this.currentRow = -1;
1331							_this.EnableMouseEvents();
1332							if(_this.WAIT)
1333								_this.WAIT.style.display = 'none';
1334							
1335							if(_this.arParams.PRELODER_ID)
1336							{
1337								BX.hide(BX(_this.arParams.PRELODER_ID));
1338							}
1339							
1340							
1341							if (!!callback)
1342								callback();
1343							_this.running = false;
1344							
1345							if(_this.INPUT.value != _this.oldValue)
1346							{
1347								_this.onChange();
1348							}
1349						}
1350					);
1351					return;
1352				}
1353				else
1354				{
1355					_this.ShowResult(_this.cache[_this.cache_key]);
1356					_this.currentRow = -1;
1357					_this.EnableMouseEvents();
1358				}
1359			}
1360			else
1361			{
1362				_this.RESULT.style.display = 'none';
1363				_this.currentRow = -1;
1364				_this.UnSelectAll();
1365			}
1366		}
1367		if (!!callback)
1368			callback();
1369		_this.running = false;
1370	};
1371
1372	this.onScroll = function ()
1373	{
1374		if(BX.type.isElementNode(_this.RESULT)
1375			&& _this.RESULT.style.display !== "none"
1376			&& _this.RESULT.innerHTML !== ''
1377		)
1378		{
1379			_this.adjustResultNode();
1380		}
1381	};
1382
1383	this.UnSelectAll = function()
1384	{
1385		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
1386		if(tbl)
1387		{
1388			var cnt = tbl.rows.length;
1389			for(var i = 0; i < cnt; i++)
1390				tbl.rows[i].className = '';
1391		}
1392	};
1393
1394	this.EnableMouseEvents = function()
1395	{
1396		var tbl = BX.findChild(_this.RESULT, {'tag':'table','class':'title-search-result'}, true);
1397		if(tbl)
1398		{
1399			var cnt = tbl.rows.length;
1400			for(var i = 0; i < cnt; i++)
1401				if(!BX.findChild(tbl.rows[i], {'class':'title-search-separator'}, true))
1402				{
1403					tbl.rows[i].id = 'row_' + i;
1404					tbl.rows[i].onmouseover = function (e) {
1405						if(_this.currentRow != this.id.substr(4))
1406						{
1407							_this.UnSelectAll();
1408							this.className = 'title-search-selected';
1409							_this.currentRow = this.id.substr(4);
1410						}
1411					};
1412					tbl.rows[i].onmouseout = function (e) {
1413						this.className = '';
1414						_this.currentRow = -1;
1415					};
1416				}
1417		}
1418	};
1419
1420	this.onFocusLost = function(hide)
1421	{
1422		setTimeout(function(){_this.RESULT.style.display = 'none';}, 250);
1423	};
1424
1425	this.onFocusGain = function()
1426	{
1427		if(_this.RESULT.innerHTML.length && _this.INPUT.value.length >= _this.arParams.MIN_QUERY_LEN)
1428			_this.ShowResult();
1429	};
1430
1431	this.onKeyDown = function(e)
1432	{
1433		if(!e)
1434			e = window.event;
1435
1436		if (_this.RESULT.style.display == 'block')
1437		{
1438			if(_this.onKeyPress(e.keyCode))
1439				return BX.PreventDefault(e);
1440		}
1441	};
1442
1443	this.adjustResultNode = function()
1444	{
1445		if(!(BX.type.isElementNode(_this.RESULT)
1446			&& BX.type.isElementNode(_this.CONTAINER))
1447		)
1448		{
1449			return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
1450		}
1451
1452		var pos = BX.pos(_this.CONTAINER);
1453
1454		_this.RESULT.style.position = 'absolute';
1455		_this.RESULT.style.top = (pos.bottom + 2) + 'px';
1456		_this.RESULT.style.left = pos.left + 'px';
1457		_this.RESULT.style.width = pos.width + 'px';
1458
1459		return pos;
1460	};
1461
1462	this._onContainerLayoutChange = function()
1463	{
1464		if(BX.type.isElementNode(_this.RESULT)
1465			&& _this.RESULT.style.display !== "none"
1466			&& _this.RESULT.innerHTML !== ''
1467		)
1468		{
1469			_this.adjustResultNode();
1470		}
1471	};
1472	this.Init = function()
1473	{
1474		this.CONTAINER = document.getElementById(this.arParams.CONTAINER_ID);
1475		BX.addCustomEvent(this.CONTAINER, "OnNodeLayoutChange", this._onContainerLayoutChange);
1476
1477		this.RESULT = document.body.appendChild(document.createElement("DIV"));
1478		this.RESULT.className = 'title-search-result';
1479		this.INPUT = document.getElementById(this.arParams.INPUT_ID);
1480		this.startText = this.oldValue = this.INPUT.value;
1481		BX.bind(this.INPUT, 'focus', function() {_this.onFocusGain()});
1482		BX.bind(this.INPUT, 'blur', function(e) {
1483			if(!!e.relatedTarget)
1484			{
1485				if(!BX.hasClass(BX(e.relatedTarget), 'js_search_href')){
1486					_this.onFocusLost();
1487				}
1488			}
1489			else
1490			{
1491				_this.onFocusLost();
1492			}
1493		});
1494		this.INPUT.onkeydown = this.onKeyDown;
1495
1496		if(this.arParams.WAIT_IMAGE)
1497		{
1498			this.WAIT = document.body.appendChild(document.createElement("DIV"));
1499			this.WAIT.style.backgroundImage = "url('" + this.arParams.WAIT_IMAGE + "')";
1500			if(!BX.browser.IsIE())
1501				this.WAIT.style.backgroundRepeat = 'none';
1502			this.WAIT.style.display = 'none';
1503			this.WAIT.style.position = 'absolute';
1504			this.WAIT.style.zIndex = '1100';
1505		}
1506
1507		BX.bind(this.INPUT, 'bxchange', function() {_this.onChange()});
1508		BX.bind(this.INPUT, 'paste', function(e) {setTimeout(function(){_this.onChange();}, 200);});
1509
1510		/* var fixedParent = BX.findParent(this.CONTAINER, BX.is_fixed);
1511		if(BX.type.isElementNode(fixedParent)){
1512			BX.bind(window, 'scroll', BX.throttle(this.onScroll, 100, this));
1513		} */
1514		
1515		BX.bind(window, 'scroll', BX.throttle(this.onScroll, 100, this));
1516		BX.bind(window, 'resize', BX.throttle(this.onScroll, 100, this));
1517	};
1518	BX.ready(function (){_this.Init(arParams)});
1519}
1520
1521$(document).ready(function(){
1522
1523	function isiPhone() {
1524	    const userAgent = navigator.userAgent || navigator.vendor || window.opera;
1525
1526	    if (/iPhone|iPod/.test(userAgent)) {
1527	        return true;
1528	    }
1529	    if (/iPad/.test(userAgent)) {
1530	        return true;
1531	    }
1532
1533	    if (/Macintosh/.test(userAgent) && 'ontouchend' in document) {
1534	        return true;
1535	    }
1536
1537	    return false;
1538	}
1539
1540  setSearch();
1541
1542	let headerSearchInput = document.querySelector("#title-search-input")
1543  // document.addEventListener("scroll", function(){
1544	// 	if(headerSearchInput){
1545	// 		// headerSearchInput.blur()
1546	// 			// navigator.virtualKeyboard.hide();
1547	// 			console.log("check")
1548	// 	}
1549
1550	// })
1551  document.addEventListener("scroll", function(){
1552		if(headerSearchInput){
1553			// headerSearchInput.blur()
1554				// navigator.virtualKeyboard.hide();
1555			if (!isiPhone()) {
1556			    // console.log("Это устройство не похоже на iPhone .");
1557			    // headerSearchInput.blur()
1558			}
1559				// console.log("check")
1560		}
1561
1562	})
1563
1564});
1565
1566function setSearch() {
1567$('.searchbox').click(function(){
1568  $(this).prepend('<div class="search-bg"></div>').addClass('opened').off('click');
1569  $('#title-search-input').val('').focus();
1570  $('.search-bg').click(function(e){
1571    e.preventDefault();
1572    e.stopPropagation();
1573    $('#title-search-input').val('');
1574    $('.search-bg').detach();
1575    $('.searchbox').removeClass('opened');
1576    $('.title-search-result').html('').css({'top': 'unset', 'left': 'unset', 'width': 'unset'});
1577    setSearch();
1578  })
1579});
1580}
1581
1582
1583
1584
1585/* End */
1586;
1587; /* Start:"a:4:{s:4:"full";s:53:"/local/templates/lux/js/voiceSearch.js?17274388783062";s:6:"source";s:38:"/local/templates/lux/js/voiceSearch.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1588(function (window){
1589	'use strict';
1590
1591	if (window.JCSpeechRecognition)
1592		return;
1593
1594  window.JCSpeechRecognition = function (arParams) {
1595    var _this = this;
1596
1597    this.canRecognition = window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition;
1598    this.recognition = null;
1599    this.previousSearchString = '';
1600
1601    if (typeof arParams === 'object') {
1602      this.arParams = {
1603        trigger: arParams.TRIGGER,
1604        searchForm: arParams.SEARCH_FORM,
1605        searchInput: arParams.SEARCH_INPUT
1606      };
1607      this.arParams.searchInputPlaceholder = {
1608        default: arParams.TEXT_DEFAULT,
1609        recognition: arParams.TEXT_RECOGNITION,
1610      };
1611    }
1612
1613    if (!this.canRecognition) {
1614      console.log('Unable to recognize speech');
1615      return false;
1616    }
1617
1618    this.listenStart = function(event) {
1619      event.preventDefault();
1620      _this.previousSearchString = _this.SEARCH_INPUT.value;
1621      _this.SEARCH_INPUT.value = '';
1622      _this.SEARCH_INPUT.placeholder = this.arParams.searchInputPlaceholder.recognition;
1623      _this.TRIGGER.classList.add('active');
1624      this.recognition.start();
1625    }
1626
1627    this.parseTranscript = function(event) {
1628      return Array
1629        .from(event.results)
1630        .map(function (result) {
1631          return result[0]
1632        })
1633        .map(function (result) {
1634          return result.transcript
1635        })
1636        .join('');
1637    }
1638  
1639    this.transcriptHandler = function(event) {
1640      const speechOutput = _this.parseTranscript(event);
1641      this.SEARCH_INPUT.value = speechOutput;
1642      if (event.results[0].isFinal) {
1643        if (speechOutput !== '') {
1644          _this.SEARCH_FORM.submit();
1645        } else {
1646          _this.cleanInput();
1647        }
1648      }
1649    }
1650
1651    this.cleanInput = function() {
1652      _this.TRIGGER.classList.remove('active');
1653      _this.SEARCH_INPUT.placeholder = _this.arParams.searchInputPlaceholder.default;
1654      _this.SEARCH_INPUT.value = _this.previousSearchString;
1655    }
1656
1657    this.Init = function() {
1658      this.TRIGGER = document.getElementById(this.arParams.trigger);
1659      this.SEARCH_FORM = document.getElementById(this.arParams.searchForm);
1660      this.SEARCH_INPUT = document.getElementById(this.arParams.searchInput);
1661
1662      this.recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition)();
1663      this.recognition.interimResults = true;
1664      this.recognition.lang = 'ru-RU';
1665  
1666      this.recognition.onresult = function(event) {
1667        _this.transcriptHandler(event);
1668      }
1669  
1670      this.recognition.onend = function() {
1671        if (_this.SEARCH_INPUT.value === '') {
1672          _this.cleanInput();
1673        }
1674      }
1675  
1676      this.recognition.onerror = function(event) {
1677        if (event.error == 'no-speech' || event.error == 'not-allowed') {
1678          _this.cleanInput();
1679        }
1680      }
1681  
1682      BX.bind(this.TRIGGER, 'click', BX.proxy(this.listenStart, this));
1683    }
1684    BX.ready(function (){_this.Init(arParams)});
1685  }
1686})(window)
1687
1688/* End */
1689;
1690; /* Start:"a:4:{s:4:"full";s:87:"/local/templates/lux/components/bitrix/menu/catalog_top_menu_v3/script.js?1727373600613";s:6:"source";s:73:"/local/templates/lux/components/bitrix/menu/catalog_top_menu_v3/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1691var menuTabContainerHeight = 0;
1692$(document).ready(function(){
1693    $('.menu-tab-select').click(function(){
1694        $('.menu-tab-select.selected-tab').removeClass('selected-tab');
1695        if (menuTabContainerHeight < $('.menu-tab-container').height()) {
1696            menuTabContainerHeight = $('.menu-tab-container').height();
1697        }
1698        $('.menu-tab-container').height(menuTabContainerHeight);
1699        $('.menu-tab-box.show-tab').removeClass('show-tab');
1700        $('.menu-tab-box[data-tab="' + $(this).data('tab') + '"]').addClass('show-tab');
1701        $(this).addClass('selected-tab');
1702    })
1703});
1704/* End */
1705;
1706; /* Start:"a:4:{s:4:"full";s:89:"/local/templates/lux/components/bitrix/news.list/contacts.footer/script.js?17274388782984";s:6:"source";s:74:"/local/templates/lux/components/bitrix/news.list/contacts.footer/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
1707document.addEventListener('DOMContentLoaded', () => {
1708  $('.show-popup-map').click(function(){
1709    if ($(this).data('link') != '') {
1710      $('#modalWindow').append('<div class="popup-close map-close"></div>' + $(this).data('link')).css('display','flex').animate({'opacity':'1'},300);
1711      $('.popup-close').click(function(){
1712        $('#modalWindow').animate({'opacity':'0'},300);
1713        setTimeout(function(){
1714          $('#modalWindow').css('display','none').html('');
1715          $('body').removeClass('popup-no-overflow');
1716        },305);
1717      });
1718    }
1719  })
1720
1721})
1722
1723window.addEventListener("load", function () {
1724  "use strict";
1725  var contactsMap = {
1726    onEntry: function onEntry(entry, self) {
1727      entry.forEach(function (_ref) {
1728        var isIntersecting = _ref.isIntersecting,
1729          target = _ref.target;
1730        if (isIntersecting && luxContacts?.length) {
1731          let myMap;
1732          $.getScript("https://api-maps.yandex.ru/2.1/?lang=ru_RU", function (data, textStatus, jqxhr) {
1733            ymaps.ready(function () {
1734              myMap = new ymaps.Map(
1735                "footer-map",
1736                {
1737                  center: luxCenter,
1738                  zoom: 12,
1739                  controls: ["zoomControl", "fullscreenControl"],
1740                },
1741                {
1742                  searchControlProvider: "yandex#search",
1743                }
1744              );
1745              for (let key in luxContacts) {
1746                let myPlacemark = new ymaps.Placemark(
1747                  [luxContacts[key]["LATITUDE"], luxContacts[key]["LONGITUDE"]],
1748                  {
1749                    hintContent: luxContacts[key]["NAME"] + "<br>" + luxContacts[key]["ADDRESS"],
1750                    balloonContent: luxContacts[key]["NAME"] + "<br>" + luxContacts[key]["ADDRESS"],
1751                  },
1752                  {
1753                    iconLayout: "default#imageWithContent",
1754                    iconImageHref: "/images/mappointer.png",
1755                    iconImageSize: [28, 41],
1756                    iconImageOffset: [-14, -41],
1757                  }
1758                );
1759          
1760                myMap.geoObjects.add(myPlacemark);
1761              }
1762              if (luxContacts.length > 1) {
1763                myMap.setBounds(myMap.geoObjects.getBounds());
1764                myMap.setZoom(myMap.getZoom() - 1);
1765              } else {
1766                myMap.setCenter(
1767                  [luxContacts[0]["LATITUDE"], luxContacts[0]["LONGITUDE"]],
1768                  16
1769                );
1770              }
1771            });
1772          });
1773          self.unobserve(target);
1774        }
1775      });
1776    },
1777    init: function init() {
1778      if ('IntersectionObserver' in window) {
1779        var options = {
1780          threshold: [0.1]
1781        };
1782        var observer = new IntersectionObserver(contactsMap.onEntry, options);
1783        var element = document.getElementById('footer-map');
1784        if (element) {
1785          observer.observe(element);
1786        }
1787      }
1788    }
1789  };
1790  contactsMap.init();
1791});
1792
1793/* End */
1794;; /* /local/templates/lux/js/jquery.cookie.min.js?17274388781300*/
1795; /* /local/templates/lux/js/owl.carousel.min.js?172743887844342*/
1796; /* /local/templates/lux/js/inputmask.min.js?17274388785446*/
1797; /* /local/templates/lux/js/functions.js?176291978122384*/
1798; /* /local/templates/lux/js/custom.js?176708196615494*/
1799; /* /local/templates/lux/js/custom2.js?1747313848359*/
1800; /* /bitrix/components/arturgolubev/search.title/script.min.js?17672717036313*/
1801; /* /local/templates/lux/components/arturgolubev/search.title/top-menu-new/script.js?176708836512145*/
1802; /* /local/templates/lux/js/voiceSearch.js?17274388783062*/
1803; /* /local/templates/lux/components/bitrix/menu/catalog_top_menu_v3/script.js?1727373600613*/
1804; /* /local/templates/lux/components/bitrix/news.list/contacts.footer/script.js?17274388782984*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.