!function(e,t){var n;"function"==typeof define&&define.amd?define(["exports","jquery"],t):"undefined"!=typeof exports?(n=require("jquery"),t(exports,n)):t(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,s){function t(i,t){function o(e,t,n){return e[t]=n,e}function n(e,t){for(var n,i,r=e.match(c.key);void 0!==(n=r.pop());)c.push.test(n)?(i=e.replace(/\[\]$/,""),void 0===a[i]&&(a[i]=0),t=o([],a[i]++,t)):c.fixed.test(n)?t=o([],n,t):c.named.test(n)&&(t=o({},n,t));return t}function e(){return r}var r={},a={};this.addPair=function(e){return c.validate.test(e.name)&&(e=n(e.name,"checkbox"===s('[name="'+(e=e).name+'"]',t).attr("type")&&"on"===e.value||e.value),r=i.extend(!0,r,e)),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t=u.elements.length+(u.percentage?4:0)?(h.off("scroll.scrollDepth"),void(m=!1)):(u.elements&&(e=u.elements,r=a,o=s,f.each(e,function(e,t){-1===f.inArray(t,g)&&f(t).length&&r>=f(t).offset().top&&(d("Elements",t,r,o),g.push(t))})),void(u.percentage&&(n=a,i=s,f.each(t,function(e,t){-1===f.inArray(e,g)&&t<=n&&(d("Percentage",e,n,i),g.push(e))}))))},r=500,c=null,l=0,function(){var e=new Date,t=r-(e-(l=l||e));return o=this,a=arguments,t<=0?(clearTimeout(c),c=null,l=e,s=i.apply(o,a)):c=c||setTimeout(n,t),s}))}var p=+new Date;u=f.extend({},e,u),f(document).height()'+t+'
',1===n?$(".vr-shopping-list__buy_items .iscroll-inner").prepend(t):$(".vr-shopping-list__item[data-original-id='"+e.product.id+"']").remove(),g(),h(),m())},error:function(e){}}))})}function p(t){0<(t=t||"").length&&isLogged&&$.ajax({type:"POST",url:"/profile/add_in_shopping_list",data:{name:t},dataType:"json",success:function(e){e='';$(".vr-shopping-list__buy_items .iscroll-inner").prepend(e),$(".vr-shopping-list__middle input").val(""),g(),h(),m(),ga("send","event",l,"add-product-button-shopping-list",t)},error:function(e){}})}function f(){$("body").on("click",".vr-products-bottom__btn button",function(){n=$(".vr-products-bottom__products-wrapper .vr-product_none"),r=n.length;var e=$(".vr-products-bottom__products-wrapper .vr-product_none:visible");for(a=[],i=0;i',n='",i=''+viewLang.product_btn_add+"
",e='",c&&(e=e.replace('';$(".vr-shopping-list__buy_items .iscroll-inner").prepend(e),$(".vr-shopping-list__middle input").val(""),vrProductsBottom.iscrollShopList(),ga("send","event","brochure-view-"+(isMobile?"mobile":"desktop"),"add-product-button-shopping-list",t)},error:function(e){console.log("error")}})}};function p(e){!1===e?$("html").addClass("vr-html-block-scroll"):$("html").removeClass("vr-html-block-scroll")}function f(e){var t=e.data("target"),n=e.data("target-open");p(e.hasClass(r)),e.toggleClass(r).find("."+a).toggleClass(a+"_open"),n===o&&($(t).toggleClass(o),l&&(e=isMobile?"click":"mouseenter",$(t+" .vr-cat-nav-item:first").trigger(e),l=!1,$(".vr-cat-nav-item-icon img").each(function(e,t){$(t).attr("src",$(t).data("cat-src"))})))}function h(e){var t=e.data("target"),n=e.data("target-open");0'+t.brand_name+'
',i.push(n)}),$(".vr-cat-top-brands-inner-wrap").html(i))}function t(){$(document).on(isMobile?"click":"mouseenter",".vr-cat-nav-wrap .vr-cat-nav-item",function(e){var s,t,c,n=$(this),r=n.data("category-id"),o="undefined"!=typeof viewVersion&&"3"===viewVersion?n.text().trim():n.text().trim()+"-click",a="undefined"!=typeof viewVersion&&"3"===viewVersion?"header-menu-category":"similar-brochure-header-menu";$(".vr-cat-nav-wrap .vr-cat-nav-item").removeClass("vr-cat-nav-item_hovered"),n.addClass("vr-cat-nav-item_hovered"),0==n.hasClass(u)?(s=r,t=city_id,c=n,$.ajax({type:"POST",dataType:"json",url:l,success:function(e){if(g(e,s),c.addClass(u),"undefined"!=typeof offerista_tracking&&offerista_tracking){var t=new OfferistaTracking,n=[];for(i=0;i',t='",t='",n=t.replace("swiper-slide"," col-xs-6 vr-show");!0===i[a][e].favorite_brand&&(t=t.replace('":"",$(".up-popup-msg-container").append(i),setTimeout(function(){$(".up-popup-msg-container .up-fstores-popup-msg").first().remove()},3e3),-1>>0;n--;)t[n]=e[n];return t}function w(e){return e.classList?y(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function X(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function $(n){return Object.keys(n||{}).reduce(function(e,t){return e+(t+": ")+n[t]+";"},"")}function x(e){return e.size!==b.size||e.x!==b.x||e.y!==b.y||e.rotate!==b.rotate||e.flipX||e.flipY}function J(e){var t=e.transform,n=e.containerWidth,e=e.iconWidth;return{outer:{transform:"translate("+n/2+" 256)"},inner:{transform:"translate("+32*t.x+", "+32*t.y+") scale("+t.size/16*(t.flipX?-1:1)+", "+t.size/16*(t.flipY?-1:1)+") rotate("+t.rotate+" 0 0)"},path:{transform:"translate("+e/2*-1+" -256)"}}}var k={x:0,y:0,width:"100%",height:"100%"},Y=function(e){var t=e.children,n=e.attributes,i=e.main,r=e.mask,e=e.transform,o=i.width,i=i.icon,a=r.width,r=r.icon,e=J({transform:e,containerWidth:a,iconWidth:o}),a={tag:"rect",attributes:f({},k,{fill:"white"})},o={tag:"g",attributes:f({},e.inner),children:[{tag:"path",attributes:f({},i.attributes,e.path,{fill:"black"})}]},i={tag:"g",attributes:f({},e.outer),children:[o]},e="mask-"+ ++_,o="clip-"+ ++_,r={tag:"defs",children:[{tag:"clipPath",attributes:{id:o},children:[r]},{tag:"mask",attributes:f({},k,{id:e,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[a,i]}]};return t.push(r,{tag:"rect",attributes:f({fill:"currentColor","clip-path":"url(#"+o+")",mask:"url(#"+e+")"},k)}),{children:t,attributes:n}},G=function(e){var t=e.children,n=e.attributes,i=e.main,r=e.transform,e=$(e.styles);return 0"+r.map(M).join("")+""+t+">"}var ve=function(){};function be(e){return"string"==typeof(e.getAttribute?e.getAttribute(p):null)}var _e={replace:function(e){var t,n=e[0],e=e[1].map(M).join("\n");n.parentNode&&n.outerHTML?n.outerHTML=e+(h.keepOriginalSource&&"svg"!==n.tagName.toLowerCase()?"\x3c!-- "+n.outerHTML+" --\x3e":""):n.parentNode&&(t=document.createElement("span"),n.parentNode.replaceChild(t,n),t.outerHTML=e)},nest:function(e){var t=e[0],n=e[1];if(~w(t).indexOf(h.replacementClass))return _e.replace(e);var i=new RegExp(h.familyPrefix+"-.*"),e=(delete n[0].attributes.style,n[0].attributes.class.split(" ").reduce(function(e,t){return(t===h.replacementClass||t.match(i)?e.toSvg:e.toNode).push(t),e},{toNode:[],toSvg:[]})),n=(n[0].attributes.class=e.toSvg.join(" "),n.map(M).join("\n"));t.setAttribute("class",e.toNode.join(" ")),t.setAttribute(p,""),t.innerHTML=n}};function ye(n,e){var i="function"==typeof e?e:ve;0===n.length?i():(a.requestAnimationFrame||function(e){return e()})(function(){var e=!0!==h.autoReplaceSvg&&_e[h.autoReplaceSvg]||_e.replace,t=ae.begin("mutate");n.map(e),t(),i()})}var we=!1,L=null;function $e(e){var i,r,o;P&&h.observeMutations&&(i=e.treeCallback,r=e.nodeCallback,o=e.pseudoElementsCallback,e=void 0===(e=e.observeMutationsRoot)?s.body:e,L=new P(function(e){we||y(e).forEach(function(e){var t,n;"childList"===e.type&&0 li {\n position: relative; }\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n';return"fa"===n&&i===t||(e=new RegExp("\\.fa\\-","g"),t=new RegExp("\\."+t,"g"),r=r.replace(e,"."+n+"-").replace(t,"."+i)),r}function Ke(e){return{found:!0,width:e[0],height:e[1],icon:{tag:"path",attributes:{fill:"currentColor",d:e.slice(4)[0]}}}}function z(){h.autoAddCss&&!I&&(W(Re()),I=!0)}function V(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(M)}}),Object.defineProperty(t,"node",{get:function(){var e;if(c)return(e=s.createElement("div")).innerHTML=t.html,e.children}}),t}function Qe(e){var t=e.prefix,t=void 0===t?"fa":t,e=e.iconName;if(e)return me(Ue.definitions,t,e)||me(g.styles,t,e)}r(Xe,[{key:"add",value:function(){for(var t=this,e=arguments.length,n=Array(e),i=0;ie)}}:{get:f.noop,set:f.noop,remove:f.noop,clear:f.noop,isExpired:f.noop},f.mixin(t.prototype,e),t;function i(){return(new Date).getTime()}function o(e){return JSON.stringify(f.isUndefined(e)?null:e)}function n(e){return JSON.parse(e)}}(),a=(f.mixin(s.prototype,{get:function(e){return this.cache[e]},set:function(e,t){var n;this.cachedKeysByAge.length===this.sizeLimit&&(n=this.cachedKeysByAge.shift(),delete this.cache[n]),this.cache[e]=t,this.cachedKeysByAge.push(e)}}),s);function s(e){f.bindAll(this),this.sizeLimit=(e=e||{}).sizeLimit||10,this.cache={},this.cachedKeysByAge=[]}u=0,d={},f.mixin(g.prototype,{_get:function(n,i){var r=this;u"+e[n]+"
"};return e}(e.template,e.engine,this.valueKey),this.local=e.local,this.prefetch=e.prefetch,this.remote=e.remote,this.itemHash={},this.adjacencyList={},this.storage=e.name?new i(e.name):null}return f.mixin(e.prototype,{_processLocalData:function(e){this._mergeProcessedData(this._processData(e))},_loadPrefetchData:function(i){var e,t,n,r,o=this,a="0.9.3"+(i.thumbprint||"");return this.storage&&(r=this.storage.get(s),e=this.storage.get(c),t=this.storage.get(l),n=this.storage.get(u)),r=r!==a||e!==f.getProtocol(),(i=f.isString(i)?{url:i}:i).ttl=f.isNumber(i.ttl)?i.ttl:864e5,t&&n&&!r?(this._mergeProcessedData({itemHash:t,adjacencyList:n}),p.Deferred().resolve()):p.getJSON(i.url).done(function(e){var e=i.filter?i.filter(e):e,e=o._processData(e),t=e.itemHash,n=e.adjacencyList;o.storage&&(o.storage.set(l,t,i.ttl),o.storage.set(u,n,i.ttl),o.storage.set(s,a,i.ttl),o.storage.set(c,f.getProtocol(),i.ttl));o._mergeProcessedData(e)})},_transformDatum:function(e){var t=f.isString(e)?e:e[this.valueKey],t={value:t,tokens:e.tokens||f.tokenizeText(t)};return f.isString(e)?(t.datum={},t.datum[this.valueKey]=e):t.datum=e,t.tokens=f.filter(t.tokens,function(e){return!f.isBlankString(e)}),t.tokens=f.map(t.tokens,function(e){return e.toLowerCase()}),t},_processData:function(e){var i=this,r={},o={};return f.each(e,function(e,t){var t=i._transformDatum(t),n=f.getUniqueId(t.value);r[n]=t,f.each(t.tokens,function(e,t){t=t.charAt(0),t=o[t]||(o[t]=[n]);~f.indexOf(t,n)||t.push(n)})}),{itemHash:r,adjacencyList:o}},_mergeProcessedData:function(e){var i=this;f.mixin(this.itemHash,e.itemHash),f.each(e.adjacencyList,function(e,t){var n=i.adjacencyList[e];i.adjacencyList[e]=n?n.concat(t):t})},_getLocalSuggestions:function(i){var n,r=this,o=[],a=[],s=[];return f.each(i,function(e,t){t=t.charAt(0);~f.indexOf(o,t)||o.push(t)}),f.each(o,function(e,t){t=r.adjacencyList[t];if(!t)return!1;a.push(t),(!n||t.lengththis.$input.width()},isCursorAtEnd:function(){var e=this.$input.val().length,t=this.$input[0].selectionStart;return f.isNumber(t)?t===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)}}),b);function b(e){var t=this;f.bindAll(this),this.specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},this.$hint=p(e.hint),this.$input=p(e.input).on("blur.tt",this._handleBlur).on("focus.tt",this._handleFocus).on("keydown.tt",this._handleSpecialKeyEvent),f.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){t.specialKeyCodeMap[e.which||e.keyCode]||f.defer(t._compareQueryToInputValue)}):this.$input.on("input.tt",this._compareQueryToInputValue),this.query=this.$input.val(),this.$overflowHelper=(e=this.$input,p("").css({position:"absolute",left:"-9999px",visibility:"hidden",whiteSpace:"nowrap",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e))}var _,y,w,$,x,k=function(){var c='',l={display:"block"},u={whiteSpace:"nowrap",cursor:"pointer"},d={whiteSpace:"normal"};function e(e){f.bindAll(this),this.isOpen=!1,this.isEmpty=!0,this.isMouseOverDropdown=!1,this.$menu=p(e.menu).on("mouseenter.tt",this._handleMouseenter).on("mouseleave.tt",this._handleMouseleave).on("click.tt",".tt-suggestion",this._handleSelection).on("mouseover.tt",".tt-suggestion",this._handleMouseover)}return f.mixin(e.prototype,t,{_handleMouseenter:function(){this.isMouseOverDropdown=!0},_handleMouseleave:function(){this.isMouseOverDropdown=!1},_handleMouseover:function(e){e=p(e.currentTarget);this._getSuggestions().removeClass("tt-is-under-cursor"),e.addClass("tt-is-under-cursor")},_handleSelection:function(e){e=p(e.currentTarget);this.trigger("suggestionSelected",i(e))},_show:function(){this.$menu.css("display","block")},_hide:function(){this.$menu.hide()},_moveCursor:function(e){var t,n;this.isVisible()&&((n=(t=this._getSuggestions()).filter(".tt-is-under-cursor")).removeClass("tt-is-under-cursor"),-1===(n=((n=t.index(n)+e)+1)%(t.length+1)-1)?this.trigger("cursorRemoved"):(n<-1&&(n=t.length-1),e=t.eq(n).addClass("tt-is-under-cursor"),this._ensureVisibility(e),this.trigger("cursorMoved",i(e))))},_getSuggestions:function(){return this.$menu.find(".tt-suggestions > .tt-suggestion")},_ensureVisibility:function(e){var t=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),n=this.$menu.scrollTop(),i=e.position().top,e=i+e.outerHeight(!0);i<0?this.$menu.scrollTop(n+i):t .tt-suggestion").removeClass("tt-is-under-cursor"),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,this.isEmpty||this._show(),this.trigger("opened"))},setLanguageDirection:function(e){"ltr"===e?this.$menu.css({left:"0",right:"auto"}):this.$menu.css({left:"auto",right:" 0"})},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getSuggestionUnderCursor:function(){var e=this._getSuggestions().filter(".tt-is-under-cursor").first();return 0").addClass(a).append(n.header).append(t).append(n.footer).appendTo(this.$menu)),0%body'.replace("%body",o),(o=p(i.firstChild).css(u).data("suggestion",t)).children().each(function(){p(this).css(d)}),r.appendChild(o[0])}),s.show().find(".tt-suggestions").html(r)):this.clearSuggestions(n.name),this.trigger("suggestionsRendered")},clearSuggestions:function(e){var e=e?this.$menu.find(".tt-dataset-"+e):this.$menu.find('[class^="tt-dataset-"]'),t=e.find(".tt-suggestions");e.hide(),t.empty(),0===this._getSuggestions().length&&(this.isEmpty=!0,this._hide())}}),e;function i(e){return e.data("suggestion")}}(),C=(_={wrapper:'',hint:'',dropdown:''},y={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},query:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"}},f.isMsie()&&f.mixin(y.query,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),f.isMsie()&&f.isMsie()<=7&&(f.mixin(y.wrapper,{display:"inline",zoom:"1"}),f.mixin(y.query,{marginTop:"-1px"})),f.mixin(S.prototype,t,{_managePreventDefault:function(e){var t,n,i=e.data,r=!1;switch(e.type){case"tabKeyed":t=this.inputView.getHintValue(),n=this.inputView.getInputValue(),r=t&&t!==n;break;case"upKeyed":case"downKeyed":r=!i.shiftKey&&!i.ctrlKey&&!i.metaKey}r&&i.preventDefault()},_setLanguageDirection:function(){var e=this.inputView.getLanguageDirection();e!==this.dir&&(this.dir=e,this.$node.css("direction",e),this.dropdownView.setLanguageDirection(e))},_updateHint:function(){var e=this.dropdownView.getFirstSuggestion(),e=e?e.value:null,t=this.dropdownView.isVisible(),n=this.inputView.isOverflow();e&&t&&!n&&(n=(t=this.inputView.getInputValue()).replace(/\s{2,}/g," ").replace(/^\s+/g,""),n=f.escapeRegExChars(n),n=new RegExp("^(?:"+n+")(.*$)","i").exec(e),this.inputView.setHintValue(t+(n?n[1]:"")))},_clearHint:function(){this.inputView.setHintValue("")},_clearSuggestions:function(){this.dropdownView.clearSuggestions()},_setInputValueToQuery:function(){this.inputView.setInputValue(this.inputView.getQuery())},_setInputValueToSuggestionUnderCursor:function(e){e=e.data;this.inputView.setInputValue(e.value,!0)},_openDropdown:function(){this.dropdownView.open()},_closeDropdown:function(e){this.dropdownView["blured"===e.type?"closeUnlessMouseIsOverDropdown":"close"]()},_moveDropdownCursor:function(e){var t=e.data;t.shiftKey||t.ctrlKey||t.metaKey||this.dropdownView["upKeyed"===e.type?"moveCursorUp":"moveCursorDown"]()},_handleSelection:function(e){var t="suggestionSelected"===e.type,n=t?e.data:this.dropdownView.getSuggestionUnderCursor();n&&(this.inputView.setInputValue(n.value),t?this.inputView.focus():e.data.preventDefault(),t&&f.isMsie()?f.defer(this.dropdownView.close):this.dropdownView.close(),this.eventBus.trigger("selected",n.datum,n.dataset))},_getSuggestions:function(){var n=this,i=this.inputView.getQuery();f.isBlankString(i)||f.each(this.datasets,function(e,t){t.getSuggestions(i,function(e){i===n.inputView.getQuery()&&n.dropdownView.renderSuggestions(t,e)})})},_autocomplete:function(e){var t;("rightKeyed"!==e.type&&"leftKeyed"!==e.type||(t=this.inputView.isCursorAtEnd(),e="ltr"===this.inputView.getLanguageDirection()?"leftKeyed"===e.type:"rightKeyed"===e.type,t&&!e))&&(t=this.inputView.getQuery(),""!==(e=this.inputView.getHintValue())&&t!==e&&(t=this.dropdownView.getFirstSuggestion(),this.inputView.setInputValue(t.value),this.eventBus.trigger("autocompleted",t.datum,t.dataset)))},_propagateEvent:function(e){this.eventBus.trigger(e.type)},destroy:function(){var e,n;this.inputView.destroy(),this.dropdownView.destroy(),e=this.$node,n=e.find(".tt-query"),f.each(n.data("ttAttrs"),function(e,t){f.isUndefined(t)?n.removeAttr(e):n.attr(e,t)}),n.detach().removeData("ttAttrs").removeClass("tt-query").insertAfter(e),e.remove(),this.$node=null},setQuery:function(e){this.inputView.setQuery(e),this.inputView.setInputValue(e),this._clearHint(),this._clearSuggestions(),this._getSuggestions()}}),S);function S(e){var t,n;f.bindAll(this),this.$node=function(e){var t=p(_.wrapper),n=p(_.dropdown),e=p(e),i=p(_.hint);t=t.css(y.wrapper),n=n.css(y.dropdown),i.css(y.hint).css({backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}),e.data("ttAttrs",{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")}),e.addClass("tt-query").attr({autocomplete:"off",spellcheck:!1}).css(y.query);try{e.attr("dir")||e.attr("dir","auto")}catch(e){}return e.wrap(t).parent().prepend(i).append(n)}(e.input),this.datasets=e.datasets,this.dir=null,this.eventBus=e.eventBus,e=this.$node.find(".tt-dropdown-menu"),t=this.$node.find(".tt-query"),n=this.$node.find(".tt-hint"),this.dropdownView=new k({menu:e}).on("suggestionSelected",this._handleSelection).on("cursorMoved",this._clearHint).on("cursorMoved",this._setInputValueToSuggestionUnderCursor).on("cursorRemoved",this._setInputValueToQuery).on("cursorRemoved",this._updateHint).on("suggestionsRendered",this._updateHint).on("opened",this._updateHint).on("closed",this._clearHint).on("opened closed",this._propagateEvent),this.inputView=new v({input:t,hint:n}).on("focused",this._openDropdown).on("blured",this._closeDropdown).on("blured",this._setInputValueToQuery).on("enterKeyed tabKeyed",this._handleSelection).on("queryChanged",this._clearHint).on("queryChanged",this._clearSuggestions).on("queryChanged",this._getSuggestions).on("whitespaceChanged",this._updateHint).on("queryChanged whitespaceChanged",this._openDropdown).on("queryChanged whitespaceChanged",this._setLanguageDirection).on("escKeyed",this._closeDropdown).on("escKeyed",this._setInputValueToQuery).on("tabKeyed upKeyed downKeyed",this._managePreventDefault).on("upKeyed downKeyed",this._moveDropdownCursor).on("upKeyed downKeyed",this._openDropdown).on("tabKeyed leftKeyed rightKeyed",this._autocomplete)}w={},$="ttView",x={initialize:function(e){var i;return 0===(e=f.isArray(e)?e:[e]).length&&p.error("no datasets provided"),i=f.map(e,function(e){var t=w[e.name]||new m(e);return e.name&&(w[e.name]=t),t}),this.each(function(){var e,t=p(this),n=new r({el:t});e=f.map(i,function(e){return e.initialize()}),t.data($,new C({input:t,eventBus:n=new r({el:t}),datasets:i})),p.when.apply(p,e).always(function(){f.defer(function(){n.trigger("initialized")})})})},destroy:function(){return this.each(function(){var e=p(this),t=e.data($);t&&(t.destroy(),e.removeData($))})},setQuery:function(t){return this.each(function(){var e=p(this).data($);e&&e.setQuery(t)})}},jQuery.fn.typeahead2=function(e){return x[e]?x[e].apply(this,[].slice.call(arguments,1)):x.initialize.apply(this,arguments)}}(window.jQuery),{}),translatedSArray=(function(e){function i(e){return String(null==e?"":e)}e.Template=function(e,t,n,i){this.r=e||this.r,this.c=n,this.options=i,this.text=t||"",this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=i(e),s.test(e)?e.replace(t,"&").replace(n,"<").replace(r,">").replace(o,"'").replace(a,"""):e},t:i,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},rp:function(e,t,n,i){e=n[e];return e?(e=this.c&&"string"==typeof e?this.c.compile(e,this.options):e).ri(t,n,i):""},rs:function(e,t,n){var i=e[e.length-1];if(c(i))for(var r=0;r/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/,c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}("undefined"!=typeof exports?exports:Hogan),function(i){function _(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function y(e,t,n){if(t.charAt(n)==e.charAt(0)){for(var i=1,r=e.length;i"==u?s+='_.b(_.rp("'+d((r=e[c]).n)+'",c,p,"'+(r.indent||"")+'"));':"{"==u||"&"==u?s+=(o=e[c].n,"_.b(_.t(_."+p(e[c].n)+'("'+d(o)+'",c,p,0)));'):"\n"==u?s+=h('"\\n"'+(e.length-1==c?"":" + i")):"_v"==u?s+=(a=e[c].n,"_.b(_.v(_."+p(e[c].n)+'("'+d(a)+'",c,p,0)));'):void 0===u&&(s+=h('"'+d(e[c])+'"'))}return s}function h(e){return"_.b("+e+");"}var w=/\S/,t=/\"/g,n=/\n/g,r=/\r/g,o=/\\/g,$={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};i.scan=function(e,t){function r(){0"==n.tag&&(n.indent=f[i].toString()),f.splice(i,1));else t||f.push({tag:"\n"});h=!1,m=f.length}var i,o,a,s,c,l=e.length,u=0,d=null,p="",f=[],h=!1,g=0,m=0,v="{{",b="}}";for(t&&(t=t.split(" "),v=t[0],b=t[1]),g=0;g");n.addClass("tt-no-results").addClass("tt-suggestion"),n.text(t),setTimeout(function(){e.find(".tt-no-results").remove(),e.find(".tt-dataset-cities-brand").show(),e.find(".tt-suggestions").append(n)},100)}function typeaheadNoResults(e){var t=window.textNoResults||"Не открихме нищо...",n=$("");n.addClass("tt-no-results").addClass("tt-suggestion"),n.text(t),setTimeout(function(){e.find(".tt-no-results").remove(),e.find(".tt-dataset-cities").show(),e.find(".tt-suggestions").append(n)},100)}function feedTypeahead(e,t){var n=buildTypeaheadSuggestions("object"==typeof window.typeaheadCities?window.typeaheadCities:typeaheadDummy,t),t=e||$(".main_select .tt-dropdown-menu"),e=$("
"),i=(e.addClass("tt-dataset-cities"),$("
"));i.addClass("tt-suggestions");for(var r=0;r
"),i=(n.addClass("tt-suggestion"),$(t?"":""));return i.addClass("tt-link"),i.text(e.value),t||i.attr("href",e.link),n.append(i),n}jQuery.extend(jQuery.fn,{within:function(e){return this.filter(function(){return $(this).closest(e).length})},isWithin:function(e){return $(this).closest(e).length}});var SubscribeV2=function(){function e(){$(".first-type .small-iwant-btn, .subscribe-view:not(.popup-form) .yes-iwant-btn, .second-type.mobile .yes-iwant-btn, .subscribe-view-small .yes-iwant-btn, .subscribe-view-mobile .yes-iwant-btn, #btn-notification, .js-open-subscribe").magnificPopup({type:"inline",fixedContentPos:!0,midClick:!0}),$(".brand-popup").magnificPopup({type:"inline",midClick:!0,callbacks:{open:function(){Cookies.get("subscribe.modal.v"+$("#brand-popup").data("version"))&&$(".mfp-close").trigger("click")},close:function(){Cookies.set("subscribe.modal.v"+$("#brand-popup").data("version"),1,{expires:365})}}}),$(".newsletter-popup").magnificPopup({type:"inline",midClick:!0,callbacks:{open:function(){window.Cookies.get("subscribe.modal.v"+$("#newsletter-popup").data("version"))&&$(".mfp-close").trigger("click")},close:function(){window.Cookies.set("subscribe.modal.v"+$("#newsletter-popup").data("version"),1,{expires:365})}}})}function t(e){return"radio"==e.element.type?$(e.element).closest("form").find(".sex-field-wrapper"):"city"==e.element.name?$(e.element).closest("form").find(".city-field"):void 0}function n(e){return"radio"==e.element.type?$(e.element).closest("form").find(".sex-field-wrapper .sex-field"):"city"==e.element.name?$(e.element).closest("form").find(".select-placeholder"):void 0}function i(){$("input[name=subscriber]").siblings(".subscriber-error").is(":visible")&&$("input[name=subscriber]").next().find(".parsley-custom-error-message").hide()}function r(e){var i,t=$(e+" input.typeahead-subscribe"),n=e;current_path;t.typeahead2({name:"cities",limit:8,local:typeaheadCities,remote:template.typeahead.domain+"/main/citysearch/%QUERY",template:'{{value}}',engine:Hogan}),t.on("blur",function(e){setTimeout(function(){$(this).closest(n).find(".tt-suggestion").remove()},400)}),t.on("typeahead:selected",function(e,t){$(this).closest("form").find("#selectCityName").val(t.value),$(this).closest("form").find(".select-placeholder").text(t.value),$(this).closest("form").find(".select-value").val(t.id)}),t.on("typeahead:opened",function(){$(this).data().ttView._clearHint()}),t.on("typeahead:initialized ",function(){$(this).data("no-hrefs");var e=$(this).parent().find(".tt-dropdown-menu"),t=$(this).data();translateTypeaheadCities(),t.ttView.dropdownView.renderSuggestions(t.ttView.datasets[0],translatedSArray),e.mCustomScrollbar()}),t.on("keyup",function(){var e=this.value,t=$(this).data("noHrefs"),n=$(this).parent().find(".tt-dropdown-menu");ifInputEmptyReset(e,n,t),clearTimeout(i),i=setTimeout(function(){ifInputFullAndNoResults(e,n)},500)})}"undefined"!=typeof page_name&&"undefined"!==page_name&&"home"!==page_name&&($(".brand-popup").length?$(document).on("mouseleave",function(e){""!=window.location.hash||$("input").is(":focus")||0==$(".mfp-wrap:visible").length&&$(".brand-popup").trigger("click")}):$(".newsletter-popup").length&&$(document).on("mouseleave",function(e){""!=window.location.hash||$("input").is(":focus")||0==$(".mfp-wrap:visible").length&&$(".newsletter-popup").trigger("click")})),this.init=function(){void 0!==$.fn.magnificPopup&&e(),setTimeout(function(){$(window).trigger("hashchange")},900),$("body").on("click",".subscribe-refresh",function(){$(this).remove(),$(".yes-iwant-btn").fadeIn(),$(".subscribe-error").remove()}),$("form.subscribe-brand_new").parsley({classHandler:n,errorsContainer:t}),$(document).on("click",".yes-iwant-btn",function(){i()}),$(document).on("blur","input[name=subscriber]",function(){i()}),"undefined"!=typeof isMobile&&isMobile||$("input").not(".spring-game input").iCheck({checkboxClass:"icheckbox_minimal-blue",radioClass:"iradio_minimal-blue",labelHover:!1,cursor:!0}),"brochure_view"!=page_name||"undefined"!=typeof isMobile&&0!=isMobile||($(document).on("click",".select-city:not(.select-hidden-mode)",function(e){$this=$(this),($(e.target).is($this.find(".select-placeholder"))||$(e.target).is($this.find(".select-placeholder span"))||$(e.target).is($this.find(".icon-select-down")))&&($this.hasClass("select-open")?$this.removeClass("select-open"):($this.addClass("select-open"),$this.find(".select-search input").focus()))}),$("body").on("click",function(e){$(e.target).isWithin(".select-city.select-hidden-mode")||($(".select-hidden-mode").find(".select-options").addClass("empty"),$(".select-hidden-mode").find(".mCSB_container").find(".select-option").hide(),$(".select-hidden-mode").find("input").val(""))}),$(document).on("click",".select-option:not(.select-hidden-mode)",function(e){var t=$(this),n=t.parents(".select").find("input[type=hidden]"),i=t.parents(".select").find("input#selectCityName"),r=(0===n.length&&(n=t.parents(".select").find(".select-value")),t.parents(".select").find(".select-placeholder"));0!==i.length&&i.val(t.text().replace(/\r?\n|\r/g,"").replace(/^\s\s*/,"").replace(/\s\s*$/,"")),n.val(t.data("value")),$(e.target).parents(".subscribe-form").length,$(e.target).parents(".subscribe-brand").length,r.html(""+t.text()+''),t.parents(".select").not(".select-hidden-mode").removeClass("select-open"),t.isWithin(".select-address")&&$("#submit-address").submit()}),$(".select-options").not(".select-hidden-mode .select-options").not(".select-typeahead .select-options").mCustomScrollbar({callbacks:{onInit:function(){}}}),$("body").on("click",function(e){$(e.target).isWithin(".select-city")||$(".select-city").not(".select-hidden-mode").removeClass("select-open")}));var a=window.location.href.split("#page=");a[a.length-1],$(document).on("submit",".subscribe-brand_new",function(e){e.preventDefault();var i,t,n,e=$(this),r="true"==e.find("[name=subscriber]").attr("valid"),o=e.find("[type=submit]");"undefined"!=typeof isMobile&&0!=isMobile||"brochure_view"!=page_name||e.find('input[name="type"]').val($("#cover-front").hasClass("cover-hidden")&&"0"!==a[a.length-1]?"view-back-cover":"view-front-cover"),o.data("pending-submit",!0),1==r&&(o.attr("disabled",!0),o.data("pending-submit",!1),r=e.serialize(),i=e.serializeArray(),n=$(".mfp-content").length?".mfp-content ":"",t&&0":"",$(""+response.msg+"
"+e).insertBefore($(".mfp-content").length?".mfp-content .underline":".underline")),$(".subscribe-loader").hide(),e=window.gaEventTags,t=0==isMobile&&$(".mfp-content .white-popup").length&&"brand_city"==page_name?"_popup":"",e.category=ga_events.subscribe[page_name+t]||e.category,"undefined"!=typeof viewVersion&&"3"===viewVersion&&("undefined"!=typeof vrSubscribeMiddle&&1==vrSubscribeMiddle?e.category="newsletter:view-middle page-desktop":"undefined"!=typeof vrSubscribeLast&&1==vrSubscribeLast&&(e.category="newsletter:view-back-cover-desktop")),$.ajax({type:"POST",url:"/ajx/ajax.file.php",data:{fn:"testEvents",ga:["send","event",e.category,e.label]}}),ga("send","event",e.category,e.label),"undefined"!=typeof fromNotificationButton&&fromNotificationButton&&ga("send","event","Newsletter:subscribe_from_bell",isMobile?"mobile":"desktop",brandName),$(".small-iwant-btn").length&&$(".small-iwant-btn").show(),$("#subscribe-success .subscribe-success__text").html(response.above_btn_txt),$("#subscribe-success a.subscribe-succcess__brand-btn-close_gray").attr("href",response.unsubscribe_link),$.magnificPopup.open({mainClass:"mfp-subscribe-success",items:{src:"#subscribe-success",type:"inline"},callbacks:{open:function(){document.querySelector("html").classList.add("html-block-scroll")},close:function(){document.querySelector("html").classList.remove("html-block-scroll")}}}),$(".vr-subscribe-btn-wrap, .second-type,.brandc-subscribe,.subscribe-section,#brand-popup,#newsletter-popup,a.brand-popup,a.newsletter-popup,#subscribebrand,#cam_popup-open").remove(),$("form.cam_form").parent().remove(),!1;$(".subscribe-error").length||$($(".mfp-content").length?".mfp-content .subscribe-brand_new":".subscribe-brand_new").append(""+response.msg+"
"+window.subscribe_btn+"
"),$(".subscribe-loader").hide()},200)}}))}),r(".subscribe-brand_new")},this.setSubscribeTypeahead=r,this.initMagnificItems=e};function toggleTooltip(){$("#gdpr-tooltip").toggle()}function ColorLuminance(e,t){if("undefined"!==e&&"string"==typeof(e=String(e).replace(/[^0-9a-f]/gi,""))){e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n,i="#",r=0;r<3;r++)n=parseInt(e.substr(2*r,2),16),i+=("00"+(n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16))).substr(n.length);return i}}$(document).ready(function(){(new SubscribeV2).init(),$("body").on("click","#subscribed-popup .button",function(){ga("send","event",{eventCategory:"Email-Subscribe-Funnel",eventAction:"Email-Sent-Pop-Up",eventLabel:"Click-OK"}),$.magnificPopup.close()}),$(document).on("click","body",function(e){$(e.target).is(".info-btn")&&0===$(".info-btn").has(e.target).length||$("#gdpr-tooltip").hide()}),$(document).on("click","#permission-pass p.unsubscribe-text a",function(e){ga("send","event","Permission-Pass-popup","To-Profile")}),$(document).on("click","#permission-pass .modal-iwant",function(e){e.preventDefault();e=$("form#gdpr-confirm input").val();$.ajax({url:"/ajx/ajax.file.php",method:"POST",data:{fn:"permissionPopupConfirm",email:e},dataType:"json",success:function(e){e.status?($("#permission-pass .links a").hide(),$("#permission-pass .links .confirm-success").show(),setTimeout(function(){$.magnificPopup.close()},3e3)):($("#permission-pass .links a").hide(),$("#permission-pass .links .confirm-error").show())},error:function(e){console.log(e)}})}),$(document).on("click",".vr-subscribe-btn-wrap.vr-subscribe-btn-wrap-last input.click-btn",function(e){vrSubscribeLast=1,vrSubscribeMiddle=0}),$(document).on("click",".vr-subscribe-btn-wrap.vr-subscribe-btn-wrap-middle input.click-btn",function(e){vrSubscribeLast=0,vrSubscribeMiddle=1})}),$(document).ready(function(){var e;0<$("#darkenColor").length&&((e=$("#darkenColor").val())&&(e=ColorLuminance("#"+e,-.2),$(".darken").css({border:"1px solid "+e,"border-bottom":"5px solid "+e}))),0<$("#darkenColor2").length&&((e=$("#darkenColor2").val())&&(e=ColorLuminance("#"+e,-.2),$(".darken2").css({border:"1px solid "+e,"border-bottom":"5px solid "+e})))});var SiteNotifications=function(){var s,c=document.querySelector("body"),l={showHideOnScroll:function(){window.addEventListener("scroll",d)},showAfterSeconds:function(e){setTimeout(function(){u()},1e3*e)},showOnMouseLeave:function(){isMobile||c.addEventListener("mouseleave",u)},viewAfterPage:function(e){showAfterPage=1