
; /* Start:"a:4:{s:4:"full";s:88:"/bitrix/templates/aspro_max/components/bitrix/catalog/main/script.min.js?172995497812625";s:6:"source";s:68:"/bitrix/templates/aspro_max/components/bitrix/catalog/main/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
function setNewHeader(obOffer){var ratingHtml=priceHtml=imgHtml=skuHtml=buttonHtml="";if("Y"==arMaxOptions.THEME.SHOW_HEADER_GOODS&&$(".main-catalog-wrapper.details").length){if($("#headerfixed").addClass("with-product"),$(".product-info-headnote .rating").length){ratingHtml='<div class="votes_block nstar'+("EXTENDED"==arAsproOptions.THEME.REVIEWS_VIEW?" pointer":"")+'"><div class="ratings"><div class="inner_rating"';var inner=$(".product-info-headnote .rating .inner_rating");inner.length&&void 0!==inner.attr("title")&&(ratingHtml+='title="'+inner.attr("title")),ratingHtml+='">',$(".product-info-headnote .rating .inner_rating > div").each((function(index){var index_title=index+1;ratingHtml+='<div class="item-rating '+($(this).hasClass("filed")?"filed":""),void 0===inner.attr("title")&&(ratingHtml+='" title="'+index_title),ratingHtml+='">'+$(this).html()+"</div>"})),ratingHtml+="</div></div></div>",$(".product-info-headnote .rating span").length&&(ratingHtml+=$(".product-info-headnote .rating span")[0].outerHTML)}if($('div *[itemprop="offers"]').length){if(BX.util.object_search_key("ASPRO_ITEM_POPUP_PRICE",BX.message)&&"Y"==BX.message("ASPRO_ITEM_POPUP_PRICE")){var obOffer={SHOW_POPUP_PRICE:!1,PRICES_COUNT:BX.message("ASPRO_ITEM_PRICES")};BX.util.object_search_key("ASPRO_ITEM_PRICE_MATRIX",BX.message)?(obOffer.USE_PRICE_COUNT=!0,obOffer.PRICE_MATRIX=BX.message("ASPRO_ITEM_PRICE_MATRIX")):BX.util.object_search_key("ASPRO_ITEM_PRICE",BX.message)&&(obOffer.PRICES_HTML=BX.message("ASPRO_ITEM_PRICE"))}if(void 0!==obOffer)if(!obOffer.SHOW_POPUP_PRICE&&("PRICES_COUNT"in obOffer&&obOffer.PRICES_COUNT>1||"PRICES"in obOffer&&Object.keys(obOffer.PRICES).length>1||"ITEM_PRICES"in obOffer&&Object.keys(obOffer.ITEM_PRICES).length>1)){var bPriceCount=obOffer.USE_PRICE_COUNT&&obOffer.PRICE_MATRIX,topPrice="";topPrice=bPriceCount?$(".cost.detail .with_matrix").length?$(".cost.detail .with_matrix").html():'<div class="prices-wrapper">'+$(".cost.detail").html()+"</div>":'<div class="prices-wrapper">'+obOffer.PRICES_HTML+"</div>",priceHtml='<div class="with_matrix pl with_old price_matrix_wrapper">'+topPrice+"</div>",priceHtml+='<div class="js_price_wrapper">',priceHtml+='<div class="js-info-block rounded3"><div class="block_title text-upper font_xs font-bold">'+BX.message("PRICES_TYPE")+'<i class="svg inline  svg-inline-close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path data-name="Rounded Rectangle 114 copy 3" class="cccls-1" d="M334.411,138l6.3,6.3a1,1,0,0,1,0,1.414,0.992,0.992,0,0,1-1.408,0l-6.3-6.306-6.3,6.306a1,1,0,0,1-1.409-1.414l6.3-6.3-6.293-6.3a1,1,0,0,1,1.409-1.414l6.3,6.3,6.3-6.3A1,1,0,0,1,340.7,131.7Z" transform="translate(-325 -130)"></path></svg></i></div><div class="block_wrap"><div class="block_wrap_inner prices srollbar-custom">',bPriceCount?priceHtml+=obOffer.PRICE_MATRIX:obOffer.PRICES_HTML&&(priceHtml+=obOffer.PRICES_HTML),priceHtml+='<div class="more-btn text-center"></div>',priceHtml+="</div></div></div>",priceHtml+='<div class="js-show-info-block more-item-info rounded3 bordered-block text-center"><i class="svg inline  svg-inline-fw" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="8" height="2" viewBox="0 0 8 2"><path id="Ellipse_292_copy_3" data-name="Ellipse 292 copy 3" class="cls-1" d="M320,4558a1,1,0,1,1-1,1A1,1,0,0,1,320,4558Zm-3,0a1,1,0,1,1-1,1A1,1,0,0,1,317,4558Zm6,0a1,1,0,1,1-1,1A1,1,0,0,1,323,4558Z" transform="translate(-316 -4558)"></path></svg></i></div>',priceHtml+="</div>"}else priceHtml=$(".cost.detail").html();else priceHtml=$(".cost.detail").html()}if($("#photo-sku").length?imgSrc=$("#photo-sku .product-detail-gallery__picture.one").attr("src")?$("#photo-sku .product-detail-gallery__picture.one").attr("src"):$("#photo-sku .product-detail-gallery__picture").data("src")?$("#photo-sku .product-detail-gallery__picture").data("src"):$("#photo-sku .product-detail-gallery__picture").attr("src"):$(".product-detail-gallery__slider #photo-0").length&&(imgSrc=$(".product-detail-gallery__slider #photo-0 .product-detail-gallery__picture").data("src")?$(".product-detail-gallery__slider #photo-0 .product-detail-gallery__picture").data("src"):$(".product-detail-gallery__slider #photo-0 .product-detail-gallery__picture").attr("src")),$(".slide_offer").length?buttonHtml='<span class="buy_block"><span class="btn btn-default btn-sm slide_offer more type_block'+($(".product-container .buy_block .offer_buy_block .btn").hasClass("has_prediction")?" has_prediction":"")+'">'+($(".product-container .buy_block .offer_buy_block .in-cart").is(":visible")?$(".product-container .buy_block .offer_buy_block .in-cart").html():BX.message("MORE_INFO_SKU"))+"</span></span>":$(".buy_block .sku_props").length?buttonHtml='<span class="buy_block"><span class="btn btn-default btn-sm more type_block'+($(".product-container .buy_block .offer_buy_block .btn").hasClass("has_prediction")?" has_prediction":"")+'">'+($(".product-container .buy_block .offer_buy_block .in-cart").is(":visible")?$(".product-container .buy_block .offer_buy_block .in-cart").html():BX.message("MORE_INFO_SKU"))+"</span></span>":$(".buy_block .button_block").length&&(buttonHtml=$(".buy_block .button_block").html().replace(/btn-lg/g,"btn-sm")),$(".sku_props .bx_catalog_item_scu > div").length){var skuHtmlTmp="";$(".product-container .sku_props .bx_catalog_item_scu > div").each((function(){var _this=$(this),li_block=_this.find("li.active"),select_block=_this.find("select");li_block.length?skuHtmlTmp+='<div class="bx_catalog_item_scu"><div class="bx_scu"><div class="'+_this.attr("class")+'"><ul><li class="active" title="'+li_block.attr("title")+'">'+li_block.html()+"</li></ul></div></div></div>":select_block.length&&(void 0!==select_block.find("option:selected").data("img_src")?skuHtmlTmp+='<div class="bx_catalog_item_scu"><div class="bx_scu"><div class="bx_item_detail_scu"><ul><li class="active" title="'+select_block.val()+'"><span class="cnt1"><span class="cnt_item" style="background-image:url('+select_block.find("option:selected").data("img_src")+')"></span></span></li></ul></div></div></div>':skuHtmlTmp+='<div class="bx_catalog_item_scu"><div class="bx_scu"><div class="'+_this.attr("class")+'"><ul><li class="active"><span class="cnt">'+select_block.val()+"</span></li></ul></div></div></div>")})),skuHtml=skuHtmlTmp.replace(/mCustomScrollbar/g,"")}$("#headerfixed .logo-row").html('<div class="ajax_load"><div class="table-view flexbox flexbox--row"><div class="table-view__item item main_item_wrapper"><div class="table-view__item-wrapper item_info catalog-adaptive flexbox flexbox--row"><div class="item-foto"><div class="item-foto__picture"><img src="'+imgSrc+'" /></div></div><div class="item-info"><div class="item-title"><span>'+$("#pagetitle").text()+'</span></div><div class="wrapp_stockers sa_block">'+($(".product-info-headnote .rating").length?'<div class="rating sm-stars">'+ratingHtml+"</div>":"")+($(".quantity_block_wrapper .item-stock").length?'<div class="item-stock">'+$(".quantity_block_wrapper .item-stock").html()+"</div>":"")+'</div></div><div class="item-actions flexbox flexbox--row"><div class="item-price"><div class="cost prices">'+priceHtml+'</div></div><div class="item-sku"><div class="but-cell flexbox flexbox--row sku_props">'+skuHtml+'</div></div><div class="item-buttons"><div class="but-cell">'+buttonHtml+"</div></div>"+($(".product-info .like_icons").length?'<div class="item-icons s_'+$(".product-info .like_icons").data("size")+'"><div class="like_icons list static icons long">'+$(".product-info .like_icons").html()+"</div></div>":"")+"</div></div></div></div></div>"),InitLazyLoad(),InitScrollBar(),"object"==typeof obMaxPredictions&&obMaxPredictions.showAll()}}BX.addCustomEvent("onWindowResize",(function(eventdata){window.predictionWindow&&"function"==typeof window.predictionWindow.close&&window.predictionWindow.close()})),$(document).on("click",".ordered-block.goods .tabs li",(function(){setTimeout(sliceItemBlockSlide,5)})),$(document).on("click",".item-stock .store_view",(function(){scroll_block($(".js-store-scroll"),$("a[href=#stores]"))})),$(document).on("click",".blog-info__rating--top-info, #headerfixed .wproducts .wrapp_stockers .rating .votes_block",(function(){var reviews=$(".reviews.EXTENDED");if(reviews.length){var tabsBlock=$(".ordered-block.tabs-block"),blockToScroll=tabsBlock.length?tabsBlock:reviews;scroll_block(blockToScroll,$('.ordered-block .nav-tabs a[href="#reviews"]'))}})),$(document).on("click",".table-view__item--has-stores .item-stock .value",(function(){$(this).closest(".table-view__item-wrapper").find(".stores-icons .btn").trigger("click")})),$(document).on("click","#headerfixed .item-buttons .more",(function(){$(".product-container .buy_block .offer_buy_block .to-cart").is(":visible")?$(".product-container .buy_block .offer_buy_block .to-cart").trigger("click"):$(".middle-info-wrapper .to-cart").is(":visible")?$(".middle-info-wrapper .to-cart").trigger("click"):$(".product-side .to-cart").is(":visible")?$(".product-side .to-cart").trigger("click"):location.href=arAsproOptions.PAGES.BASKET_PAGE_URL})),$(document).on("click","#headerfixed .item-actions .bx_catalog_item_scu",(function(){var offset=0;offset=$(".product-container .sku_props .bx_catalog_item_scu").offset().top,$("body, html").animate({scrollTop:offset-150},500)})),$(document).on("click",".stores-title .stores-title__list",(function(){var _this=$(this);_this.siblings().removeClass("stores-title--active"),_this.addClass("stores-title--active"),$(".stores_block_wrap .stores-amount-list").hide(100).removeClass("stores-amount-list--active"),$(".stores_block_wrap .stores-amount-list:eq("+_this.index()+")").show(100,(function(){_this.hasClass("stores-title--map")&&"undefined"!=typeof map&&(map.container.fitToViewport(),"undefined"==typeof clusterer||$(this).find(".detail_items").is(":visible")||map.setBounds(clusterer.getBounds(),{zoomMargin:40}))})).addClass("stores-amount-list--active")})),$(document).on("click",".info_ext_block .title",(function(){var _this=$(this);_this.toggleClass("opened"),_this.next().slideToggle()})),$(document).on("click",".stores-icons .btn",(function(){var _this=$(this),block=_this.closest(".table-view__item-wrapper").next(),bVisibleblock,animate=block.is(":visible")?"slideUp":"slideDown";_this.hasClass("clicked")||(_this.addClass("clicked"),block.velocity("stop").velocity(animate,{duration:400,begin:function(){_this.toggleClass("closed")},complete:function(){_this.removeClass("clicked")}}))}));var checkFilterLandgings=function(){if($(".top-content-block .with-filter .with-filter-wrapper").length){var bActiveClass=!1;$("#mobilefilter .with-filter-wrapper").length?($("#mobilefilter .with-filter-wrapper .bx_filter_parameters_box").hasClass("active")&&(bActiveClass=!0),$("#mobilefilter .with-filter-wrapper").empty(),$(".top-content-block .with-filter .with-filter-wrapper").prependTo($("#mobilefilter .with-filter-wrapper"))):$(".top-content-block .with-filter .with-filter-wrapper").prependTo($("#mobilefilter .bx_filter_parameters")),($("#mobilefilter .bx_filter_parameters .landings-list__item--active").length||bActiveClass)&&$("#mobilefilter .with-filter-wrapper .bx_filter_parameters_box").addClass("active"),$("#mobilefilter .scrollbar").scrollTop(0),$("#mobilefilter .bx_filter_parameters.scroll-init").length&&$("#mobilefilter .bx_filter_parameters.scroll-init").mCustomScrollbar("scrollTo",0)}};$(document).ready((function(){lazyLoadPagenBlock(),BX.addCustomEvent("onWindowResize",(function(){try{var fixedMobile;if("Y"==arAsproOptions.THEME.FIXED_BUY_MOBILE){var buyBlock=$(".product-action .buy_block"),counterWrapp=$(".product-action .counter_wrapp:not(.services_counter)");if(buyBlock.length&&counterWrapp.length&&!$(".list-offers.ajax_load").length)if(window.matchMedia("(max-width: 767px)").matches){if(void 0===buyBlock.data("hasCatalog")){var hasCatalog=buyBlock.hasClass("catalog_block");buyBlock.data("hasCatalog",hasCatalog)}if(buyBlock.addClass("catalog_block"),void 0===counterWrapp.data("hasList")){var hasList=counterWrapp.hasClass("list");counterWrapp.data("hasList",hasList)}counterWrapp.removeClass("list").addClass("fixed")}else void 0===buyBlock.data("hasCatalog")||buyBlock.data("hasCatalog")||buyBlock.removeClass("catalog_block"),void 0!==counterWrapp.data("hasList")&&counterWrapp.data("hasList")&&counterWrapp.addClass("list"),counterWrapp.removeClass("fixed")}}catch(e){}})),$(document).find(".catalog_detail [class^=bx_item_detail] [class*=_scroller_container]").mCustomScrollbar({mouseWheel:{scrollAmount:150,preventDefault:!0}})}));
/* End */
;
; /* Start:"a:4:{s:4:"full";s:97:"/bitrix/templates/aspro_max/components/bitrix/catalog.element/main4/script.min.js?172995497889155";s:6:"source";s:77:"/bitrix/templates/aspro_max/components/bitrix/catalog.element/main4/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
var ItemObj={};$(document).ready((function(){"TYPE_1"==BX.message("TYPE_SKU")&&"Y"==BX.message("HAS_SKU_PROPS")||setNewHeader(),"Y"==arMaxOptions.THEME.SHOW_HEADER_GOODS&&$("#headerfixed .logo-row").addClass("wproducts"),$(".ordered-block.js-store-scroll .tabs > ul.nav.nav-tabs").length&&$('<div class="product-item-detail-tabs-container-fixed"><div class="wrapper_inner"><div class="product-item-detail-tabs-wrapper arrow_scroll"><ul class="product-item-detail-tabs-list nav nav-tabs">'+$(".ordered-block.js-store-scroll ul.nav.nav-tabs").html()+"</ul></div></div></div>").insertAfter($("#headerfixed"));var options={arrows_css:{"background-color":"#fafafa"},linked_tabs:$(".ordered-block .tabs.arrow_scroll.arrow_scroll_init")};$(".product-item-detail-tabs-wrapper").scrollTab(options);var options={};$(".tabs.arrow_scroll").scrollTab(options),InitStickySideBar(".sticky-sidebar-custom",".bottom-info-wrapper"),$(".opener").click((function(){var showBlock;$(this).find(".opener_icon").toggleClass("opened"),$(this).parents("tr").toggleClass("nb").next(".offer_stores").find(".stores_block_wrap").slideToggle(200)})),$("a.linked").on("shown.bs.tab",(function(e){$(this).closest(".ordered-block").find(".tab-pane").removeClass("cur"),$("#"+$(this).attr("href").replace("#","")).addClass("cur")})),$('a[data-toggle="tab"]:not(.linked)').on("shown.bs.tab",(function(e){var _this=$(e.target),parent=_this.parent();if(_this.attr("href")&&history.pushState({},"",_this.attr("href")),_this.closest(".product-item-detail-tabs-list").length&&$(".ordered-block .tabs").length){var content_offset=$(".ordered-block .tabs").offset(),tab_height=$(".product-item-detail-tabs-container-fixed").actual("outerHeight"),hfixed_height=$("#headerfixed").actual("outerHeight");$("html, body").animate({scrollTop:content_offset.top-88},400)}"#stores"===_this.attr("href")&&$(".stores_tab").length&&"undefined"!=typeof map&&(map.container.fitToViewport(),"undefined"==typeof clusterer||$(".stores_tab").find(".detail_items").is(":visible")||map.setBounds(clusterer.getBounds(),{zoomMargin:40})),$(".nav.nav-tabs li").each((function(){var _this=$(this);_this.find(" > a.linked").length||(_this.removeClass("active"),_this.index()==parent.index()&&_this.addClass("active"))})),InitLazyLoad()})),$(".title-tab-heading").length&&$(".title-tab-heading").on("click",(function(){var _this,content_offset=$(this).offset();$("html, body").animate({scrollTop:content_offset.top-100},400)})),$("html, body").on("mousedown",(function(e){if("string"==typeof e.target.className&&e.target.className.indexOf("adm")<0){e.stopPropagation();var hint=$(e.target).closest(".hint");if($(e.target).closest(".hint").length){var pos_tmp=hint.offset().top+""+hint.offset().left;$(".hint").each((function(){var pos_tmp2=$(this).offset().top+""+$(this).offset().left;$(this).text()+pos_tmp2!=hint.text()+pos_tmp&&$(this).removeClass("active").find(".tooltip").slideUp(100)}))}else $(".hint").removeClass("active").find(".tooltip").slideUp(100)}})),$(".list-sales-compact").length&&($(".list-sales-compact").appendTo($(".js-sales")),$(".js-sales").velocity({height:$(".list-sales-compact").outerHeight()},{duration:800,delay:800,complete:function(){$(".js-sales").addClass("active").removeAttr("style")}})),$(".js-services-hide").length&&($(".js-services-hide").appendTo($(".js-services")),$(".js-services").velocity({height:$(".js-services-hide").outerHeight()},{duration:800,delay:800,complete:function(){$(".js-services").addClass("active").removeAttr("style")}}))})),$(".set_block").ready((function(){$(".set_block ").equalize({children:'.item:not(".r") .cost',reset:!0}),$(".set_block").equalize({children:".item .item-title",reset:!0}),$(".set_block").equalize({children:".item .item_info",reset:!1})})),function(window){if(window.JCCatalogOnlyElement||(window.JCCatalogOnlyElement=function(arParams){"object"==typeof arParams&&(this.params=arParams,this.obProduct=null,this.set_quantity=1,this.currentPriceMode="",this.currentPrices=[],this.currentPriceSelected=0,this.currentQuantityRanges=[],this.currentQuantityRangeSelected=0,this.params.MESS&&(this.mess=this.params.MESS),this.init())},window.JCCatalogOnlyElement.prototype={init:function(){var i=0,j=0,treeItems=null;this.obProduct=BX(this.params.ID),this.obProduct&&($(this.obProduct).find(".counter_wrapp .counter_block input").data("product","ob"+this.obProduct.id+"el"),this.currentPriceMode=this.params.ITEM_PRICE_MODE,this.currentPrices=this.params.ITEM_PRICES,this.currentQuantityRanges=this.params.ITEM_QUANTITY_RANGES)},setPriceAction:function(){this.set_quantity=this.params.MIN_QUANTITY_BUY,$(this.obProduct).find("input[name=quantity]").length&&(this.set_quantity=$(this.obProduct).find("input[name=quantity]").val()),this.checkPriceRange(this.set_quantity),$(this.obProduct).find(".not_matrix").hide(),$(this.obProduct).find(".with_matrix .price_value_block").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_PRICE)),$(this.obProduct).find(".with_matrix .discount")&&$(this.obProduct).find(".with_matrix .discount").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].BASE_PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_BASE_PRICE)),"Y"==this.params.SHOW_DISCOUNT_PERCENT_NUMBER&&(this.currentPrices[this.currentPriceSelected].PERCENT>0&&this.currentPrices[this.currentPriceSelected].PERCENT<100?($(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").length||$('<div class="value"></div>').insertBefore($(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .text")),$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").html("-<span>"+this.currentPrices[this.currentPriceSelected].PERCENT+"</span>%")):$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").length&&$(this.obProduct).find(".with_matrix .sale_block .sale_wrapper .value").remove()),$(this.obProduct).find(".with_matrix .sale_block .text .values_wrapper").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].DISCOUNT,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_DISCOUNT)),$(this.obProduct).find(".with_matrix").show(),"Y"==arMaxOptions.THEME.SHOW_TOTAL_SUMM&&void 0!==this.currentPrices[this.currentPriceSelected]&&setPriceItem($(this.obProduct),this.set_quantity,this.currentPrices[this.currentPriceSelected].PRICE)},checkPriceRange:function(quantity){if(void 0!==quantity&&"Q"==this.currentPriceMode){var range,found=!1;for(var i in this.currentQuantityRanges)if(this.currentQuantityRanges.hasOwnProperty(i)&&(range=this.currentQuantityRanges[i],parseInt(quantity)>=parseInt(range.SORT_FROM)&&("INF"==range.SORT_TO||parseInt(quantity)<=parseInt(range.SORT_TO)))){found=!0,this.currentQuantityRangeSelected=range.HASH;break}for(var k in!found&&(range=this.getMinPriceRange())&&(this.currentQuantityRangeSelected=range.HASH),this.currentPrices)if(this.currentPrices.hasOwnProperty(k)&&this.currentPrices[k].QUANTITY_HASH==this.currentQuantityRangeSelected){this.currentPriceSelected=k;break}}},getMinPriceRange:function(){var range;for(var i in this.currentQuantityRanges)this.currentQuantityRanges.hasOwnProperty(i)&&(!range||parseInt(this.currentQuantityRanges[i].SORT_FROM)<parseInt(range.SORT_FROM))&&(range=this.currentQuantityRanges[i]);return range}}),!window.JCCatalogElement){var BasketButton=function(params){BasketButton.superclass.constructor.apply(this,arguments),this.nameNode=BX.create("span",{props:{className:"bx_medium bx_bt_button",id:this.id},style:"object"==typeof params.style?params.style:{},text:params.text}),this.buttonNode=BX.create("span",{attrs:{className:params.ownerClass},children:[this.nameNode],events:this.contextEvents}),BX.browser.IsIE()&&this.buttonNode.setAttribute("hideFocus","hidefocus")};BX.extend(BasketButton,BX.PopupWindowButton),window.JCCatalogElement=function(arParams){if(this.timerInitCalculateDelivery=!1,this.skuVisualParams={SELECT:{TAG_BIND:"select",TAG:"option",ACTIVE_CLASS:"active",HIDE_CLASS:"hidden",EVENT:"change"},LI:{TAG_BIND:"li",TAG:"li",ACTIVE_CLASS:"active",HIDE_CLASS:"missing",EVENT:"click"}},this.productType=0,this.config={useCatalog:!0,showQuantity:!0,showPrice:!0,showAbsent:!0,showOldPrice:!1,showPercent:!1,showSkuProps:!1,showOfferGroup:!1,useCompare:!1,mainPictureMode:"IMG",showBasisPrice:!1,showPercentNumber:!1,offerShowPreviewPictureProps:!1,basketAction:["BUY"],showClosePopup:!1},this.basketLinkURL="",this.checkQuantity=!1,this.maxQuantity=0,this.SliderImages=0,this.defaultCount=1,this.stepQuantity=1,this.isDblQuantity=!1,this.canBuy=!0,this.currentBasisPrice={},this.canSubscription=!0,this.currentIsSet=!1,this.updateViewedCount=!1,this.currentPriceMode="",this.currentPrices=[],this.currentPriceSelected=0,this.currentQuantityRanges=[],this.currentQuantityRangeSelected=0,this.precision=6,this.precisionFactor=Math.pow(10,this.precision),this.listID={main:["PICT_ID","BIG_SLIDER_ID","BIG_IMG_CONT_ID"],stickers:["STICKER_ID"],productSlider:["SLIDER_CONT","SLIDER_LIST","SLIDER_LEFT","SLIDER_RIGHT"],offerSlider:["SLIDER_CONT_OF_ID","SLIDER_LIST_OF_ID","SLIDER_LEFT_OF_ID","SLIDER_RIGHT_OF_ID"],offerSliderMobile:["SLIDER_CONT_OFM_ID","SLIDER_LIST_OFM_ID","SLIDER_LEFT_OFM_ID","SLIDER_RIGHT_OFM_ID"],offers:["TREE_ID","TREE_ITEM_ID","DISPLAY_PROP_DIV","DISPLAY_PROP_ARTICLE_DIV","OFFER_GROUP"],quantity:["QUANTITY_ID","QUANTITY_UP_ID","QUANTITY_DOWN_ID","QUANTITY_MEASURE","QUANTITY_LIMIT","BASIS_PRICE"],price:["PRICE_ID"],oldPrice:["OLD_PRICE_ID","DISCOUNT_VALUE_ID"],discountPerc:["DISCOUNT_PERC_ID"],basket:["BASKET_PROP_DIV","BUY_ID","BASKET_LINK","ADD_BASKET_ID","BASKET_ACTIONS_ID","NOT_AVAILABLE_MESS","SUBSCRIBE_ID","SUBSCRIBED_ID"],magnifier:["MAGNIFIER_ID","MAGNIFIER_AREA_ID"],compare:["COMPARE_LINK_ID"]},this.visualPostfix={PICT_ID:"_pict",BIG_SLIDER_ID:"_big_slider",BIG_IMG_CONT_ID:"_bigimg_cont",STICKER_ID:"_sticker",SLIDER_CONT:"_slider_cont",SLIDER_LIST:"_slider_list",SLIDER_LEFT:"_slider_left",SLIDER_RIGHT:"_slider_right",SLIDER_CONT_OF_ID:"_slider_cont_",SLIDER_LIST_OF_ID:"_slider_list_",SLIDER_LEFT_OF_ID:"_slider_left_",SLIDER_RIGHT_OF_ID:"_slider_right_",SLIDER_CONT_OFM_ID:"_sliderm_cont_",SLIDER_LIST_OFM_ID:"_sliderm_list_",SLIDER_LEFT_OFM_ID:"_sliderm_left_",SLIDER_RIGHT_OFM_ID:"_sliderm_right_",TREE_ID:"_skudiv",TREE_ITEM_ID:"_prop_",DISPLAY_PROP_DIV:"_sku_prop",DISPLAY_PROP_ARTICLE_DIV:"_sku_article_prop",QUANTITY_ID:"_quantity",QUANTITY_UP_ID:"_quant_up",QUANTITY_DOWN_ID:"_quant_down",QUANTITY_MEASURE:"_quant_measure",QUANTITY_LIMIT:"_quant_limit",BASIS_PRICE:"_basis_price",PRICE_ID:"_price",OLD_PRICE_ID:"_old_price",DISCOUNT_VALUE_ID:"_price_discount",DISCOUNT_PERC_ID:"_dsc_pict",BASKET_PROP_DIV:"_basket_prop",BUY_ID:"_buy_link",BASKET_LINK:"_basket_link",ADD_BASKET_ID:"_add_basket_link",BASKET_ACTIONS_ID:"_basket_actions",NOT_AVAILABLE_MESS:"_not_avail",SUBSCRIBE_ID:"_subscribe_div",SUBSCRIBED_ID:"_subscribed_div",MAGNIFIER_ID:"_magnifier",MAGNIFIER_AREA_ID:"_magnifier_area",OFFER_GROUP:"_set_group_",COMPARE_LINK_ID:"_compare_link"},this.visual={},this.basketMode="",this.product={checkQuantity:!1,maxQuantity:0,stepQuantity:1,startQuantity:1,isDblQuantity:!1,canBuy:!0,canSubscription:!0,name:"",pict:{},id:0,addUrl:"",buyUrl:"",slider:{},sliderCount:0,useSlider:!1,sliderPict:[]},this.mess={},this.basketData={useProps:!1,emptyProps:!1,quantity:"quantity",props:"prop",basketUrl:"",sku_props:"",sku_props_var:"basket_props",add_url:"",buy_url:""},this.compareData={compareUrl:"",comparePath:""},this.defaultPict={preview:null,detail:null},this.offers=[],this.offerNum=0,this.treeProps=[],this.obTreeRows=[],this.showCount=[],this.showStart=[],this.selectedValues={},this.sliders=[],this.obProduct=null,this.obQuantity=null,this.obQuantityUp=null,this.obQuantityDown=null,this.obBasisPrice=null,this.obPict=null,this.obPictAligner=null,this.obPrice={price:null,full:null,discount:null,percent:null},this.obTree=null,this.obBuyBtn=null,this.obBasketBtn=null,this.obAddToBasketBtn=null,this.obBasketActions=null,this.obNotAvail=null,this.obSkuProps=null,this.obSlider=null,this.obMeasure=null,this.obQuantityLimit={all:null,value:null},this.obCompare=null,this.viewedCounter={path:"/bitrix/components/bitrix/catalog.element/ajax.php",params:{AJAX:"Y",SITE_ID:"",PRODUCT_ID:0,PARENT_ID:0}},this.currentImg={src:"",width:0,height:0,screenWidth:0,screenHeight:0,screenOffsetX:0,screenOffsetY:0,scale:1},this.currentBigImg={src:""},this.obPopupWin=null,this.basketUrl="",this.basketParams={},this.obPopupPict=null,this.magnify={obMagnifier:null,obMagnifyPict:null,obMagnifyArea:null,obBigImg:null,obBigSlider:null,magnifyShow:!1,areaParams:{width:100,height:130,left:0,top:0,scaleFactor:1,globalLeft:0,globalTop:0,globalRight:0,globalBottom:0},magnifierParams:{top:0,left:0,width:0,height:0,ratioX:10,ratioY:13,defaultScale:1},magnifyPictParams:{marginTop:0,marginLeft:0,width:0,height:0}},this.treeRowShowSize=5,this.treeEnableArrow={display:"",cursor:"pointer",opacity:1},this.treeDisableArrow={display:"",cursor:"default",opacity:.2},this.sliderRowShowSize=5,this.sliderEnableArrow={display:"",cursor:"pointer",opacity:1},this.sliderDisableArrow={display:"",cursor:"default",opacity:.2},this.errorCode=0,"object"==typeof arParams){switch(this.params=arParams,this.initConfig(),this.params.MESS&&(this.mess=this.params.MESS),this.productType){case 0:case 1:case 2:this.initProductData();break;case 3:this.initOffersData();break;default:this.errorCode=-1}this.initBasketData(),this.initCompareData()}0===this.errorCode&&BX.ready(BX.delegate(this.Init,this)),this.params={}},window.JCCatalogElement.prototype.Init=function(){var i=0,j=0,strPrefix="",SliderImgs=null,TreeItems=null;if(this.obProduct=BX(this.visual.ID),this.obProduct||(this.errorCode=-1),this.obPict=BX(this.visual.PICT_ID),this.obPict?this.obPictAligner=this.obPict.parentNode:this.errorCode=-2,this.config.showPrice&&(this.obPrice.price=BX(this.visual.PRICE_ID),!this.obPrice.price&&this.config.useCatalog?this.errorCode=-16:(this.config.showOldPrice&&(this.obPrice.full=BX(this.visual.OLD_PRICE_ID),this.obPrice.discount=BX(this.visual.DISCOUNT_VALUE_ID),this.obPrice.full&&BX.adjust(this.obPrice.full,{style:{display:"none"},html:""})),this.config.showPercent&&(this.obPrice.percent=BX(this.visual.DISCOUNT_PERC_ID))),this.obBasketActions=BX(this.visual.BASKET_ACTIONS_ID),this.obBasketActions&&(BX.util.in_array("BUY",this.config.basketAction)&&(this.obBuyBtn=BX(this.visual.BUY_ID)),BX.util.in_array("ADD",this.config.basketAction)&&(this.obAddToBasketBtn=BX(this.visual.BUY_ID)),this.visual.BASKET_LINK&&(this.obBasketBtn=BX(this.visual.BASKET_LINK))),this.obNotAvail=BX(this.visual.NOT_AVAILABLE_MESS)),this.config.showQuantity&&(this.obQuantity=BX(this.visual.QUANTITY_ID),this.visual.QUANTITY_UP_ID&&(this.obQuantityUp=BX(this.visual.QUANTITY_UP_ID)),this.visual.QUANTITY_DOWN_ID&&(this.obQuantityDown=BX(this.visual.QUANTITY_DOWN_ID)),this.config.showBasisPrice&&(this.obBasisPrice=BX(this.visual.BASIS_PRICE))),3===this.productType){if(this.visual.TREE_ID)for(this.obTree=BX(this.visual.TREE_ID),this.obTree||(this.errorCode=-256),strPrefix=this.visual.TREE_ITEM_ID,i=0;i<this.treeProps.length;i++)if(this.obTreeRows[i]={LEFT:BX(strPrefix+this.treeProps[i].ID+"_left"),RIGHT:BX(strPrefix+this.treeProps[i].ID+"_right"),LIST:BX(strPrefix+this.treeProps[i].ID+"_list"),CONT:BX(strPrefix+this.treeProps[i].ID+"_cont")},!this.obTreeRows[i].LIST||!this.obTreeRows[i].CONT){this.errorCode=-512;break}this.visual.QUANTITY_MEASURE&&(this.obMeasure=BX(this.visual.QUANTITY_MEASURE)),this.visual.QUANTITY_LIMIT&&(this.obQuantityLimit.all=BX(this.visual.QUANTITY_LIMIT),this.obQuantityLimit.all&&(this.obQuantityLimit.value=BX.findChild(this.obQuantityLimit.all,{tagName:"span"},!1,!1),this.obQuantityLimit.value||(this.obQuantityLimit.all=null)))}if(this.config.showSkuProps&&(this.visual.DISPLAY_PROP_DIV&&(this.obSkuProps=BX(this.visual.DISPLAY_PROP_DIV)),this.visual.DISPLAY_PROP_ARTICLE_DIV&&(this.obSkuArticleProps=BX(this.visual.DISPLAY_PROP_ARTICLE_DIV))),this.config.useCompare&&(this.obCompare=BX(this.visual.COMPARE_LINK_ID)),0===this.errorCode){switch(this.config.showQuantity&&(this.obQuantityUp&&BX.bind(this.obQuantityUp,"click",BX.delegate(this.QuantityUp,this)),this.obQuantityDown&&BX.bind(this.obQuantityDown,"click",BX.delegate(this.QuantityDown,this)),this.obQuantity&&BX.bind(this.obQuantity,"change",BX.delegate(this.QuantityChange,this))),this.productType){case 0:case 1:case 2:if(this.product.useSlider){if(this.product.slider={COUNT:this.product.sliderCount,ID:this.visual.SLIDER_CONT,CONT:BX(this.visual.SLIDER_CONT),LIST:BX(this.visual.SLIDER_LIST),LEFT:BX(this.visual.SLIDER_LEFT),RIGHT:BX(this.visual.SLIDER_RIGHT),START:0},(SliderImgs=BX.findChildren(this.product.slider.LIST,{tagName:"li"},!0))&&0<SliderImgs.length)for(j=0;j<SliderImgs.length;j++)BX.bind(SliderImgs[j],"click",BX.delegate(this.ProductSelectSliderImg,this));this.product.slider.LEFT&&(BX.bind(this.product.slider.LEFT,"click",BX.delegate(this.ProductSliderRowLeft,this)),BX.adjust(this.product.slider.LEFT,{style:this.sliderDisableArrow})),this.product.slider.RIGHT&&(BX.bind(this.product.slider.RIGHT,"click",BX.delegate(this.ProductSliderRowRight,this)),BX.adjust(this.product.slider.RIGHT,{style:this.sliderEnableArrow})),this.setCurrentImg(this.product.sliderPict[0],!0)}break;case 3:for(var key in this.skuVisualParams){var TreeItems;if((TreeItems=BX.findChildren(this.obTree,{tagName:this.skuVisualParams[key].TAG_BIND},!0))&&0<TreeItems.length)for(i=0;i<TreeItems.length;i++)$(TreeItems[i]).on(this.skuVisualParams[key].EVENT,BX.delegate(this.SelectOfferProp,this))}for(i=0;i<this.offers.length;i++)if(this.offers[i].SLIDER_COUNT=parseInt(this.offers[i].SLIDER_COUNT,10),isNaN(this.offers[i].SLIDER_COUNT)&&(this.offers[i].SLIDER_COUNT=0),0===this.offers[i].SLIDER_COUNT)this.sliders[i]={COUNT:this.offers[i].SLIDER_COUNT,ID:""};else{for(j=0;j<this.offers[i].SLIDER.length;j++)this.offers[i].SLIDER[j].WIDTH=parseInt(this.offers[i].SLIDER[j].WIDTH,10),this.offers[i].SLIDER[j].HEIGHT=parseInt(this.offers[i].SLIDER[j].HEIGHT,10);if(this.sliders[i]={COUNT:this.offers[i].SLIDER_COUNT,OFFER_ID:this.offers[i].ID,ID:this.visual.SLIDER_CONT_OF_ID+this.offers[i].ID,CONT:BX(this.visual.SLIDER_CONT_OF_ID+this.offers[i].ID),LIST:BX(this.visual.SLIDER_LIST_OF_ID+this.offers[i].ID),CONT_M:BX(this.visual.SLIDER_CONT_OFM_ID+this.offers[i].ID),LIST_M:BX(this.visual.SLIDER_LIST_OFM_ID+this.offers[i].ID),LEFT:BX(this.visual.SLIDER_LEFT_OF_ID+this.offers[i].ID),RIGHT:BX(this.visual.SLIDER_RIGHT_OF_ID+this.offers[i].ID),START:0},(SliderImgs=BX.findChildren(this.sliders[i].LIST,{tagName:"li"},!0))&&0<SliderImgs.length)for(j=0;j<SliderImgs.length;j++)BX.bind(SliderImgs[j],"click",BX.delegate(this.SelectSliderImg,this));this.sliders[i].LEFT&&BX.bind(this.sliders[i].LEFT,"click",BX.delegate(this.SliderRowLeft,this)),this.sliders[i].RIGHT&&BX.bind(this.sliders[i].RIGHT,"click",BX.delegate(this.SliderRowRight,this))}this.SetCurrent()}this.obBuyBtn&&BX.bind(this.obBuyBtn,"click",BX.proxy(this.BuyBasket,this)),this.obAddToBasketBtn&&BX.bind(this.obAddToBasketBtn,"click",BX.proxy(this.Add2Basket,this)),this.obCompare&&BX.bind(this.obCompare,"click",BX.proxy(this.Compare,this))}},window.JCCatalogElement.prototype.initConfig=function(){this.productType=parseInt(this.params.PRODUCT_TYPE,10),this.params.CONFIG&&"object"==typeof this.params.CONFIG?("undefined"!==this.params.CONFIG.USE_CATALOG&&BX.type.isBoolean(this.params.CONFIG.USE_CATALOG)&&(this.config.useCatalog=this.params.CONFIG.USE_CATALOG),this.config.showQuantity=!!this.params.CONFIG.SHOW_QUANTITY,this.config.showPrice=!!this.params.CONFIG.SHOW_PRICE,this.config.showPercent=!!this.params.CONFIG.SHOW_DISCOUNT_PERCENT,this.config.showOldPrice=!!this.params.CONFIG.SHOW_OLD_PRICE,this.config.showSkuProps=!!this.params.CONFIG.SHOW_SKU_PROPS,this.config.showOfferGroup=!!this.params.CONFIG.OFFER_GROUP,this.config.useCompare=!!this.params.CONFIG.DISPLAY_COMPARE,this.config.showPercentNumber="Y"==this.params.SHOW_DISCOUNT_PERCENT_NUMBER,this.config.offerShowPreviewPictureProps=this.params.OFFER_SHOW_PREVIEW_PICTURE_PROPS,this.params.CONFIG.MAIN_PICTURE_MODE&&(this.config.mainPictureMode=this.params.CONFIG.MAIN_PICTURE_MODE),this.config.showBasisPrice=!!this.params.CONFIG.SHOW_BASIS_PRICE,this.params.CONFIG.ADD_TO_BASKET_ACTION&&(this.config.basketAction=this.params.CONFIG.ADD_TO_BASKET_ACTION),this.config.showClosePopup=!!this.params.CONFIG.SHOW_CLOSE_POPUP):("undefined"!==this.params.USE_CATALOG&&BX.type.isBoolean(this.params.USE_CATALOG)&&(this.config.useCatalog=this.params.USE_CATALOG),this.config.showQuantity=!!this.params.SHOW_QUANTITY,this.config.showPrice=!!this.params.SHOW_PRICE,this.config.showPercent=!!this.params.SHOW_DISCOUNT_PERCENT,this.config.showOldPrice=!!this.params.SHOW_OLD_PRICE,this.config.showSkuProps=!!this.params.SHOW_SKU_PROPS,this.config.showOfferGroup=!!this.params.OFFER_GROUP,this.config.useCompare=!!this.params.DISPLAY_COMPARE,this.params.MAIN_PICTURE_MODE&&(this.config.mainPictureMode=this.params.MAIN_PICTURE_MODE),this.config.showBasisPrice=!!this.params.SHOW_BASIS_PRICE,this.params.ADD_TO_BASKET_ACTION&&(this.config.basketAction=this.params.ADD_TO_BASKET_ACTION),this.config.showClosePopup=!!this.params.SHOW_CLOSE_POPUP),this.config.SKU_DETAIL_ID=this.params.SKU_DETAIL_ID,this.params.VISUAL&&"object"==typeof this.params.VISUAL&&this.params.VISUAL.ID?(this.visual.ID=this.params.VISUAL.ID,this.basketLinkURL=this.params.BASKET.BASKET_URL,this.defaultCount=this.params.DEFAULT_COUNT,this.storeQuanity=BX(this.params.STORE_QUANTITY),this.initVisualParams("main"),this.config.showQuantity&&this.initVisualParams("quantity"),this.config.showPrice&&this.initVisualParams("price"),this.config.showOldPrice&&this.initVisualParams("oldPrice"),this.config.showPercent&&this.initVisualParams("discountPerc"),this.initVisualParams("basket"),"MAGNIFIER"===this.config.mainPictureMode&&this.initVisualParams("magnifier"),this.config.useCompare&&this.initVisualParams("compare")):this.errorCode=-1},window.JCCatalogElement.prototype.initVisualParams=function(ID){var i=0,key="";if(this.listID[ID])for(i=0;i<this.listID[ID].length;i++)key=this.listID[ID][i],this.visual[key]=this.params.VISUAL[key]?this.params.VISUAL[key]:this.visual.ID+this.visualPostfix[key];else this.errorCode=-1},window.JCCatalogElement.prototype.initProductData=function(){var j=0;if(this.initVisualParams("productSlider"),this.params.PRODUCT&&"object"==typeof this.params.PRODUCT){if(this.config.showQuantity&&(this.product.checkQuantity=this.params.PRODUCT.CHECK_QUANTITY,this.product.isDblQuantity=this.params.PRODUCT.QUANTITY_FLOAT,this.product.checkQuantity&&(this.product.maxQuantity=this.product.isDblQuantity?parseFloat(this.params.PRODUCT.MAX_QUANTITY):parseInt(this.params.PRODUCT.MAX_QUANTITY,10)),this.product.stepQuantity=this.product.isDblQuantity?parseFloat(this.params.PRODUCT.STEP_QUANTITY):parseInt(this.params.PRODUCT.STEP_QUANTITY,10),this.checkQuantity=this.product.checkQuantity,this.isDblQuantity=this.product.isDblQuantity,this.maxQuantity=this.product.maxQuantity,this.stepQuantity=this.product.stepQuantity,this.isDblQuantity&&(this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor)),this.product.canBuy=this.params.PRODUCT.CAN_BUY,this.product.canSubscription=this.params.PRODUCT.SUBSCRIPTION,this.config.showPrice&&(this.currentBasisPrice=this.params.PRODUCT.BASIS_PRICE),this.canBuy=this.product.canBuy,this.canSubscription=this.product.canSubscription,this.product.name=this.params.PRODUCT.NAME,this.product.pict=this.params.PRODUCT.PICT,this.product.id=this.params.PRODUCT.ID,this.params.PRODUCT.ADD_URL&&(this.product.addUrl=this.params.PRODUCT.ADD_URL),this.params.PRODUCT.BUY_URL&&(this.product.buyUrl=this.params.PRODUCT.BUY_URL),this.params.PRODUCT.SLIDER_COUNT&&(this.product.sliderCount=parseInt(this.params.PRODUCT.SLIDER_COUNT,10),isNaN(this.product.sliderCount)&&(this.product.sliderCount=0),0<this.product.sliderCount&&this.params.PRODUCT.SLIDER.length&&0<this.params.PRODUCT.SLIDER.length)){for(j=0;j<this.params.PRODUCT.SLIDER.length;j++)this.product.useSlider=!0,this.params.PRODUCT.SLIDER[j].WIDTH=parseInt(this.params.PRODUCT.SLIDER[j].WIDTH,10),this.params.PRODUCT.SLIDER[j].HEIGHT=parseInt(this.params.PRODUCT.SLIDER[j].HEIGHT,10);this.product.sliderPict=this.params.PRODUCT.SLIDER,this.setCurrentImg(this.product.sliderPict[0],!1)}this.currentIsSet=!0}else this.errorCode=-1},window.JCCatalogElement.prototype.initOffersData=function(){if(this.initVisualParams("offerSlider"),this.initVisualParams("offerSliderMobile"),this.initVisualParams("offers"),this.params.OFFERS&&BX.type.isArray(this.params.OFFERS)){if(this.offers=this.params.OFFERS,this.offerNum=0,this.params.OFFER_SELECTED&&(this.offerNum=parseInt(this.params.OFFER_SELECTED,10),"offers"in this&&this.offers.length)){var objUrl=parseUrlQuery(),sku_params=this.params.SKU_DETAIL_ID,sku_id=0;if(this.config.SKU_DETAIL_ID in objUrl&&(sku_id=objUrl[this.config.SKU_DETAIL_ID]),sku_id)for(var i in this.offers)this.offers[i].ID==sku_id&&(this.offerNum=parseInt(i,10))}isNaN(this.offerNum)&&(this.offerNum=0),this.params.TREE_PROPS&&(this.treeProps=this.params.TREE_PROPS),this.params.DEFAULT_PICTURE&&(this.defaultPict.preview=this.params.DEFAULT_PICTURE.PREVIEW_PICTIRE,this.defaultPict.detail=this.params.DEFAULT_PICTURE.DETAIL_PICTURE),this.params.PRODUCT&&"object"==typeof this.params.PRODUCT&&(this.product.id=parseInt(this.params.PRODUCT.ID,10),this.product.name=this.params.PRODUCT.NAME)}else this.errorCode=-1},window.JCCatalogElement.prototype.initBasketData=function(){this.params.BASKET&&"object"==typeof this.params.BASKET&&(1!==this.productType&&2!==this.productType||(this.basketData.useProps=!!this.params.BASKET.ADD_PROPS,this.basketData.emptyProps=!!this.params.BASKET.EMPTY_PROPS),this.params.BASKET.QUANTITY&&(this.basketData.quantity=this.params.BASKET.QUANTITY),this.params.BASKET.PROPS&&(this.basketData.props=this.params.BASKET.PROPS),this.params.BASKET.BASKET_URL&&(this.basketData.basketUrl=this.params.BASKET.BASKET_URL),3===this.productType&&this.params.BASKET.SKU_PROPS&&(this.basketData.sku_props=this.params.BASKET.SKU_PROPS),this.params.BASKET.ADD_URL_TEMPLATE&&(this.basketData.add_url=this.params.BASKET.ADD_URL_TEMPLATE),this.params.BASKET.BUY_URL_TEMPLATE&&(this.basketData.buy_url=this.params.BASKET.BUY_URL_TEMPLATE),""===this.basketData.add_url&&""===this.basketData.buy_url&&(this.errorCode=-1024))},window.JCCatalogElement.prototype.initCompareData=function(){this.config.useCompare&&(this.params.COMPARE&&"object"==typeof this.params.COMPARE?(this.params.COMPARE.COMPARE_PATH&&(this.compareData.comparePath=this.params.COMPARE.COMPARE_PATH),this.params.COMPARE.COMPARE_URL_TEMPLATE_DEL&&(this.compareData.compareUrlDel=this.params.COMPARE.COMPARE_URL_TEMPLATE_DEL),this.params.COMPARE.COMPARE_URL_TEMPLATE?this.compareData.compareUrl=this.params.COMPARE.COMPARE_URL_TEMPLATE:this.config.useCompare=!1):this.config.useCompare=!1)},window.JCCatalogElement.prototype.setMainPictHandler=function(){switch(this.config.mainPictureMode){case"GALLERY":break;case"MAGNIFIER":this.currentBigImg.src&&($(this.obPict).addClass("zoom_picture"),InitZoomPict());break;case"POPUP":$(this.obPict).parent().addClass("fancy_offer")}},window.JCCatalogElement.prototype.setCurrentImg=function(img,showImage){showImage=!!showImage,"SMALL"in img?this.currentImg.src=img.SMALL.src:"SRC"in img&&(this.currentImg.src=img.SRC),"BIG"in img&&(this.currentBigImg.src=img.BIG.src),"WIDTH"in img&&(this.currentImg.width=img.WIDTH),"HEIGHT"in img&&(this.currentImg.height=img.HEIGHT),showImage&&this.obPict&&("MAGNIFIER"===this.config.mainPictureMode&&($(this.obPict).attr("data-large",this.currentBigImg.src),$(this.obPict).attr("xoriginal",this.currentBigImg.src),"SMALL"in img&&$(this.obPict).attr("xpreview",img.SMALL.src)),"src"in this.currentImg&&this.currentImg.src&&BX.adjust(this.obPict,{props:{src:this.currentImg.src}}),"src"in this.currentBigImg&&this.currentBigImg.src&&("POPUP"===this.config.mainPictureMode&&$(this.obPict).parent().attr("href",this.currentBigImg.src),$(this.obPict).parent().attr("title",img.TITLE),$(this.obPict).parent().attr("alt",img.ALT),$(this.obPict).attr("title",img.TITLE),$(this.obPict).attr("alt",img.ALT)))},window.JCCatalogElement.prototype.scaleImg=function(src,dest){var scaleX,scaleY,scale,result={};return dest.width>=src.width&&dest.height>=src.height?(result.width=src.width,result.height=src.height):(scaleX=dest.width/src.width,scaleY=dest.height/src.height,scale=Math.min(scaleX,scaleY),result.width=Math.max(1,parseInt(scale*src.width,10)),result.height=Math.max(1,parseInt(scale*src.height,10))),result},window.JCCatalogElement.prototype.showMagnifier=function(e){this.magnify.magnifyShow||(this.calcMagnifierParams(),this.calcMagnifyAreaSize(),this.calcMagnifyAreaPos(e),this.calcMagnifyPictSize(),this.calcMagnifyPictPos(),this.setMagnifyAreaParams(!0),this.setMagnifyPictParams(!0),this.setMagnifierParams(!0),BX.bind(document,"mousemove",BX.proxy(this.moveMagnifierArea,this)))},window.JCCatalogElement.prototype.hideMagnifier=function(){this.magnify.magnifyShow||(this.magnify.obMagnifier&&BX.adjust(this.magnify.obMagnifier,{style:{display:"none"}}),this.magnify.obMagnifyArea&&BX.adjust(this.magnify.obMagnifyArea,{style:{display:"none"}}),BX.unbind(document,"mousemove",BX.proxy(this.moveMagnifierArea,this)))},window.JCCatalogElement.prototype.moveMagnifierArea=function(e){var currentPos={X:0,Y:0},posBigImg=BX.pos(this.obPict),intersect={},params={},paramsPict={};if(currentPos=this.inRect(e,posBigImg),this.inBound(posBigImg,currentPos)){switch((intersect=this.intersectArea(currentPos,posBigImg)).X){case-1:this.magnify.areaParams.left=this.currentImg.screenOffsetX;break;case 0:this.magnify.areaParams.left=this.currentImg.screenOffsetX+currentPos.X-(this.magnify.areaParams.width>>>1);break;case 1:this.magnify.areaParams.left=this.currentImg.screenOffsetX+posBigImg.width-this.magnify.areaParams.width}switch(intersect.Y){case-1:this.magnify.areaParams.top=0;break;case 0:this.magnify.areaParams.top=currentPos.Y-(this.magnify.areaParams.height>>>1);break;case 1:this.magnify.areaParams.top=posBigImg.height-this.magnify.areaParams.height}this.magnify.magnifyPictParams.marginLeft=-parseInt((this.magnify.areaParams.left-this.currentImg.screenOffsetX)*this.currentImg.scale,10),this.magnify.magnifyPictParams.marginTop=-parseInt(this.magnify.areaParams.top*this.currentImg.scale,10),params.left=this.magnify.areaParams.left+"px",params.top=this.magnify.areaParams.top+"px",BX.adjust(this.magnify.obMagnifyArea,{style:params}),paramsPict.marginLeft=this.magnify.magnifyPictParams.marginLeft+"px",paramsPict.marginTop=this.magnify.magnifyPictParams.marginTop+"px",BX.adjust(this.magnify.obMagnifyPict,{style:paramsPict})}else this.outMagnifierArea(),this.hideMagnifier()},window.JCCatalogElement.prototype.onMagnifierArea=function(){this.magnify.magnifyShow=!0},window.JCCatalogElement.prototype.outMagnifierArea=function(){this.magnify.magnifyShow=!1},window.JCCatalogElement.prototype.calcMagnifierParams=function(){if(this.magnify.obBigImg){var pos=BX.pos(this.magnify.obBigImg,!0);this.magnify.magnifierParams.width=pos.width,this.magnify.magnifierParams.height=pos.height,this.magnify.magnifierParams.top=pos.top,this.magnify.magnifierParams.left=pos.left+pos.width+2}},window.JCCatalogElement.prototype.setMagnifierParams=function(show){if(this.magnify.obMagnifier){show=!!show;var params={top:this.magnify.magnifierParams.top+"px",left:this.magnify.magnifierParams.left+"px",width:this.magnify.magnifierParams.width+"px",height:this.magnify.magnifierParams.height+"px"};show&&(params.display=""),BX.adjust(this.magnify.obMagnifier,{style:params})}},window.JCCatalogElement.prototype.setMagnifyAreaParams=function(show){if(this.magnify.obMagnifier){show=!!show;var params={top:this.magnify.areaParams.top+"px",left:this.magnify.areaParams.left+"px",width:this.magnify.areaParams.width+"px",height:this.magnify.areaParams.height+"px"};show&&(params.display=""),BX.adjust(this.magnify.obMagnifyArea,{style:params})}},window.JCCatalogElement.prototype.calcMagnifyAreaPos=function(e){var currentPos,posBigImg,intersect;if(posBigImg=BX.pos(this.obPict),currentPos=this.inRect(e,posBigImg),this.inBound(posBigImg,currentPos)){switch((intersect=this.intersectArea(currentPos,posBigImg)).X){case-1:this.magnify.areaParams.left=this.currentImg.screenOffsetX;break;case 0:this.magnify.areaParams.left=this.currentImg.screenOffsetX+currentPos.X-(this.magnify.areaParams.width>>>1);break;case 1:this.magnify.areaParams.left=this.currentImg.screenOffsetX+posBigImg.width-this.magnify.areaParams.width}switch(intersect.Y){case-1:this.magnify.areaParams.top=0;break;case 0:this.magnify.areaParams.top=currentPos.Y-(this.magnify.areaParams.height>>>1);break;case 1:this.magnify.areaParams.top=posBigImg.height-this.magnify.areaParams.height}}},window.JCCatalogElement.prototype.inBound=function(rect,point){return 0<=point.Y&&rect.height>=point.Y&&0<=point.X&&rect.width>=point.X},window.JCCatalogElement.prototype.inRect=function(e,rect){var wndSize=BX.GetWindowSize(),currentPos={X:0,Y:0,globalX:0,globalY:0};return currentPos.globalX=e.clientX+wndSize.scrollLeft,currentPos.X=currentPos.globalX-rect.left,currentPos.globalY=e.clientY+wndSize.scrollTop,currentPos.Y=currentPos.globalY-rect.top,currentPos},window.JCCatalogElement.prototype.intersectArea=function(currentPos,rect){var intersect={X:0,Y:0},halfX=this.magnify.areaParams.width>>>1,halfY=this.magnify.areaParams.height>>>1;return currentPos.X<=halfX?intersect.X=-1:currentPos.X>=rect.width-halfX?intersect.X=1:intersect.X=0,currentPos.Y<=halfY?intersect.Y=-1:currentPos.Y>=rect.height-halfY?intersect.Y=1:intersect.Y=0,intersect},window.JCCatalogElement.prototype.calcMagnifyAreaSize=function(){var scaleX,scaleY,scale;this.magnify.magnifierParams.width<this.currentImg.width&&this.magnify.magnifierParams.height<this.currentImg.height?(scaleX=this.magnify.obBigImg.offsetWidth/this.currentImg.width,scaleY=this.magnify.obBigImg.offsetHeight/this.currentImg.height,scale=Math.min(scaleX,scaleY),this.currentImg.scale=1/scale,this.magnify.areaParams.width=Math.max(1,parseInt(scale*this.magnify.magnifierParams.width,10)),this.magnify.areaParams.height=Math.max(1,parseInt(scale*this.magnify.magnifierParams.height,10)),this.magnify.areaParams.scaleFactor=this.magnify.magnifierParams.defaultScale):(scaleX=this.obPict.offsetWidth/this.magnify.obBigImg.offsetWidth,scaleY=this.obPict.offsetHeight/this.magnify.obBigImg.offsetHeight,scale=Math.min(scaleX,scaleY),this.currentImg.scale=1/scale,this.magnify.areaParams.width=Math.max(1,parseInt(scale*this.magnify.magnifierParams.width,10)),this.magnify.areaParams.height=Math.max(1,parseInt(scale*this.magnify.magnifierParams.height,10)),scaleX=this.magnify.magnifierParams.width/this.currentImg.width,scaleY=this.magnify.magnifierParams.height/this.currentImg.height,scale=Math.max(scaleX,scaleY),this.magnify.areaParams.scaleFactor=scale)},window.JCCatalogElement.prototype.calcMagnifyPictSize=function(){this.magnify.magnifyPictParams.width=this.currentImg.width*this.magnify.areaParams.scaleFactor,this.magnify.magnifyPictParams.height=this.currentImg.height*this.magnify.areaParams.scaleFactor},window.JCCatalogElement.prototype.calcMagnifyPictPos=function(){this.magnify.magnifyPictParams.marginLeft=-parseInt((this.magnify.areaParams.left-this.currentImg.screenOffsetX)*this.currentImg.scale,10),this.magnify.magnifyPictParams.marginTop=-parseInt(this.magnify.areaParams.top*this.currentImg.scale,10)},window.JCCatalogElement.prototype.setMagnifyPictParams=function(show){if(this.magnify.obMagnifier){show=!!show;var params={width:this.magnify.magnifyPictParams.width+"px",height:this.magnify.magnifyPictParams.height+"px",marginTop:this.magnify.magnifyPictParams.marginTop+"px",marginLeft:this.magnify.magnifyPictParams.marginLeft+"px"};show&&(params.display=""),BX.adjust(this.magnify.obMagnifyPict,{style:params,props:{src:this.currentImg.src}})}},window.JCCatalogElement.prototype.ProductSliderRowLeft=function(){var target;BX.proxy_context&&this.sliderRowShowSize<this.product.slider.COUNT&&(0>this.product.slider.START&&(this.product.slider.START++,BX.adjust(this.product.slider.LIST,{style:{marginLeft:20*this.product.slider.START+"%"}}),BX.adjust(this.product.slider.RIGHT,{style:this.sliderEnableArrow})),0<=this.product.slider.START&&BX.adjust(this.product.slider.LEFT,{style:this.sliderDisableArrow}))},window.JCCatalogElement.prototype.ProductSliderRowRight=function(){var target;BX.proxy_context&&this.sliderRowShowSize<this.product.slider.COUNT&&(this.sliderRowShowSize-this.product.slider.START<this.product.slider.COUNT&&(this.product.slider.START--,BX.adjust(this.product.slider.LIST,{style:{marginLeft:20*this.product.slider.START+"%"}}),BX.adjust(this.product.slider.LEFT,{style:this.sliderEnableArrow})),this.sliderRowShowSize-this.product.slider.START>=this.product.slider.COUNT&&BX.adjust(this.product.slider.RIGHT,{style:this.sliderDisableArrow}))},window.JCCatalogElement.prototype.ProductSelectSliderImg=function(){var strValue="",target=BX.proxy_context;target&&target.hasAttribute("data-value")&&(strValue=target.getAttribute("data-value"),this.SetProductMainPict(strValue))},window.JCCatalogElement.prototype.SetProductMainPict=function(intPict){var indexPict=-1,i=0,j=0,value="",strValue="",RowItems=null;if(0<this.product.sliderCount){for(j=0;j<this.product.sliderPict.length;j++)if(intPict===this.product.sliderPict[j].ID){indexPict=j;break}if(-1<indexPict&&(this.product.sliderPict[indexPict]&&this.setCurrentImg(this.product.sliderPict[indexPict],!0),(RowItems=BX.findChildren(this.product.slider.LIST,{tagName:"li"},!1))&&0<RowItems.length))for(strValue=intPict,i=0;i<RowItems.length;i++)(value=RowItems[i].getAttribute("data-value"))===strValue?BX.addClass(RowItems[i],"active"):BX.removeClass(RowItems[i],"active")}},window.JCCatalogElement.prototype.SliderRowLeft=function(){var strValue="",index=-1,i,target=BX.proxy_context;if(target&&target.hasAttribute("data-value")){for(strValue=target.getAttribute("data-value"),i=0;i<this.sliders.length;i++)if(this.sliders[i].OFFER_ID===strValue){index=i;break}-1<index&&this.sliderRowShowSize<this.sliders[index].COUNT&&(0>this.sliders[index].START&&(this.sliders[index].START++,BX.adjust(this.sliders[index].LIST,{style:{marginLeft:20*this.sliders[index].START+"%"}}),BX.adjust(this.sliders[index].RIGHT,{style:this.sliderEnableArrow})),0<=this.sliders[index].START&&BX.adjust(this.sliders[index].LEFT,{style:this.sliderDisableArrow}))}},window.JCCatalogElement.prototype.SliderRowRight=function(){var strValue="",index=-1,i,target=BX.proxy_context;if(target&&target.hasAttribute("data-value")){for(strValue=target.getAttribute("data-value"),i=0;i<this.sliders.length;i++)if(this.sliders[i].OFFER_ID===strValue){index=i;break}-1<index&&this.sliderRowShowSize<this.sliders[index].COUNT&&(this.sliderRowShowSize-this.sliders[index].START<this.sliders[index].COUNT&&(this.sliders[index].START--,BX.adjust(this.sliders[index].LIST,{style:{marginLeft:20*this.sliders[index].START+"%"}}),BX.adjust(this.sliders[index].LEFT,{style:this.sliderEnableArrow})),this.sliderRowShowSize-this.sliders[index].START>=this.sliders[index].COUNT&&BX.adjust(this.sliders[index].RIGHT,{style:this.sliderDisableArrow}))}},window.JCCatalogElement.prototype.SelectSliderImg=function(){var strValue="",arItem=[],target=BX.proxy_context;target&&target.hasAttribute("data-value")&&(arItem=(strValue=target.getAttribute("data-value")).split("_"),this.SetMainPict(arItem[0],arItem[1]))},window.JCCatalogElement.prototype.SetMainPict=function(intSlider,intPict){var index=-1,indexPict=-1,i,j,value="",RowItems=null,strValue="";for(i=0;i<this.offers.length;i++)if(intSlider===this.offers[i].ID){index=i;break}if($(".thumbs_navigation ul").addClass("hidden_block"),this.SliderImages>1&&$(".thumbs_navigation ul:eq("+index+")").removeClass("hidden_block"),$(".thumbs_navigation").removeClass("hidden_block"),$(".fancy_offer").addClass("hidden_block"),$(this.obPict).closest(".offers_img").css("opacity",0),-1<index&&0<this.offers[index].SLIDER_COUNT){for(j=0;j<this.offers[index].SLIDER.length;j++)if(intPict===this.offers[index].SLIDER[j].ID){indexPict=j;break}if(-1<indexPict&&(this.offers[index].SLIDER[indexPict]&&this.setCurrentImg(this.offers[index].SLIDER[indexPict],!0),(RowItems=BX.findChildren(this.sliders[index].LIST,{tagName:"li"},!1))&&0<RowItems.length))for(strValue=intSlider+"_"+intPict,i=0;i<RowItems.length;i++)(value=RowItems[i].getAttribute("data-value"))===strValue?BX.addClass(RowItems[i],"current"):BX.removeClass(RowItems[i],"current")}setTimeout((function(){$(".fancy_offer").removeClass("hidden_block"),$(".offers_img").css("opacity",1)}),200)},window.JCCatalogElement.prototype.SetMainPictFromItem=function(index){if(this.obPict){var boolSet=!1,obNewPict={};this.offers[index]&&(this.offers[index].DETAIL_PICTURE?(obNewPict=this.offers[index].DETAIL_PICTURE,boolSet=!0):this.offers[index].PREVIEW_PICTURE&&(obNewPict=this.offers[index].PREVIEW_PICTURE,boolSet=!0)),boolSet||(this.defaultPict.detail?(obNewPict=this.defaultPict.detail,boolSet=!0):this.defaultPict.preview&&(obNewPict=this.defaultPict.preview,boolSet=!0)),boolSet&&this.setCurrentImg(obNewPict,!0)}},window.JCCatalogElement.prototype.SetAdditionalGallery=function(index){var $gallery=$(".additional-gallery");if($gallery.length){var bHidden=$gallery.hasClass("hidden"),bigGallery=$gallery.find(".big-gallery-block .owl-carousel"),smallGallery=$gallery.find(".small-gallery-block .row"),slideBigHtml=slideSmallHtml="";if(this.offers[index].ADDITIONAL_GALLERY.length){for(var i in bHidden&&$gallery.removeClass("hidden"),$gallery.find(".switch-item-block .switch-item-block__count-wrapper--small .switch-item-block__count-value").text(this.offers[index].ADDITIONAL_GALLERY.length),$gallery.find(".switch-item-block .switch-item-block__count-wrapper--big .switch-item-block__count-value").text("1/"+this.offers[index].ADDITIONAL_GALLERY.length),this.offers[index].ADDITIONAL_GALLERY)"object"==typeof this.offers[index].ADDITIONAL_GALLERY[i]&&(slideBigHtml+='<div class="item"><a href="'+this.offers[index].ADDITIONAL_GALLERY[i].DETAIL.SRC+'" data-fancybox="big-gallery" class="fancy"><img class="picture" border="0" src="'+this.offers[index].ADDITIONAL_GALLERY[i].PREVIEW.src+'" alt="'+this.offers[index].ADDITIONAL_GALLERY[i].ALT+'" title="'+this.offers[index].ADDITIONAL_GALLERY[i].TITLE+'" /></a></div>',slideSmallHtml+='<div class="col-md-3"><div class="item"><a href="'+this.offers[index].ADDITIONAL_GALLERY[i].DETAIL.SRC+'" data-fancybox="small-gallery" class="fancy"><img class="picture" border="0" src="'+this.offers[index].ADDITIONAL_GALLERY[i].PREVIEW.src+'" alt="'+this.offers[index].ADDITIONAL_GALLERY[i].ALT+'" title="'+this.offers[index].ADDITIONAL_GALLERY[i].TITLE+'" /></a></div></div>');bigGallery.html(slideBigHtml),smallGallery.html(slideSmallHtml),void 0!==bigGallery.data("owl.carousel")&&bigGallery.data("owl.carousel").destroy(),InitOwlSlider(),InitFancyBox()}else $gallery.addClass("hidden")}},window.JCCatalogElement.prototype.showMainPictPopup=function(e){var pictContent="";return pictContent='<div style="text-align: center;"><img src="'+this.currentImg.src+'" width="'+this.currentImg.width+'" height="'+this.currentImg.height+'" name=""></div>',this.obPopupPict.setContent(pictContent),this.obPopupPict.show(),BX.PreventDefault(e)},window.JCCatalogElement.prototype.QuantityUp=function(){var curValue=0,boolSet=!0,calcPrice;0===this.errorCode&&this.config.showQuantity&&this.canBuy&&(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)||(curValue+=this.stepQuantity,this.checkQuantity&&curValue>this.maxQuantity&&(boolSet=!1),boolSet&&(this.isDblQuantity&&(curValue=Math.round(curValue*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=curValue)))},window.JCCatalogElement.prototype.QuantityDown=function(){var curValue=0,boolSet=!0,calcPrice;0===this.errorCode&&this.config.showQuantity&&this.canBuy&&(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)||((curValue-=this.stepQuantity)<this.stepQuantity&&(boolSet=!1),boolSet&&(this.isDblQuantity&&(curValue=Math.round(curValue*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=curValue)))},window.JCCatalogElement.prototype.QuantityChange=function(){var curValue=0,calcPrice,intCount,count;0===this.errorCode&&this.config.showQuantity&&(this.canBuy?(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)?this.obQuantity.value=this.stepQuantity:(this.checkQuantity&&curValue>this.maxQuantity&&(curValue=this.maxQuantity),curValue<this.stepQuantity?curValue=this.stepQuantity:(count=Math.round(curValue*this.precisionFactor/this.stepQuantity)/this.precisionFactor,intCount=parseInt(count,10),isNaN(intCount)&&(intCount=1,count=1.1),count>intCount&&(curValue=intCount<=1?this.stepQuantity:intCount*this.stepQuantity,curValue=Math.round(curValue*this.precisionFactor)/this.precisionFactor)),this.obQuantity.value=curValue)):this.obQuantity.value=this.stepQuantity)},window.JCCatalogElement.prototype.QuantitySet=function(index){var basisPrice="",strLimit;0===this.errorCode&&(this.canBuy=this.offers[index].CAN_BUY,this.currentPriceMode=this.offers[index].ITEM_PRICE_MODE,this.currentPrices=this.offers[index].ITEM_PRICES,this.currentPriceSelected=this.offers[index].ITEM_PRICE_SELECTED,this.currentQuantityRanges=this.offers[index].ITEM_QUANTITY_RANGES,this.currentQuantityRangeSelected=this.offers[index].ITEM_QUANTITY_RANGE_SELECTED,this.canBuy?(this.obBasketActions&&BX.style(this.obBasketActions,"display",""),this.obNotAvail&&BX.style(this.obNotAvail,"display","none")):(this.obBasketActions&&(BX.style(this.obBasketActions,"opacity","0"),BX.style(BX.findParent(BX(this.obQuantity),{class:"counter_block"}),"display","none")),this.obNotAvail&&BX.style(this.obNotAvail,"display","")),this.config.showQuantity&&(this.isDblQuantity=this.offers[index].QUANTITY_FLOAT,this.checkQuantity=this.offers[index].CHECK_QUANTITY,this.isDblQuantity?(this.maxQuantity=parseFloat(this.offers[index].MAX_QUANTITY),this.stepQuantity=Math.round(parseFloat(this.offers[index].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor):(this.maxQuantity=parseInt(this.offers[index].MAX_QUANTITY,10),this.stepQuantity=parseInt(this.offers[index].STEP_QUANTITY,10)),this.obMeasure&&(this.offers[index].MEASURE?BX.adjust(this.obMeasure,{html:this.offers[index].MEASURE}):BX.adjust(this.obMeasure,{html:""})),this.obQuantityLimit.all&&(this.checkQuantity?(strLimit=this.offers[index].MAX_QUANTITY,this.offers[index].MEASURE&&(strLimit+=" "+this.offers[index].MEASURE),BX.adjust(this.obQuantityLimit.value,{html:strLimit}),BX.adjust(this.obQuantityLimit.all,{style:{display:""}})):(BX.adjust(this.obQuantityLimit.value,{html:""}),BX.adjust(this.obQuantityLimit.all,{style:{display:"none"}}))),this.obBasisPrice&&(this.offers[index].BASIS_PRICE?(basisPrice=(basisPrice=(basisPrice=BX.message("BASIS_PRICE_MESSAGE")).replace("#PRICE#",BX.Currency.currencyFormat(this.offers[index].BASIS_PRICE.DISCOUNT_VALUE,this.offers[index].BASIS_PRICE.CURRENCY,!0))).replace("#MEASURE#",this.offers[index].MEASURE),BX.adjust(this.obBasisPrice,{style:{display:""},html:basisPrice})):BX.adjust(this.obBasisPrice,{style:{display:"none"},html:""}))),this.currentBasisPrice=this.offers[index].BASIS_PRICE)},window.JCCatalogElement.prototype.SelectOfferProp=function(){var i=0,strTreeValue="",arTreeItem=[],RowItems=null,target=BX.proxy_context;if(void 0!==target.options&&void 0!==target.options[target.selectedIndex]&&(target=target.options[target.selectedIndex]),target&&target.hasAttribute("data-treevalue")&&(strTreeValue=target.getAttribute("data-treevalue"),propModes=target.getAttribute("data-showtype"),arTreeItem=strTreeValue.split("_"),this.SearchOfferPropIndex(arTreeItem[0],arTreeItem[1]),(RowItems=BX.findChildren(target.parentNode,{tagName:this.skuVisualParams[propModes.toUpperCase()].TAG},!1))&&0<RowItems.length))for(i=0;i<RowItems.length;i++)value=RowItems[i].getAttribute("data-onevalue"),"TEXT"==propModes?value===arTreeItem[1]?RowItems[i].setAttribute("selected","selected"):RowItems[i].removeAttribute("selected"):value===arTreeItem[1]?$(RowItems[i]).addClass(this.skuVisualParams[propModes.toUpperCase()].ACTIVE_CLASS):$(RowItems[i]).removeClass(this.skuVisualParams[propModes.toUpperCase()].ACTIVE_CLASS)},window.JCCatalogElement.prototype.SearchOfferPropIndex=function(strPropID,strPropValue){var strName="",arShowValues=!1,arCanBuyValues=[],allValues=[],index=-1,i,j,arFilter={},tmpFilter=[];for(i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strPropID){index=i;break}if(-1<index){for(i=0;i<index;i++)arFilter[strName="PROP_"+this.treeProps[i].ID]=this.selectedValues[strName];for(arFilter[strName="PROP_"+this.treeProps[index].ID]=strPropValue,i=index+1;i<this.treeProps.length&&(strName="PROP_"+this.treeProps[i].ID,arShowValues=this.GetRowValues(arFilter,strName));i++){if(allValues=[],this.config.showAbsent)for(arCanBuyValues=[],tmpFilter=[],tmpFilter=BX.clone(arFilter,!0),j=0;j<arShowValues.length;j++)tmpFilter[strName]=arShowValues[j],allValues[allValues.length]=arShowValues[j],this.GetCanBuy(tmpFilter)&&(arCanBuyValues[arCanBuyValues.length]=arShowValues[j]);else arCanBuyValues=arShowValues;this.selectedValues[strName]&&BX.util.in_array(this.selectedValues[strName],arCanBuyValues)?arFilter[strName]=this.selectedValues[strName]:this.config.showAbsent?arFilter[strName]=arCanBuyValues.length?arCanBuyValues[0]:allValues[0]:arFilter[strName]=arCanBuyValues[0],this.UpdateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues=arFilter,this.ChangeInfo()}},window.JCCatalogElement.prototype.RowLeft=function(){var strTreeValue="",index=-1,i,target=BX.proxy_context;if(target&&target.hasAttribute("data-treevalue")){for(strTreeValue=target.getAttribute("data-treevalue"),i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strTreeValue){index=i;break}-1<index&&this.treeRowShowSize<this.showCount[index]&&0>this.showStart[index]&&(this.showStart[index]++,BX.adjust(this.obTreeRows[index].LIST,{style:{marginLeft:20*this.showStart[index]+"%"}}))}},window.JCCatalogElement.prototype.RowRight=function(){var strTreeValue="",index=-1,i,target=BX.proxy_context;if(target&&target.hasAttribute("data-treevalue")){for(strTreeValue=target.getAttribute("data-treevalue"),i=0;i<this.treeProps.length;i++)if(this.treeProps[i].ID===strTreeValue){index=i;break}-1<index&&this.treeRowShowSize<this.showCount[index]&&this.treeRowShowSize-this.showStart[index]<this.showCount[index]&&(this.showStart[index]--,BX.adjust(this.obTreeRows[index].LIST,{style:{marginLeft:20*this.showStart[index]+"%"}}))}},window.JCCatalogElement.prototype.UpdateRowsImages=function(){if("object"==typeof this.config.offerShowPreviewPictureProps&&this.config.offerShowPreviewPictureProps.length){var currentTree=this.selectedValues;for(var i in this.obTreeRows)if(BX.util.in_array(this.treeProps[i].CODE,this.config.offerShowPreviewPictureProps)){var RowItems=BX.findChildren(this.obTreeRows[i].LIST,{tagName:"LI"},!1);if(RowItems&&0<RowItems.length)for(var j in RowItems){var ImgItem=BX.findChild(RowItems[j],{className:"cnt_item"},!0,!1);if(ImgItem){var value=RowItems[j].getAttribute("data-onevalue");if(0!=value){var bgi=ImgItem.style.backgroundImage,obgi=ImgItem.getAttribute("data-obgi");obgi||(obgi=bgi,ImgItem.setAttribute("data-obgi",obgi));var boolOneSearch=!1,rowTree=BX.clone(currentTree,!0);for(var m in rowTree["PROP_"+this.treeProps[i].ID]=value,this.offers){for(var n in boolOneSearch=!0,rowTree)if(rowTree[n]!==this.offers[m].TREE[n]){boolOneSearch=!1;break}if(boolOneSearch){var newBgi;if("object"==typeof this.offers[m].PREVIEW_PICTURE&&this.offers[m].PREVIEW_PICTURE.SRC)bgi!==(newBgi='url("'+this.offers[m].PREVIEW_PICTURE.SRC+'")')&&(ImgItem.style.backgroundImage=newBgi,BX.addClass(ImgItem,"pp"));else boolOneSearch=!1;break}}for(var m in this.offers)if(rowTree["PROP_"+this.treeProps[i].ID]==this.offers[m].TREE["PROP_"+this.treeProps[i].ID]&&!boolOneSearch){if("object"==typeof this.offers[m].PREVIEW_PICTURE&&this.offers[m].PREVIEW_PICTURE.SRC){var newBgi='url("'+this.offers[m].PREVIEW_PICTURE.SRC+'")';ImgItem.style.backgroundImage=newBgi,BX.addClass(ImgItem,"pp"),boolOneSearch=!0}break}!boolOneSearch&&obgi&&bgi!==obgi&&(ImgItem.style.backgroundImage=obgi,BX.removeClass(ImgItem,"pp"))}}}}}},window.JCCatalogElement.prototype.UpdateRow=function(intNumber,activeID,showID,canBuyID){var i=0,showI=0,value="",countShow=0,strNewLen="",obData={},obDataCont={},RowItems=null,pictMode=!1,extShowMode=!1,isCurrent=!1,selectIndex=0,obLeft=this.treeEnableArrow,obRight=this.treeEnableArrow,currentShowStart=0;if(-1<intNumber&&intNumber<this.obTreeRows.length&&(propMode=this.treeProps[intNumber].DISPLAY_TYPE,(RowItems=BX.findChildren(this.obTreeRows[intNumber].LIST,{tagName:this.skuVisualParams[propMode].TAG},!1))&&0<RowItems.length)){for(selectMode="SELECT"===this.treeProps[intNumber].DISPLAY_TYPE,countShow=showID.length,obData={style:{},props:{disabled:"",selected:""}},obDataCont={style:{}},i=0;i<RowItems.length;i++)isCurrent=(value=RowItems[i].getAttribute("data-onevalue"))===activeID,BX.util.in_array(value,canBuyID)?obData.props.className=isCurrent?this.skuVisualParams[propMode].ACTIVE_CLASS:"":obData.props.className=isCurrent?this.skuVisualParams[propMode].ACTIVE_CLASS+" "+this.skuVisualParams[propMode].HIDE_CLASS:this.skuVisualParams[propMode].HIDE_CLASS,selectMode?(obData.props.disabled="disabled",obData.props.selected=isCurrent?"selected":""):obData.style.display="none",BX.util.in_array(value,showID)&&(selectMode?obData.props.disabled="":obData.style.display="",isCurrent&&(selectIndex=showI),0!=value&&showI++),BX.adjust(RowItems[i],obData);obDataCont.style.display=showI?"":"none",BX.adjust(this.obTreeRows[intNumber].CONT,obDataCont),selectMode&&$(this.obTreeRows[intNumber].LIST).parent().hasClass("ik_select")&&$(this.obTreeRows[intNumber].LIST).ikSelect("reset"),this.showCount[intNumber]=countShow,this.showStart[intNumber]=0}},window.JCCatalogElement.prototype.GetRowValues=function(arFilter,index){var arValues=[],i=0,j=0,boolSearch=!1,boolOneSearch=!0;if(0===arFilter.length){for(i=0;i<this.offers.length;i++)BX.util.in_array(this.offers[i].TREE[index],arValues)||(arValues[arValues.length]=this.offers[i].TREE[index]);boolSearch=!0}else for(i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,arFilter)if(arFilter[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}boolOneSearch&&(BX.util.in_array(this.offers[i].TREE[index],arValues)||(arValues[arValues.length]=this.offers[i].TREE[index]),boolSearch=!0)}return!!boolSearch&&arValues},window.JCCatalogElement.prototype.GetCanBuy=function(arFilter){var i=0,j=0,boolOneSearch=!0,boolSearch=!1;for(i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,arFilter)if(arFilter[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}if(boolOneSearch&&this.offers[i].CAN_BUY){boolSearch=!0;break}}return boolSearch},window.JCCatalogElement.prototype.SetCurrent=function(){var i=0,j=0,strName="",arShowValues=!1,arCanBuyValues=[],arFilter={},tmpFilter=[],current=this.offers[this.offerNum].TREE;for(i=0;i<this.treeProps.length&&(strName="PROP_"+this.treeProps[i].ID,arShowValues=this.GetRowValues(arFilter,strName));i++){if(BX.util.in_array(current[strName],arShowValues)?arFilter[strName]=current[strName]:(arFilter[strName]=arShowValues[0],this.offerNum=0),this.config.showAbsent)for(arCanBuyValues=[],tmpFilter=[],tmpFilter=BX.clone(arFilter,!0),j=0;j<arShowValues.length;j++)tmpFilter[strName]=arShowValues[j],this.GetCanBuy(tmpFilter)&&(arCanBuyValues[arCanBuyValues.length]=arShowValues[j]);else arCanBuyValues=arShowValues;this.UpdateRow(i,arFilter[strName],arShowValues,arCanBuyValues)}this.selectedValues=arFilter,this.ChangeInfo()},window.JCCatalogElement.prototype.ChangeInfo=function(){var index=-1,i=0,j=0,RowItems=null,boolOneSearch=!0;for($(".table_sizes").length&&$(".table_sizes").addClass("w-offers"),i=0;i<this.offers.length;i++){for(j in boolOneSearch=!0,this.selectedValues)if(this.selectedValues[j]!==this.offers[i].TREE[j]){boolOneSearch=!1;break}if(boolOneSearch){index=i;break}}if(this.treeProps){for(var i in this.treeProps){var cont=$("#"+this.visual.ID+"_prop_"+this.treeProps[i].ID+"_cont"),color=cont.find('li[data-treevalue="'+this.treeProps[i].ID+"_"+this.selectedValues["PROP_"+this.treeProps[i].ID]+'"] i').attr("title"),arColor=[];if(color||(color=cont.find('li[data-treevalue="'+this.treeProps[i].ID+"_"+this.selectedValues["PROP_"+this.treeProps[i].ID]+'"]').attr("title")),color&&(arColor=color.split(":")),2==arColor.length){arColor[1]=arColor[1].trim();var val=cont.find(".bx_item_section_name .val");val.length?val.html(arColor[1]):cont.find(".bx_item_section_name").append('<span class="val">'+arColor[1]+"</span>")}}this.UpdateRowsImages()}if(-1<index){for(i=0;i<this.offers.length;i++)this.config.showOfferGroup&&this.offers[i].OFFER_GROUP&&i!==index&&BX(this.visual.OFFER_GROUP+this.offers[i].ID)&&BX.adjust(BX(this.visual.OFFER_GROUP+this.offers[i].ID),{style:{display:"none"}});this.config.showOfferGroup&&this.offers[index].OFFER_GROUP&&BX(this.visual.OFFER_GROUP+this.offers[index].ID)&&BX.adjust(BX(this.visual.OFFER_GROUP+this.offers[index].ID),{style:{display:""}}),this.SetAdditionalGallery(index),this.SetSliderPict(this.offers[index],this.offers[index].SLIDER,this.config);var bSideChar=$(".js-offers-props").length&&!$(".char-side .more-char-link").length,props="";if(bSideChar&&$(".js-offers-props").empty(),this.config.showSkuProps){var html="",display_type=this.offers[index].TYPE_PROP;if("TABLE"!=display_type&&$(".props_block .sku_block_prop").remove(),this.offers[index].DISPLAY_PROPERTIES&&0!==this.offers[index].DISPLAY_PROPERTIES.length){for(var i in this.offers[index].DISPLAY_PROPERTIES){var class_block=this.offers[index].DISPLAY_PROPERTIES[i].HINT&&"Y"==this.offers[index].DISPLAY_PROPERTIES[i].SHOW_HINTS?" whint1":"",hint_block=this.offers[index].DISPLAY_PROPERTIES[i].HINT&&"Y"==this.offers[index].DISPLAY_PROPERTIES[i].SHOW_HINTS?'<div class="hint"><span class="icon"><i>?</i></span><div class="tooltip">'+this.offers[index].DISPLAY_PROPERTIES[i].HINT+"</div></div>":"";"TABLE"==display_type?html+='<tr><td class="char_name"><span class="'+class_block+'">'+hint_block+"<span>"+this.offers[index].DISPLAY_PROPERTIES[i].NAME+'</span></span></td><td class="char_value"><span>'+this.offers[index].DISPLAY_PROPERTIES[i].VALUE+"</span></td></tr>":(html='<div class="char sku_block_prop col-lg-3 col-md-4 col-xs-6 bordered"><div class="char_name muted"><span class="'+class_block+'">'+hint_block+"<span>"+this.offers[index].DISPLAY_PROPERTIES[i].NAME+'</span></span></div><div class="char_value darken"><span>'+this.offers[index].DISPLAY_PROPERTIES[i].VALUE+"</span></div></div>",this.obSkuProps&&$(this.obSkuProps).append(html)),bSideChar&&(props='<div class="properties__item properties__item--compact font_xs"><div class="properties__title properties__item--inline muted">'+this.offers[index].DISPLAY_PROPERTIES[i].NAME+'</div><div class="properties__hr properties__item--inline muted">&mdash;</div><div class="properties__value properties__item--inline darken">'+this.offers[index].DISPLAY_PROPERTIES[i].VALUE+"</div></div>",$(".js-offers-props").append(props))}"TABLE"==display_type&&this.obSkuProps&&BX.adjust(this.obSkuProps,{style:{display:""},html:html})}else this.obSkuProps&&("TABLE"==display_type?BX.adjust(this.obSkuProps,{style:{display:"none"},html:""}):$(this.obSkuProps).find(".sku_block_prop").remove())}this.config.showSkuProps&&this.obSkuArticleProps&&("DISPLAY_PROPERTIES_CODE"in this.offers[index]&&"ARTICLE"in this.offers[index].DISPLAY_PROPERTIES_CODE?this.offers[index].DISPLAY_PROPERTIES_CODE.ARTICLE.VALUE&&BX.adjust(this.obSkuArticleProps,{style:{display:""},html:this.offers[index].DISPLAY_PROPERTIES_CODE.ARTICLE.VALUE_FORMAT}):"Y"==this.offers[index].SHOW_ARTICLE_SKU&&this.offers[index].ARTICLE_SKU?BX.adjust(this.obSkuArticleProps,{style:{display:""},html:this.offers[index].ARTICLE_SKU}):BX.adjust(this.obSkuArticleProps,{style:{display:"none"},html:""})),this.config.SKU_DETAIL_ID&&setLocationSKU(this.offers[index].ID,this.config.SKU_DETAIL_ID),$(this.obBasketActions).closest(".counter_wrapp").addClass("hidden_block"),this.offerNum=index,this.QuantitySet(this.offerNum),this.setStoreBlock(this.offers[index].ID),this.setQuantityStore(this.offers[index].MAX_QUANTITY,this.offers[index].AVAILIABLE.TEXT),$(".product-action .item-stock").html(this.offers[index].AVAILIABLE.HTML),this.incViewedCounter(),BX.onCustomEvent("onCatalogStoreProductChange",[this.offers[this.offerNum].ID]),$(this.obPict).parent().data("id",this.offers[index].ID);var arPriceItem=this.offers[index].PRICE;"Q"==this.offers[index].ITEM_PRICE_MODE&&this.offers[index].ITEM_PRICES&&this.offers[index].USE_PRICE_COUNT&&(this.offers[index].USE_PRICE_COUNT&&this.offers[index].PRICE_MATRIX&&this.checkPriceRange(this.offers[index].CONFIG.MIN_QUANTITY_BUY),(arPriceItem=this.currentPrices[this.currentPriceSelected]).DISCOUNT_VALUE=arPriceItem.PRICE,arPriceItem.PRINT_DISCOUNT_VALUE=getCurrentPrice(arPriceItem.PRICE,arPriceItem.CURRENCY,arPriceItem.PRINT_PRICE),arPriceItem.VALUE=arPriceItem.BASE_PRICE,arPriceItem.PRINT_VALUE=getCurrentPrice(arPriceItem.BASE_PRICE,arPriceItem.CURRENCY,arPriceItem.PRINT_BASE_PRICE)),setViewedProduct(this.offers[index].ID,{PRODUCT_ID:this.offers[index].PRODUCT_ID,IBLOCK_ID:this.offers[index].IBLOCK_ID,NAME:this.offers[index].NAME,DETAIL_PAGE_URL:this.offers[index].URL,PICTURE_ID:this.offers[index].PREVIEW_PICTURE?this.offers[index].PREVIEW_PICTURE.ID:this.offers[index].PARENT_PICTURE?this.offers[index].PARENT_PICTURE.ID:!!this.offers[index].SLIDER_COUNT&&this.offers[index].SLIDER[0].ID,CATALOG_MEASURE_NAME:this.offers[index].MEASURE,MIN_PRICE:arPriceItem,CAN_BUY:this.offers[index].CAN_BUY?"Y":"N",IS_OFFER:"Y",WITH_OFFERS:"N"});var obj=this.offers[index],th=$(this.obProduct),_th=this;"undefined"!=typeof arBasketAspro?this.setActualDataBlock(th,obj):void 0!==window.frameCacheVars&&BX.addCustomEvent("onFrameDataReceived",(function(){_th.setActualDataBlock(th,obj)})),th.find(".quantity_block .values").length&&th.find(".quantity_block .values .item span.value").text(this.offers[index].MAX_QUANTITY).css({opacity:"1"}),"Y"==this.offers[index].SHOW_DISCOUNT_TIME_EACH_SKU&&initCountdownTime(th,this.offers[index].DISCOUNT_ACTIVE),"Y"==arMaxOptions.THEME.CHANGE_TITLE_ITEM&&($("h1").html(this.offers[index].NAME),document.title=$("h1").html()+""+this.offers[index].POSTFIX,ItemObj.TITLE=this.offers[index].NAME,ItemObj.WINDOW_TITLE=this.offers[index].NAME+""+this.offers[index].POSTFIX),$('.catalog_detail input[data-sid="PRODUCT_NAME"]').attr("value",$("h1").text()),setTimeout((function(){setNewHeader(obj)}),200);var servWrap=$(this.obProduct).closest(".product-container").find(".buy_services_wrap");servWrap.length&&(servWrap.attr("data-parent_product",this.offers[index].ID),servWrap.find(".services-item").each((function(){var serviceItem=$(this),basketItem=arBasketAspro.SERVICES[serviceItem.attr("data-item_id")+"_"+_th.offers[index].ID];void 0!==basketItem&&basketItem.basket_id?(serviceItem.find('input[name="buy_switch_services"]').prop("checked",!0),serviceItem.find('.counter_block input[name="quantity"]').val(basketItem.quantity),serviceItem.addClass("services_on")):(serviceItem.removeClass("services_on"),serviceItem.find('input[name="buy_switch_services"]').prop("checked",!1))})))}},window.JCCatalogElement.prototype.checkPriceRange=function(quantity){if(void 0!==quantity&&"Q"==this.currentPriceMode){var range,found=!1;for(var i in this.currentQuantityRanges)if(this.currentQuantityRanges.hasOwnProperty(i)&&(range=this.currentQuantityRanges[i],parseInt(quantity)>=parseInt(range.SORT_FROM)&&("INF"==range.SORT_TO||parseInt(quantity)<=parseInt(range.SORT_TO)))){found=!0,this.currentQuantityRangeSelected=range.HASH;break}for(var k in!found&&(range=this.getMinPriceRange())&&(this.currentQuantityRangeSelected=range.HASH),this.currentPrices)if(this.currentPrices.hasOwnProperty(k)&&this.currentPrices[k].QUANTITY_HASH==this.currentQuantityRangeSelected){this.currentPriceSelected=k;break}}},window.JCCatalogElement.prototype.getMinPriceRange=function(){var range;for(var i in this.currentQuantityRanges)this.currentQuantityRanges.hasOwnProperty(i)&&(!range||parseInt(this.currentQuantityRanges[i].SORT_FROM)<parseInt(range.SORT_FROM))&&(range=this.currentQuantityRanges[i]);return range},window.JCCatalogElement.prototype.setActualDataBlock=function(th,obj){this.setLikeBlock(th,".like_icons .wish_item",obj,"DELAY"),this.setLikeBlock(th,".like_icons .compare_item",obj,"COMPARE"),this.setBuyBlock(th,obj)},window.JCCatalogElement.prototype.SetSliderPict=function(obj,slider,config){var container=$(".product-detail-gallery__slider.big"),containerThmb=$(".product-detail-gallery__slider.thmb"),slideHtml="",slideThmbHtml="";if(countPhoto=obj.SLIDER_COUNT,product=$(this.obProduct).closest(".product-container"),containerThmb.css({"max-width":Math.ceil(70*(countPhoto<=4?countPhoto:4)-10)}),slider.length){for(var i in slider)"object"==typeof slider[i]&&(slideHtml+='<div id="photo-'+i+'" class="product-detail-gallery__item product-detail-gallery__item--middle text-center" data-big="'+slider[i].BIG.src+'"><a href="'+slider[i].BIG.src+'" data-fancybox="gallery" class="product-detail-gallery__link fancy"><img class="product-detail-gallery__picture" border="0" src="'+slider[i].SMALL.src+'" alt="'+slider[i].ALT+'" title="'+slider[i].TITLE+'" /></a></div>');if(countPhoto>1)for(var i in slider)"object"==typeof slider[i]&&(slideThmbHtml+='<div class="product-detail-gallery__item product-detail-gallery__item--thmb text-center" data-big="'+slider[i].BIG.src+'"><img class="product-detail-gallery__picture" border="0" src="'+slider[i].SMALL.src+'" alt="'+slider[i].ALT+'" title="'+slider[i].TITLE+'" /></div>')}else slideHtml+='<div class="product-detail-gallery__item product-detail-gallery__item--middle text-center"><span class="product-detail-gallery__link"><img class="product-detail-gallery__picture" border="0" src="'+obj.NO_PHOTO.SRC+'" alt="'+obj.NAME+'" title="'+obj.NAME+'" /></span></div>';if(container.html(slideHtml),containerThmb.attr("data-size",countPhoto).html(slideThmbHtml),product.find(".popup_video").remove(),obj.POPUP_VIDEO&&$('<div class="video-block popup_video '+(slider.length>3?"fromtop":"")+' sm"><a class="various video_link image dark_link" href="'+obj.POPUP_VIDEO+'" title="'+BX.message("POPUP_VIDEO")+'"><span class="play text-upper font_xs">'+BX.message("POPUP_VIDEO")+"</span></a></div>").insertAfter(containerThmb),slideThmbHtml||product.find(".popup_video").addClass("only-item"),void 0!==container.data("owl.carousel")&&container.data("owl.carousel").destroy(),void 0!==containerThmb.data("owl.carousel")&&containerThmb.data("owl.carousel").destroy(),InitOwlSlider(),InitFancyBox(),"MAGNIFIER"==config.mainPictureMode){var pict="";pict=slider&&slider[0]?'<img class="product-detail-gallery__picture zoom_picture" border="0" src="'+slider[0].SMALL.src+'" alt="'+slider[0].ALT+'" title="'+slider[0].TITLE+'" data-xoriginal="'+slider[0].BIG.src+'"/>':'<img class="product-detail-gallery__picture one" border="0" src="'+obj.NO_PHOTO.SRC+'" alt="'+obj.NAME+'" title="'+obj.NAME+'" data-xoriginal2="'+obj.NO_PHOTO.SRC+'"/>',product.find(".line_link").length?product.find(".line_link").html(pict):(product.find(".product-detail-gallery__picture.one").length||product.find(".product-detail-gallery__picture.zoom_picture").length)&&product.find("#photo-sku").html(pict),InitZoomPict()}},window.JCCatalogElement.prototype.setLikeBlock=function(th,className,obj,type){var block=th;"DELAY"==type&&(obj.CAN_BUY?block.find(className+"_button").css("display","inline-block"):block.find(className+"_button").hide()),block.find(className).attr("data-item",obj.ID),arBasketAspro[type]&&(block.find(className+".to").css("display","block"),block.find(className+".in").hide(),void 0!==arBasketAspro[type][obj.ID]&&(block.find(className+".to").hide(),block.find(className+".in").css("display","block").addClass("added")))},window.JCCatalogElement.prototype.setBuyBlock=function(th,obj){var buyBlock=th.find(".offer_buy_block"),input_value=obj.CONFIG.MIN_QUANTITY_BUY;buyBlock.find(".counter_wrapp .counter_block").length&&buyBlock.find(".counter_wrapp .counter_block").attr("data-item",obj.ID),this.offers[this.offerNum].offer_set_quantity&&(input_value=this.offers[this.offerNum].offer_set_quantity);var $calculate=buyBlock.closest(".catalog_detail").find(".calculate-delivery");if($calculate.length&&($calculate.each((function(){var $calculateSpan=$(this).find("span[data-event=jqm]").first();if($calculateSpan.length){var $clone=$calculateSpan.clone();$clone.attr("data-param-product_id",obj.ID).attr("data-param-quantity",input_value).removeClass("clicked"),$clone.insertAfter($calculateSpan).on("click",(function(){jQuery.browser.mobile||$(this).parent().addClass("loadings")})),$calculateSpan.remove()}if($(this).hasClass("with_preview")){$(this).removeClass("inited"),this.timerInitCalculateDelivery&&clearTimeout(this.timerInitCalculateDelivery);var that=this;this.timerInitCalculateDelivery=setTimeout((function(){initCalculatePreview(),that.timerInitCalculateDelivery=!1}),1e3)}})),"ADD"===this.offers[this.offerNum].ACTION&&"Y"===this.offers[this.offerNum].CAN_BUY?$calculate.show():$calculate.hide()),th.find(".cheaper_form").length){var cheaper_form=th.find(".cheaper_form span");cheaper_form.data("autoload-product_name",obj.NAME),cheaper_form.data("autoload-product_id",obj.ID)}if(obj.CONFIG.OPTIONS.USE_PRODUCT_QUANTITY_DETAIL&&"ADD"==obj.CONFIG.ACTION&&obj.CAN_BUY){var max=obj.CONFIG.MAX_QUANTITY_BUY>0?"data-max='"+obj.CONFIG.MAX_QUANTITY_BUY+"'":"",counterHtml='<span class="minus dark-color"><i class="svg"><svg width="11" height="1" viewBox="0 0 11 1"><rect width="11" height="1" rx="0.5" ry="0.5"></rect></svg></i></span><input type="text" class="text" name="'+obj.PRODUCT_QUANTITY_VARIABLE+'" value="'+input_value+'" /><span class="plus dark-color" '+max+'><i class="svg"><svg width="11" height="11" viewBox="0 0 11 11"><path d="M1034.5,193H1030v4.5a0.5,0.5,0,0,1-1,0V193h-4.5a0.5,0.5,0,0,1,0-1h4.5v-4.5a0.5,0.5,0,0,1,1,0V192h4.5A0.5,0.5,0,0,1,1034.5,193Z" transform="translate(-1024 -187)"></path></svg></i></span>';arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]?buyBlock.find(".counter_wrapp .counter_block").length?buyBlock.find(".counter_wrapp .counter_block").hide():(buyBlock.find(".counter_wrapp").prepend('<div class="counter_block_inner"><div class="counter_block md" data-item="'+obj.ID+'"></div></div>'),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).hide()):buyBlock.find(".counter_wrapp .counter_block").length?(buyBlock.find(".counter_wrapp .counter_block_inner").show(),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).show()):(buyBlock.find(".counter_wrapp").prepend('<div class="counter_block_inner"><div class="counter_block md" data-item="'+obj.ID+'"></div></div>'),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml))}else buyBlock.find(".counter_wrapp .counter_block").length&&buyBlock.find(".counter_wrapp .counter_block").hide();var className="ORDER"==obj.CONFIG.ACTION||!obj.CAN_BUY||!obj.CONFIG.OPTIONS.USE_PRODUCT_QUANTITY_DETAIL||"SUBSCRIBE"==obj.CONFIG.ACTION&&"Y"==obj.CATALOG_SUBSCRIBE?"wide":"",buyBlockBtn=$('<div class="button_block"></div>');buyBlock.find(".counter_wrapp").find(".button_block").length?arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]?(buyBlock.find(".counter_wrapp").find(".button_block").addClass("wide").html(obj.HTML),markProductAddBasket(obj.ID)):className?(buyBlock.find(".counter_wrapp").find(".button_block").addClass("wide").html(obj.HTML),"undefined"!=typeof arBasketAspro&&arBasketAspro.SUBSCRIBE&&void 0!==arBasketAspro.SUBSCRIBE[obj.ID]&&markProductSubscribe(obj.ID)):buyBlock.find(".counter_wrapp").find(".button_block").removeClass("wide").html(obj.HTML):(buyBlock.find(".counter_wrapp").append('<div class="button_block '+className+'">'+obj.HTML+"</div>"),arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]&&markProductAddBasket(obj.ID),arBasketAspro.SUBSCRIBE&&void 0!==arBasketAspro.SUBSCRIBE[obj.ID]&&markProductSubscribe(obj.ID)),buyBlock.find(".wrapp-one-click").length&&buyBlock.find(".wrapp-one-click").remove(),"NOTHING"!==obj.CONFIG.ACTION?buyBlock.append(obj.ONE_CLICK_BUY_HTML):buyBlock.find(".wrapp-one-click").length&&buyBlock.find(".wrapp-one-click").remove(),buyBlock.fadeIn(),buyBlock.find(".counter_wrapp .counter_block input").data("product","ob"+this.obProduct.id),this.setPriceAction("","Y"),InitFancyBoxVideo(),"object"==typeof obMaxPredictions&&obMaxPredictions.showAll()},window.JCCatalogElement.prototype.setStoreBlock=function(id){"function"==typeof setElementStore?setElementStore("",id):void 0!==window.frameCacheVars&&BX.addCustomEvent("onFrameDataReceived",(function(json){"function"==typeof setElementStore&&setElementStore("",id)}))},window.JCCatalogElement.prototype.setQuantityStore=function(quantity,text){parseFloat(quantity)>0?$(this.storeQuanity).find(".icon").removeClass("order").addClass("stock"):$(this.storeQuanity).find(".icon").removeClass("stock").addClass("order"),$(this.storeQuanity).find(".icon + span").html(text),$(".stores_tab").length||$(".item-stock .store_view").removeClass("store_view")},window.JCCatalogElement.prototype.CompareCountResult=function(result){if(result.COMPARE_COUNT){for(var i in result.ITEMS){if(result.ITEMS[i]==this.offers[this.offerNum].ID){this.offers[this.offerNum].COMPARE_ACTIVE=!0;break}this.offers[this.offerNum].COMPARE_ACTIVE=!1}this.offers[this.offerNum].COMPARE_ACTIVE?($(this.obCompare).addClass("added"),$(this.obCompare).find(".value:not(.added)").hide(),$(this.obCompare).find(".value.added").css("display","block")):($(this.obCompare).removeClass("added"),$(this.obCompare).find(".value.added").hide(),$(this.obCompare).find(".value:not(.added)").css("display","block"))}},window.JCCatalogElement.prototype.ItemInfoResult=function(result){result.HTML&&($(this.obBasketActions).html(result.HTML),$(this.obBasketActions).show(),this.obAddToBasketBtn=BX(this.visual.BUY_ID),this.obBasketBtn=BX(this.visual.BASKET_LINK),this.obSubscribeBtn=BX(this.visual.SUBSCRIBE_ID),this.obSubscribedBtn=BX(this.visual.SUBSCRIBED_ID),BX.bind(this.obAddToBasketBtn,"click",BX.delegate(this.Add2Basket,this)),$(this.obBasketActions).removeClass("wide"),this.ajax_type_item=result.BUYMISSINGGOODS,"ADD"==result.BUYMISSINGGOODS||this.canBuy?$(this.obQuantity).css("display",""):$(this.obBasketActions).addClass("wide"),result.ONE_CLICK_HTML&&$(".wrapp_one_click").html(result.ONE_CLICK_HTML)),basketParams={ajax_action:"Y"},BX.ajax.loadJSON(arMaxOptions.SITE_DIR+"ajax/get_basket_count.php",basketParams,BX.delegate(this.BasketCountResult,this))},window.JCCatalogElement.prototype.BasketCountResult=function(result){for(var i in result.ITEMS){if(result.ITEMS[i].PRODUCT_ID==this.offers[this.offerNum].ID){this.offers[this.offerNum].BASKET_ACTIVE=!0;break}this.offers[this.offerNum].BASKET_ACTIVE=!1}for(var i in result.SUBSCRIBE_ITEMS){if(result.SUBSCRIBE_ITEMS[i].PRODUCT_ID==this.offers[this.offerNum].ID){this.offers[this.offerNum].SUBSCRIBE_ACTIVE=!0;break}this.offers[this.offerNum].SUBSCRIBE_ACTIVE=!1}this.BasketStateRefresh()},window.JCCatalogElement.prototype.BasketStateRefresh=function(buy_basket){this.offers[this.offerNum].SUBSCRIBE_ACTIVE?($(this.obBasketActions).addClass("wide"),$(this.obSubscribeBtn).hide(),$(this.obSubscribedBtn).show()):($(this.obBasketActions).addClass("wide"),$(this.obSubscribedBtn).hide(),$(this.obSubscribeBtn).show()),this.offers[this.offerNum].BASKET_ACTIVE?($(this.obAddToBasketBtn).hide(),$(this.obQuantity).closest(".counter_wrapp").find(".counter_block").hide(),$(this.obBasketBtn).show(),$(this.obBasketActions).addClass("wide")):($(this.obBasketActions).removeClass("wide"),$(this.obBasketBtn).hide(),("ADD"==this.ajax_type_item||this.canBuy)&&$(this.obQuantity).closest(".counter_wrapp").find(".counter_block").show(),$(this.obAddToBasketBtn).show()),this.canBuy||$(this.obBasketActions).addClass("wide"),this.canBuy&&$(".one_click").removeClass("hidden_block").css("opacity",1),BX.style(this.obBasketActions,"opacity","1"),$(this.obBasketActions).closest(".counter_wrapp").removeClass("hidden_block").css("opacity",1),"undefined"!==buy_basket&&"Y"==buy_basket&&($("#basket_line .basket_fly").length&&$(window).outerWidth()>768?basketFly("open"):$("#basket_line .cart").length&&($("#basket_line .cart").is(".empty_cart")&&($("#basket_line .cart").removeClass("empty_cart").find(".cart_wrapp a.basket_link").removeAttr("href").addClass("cart-call"),touchBasket(".cart:not(.empty_cart) .basket_block .link")),reloadTopBasket("add",$("#basket_line"),200,2e3,"Y")),animateBasketLine(200))},window.JCCatalogElement.prototype.setPriceAction=function(change,sku){var measure=this.offers[this.offerNum].MEASURE&&"Y"==this.offers[this.offerNum].SHOW_MEASURE?this.offers[this.offerNum].MEASURE:"",product=$(this.obProduct).closest(".product-container").find(".main_item_wrapper.middle-info-wrapper"),check_quantity="",is_sku=void 0!==sku&&"Y"==sku;if(this.offers[this.offerNum].offer_set_quantity=this.offers[this.offerNum].CONFIG.MIN_QUANTITY_BUY,$(product).find("input[name=quantity]").length&&(this.offers[this.offerNum].offer_set_quantity=$(product).find("input[name=quantity]").val()),$(product).find(".price.discount").length&&$(product).find(".price.discount").html(""),$(product).find(".sale_block:not(.matrix)").length&&$(product).find(".sale_block:not(.matrix)").html(""),this.offers[this.offerNum].USE_PRICE_COUNT&&this.offers[this.offerNum].PRICE_MATRIX?(this.checkPriceRange(this.offers[this.offerNum].offer_set_quantity),this.setPriceMatrix(this.offers[this.offerNum].PRICE_MATRIX)):"PRICES"in this.offers[this.offerNum]&&this.setPrice(this.offers[this.offerNum].PRICES,measure),"Y"==arMaxOptions.THEME.SHOW_TOTAL_SUMM){var check_quantity;if(this.offers[this.offerNum].check_quantity)check_quantity="Y";else(check_quantity=void 0!==change&&"Y"==change?change:"")&&(this.offers[this.offerNum].check_quantity=!0);void 0!==this.currentPrices[this.currentPriceSelected]&&("ALWAYS"==arMaxOptions.THEME.SHOW_TOTAL_SUMM_TYPE&&(check_quantity=is_sku=""),setPriceItem(product,this.offers[this.offerNum].offer_set_quantity,this.currentPrices[this.currentPriceSelected].PRICE,check_quantity,is_sku))}},window.JCCatalogElement.prototype.setPriceMatrix=function(sPriceMatrix){var prices="";if(this.obPrice.price){var measure=this.offers[this.offerNum].MEASURE&&"Y"==this.offers[this.offerNum].SHOW_MEASURE?this.offers[this.offerNum].MEASURE:"",product=$(this.obProduct).closest(".product-container").find(".main_item_wrapper.middle-info-wrapper"),strPrice="";strPrice=getCurrentPrice(this.currentPrices[this.currentPriceSelected].PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_PRICE),measure&&(strPrice+='<span class="price_measure">/'+measure+"</span>"),product.find(".not_matrix").hide(),product.find(".with_matrix .price_value_block").html(strPrice),this.config.showOldPrice&&parseFloat(this.currentPrices[this.currentPriceSelected].BASE_PRICE)>parseFloat(this.currentPrices[this.currentPriceSelected].PRICE)?(product.find(".with_matrix .discount").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].BASE_PRICE,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_BASE_PRICE)),product.find(".with_matrix .discount").css("display","inline-block")):(product.find(".with_matrix .discount").html(""),product.find(".with_matrix .discount").css("display","none")),this.currentPrices[this.currentPriceSelected].PERCENT>0&&this.config.showPercentNumber&&(this.currentPrices[this.currentPriceSelected].PERCENT>0&&this.currentPrices[this.currentPriceSelected].PERCENT<100?(product.find(".with_matrix .sale_block .sale_wrapper .value").length||$('<div class="value"></div>').insertBefore(product.find(".with_matrix .sale_block .sale_wrapper .text")),product.find(".with_matrix .sale_block .sale_wrapper .value").html("-<span>"+this.currentPrices[this.currentPriceSelected].PERCENT+"</span>%")):product.find(".with_matrix .sale_block .sale_wrapper .value").length&&product.find(".with_matrix .sale_block .sale_wrapper .value").remove()),product.find(".with_matrix .sale_block .text .values_wrapper").html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].DISCOUNT,this.currentPrices[this.currentPriceSelected].CURRENCY,this.currentPrices[this.currentPriceSelected].PRINT_DISCOUNT)),this.config.showPercent&&parseFloat(this.currentPrices[this.currentPriceSelected].DISCOUNT)>0?product.find(".with_matrix .sale_block").show():product.find(".with_matrix .sale_block").hide(),product.find(".with_matrix").show(),product.find(".cost .js_price_wrapper").html(this.offers[this.offerNum].PRICE_MATRIX),this.offers[this.offerNum].SHOW_POPUP_PRICE&&product.find(".cost .js_price_wrapper").append('<div class="js-show-info-block more-item-info rounded3 bordered-block text-center"><i class="svg inline  svg-inline-fw" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="8" height="2" viewBox="0 0 8 2"><path id="Ellipse_292_copy_3" data-name="Ellipse 292 copy 3" class="cls-1" d="M320,4558a1,1,0,1,1-1,1A1,1,0,0,1,320,4558Zm-3,0a1,1,0,1,1-1,1A1,1,0,0,1,317,4558Zm6,0a1,1,0,1,1-1,1A1,1,0,0,1,323,4558Z" transform="translate(-316 -4558)"></path></svg></i></div>');var eventdata={product:$(this.obProduct),measure:measure,config:this.config,offer:this.offers[this.offerNum],obPrice:this.currentPrices[this.currentPriceSelected]};BX.onCustomEvent("onAsproSkuSetPriceMatrix",[eventdata])}},window.JCCatalogElement.prototype.setPrice=function(obPrices,measure){var prices="";if(this.obPrice.price){var measure=this.offers[this.offerNum].MEASURE&&"Y"==this.offers[this.offerNum].SHOW_MEASURE?this.offers[this.offerNum].MEASURE:"",product=$(this.obProduct).closest(".product-container").find(".main_item_wrapper.middle-info-wrapper"),obPrices;if("object"==typeof(obPrices=this.offers[this.offerNum].PRICES)){product.find(".with_matrix").hide(),product.find(".cost .js_price_wrapper").html(this.offers[this.offerNum].PRICES_HTML);var eventdata={product:product,measure:measure,config:this.config,offer:this.offers[this.offerNum],obPrices:obPrices};BX.onCustomEvent("onAsproSkuSetPrice",[eventdata])}}},window.JCCatalogElement.prototype.Compare=function(){var compareParams,compareLink;if($(this.obCompare).find(".added").is(":visible")?(compareLink=this.compareData.compareUrlDel,this.compareData.Added=!1):(compareLink=this.compareData.compareUrl,this.compareData.Added=!0),compareLink){switch(this.productType){case 1:case 2:compareLink=compareLink.replace("#ID#",this.product.id.toString());break;case 3:compareLink=compareLink.replace("#ID#",this.offers[this.offerNum].ID)}compareParams={ajax_action:"Y"},BX.ajax.loadJSON(compareLink,compareParams,BX.proxy(this.CompareResult,this))}},window.JCCatalogElement.prototype.CompareResult=function(result){var popupContent,popupButtons,popupTitle;return"object"==typeof result&&("OK"===result.STATUS?(BX.onCustomEvent("OnCompareChange"),this.compareData.Added?($(this.obCompare).addClass("added"),$(this.obCompare).find(".value:not(.added)").hide(),$(this.obCompare).find(".added").css("display","block")):($(this.obCompare).removeClass("added"),$(this.obCompare).find(".added").hide(),$(this.obCompare).find(".value:not(.added)").css("display","block")),jsAjaxUtil.InsertDataToNode(arMaxOptions.SITE_DIR+"ajax/show_compare_preview_top.php","compare_line",!1)):console.log(BX.message("ADD_ERROR_COMPARE")),!1)},window.JCCatalogElement.prototype.CompareRedirect=function(){this.compareData.comparePath?location.href=this.compareData.comparePath:this.obPopupWin.close()},window.JCCatalogElement.prototype.InitBasketUrl=function(){var product_url="";switch(this.basketUrl="ADD"===this.basketMode?this.basketData.add_url:this.basketData.buy_url,this.productType){case 1:case 2:this.basketUrl=this.basketUrl.replace("#ID#",this.product.id.toString()),product_url=this.product.id.toString();break;case 3:this.basketUrl=this.basketUrl.replace("#ID#",this.offers[this.offerNum].ID),product_url=this.offers[this.offerNum].URL}this.basketParams={ajax_basket:"Y"},this.config.showQuantity&&(this.basketParams[this.basketData.quantity]=this.obQuantity.value),this.basketData.sku_props&&(this.basketParams[this.basketData.sku_props_var]=this.basketData.sku_props),product_url&&(this.basketParams.REQUEST_URI=product_url)},window.JCCatalogElement.prototype.FillBasketProps=function(){if(this.visual.BASKET_PROP_DIV){var i=0,propCollection=null,foundValues=!1,obBasketProps=null;if(this.basketData.useProps&&!this.basketData.emptyProps?this.obPopupWin&&this.obPopupWin.contentContainer&&(obBasketProps=this.obPopupWin.contentContainer):obBasketProps=BX(this.visual.BASKET_PROP_DIV),obBasketProps){if((propCollection=obBasketProps.getElementsByTagName("select"))&&propCollection.length)for(i=0;i<propCollection.length;i++)if(!propCollection[i].disabled)switch(propCollection[i].type.toLowerCase()){case"select-one":this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0}if((propCollection=obBasketProps.getElementsByTagName("input"))&&propCollection.length)for(i=0;i<propCollection.length;i++)if(!propCollection[i].disabled)switch(propCollection[i].type.toLowerCase()){case"hidden":this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0;break;case"radio":propCollection[i].checked&&(this.basketParams[propCollection[i].name]=propCollection[i].value,foundValues=!0)}}foundValues||(this.basketParams[this.basketData.props]=[],this.basketParams[this.basketData.props][0]=0)}},window.JCCatalogElement.prototype.SendToBasket=function(){this.canBuy&&(this.InitBasketUrl(),this.FillBasketProps(),BX.ajax.loadJSON(this.basketUrl,this.basketParams,BX.proxy(this.BasketResult,this)))},window.JCCatalogElement.prototype.Add2Basket=function(){this.basketMode="ADD",this.Basket()},window.JCCatalogElement.prototype.BuyBasket=function(){this.basketMode="BUY",this.Basket()},window.JCCatalogElement.prototype.Basket=function(){var contentBasketProps="";this.canBuy&&this.SendToBasket()},window.JCCatalogElement.prototype.BasketResult=function(arResult){var popupContent,popupButtons,popupTitle,productPict;return this.obPopupWin&&this.obPopupWin.close(),"object"==typeof arResult&&("OK"===arResult.STATUS&&"BUY"===this.basketMode?this.BasketRedirect():(popupTitle={content:BX.create("div",{style:{marginRight:"30px",whiteSpace:"nowrap"},text:"OK"===arResult.STATUS?BX.message("TITLE_SUCCESSFUL"):BX.message("TITLE_ERROR")})},"OK"===arResult.STATUS?(BX.onCustomEvent("OnBasketChange"),this.offers[this.offerNum].BASKET_ACTIVE=!0,this.BasketStateRefresh("Y")):console.log(BX.message("ADD_ERROR_BASKET"))),!1)},window.JCCatalogElement.prototype.BasketRedirect=function(){location.href=this.basketData.basketUrl?this.basketData.basketUrl:BX.message("BASKET_URL")},window.JCCatalogElement.prototype.InitPopupWindow=function(){this.obPopupWin||(this.obPopupWin=BX.PopupWindowManager.create("CatalogElementBasket_"+this.visual.ID,null,{autoHide:!1,offsetLeft:0,offsetTop:0,overlay:!0,closeByEsc:!0,titleBar:!0,closeIcon:{top:"10px",right:"10px"}}))},window.JCCatalogElement.prototype.onPopupWindowShow=function(popup){BX.bind(document,"click",BX.proxy(this.popupWindowClick,this))},window.JCCatalogElement.prototype.onPopupWindowClose=function(popup,event){BX.unbind(document,"click",BX.proxy(this.popupWindowClick,this))},window.JCCatalogElement.prototype.popupWindowClick=function(){this.obPopupPict&&"object"==typeof this.obPopupPict&&this.obPopupPict.isShown()&&this.obPopupPict.close()},window.JCCatalogElement.prototype.incViewedCounter=function(){if(this.currentIsSet&&!this.updateViewedCount){switch(this.productType){case 1:case 2:this.viewedCounter.params.PRODUCT_ID=this.product.id,this.viewedCounter.params.PARENT_ID=this.product.id;break;case 3:this.viewedCounter.params.PARENT_ID=this.product.id,this.viewedCounter.params.PRODUCT_ID=this.offers[this.offerNum].ID;break;default:return}this.viewedCounter.params.SITE_ID=BX.message("SITE_ID"),this.updateViewedCount=!0,BX.ajax.post(this.viewedCounter.path,this.viewedCounter.params,BX.delegate((function(){this.updateViewedCount=!1}),this))}},window.JCCatalogElement.prototype.allowViewedCount=function(update){update=!!update,this.currentIsSet=!0,update&&this.incViewedCounter()}}}(window);
/* End */
;
; /* Start:"a:4:{s:4:"full";s:103:"/bitrix/templates/aspro_max/components/bitrix/sale.gift.main.products/main/script.min.js?17299549783522";s:6:"source";s:84:"/bitrix/templates/aspro_max/components/bitrix/sale.gift.main.products/main/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
BX.namespace("BX.Sale"),BX.Sale.GiftMainProductsClass=function(){var t=function(t){this.ajaxUrl="/bitrix/components/bitrix/sale.gift.main.products/ajax.php",this.contextAjaxData=t.contextAjaxData||{},this.mainProductState=t.mainProductState||null,this.injectId=t.injectId||null,this.isGift=!!t.isGift,this.productId=t.productId,this.offerId=t.offerId,this.offers=t.offers||[],this.setEvents(),document.location.hash.match(/as_gift/g)&&(this.isGift?this.enableGift():this.raiseNonGiftEvent()),BX.bindDelegate(BX(this.injectId),"click",{tagName:"a"},BX.proxy(this.clickNavLink,this))};return t.prototype.clickNavLink=function(t){if(this.onPageNavigationByLink(BX.proxy_context))return BX.PreventDefault(t)},t.prototype.setEvents=function(){BX.addCustomEvent("onCatalogStoreProductChange",BX.proxy(this.onCatalogStoreProductChange,this)),BX.addCustomEvent("onAddToBasketMainProduct",BX.proxy(this.onAddToBasketMainProduct,this))},t.prototype.unsubscribeEvents=function(){BX.removeCustomEvent("onCatalogStoreProductChange",BX.proxy(this.onCatalogStoreProductChange,this))},t.prototype.onAddToBasketMainProduct=function(t){this.enableGift()},t.prototype.onCatalogStoreProductChange=function(e){e!=this.offerId&&$(this.injectId).length&&BX.ajax({url:this.ajaxUrl,method:"POST",data:BX.merge(this.contextAjaxData,{offerId:e,mainProductState:this.mainProductState,SITE_ID:BX.message("SITE_ID")}),dataType:"html",processData:!1,start:!0,onsuccess:BX.delegate(function(t){this.offerId=e;var i=BX.processHTML(t);i.HTML?(this.unsubscribeEvents(),BX(this.injectId).innerHTML=i.HTML,BX.ajax.processScripts(i.SCRIPT)):document.location.hash.match(/as_gift/g)&&(this.isGift?this.raiseGiftEvent():this.raiseNonGiftEvent())},this)})},t.prototype.onPageNavigationByLink=function(t){return!!BX.delegate(function(t){return!(!BX.type.isElementNode(t)||!t.href)&&(0<=t.href.indexOf(this.ajaxUrl)||-1!==t.href.indexOf("PAGEN_"))},this)(t)&&(BX.ajax({url:t.href,method:"POST",data:BX.merge(this.contextAjaxData,{SITE_ID:BX.message("SITE_ID")}),dataType:"html",processData:!1,start:!0,onsuccess:BX.delegate(function(t){var i=BX.processHTML(t);i.HTML&&(this.unsubscribeEvents(),BX(this.injectId).innerHTML=i.HTML,BX.ajax.processScripts(i.SCRIPT))},this)}),!0)},t.prototype.enableGift=function(){this.isGift=!0,this.raiseGiftEvent()},t.prototype.raiseGiftEvent=function(){BX.onCustomEvent("onSaleProductIsGift",[this.productId,this.offerId])},t.prototype.raiseNonGiftEvent=function(){BX.onCustomEvent("onSaleProductIsNotGift",[this.productId,this.offerId])},t}(),BX.addCustomEvent("onSliderInitialized",function(t){try{ignoreResize.push(!0),t&&$(t.slider.currentTarget).closest(".bx_sale_gift_main_products").length&&($(".bx_sale_gift_main_products .catalog_block .catalog_item .item_info .item-title").sliceHeight({item:".bx_sale_gift_main_products .catalog_item:not(.big)",mobile:!0,autoslicecount:!1,slice:999}),$(".bx_sale_gift_main_products .catalog_block .catalog_item .item_info .sa_block").sliceHeight({item:".bx_sale_gift_main_products .catalog_item:not(.big)",mobile:!0,autoslicecount:!1,slice:999}),$(".bx_sale_gift_main_products .catalog_block .catalog_item .item_info .cost.prices").sliceHeight({item:".bx_sale_gift_main_products .catalog_item:not(.big)",mobile:!0,autoslicecount:!1,slice:999}),$(".bx_sale_gift_main_products .catalog_block .catalog_item").sliceHeight({classNull:".footer_button",item:".bx_sale_gift_main_products .catalog_item:not(.big)",mobile:!0,autoslicecount:!1,slice:999}))}catch(t){}finally{ignoreResize.pop()}});
/* End */
;
; /* Start:"a:4:{s:4:"full";s:105:"/bitrix/templates/aspro_max/components/bitrix/catalog.bigdata.products/main/script.min.js?172995497823267";s:6:"source";s:85:"/bitrix/templates/aspro_max/components/bitrix/catalog.bigdata.products/main/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
function getCookie(t){var s=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return s?decodeURIComponent(s[1]):void 0}function bx_rcm_recommendation_event_attaching(t){return null}function bx_rcm_adaptive_recommendation_event_attaching(t,s){var e=function(s){var e,i=BX(this);for(e in t)if(t[e].productUrl==i.getAttribute("href")){window.JCCatalogBigdataProducts.prototype.RememberProductRecommendation(t[e].recommendationId,t[e].productId);break}},i=BX(s);i||(i=document.body);var o,a=BX.findChildren(i,{tag:"a"},!0);if(a)for(o in a)BX.bind(a[o],"click",e)}function bx_rcm_get_from_cloud(t,s,e){var i="https://analytics.bitrix.info/crecoms/v1_0/recoms.php",o=BX.ajax.prepareData(s);o&&(i+=(-1!==i.indexOf("?")?"&":"?")+o);var a=function(s){s.items||(s.items=[]),BX.ajax({url:"/bitrix/components/bitrix/catalog.bigdata.products/ajax.php?"+BX.ajax.prepareData({AJAX_ITEMS:s.items,RID:s.id}),method:"POST",data:e,dataType:"html",processData:!1,start:!0,onsuccess:function(s){var e=BX.processHTML(s);BX(t).innerHTML=e.HTML,BX.ajax.processScripts(e.SCRIPT),InitOwlSlider(),InitLazyLoad(),void 0!==window.stickySidebar&&window.stickySidebar.updateSticky()}})};BX.ajax({method:"GET",dataType:"json",url:i,timeout:3,onsuccess:a,onfailure:a})}(function(t){if(!t.JCCatalogBigdataProducts){var s=function(t){s.superclass.constructor.apply(this,arguments),this.nameNode=BX.create("span",{props:{className:"bx_medium bx_bt_button",id:this.id},text:t.text}),this.buttonNode=BX.create("span",{attrs:{className:t.ownerClass},style:{marginBottom:"0",borderBottom:"0 none transparent"},children:[this.nameNode],events:this.contextEvents}),BX.browser.IsIE()&&this.buttonNode.setAttribute("hideFocus","hidefocus")};BX.extend(s,BX.PopupWindowButton),t.JCCatalogBigdataProducts=function(t){if(this.productType=0,this.showQuantity=!0,this.showAbsent=!0,this.secondPict=!1,this.showOldPrice=!1,this.showPercent=!1,this.showSkuProps=!1,this.visual={ID:"",PICT_ID:"",SECOND_PICT_ID:"",QUANTITY_ID:"",QUANTITY_UP_ID:"",QUANTITY_DOWN_ID:"",PRICE_ID:"",DSC_PERC:"",SECOND_DSC_PERC:"",DISPLAY_PROP_DIV:"",BASKET_PROP_DIV:""},this.product={checkQuantity:!1,maxQuantity:0,stepQuantity:1,isDblQuantity:!1,canBuy:!0,canSubscription:!0,name:"",pict:{},id:0,addUrl:"",buyUrl:""},this.basketData={useProps:!1,emptyProps:!1,quantity:"quantity",props:"prop",basketUrl:""},this.defaultPict={pict:null,secondPict:null},this.checkQuantity=!1,this.maxQuantity=0,this.stepQuantity=1,this.isDblQuantity=!1,this.canBuy=!0,this.canSubscription=!0,this.precision=6,this.precisionFactor=Math.pow(10,this.precision),this.offers=[],this.offerNum=0,this.treeProps=[],this.obTreeRows=[],this.showCount=[],this.showStart=[],this.selectedValues={},this.obProduct=null,this.obQuantity=null,this.obQuantityUp=null,this.obQuantityDown=null,this.obPict=null,this.obSecondPict=null,this.obPrice=null,this.obTree=null,this.obBuyBtn=null,this.obDscPerc=null,this.obSecondDscPerc=null,this.obSkuProps=null,this.obMeasure=null,this.obPopupWin=null,this.basketUrl="",this.basketParams={},this.treeRowShowSize=5,this.treeEnableArrow={display:"",cursor:"pointer",opacity:1},this.treeDisableArrow={display:"",cursor:"default",opacity:.2},this.lastElement=!1,this.containerHeight=0,this.errorCode=0,"object"==typeof t){switch(this.productType=parseInt(t.PRODUCT_TYPE,10),this.showQuantity=t.SHOW_QUANTITY,this.showAbsent=t.SHOW_ABSENT,this.secondPict=!!t.SECOND_PICT,this.showOldPrice=!!t.SHOW_OLD_PRICE,this.showPercent=!!t.SHOW_DISCOUNT_PERCENT,this.showSkuProps=!!t.SHOW_SKU_PROPS,this.visual=t.VISUAL,this.productType){case 1:case 2:t.PRODUCT&&"object"==typeof t.PRODUCT?(this.showQuantity&&(this.product.checkQuantity=t.PRODUCT.CHECK_QUANTITY,this.product.isDblQuantity=t.PRODUCT.QUANTITY_FLOAT,this.product.checkQuantity&&(this.product.maxQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.MAX_QUANTITY):parseInt(t.PRODUCT.MAX_QUANTITY,10)),this.product.stepQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.STEP_QUANTITY):parseInt(t.PRODUCT.STEP_QUANTITY,10),this.checkQuantity=this.product.checkQuantity,this.isDblQuantity=this.product.isDblQuantity,this.maxQuantity=this.product.maxQuantity,this.stepQuantity=this.product.stepQuantity,this.isDblQuantity&&(this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor)),this.product.canBuy=t.PRODUCT.CAN_BUY,this.product.canSubscription=t.PRODUCT.SUBSCRIPTION,this.canBuy=this.product.canBuy,this.canSubscription=this.product.canSubscription,this.product.name=t.PRODUCT.NAME,this.product.pict=t.PRODUCT.PICT,this.product.id=t.PRODUCT.ID,t.PRODUCT.ADD_URL&&(this.product.addUrl=t.PRODUCT.ADD_URL),t.PRODUCT.BUY_URL&&(this.product.buyUrl=t.PRODUCT.BUY_URL),t.BASKET&&"object"==typeof t.BASKET&&(this.basketData.useProps=!!t.BASKET.ADD_PROPS,this.basketData.emptyProps=!!t.BASKET.EMPTY_PROPS)):this.errorCode=-1;break;case 3:t.OFFERS&&BX.type.isArray(t.OFFERS)?(t.PRODUCT&&"object"==typeof t.PRODUCT&&(this.product.name=t.PRODUCT.NAME,this.product.id=t.PRODUCT.ID),this.offers=t.OFFERS,this.offerNum=0,t.OFFER_SELECTED&&(this.offerNum=parseInt(t.OFFER_SELECTED,10)),isNaN(this.offerNum)&&(this.offerNum=0),t.TREE_PROPS&&(this.treeProps=t.TREE_PROPS),t.DEFAULT_PICTURE&&(this.defaultPict.pict=t.DEFAULT_PICTURE.PICTURE,this.defaultPict.secondPict=t.DEFAULT_PICTURE.PICTURE_SECOND)):this.errorCode=-1;break;default:this.errorCode=-1}t.BASKET&&"object"==typeof t.BASKET&&(t.BASKET.QUANTITY&&(this.basketData.quantity=t.BASKET.QUANTITY),t.BASKET.PROPS&&(this.basketData.props=t.BASKET.PROPS),t.BASKET.BASKET_URL&&(this.basketData.basketUrl=t.BASKET.BASKET_URL)),this.lastElement=!!t.LAST_ELEMENT&&"Y"===t.LAST_ELEMENT}0===this.errorCode&&BX.ready(BX.delegate(this.Init,this))},t.JCCatalogBigdataProducts.prototype.Init=function(){var s=0,e="",i=null;if(this.obProduct=BX(this.visual.ID),this.obProduct||(this.errorCode=-1),this.obPict=BX(this.visual.PICT_ID),this.obPict||(this.errorCode=-2),this.secondPict&&this.visual.SECOND_PICT_ID&&(this.obSecondPict=BX(this.visual.SECOND_PICT_ID)),this.obPrice=BX(this.visual.PRICE_ID),this.obPrice||(this.errorCode=-16),this.showQuantity&&this.visual.QUANTITY_ID&&(this.obQuantity=BX(this.visual.QUANTITY_ID),this.visual.QUANTITY_UP_ID&&(this.obQuantityUp=BX(this.visual.QUANTITY_UP_ID)),this.visual.QUANTITY_DOWN_ID&&(this.obQuantityDown=BX(this.visual.QUANTITY_DOWN_ID))),3===this.productType){if(this.visual.TREE_ID)for(this.obTree=BX(this.visual.TREE_ID),this.obTree||(this.errorCode=-256),e=this.visual.TREE_ITEM_ID,s=0;s<this.treeProps.length;s++)if(this.obTreeRows[s]={LEFT:BX(e+this.treeProps[s].ID+"_left"),RIGHT:BX(e+this.treeProps[s].ID+"_right"),LIST:BX(e+this.treeProps[s].ID+"_list"),CONT:BX(e+this.treeProps[s].ID+"_cont")},!(this.obTreeRows[s].LEFT&&this.obTreeRows[s].RIGHT&&this.obTreeRows[s].LIST&&this.obTreeRows[s].CONT)){this.errorCode=-512;break}this.visual.QUANTITY_MEASURE&&(this.obMeasure=BX(this.visual.QUANTITY_MEASURE))}if(this.visual.BUY_ID&&(this.obBuyBtn=BX(this.visual.BUY_ID)),this.showPercent&&(this.visual.DSC_PERC&&(this.obDscPerc=BX(this.visual.DSC_PERC)),this.secondPict&&this.visual.SECOND_DSC_PERC&&(this.obSecondDscPerc=BX(this.visual.SECOND_DSC_PERC))),this.showSkuProps&&this.visual.DISPLAY_PROP_DIV&&(this.obSkuProps=BX(this.visual.DISPLAY_PROP_DIV)),0===this.errorCode){switch(this.showQuantity&&(this.obQuantityUp&&BX.bind(this.obQuantityUp,"click",BX.delegate(this.QuantityUp,this)),this.obQuantityDown&&BX.bind(this.obQuantityDown,"click",BX.delegate(this.QuantityDown,this)),this.obQuantity&&BX.bind(this.obQuantity,"change",BX.delegate(this.QuantityChange,this))),this.productType){case 1:break;case 3:if(i=BX.findChildren(this.obTree,{tagName:"li"},!0),i&&0<i.length)for(s=0;s<i.length;s++)BX.bind(i[s],"click",BX.delegate(this.SelectOfferProp,this));for(s=0;s<this.obTreeRows.length;s++)BX.bind(this.obTreeRows[s].LEFT,"click",BX.delegate(this.RowLeft,this)),BX.bind(this.obTreeRows[s].RIGHT,"click",BX.delegate(this.RowRight,this));this.SetCurrent()}this.obBuyBtn&&BX.bind(this.obBuyBtn,"click",BX.delegate(this.Basket,this)),this.lastElement&&(this.containerHeight=parseInt(this.obProduct.parentNode.offsetHeight,10),isNaN(this.containerHeight)&&(this.containerHeight=0),this.setHeight(),BX.bind(t,"resize",BX.delegate(this.checkHeight,this)),BX.bind(this.obProduct.parentNode,"mouseover",BX.delegate(this.setHeight,this)),BX.bind(this.obProduct.parentNode,"mouseout",BX.delegate(this.clearHeight,this)))}},t.JCCatalogBigdataProducts.prototype.checkHeight=function(){this.containerHeight=parseInt(this.obProduct.parentNode.offsetHeight,10),isNaN(this.containerHeight)&&(this.containerHeight=0)},t.JCCatalogBigdataProducts.prototype.setHeight=function(){0<this.containerHeight&&BX.adjust(this.obProduct.parentNode,{style:{height:this.containerHeight+"px"}})},t.JCCatalogBigdataProducts.prototype.clearHeight=function(){BX.adjust(this.obProduct.parentNode,{style:{height:"auto"}})},t.JCCatalogBigdataProducts.prototype.QuantityUp=function(){var t=0,s=!0;0===this.errorCode&&this.showQuantity&&this.canBuy&&(t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(t)||(t+=this.stepQuantity,this.checkQuantity&&t>this.maxQuantity&&(s=!1),s&&(this.isDblQuantity&&(t=Math.round(t*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=t)))},t.JCCatalogBigdataProducts.prototype.QuantityDown=function(){var t=0,s=!0;0===this.errorCode&&this.showQuantity&&this.canBuy&&(t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(t)||(t-=this.stepQuantity,t<this.stepQuantity&&(s=!1),s&&(this.isDblQuantity&&(t=Math.round(t*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=t)))},t.JCCatalogBigdataProducts.prototype.QuantityChange=function(){var t=0,s=!0;0===this.errorCode&&this.showQuantity&&(this.canBuy?(t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(t)?this.obQuantity.value=this.stepQuantity:(this.checkQuantity&&(t>this.maxQuantity?(s=!1,t=this.maxQuantity):t<this.stepQuantity&&(s=!1,t=this.stepQuantity)),s||(this.obQuantity.value=t))):this.obQuantity.value=this.stepQuantity)},t.JCCatalogBigdataProducts.prototype.QuantitySet=function(t){0===this.errorCode&&(this.canBuy=this.offers[t].CAN_BUY,this.canBuy?(BX.addClass(this.obBuyBtn,"bx_bt_button"),BX.removeClass(this.obBuyBtn,"bx_bt_button_type_2"),this.obBuyBtn.innerHTML=BX.message("CBD_MESS_BTN_BUY")):(BX.addClass(this.obBuyBtn,"bx_bt_button_type_2"),BX.removeClass(this.obBuyBtn,"bx_bt_button"),this.obBuyBtn.innerHTML=BX.message("CBD_MESS_NOT_AVAILABLE")),this.showQuantity&&(this.isDblQuantity=this.offers[t].QUANTITY_FLOAT,this.checkQuantity=this.offers[t].CHECK_QUANTITY,this.isDblQuantity?(this.maxQuantity=parseFloat(this.offers[t].MAX_QUANTITY),this.stepQuantity=Math.round(parseFloat(this.offers[t].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor):(this.maxQuantity=parseInt(this.offers[t].MAX_QUANTITY,10),this.stepQuantity=parseInt(this.offers[t].STEP_QUANTITY,10)),this.obQuantity.value=this.stepQuantity,this.obQuantity.disabled=!this.canBuy,this.obMeasure&&(this.offers[t].MEASURE?BX.adjust(this.obMeasure,{html:this.offers[t].MEASURE}):BX.adjust(this.obMeasure,{html:""}))))},t.JCCatalogBigdataProducts.prototype.SelectOfferProp=function(){var t=0,s="",e="",i=[],o=null,a=BX.proxy_context;if(a&&a.hasAttribute("data-treevalue")&&(e=a.getAttribute("data-treevalue"),i=e.split("_"),this.SearchOfferPropIndex(i[0],i[1])&&(o=BX.findChildren(a.parentNode,{tagName:"li"},!1),o&&0<o.length)))for(t=0;t<o.length;t++)s=o[t].getAttribute("data-onevalue"),s===i[1]?BX.addClass(o[t],"bx_active"):BX.removeClass(o[t],"bx_active")},t.JCCatalogBigdataProducts.prototype.SearchOfferPropIndex=function(t,s){var e,i,o="",a=!1,r=[],h=-1,n={},u=[];for(e=0;e<this.treeProps.length;e++)if(this.treeProps[e].ID===t){h=e;break}if(-1<h){for(e=0;e<h;e++)o="PROP_"+this.treeProps[e].ID,n[o]=this.selectedValues[o];if(o="PROP_"+this.treeProps[h].ID,a=this.GetRowValues(n,o),!a)return!1;if(!BX.util.in_array(s,a))return!1;for(n[o]=s,e=h+1;e<this.treeProps.length;e++){if(o="PROP_"+this.treeProps[e].ID,a=this.GetRowValues(n,o),!a)return!1;if(this.showAbsent)for(r=[],u=[],u=BX.clone(n,!0),i=0;i<a.length;i++)u[o]=a[i],this.GetCanBuy(u)&&(r[r.length]=a[i]);else r=a;this.selectedValues[o]&&BX.util.in_array(this.selectedValues[o],r)?n[o]=this.selectedValues[o]:n[o]=r[0],this.UpdateRow(e,n[o],a,r)}this.selectedValues=n,this.ChangeInfo()}return!0},t.JCCatalogBigdataProducts.prototype.RowLeft=function(){var t=0,s="",e=-1,i=BX.proxy_context;if(i&&i.hasAttribute("data-treevalue")){for(s=i.getAttribute("data-treevalue"),t=0;t<this.treeProps.length;t++)if(this.treeProps[t].ID===s){e=t;break}-1<e&&this.treeRowShowSize<this.showCount[e]&&(0>this.showStart[e]&&(this.showStart[e]++,BX.adjust(this.obTreeRows[e].LIST,{style:{marginLeft:20*this.showStart[e]+"%"}}),BX.adjust(this.obTreeRows[e].RIGHT,{style:this.treeEnableArrow})),0<=this.showStart[e]&&BX.adjust(this.obTreeRows[e].LEFT,{style:this.treeDisableArrow}))}},t.JCCatalogBigdataProducts.prototype.RowRight=function(){var t=0,s="",e=-1,i=BX.proxy_context;if(i&&i.hasAttribute("data-treevalue")){for(s=i.getAttribute("data-treevalue"),t=0;t<this.treeProps.length;t++)if(this.treeProps[t].ID===s){e=t;break}-1<e&&this.treeRowShowSize<this.showCount[e]&&(this.treeRowShowSize-this.showStart[e]<this.showCount[e]&&(this.showStart[e]--,BX.adjust(this.obTreeRows[e].LIST,{style:{marginLeft:20*this.showStart[e]+"%"}}),BX.adjust(this.obTreeRows[e].LEFT,{style:this.treeEnableArrow})),this.treeRowShowSize-this.showStart[e]>=this.showCount[e]&&BX.adjust(this.obTreeRows[e].RIGHT,{style:this.treeDisableArrow}))}},t.JCCatalogBigdataProducts.prototype.UpdateRow=function(t,s,e,i){var o=0,a=0,r="",h=0,n="",u={},c=!1,l=!1,d=!1,p=0,P=this.treeEnableArrow,b=this.treeEnableArrow,B=0,f=null;if(-1<t&&t<this.obTreeRows.length&&(f=BX.findChildren(this.obTreeRows[t].LIST,{tagName:"li"},!1),f&&0<f.length)){for(c="PICT"===this.treeProps[t].SHOW_MODE,h=e.length,l=this.treeRowShowSize<h,n=l?100/h+"%":"20%",u={props:{className:""},style:{width:n}},c&&(u.style.paddingTop=n),o=0;o<f.length;o++)r=f[o].getAttribute("data-onevalue"),d=r===s,BX.util.in_array(r,i)?u.props.className=d?"bx_active":"":u.props.className=d?"bx_active bx_missing":"bx_missing",u.style.display="none",BX.util.in_array(r,e)&&(u.style.display="",d&&(p=a),a++),BX.adjust(f[o],u);u={style:{width:(l?20*h:100)+"%",marginLeft:"0%"}},c?BX.adjust(this.obTreeRows[t].CONT,{props:{className:l?"bx_item_detail_scu full":"bx_item_detail_scu"}}):BX.adjust(this.obTreeRows[t].CONT,{props:{className:l?"bx_item_detail_size full":"bx_item_detail_size"}}),l?(p+1===h&&(b=this.treeDisableArrow),this.treeRowShowSize<=p&&(B=this.treeRowShowSize-p-1,u.style.marginLeft=20*B+"%"),0===B&&(P=this.treeDisableArrow),BX.adjust(this.obTreeRows[t].LEFT,{style:P}),BX.adjust(this.obTreeRows[t].RIGHT,{style:b})):(BX.adjust(this.obTreeRows[t].LEFT,{style:{display:"none"}}),BX.adjust(this.obTreeRows[t].RIGHT,{style:{display:"none"}})),BX.adjust(this.obTreeRows[t].LIST,u),this.showCount[t]=h,this.showStart[t]=B}},t.JCCatalogBigdataProducts.prototype.GetRowValues=function(t,s){var e,i=0,o=[],a=!1,r=!0;if(0===t.length){for(i=0;i<this.offers.length;i++)BX.util.in_array(this.offers[i].TREE[s],o)||(o[o.length]=this.offers[i].TREE[s]);a=!0}else for(i=0;i<this.offers.length;i++){for(e in r=!0,t)if(t[e]!==this.offers[i].TREE[e]){r=!1;break}r&&(BX.util.in_array(this.offers[i].TREE[s],o)||(o[o.length]=this.offers[i].TREE[s]),a=!0)}return!!a&&o},t.JCCatalogBigdataProducts.prototype.GetCanBuy=function(t){var s,e=0,i=!1,o=!0;for(e=0;e<this.offers.length;e++){for(s in o=!0,t)if(t[s]!==this.offers[e].TREE[s]){o=!1;break}if(o&&this.offers[e].CAN_BUY){i=!0;break}}return i},t.JCCatalogBigdataProducts.prototype.SetCurrent=function(){var t=0,s=0,e=[],i="",o=!1,a={},r=[],h=this.offers[this.offerNum].TREE;for(t=0;t<this.treeProps.length&&(i="PROP_"+this.treeProps[t].ID,o=this.GetRowValues(a,i),o);t++){if(BX.util.in_array(h[i],o)?a[i]=h[i]:(a[i]=o[0],this.offerNum=0),this.showAbsent)for(e=[],r=[],r=BX.clone(a,!0),s=0;s<o.length;s++)r[i]=o[s],this.GetCanBuy(r)&&(e[e.length]=o[s]);else e=o;this.UpdateRow(t,a[i],o,e)}this.selectedValues=a,this.ChangeInfo()},t.JCCatalogBigdataProducts.prototype.ChangeInfo=function(){var t,s=0,e=-1,i={},o=!0,a="";for(s=0;s<this.offers.length;s++){for(t in o=!0,this.selectedValues)if(this.selectedValues[t]!==this.offers[s].TREE[t]){o=!1;break}if(o){e=s;break}}-1<e&&(this.obPict&&(this.offers[e].PREVIEW_PICTURE?BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.offers[e].PREVIEW_PICTURE.SRC+")"}}):BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})),this.secondPict&&this.obSecondPict&&(this.offers[e].PREVIEW_PICTURE_SECOND?BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[e].PREVIEW_PICTURE_SECOND.SRC+")"}}):this.offers[e].PREVIEW_PICTURE.SRC?BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[e].PREVIEW_PICTURE.SRC+")"}}):this.defaultPict.secondPict?BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.secondPict.SRC+")"}}):BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})),this.showSkuProps&&this.obSkuProps&&(0===this.offers[e].DISPLAY_PROPERTIES.length?BX.adjust(this.obSkuProps,{style:{display:"none"},html:""}):BX.adjust(this.obSkuProps,{style:{display:""},html:this.offers[e].DISPLAY_PROPERTIES})),this.obPrice&&(a=this.offers[e].PRICE.PRINT_DISCOUNT_VALUE,this.showOldPrice&&this.offers[e].PRICE.DISCOUNT_VALUE!==this.offers[e].PRICE.VALUE&&(a+=" <span>"+this.offers[e].PRICE.PRINT_VALUE+"</span>"),BX.adjust(this.obPrice,{html:a}),this.showPercent&&(i=this.offers[e].PRICE.DISCOUNT_VALUE!==this.offers[e].PRICE.VALUE?{style:{display:""},html:this.offers[e].PRICE.DISCOUNT_DIFF_PERCENT}:{style:{display:"none"},html:""},this.obDscPerc&&BX.adjust(this.obDscPerc,i),this.obSecondDscPerc&&BX.adjust(this.obSecondDscPerc,i))),this.offerNum=e,this.QuantitySet(this.offerNum))},t.JCCatalogBigdataProducts.prototype.InitBasketUrl=function(){switch(this.productType){case 1:case 2:this.basketUrl=this.product.addUrl;break;case 3:this.basketUrl=this.offers[this.offerNum].ADD_URL}this.basketParams={ajax_basket:"Y",rcm:"yes"},this.showQuantity&&(this.basketParams[this.basketData.quantity]=this.obQuantity.value)},t.JCCatalogBigdataProducts.prototype.FillBasketProps=function(){if(this.visual.BASKET_PROP_DIV){var t=0,s=null,e=!1,i=null;if(this.basketData.useProps&&!this.basketData.emptyProps?this.obPopupWin&&this.obPopupWin.contentContainer&&(i=this.obPopupWin.contentContainer):i=BX(this.visual.BASKET_PROP_DIV),i){if(s=i.getElementsByTagName("select"),s&&s.length)for(t=0;t<s.length;t++)if(!s[t].disabled)switch(s[t].type.toLowerCase()){case"select-one":this.basketParams[s[t].name]=s[t].value,e=!0}if(s=i.getElementsByTagName("input"),s&&s.length)for(t=0;t<s.length;t++)if(!s[t].disabled)switch(s[t].type.toLowerCase()){case"hidden":this.basketParams[s[t].name]=s[t].value,e=!0;break;case"radio":s[t].checked&&(this.basketParams[s[t].name]=s[t].value,e=!0)}e||(this.basketParams[this.basketData.props]=[],this.basketParams[this.basketData.props][0]=0)}}},t.JCCatalogBigdataProducts.prototype.SendToBasket=function(){this.canBuy&&(this.InitBasketUrl(),this.FillBasketProps(),this.product&&this.product.id&&JCCatalogBigdataProducts.productsByRecommendation&&JCCatalogBigdataProducts.productsByRecommendation[this.product.id]&&this.RememberProductRecommendation(JCCatalogBigdataProducts.productsByRecommendation[this.product.id],this.product.id),BX.ajax({method:"POST",dataType:"json",url:this.basketUrl,data:this.basketParams,onsuccess:BX.delegate(this.BasketResult,this)}))},t.JCCatalogBigdataProducts.prototype.RememberRecommendation=function(t,s){var e=BX.findParent(t,{className:"bigdata_recommended_products_items"}),i=BX.findChild(e,{attr:{name:"bigdata_recommendation_id"}},!0).value;this.RememberProductRecommendation(i,s)},t.JCCatalogBigdataProducts.prototype.RememberProductRecommendation=function(t,s){var e,i=BX.cookie_prefix+"_RCM_PRODUCT_LOG",o=getCookie(i),a=!1,r=[];o&&(r=o.split("."));for(var h=r.length;h--;)e=r[h].split("-"),e[0]==s?(e=r[h].split("-"),e[1]=t,e[2]=BX.current_server_time,r[h]=e.join("-"),a=!0):BX.current_server_time-e[2]>2592e3&&r.splice(h,1);a||r.push([s,t,BX.current_server_time].join("-"));var n=r.join("."),u=new Date((new Date).getTime()+31536e7);document.cookie=i+"="+n+"; path=/; expires="+u.toUTCString()+"; domain="+BX.cookie_domain},t.JCCatalogBigdataProducts.prototype.Basket=function(){var t="";if(this.canBuy)switch(this.productType){case 1:case 2:this.basketData.useProps&&!this.basketData.emptyProps?(this.InitPopupWindow(),this.obPopupWin.setTitleBar({content:BX.create("div",{style:{marginRight:"30px",whiteSpace:"nowrap"},text:BX.message("CBD_TITLE_BASKET_PROPS")})}),BX(this.visual.BASKET_PROP_DIV)&&(t=BX(this.visual.BASKET_PROP_DIV).innerHTML),this.obPopupWin.setContent(t),this.obPopupWin.setButtons([new s({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CBD_BTN_MESSAGE_SEND_PROPS"),events:{click:BX.delegate(this.SendToBasket,this)}})]),this.obPopupWin.show()):this.SendToBasket();break;case 3:this.SendToBasket()}},t.JCCatalogBigdataProducts.prototype.BasketResult=function(t){var e="",i="",o="",a=!0,r=[];if(this.obPopupWin&&this.obPopupWin.close(),"object"!=typeof t)return!1;if(a="OK"===t.STATUS,a){switch(BX.onCustomEvent("OnBasketChange"),i=this.product.name,this.productType){case 1:case 2:o=this.product.pict.SRC;break;case 3:o=this.offers[this.offerNum].PREVIEW_PICTURE?this.offers[this.offerNum].PREVIEW_PICTURE.SRC:this.defaultPict.pict.SRC}e='<div style="width: 96%; margin: 10px 2%; text-align: center;"><img src="'+o+'" height="130" style="max-height:130px"><p>'+i+"</p></div>",r=[new s({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CBD_BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate(function(){location.href=this.basketData.basketUrl?this.basketData.basketUrl:BX.message("CBD_BASKET_URL")},this)}})]}else e=t.MESSAGE?t.MESSAGE:BX.message("CBD_BASKET_UNKNOWN_ERROR"),r=[new s({ownerClass:this.obProduct.parentNode.parentNode.parentNode.className,text:BX.message("CBD_BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})];this.InitPopupWindow(),this.obPopupWin.setTitleBar({content:BX.create("div",{style:{marginRight:"30px",whiteSpace:"nowrap"},text:a?BX.message("CBD_TITLE_SUCCESSFUL"):BX.message("CBD_TITLE_ERROR")})}),this.obPopupWin.setContent(e),this.obPopupWin.setButtons(r),this.obPopupWin.show()},t.JCCatalogBigdataProducts.prototype.InitPopupWindow=function(){this.obPopupWin||(this.obPopupWin=BX.PopupWindowManager.create("CatalogSectionBasket_"+this.visual.ID,null,{autoHide:!1,offsetLeft:0,offsetTop:0,overlay:!0,closeByEsc:!0,titleBar:!0,closeIcon:{top:"10px",right:"10px"}}))}}})(window),BX.addCustomEvent("onSlideInit",function(t){try{if(ignoreResize.push(!0),t){var s=t.slider;s&&s.hasClass("bigdata_recommended_products_items")&&setHeightBlockSlider()}}catch(t){}finally{ignoreResize.pop()}});
/* End */
;
; /* Start:"a:4:{s:4:"full";s:64:"/bitrix/templates/aspro_max/js/jquery.history.js?172995497821571";s:6:"source";s:48:"/bitrix/templates/aspro_max/js/jquery.history.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
window.JSON||(window.JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var JSON=window.JSON,cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a,b){"use strict";var c=a.History=a.History||{},d=a.jQuery;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b,c){d(a).trigger(b,c)},extractEventData:function(a,c,d){var e=c&&c.originalEvent&&c.originalEvent[a]||d&&d[a]||b;return e},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()}(window),function(a,b){"use strict";var c=a.document,d=a.setTimeout||d,e=a.clearTimeout||e,f=a.setInterval||f,g=a.History=a.History||{};if(typeof g.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");g.initHtml4=function(){if(typeof g.initHtml4.initialized!="undefined")return!1;g.initHtml4.initialized=!0,g.enabled=!0,g.savedHashes=[],g.isLastHash=function(a){var b=g.getHashByIndex(),c;return c=a===b,c},g.saveHash=function(a){return g.isLastHash(a)?!1:(g.savedHashes.push(a),!0)},g.getHashByIndex=function(a){var b=null;return typeof a=="undefined"?b=g.savedHashes[g.savedHashes.length-1]:a<0?b=g.savedHashes[g.savedHashes.length+a]:b=g.savedHashes[a],b},g.discardedHashes={},g.discardedStates={},g.discardState=function(a,b,c){var d=g.getHashByState(a),e;return e={discardedState:a,backState:c,forwardState:b},g.discardedStates[d]=e,!0},g.discardHash=function(a,b,c){var d={discardedHash:a,backState:c,forwardState:b};return g.discardedHashes[a]=d,!0},g.discardedState=function(a){var b=g.getHashByState(a),c;return c=g.discardedStates[b]||!1,c},g.discardedHash=function(a){var b=g.discardedHashes[a]||!1;return b},g.recycleState=function(a){var b=g.getHashByState(a);return g.discardedState(a)&&delete g.discardedStates[b],!0},g.emulated.hashChange&&(g.hashChangeInit=function(){g.checkerFunction=null;var b="",d,e,h,i;return g.isInternetExplorer()?(d="historyjs-iframe",e=c.createElement("iframe"),e.setAttribute("id",d),e.style.display="none",c.body.appendChild(e),e.contentWindow.document.open(),e.contentWindow.document.close(),h="",i=!1,g.checkerFunction=function(){if(i)return!1;i=!0;var c=g.getHash()||"",d=g.unescapeHash(e.contentWindow.document.location.hash)||"";return c!==b?(b=c,d!==c&&(h=d=c,e.contentWindow.document.open(),e.contentWindow.document.close(),e.contentWindow.document.location.hash=g.escapeHash(c)),g.Adapter.trigger(a,"hashchange")):d!==h&&(h=d,g.setHash(d,!1)),i=!1,!0}):g.checkerFunction=function(){var c=g.getHash();return c!==b&&(b=c,g.Adapter.trigger(a,"hashchange")),!0},g.intervalList.push(f(g.checkerFunction,g.options.hashChangeInterval)),!0},g.Adapter.onDomLoad(g.hashChangeInit)),g.emulated.pushState&&(g.onHashChange=function(b){var d=b&&b.newURL||c.location.href,e=g.getHashByUrl(d),f=null,h=null,i=null,j;return g.isLastHash(e)?(g.busy(!1),!1):(g.doubleCheckComplete(),g.saveHash(e),e&&g.isTraditionalAnchor(e)?(g.Adapter.trigger(a,"anchorchange"),g.busy(!1),!1):(f=g.extractState(g.getFullUrl(e||c.location.href,!1),!0),g.isLastSavedState(f)?(g.busy(!1),!1):(h=g.getHashByState(f),j=g.discardedState(f),j?(g.getHashByIndex(-2)===g.getHashByState(j.forwardState)?g.back(!1):g.forward(!1),!1):(g.pushState(f.data,f.title,f.url,!1),!0))))},g.Adapter.bind(a,"hashchange",g.onHashChange),g.pushState=function(b,d,e,f){if(g.getHashByUrl(e))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&g.busy())return g.pushQueue({scope:g,callback:g.pushState,args:arguments,queue:f}),!1;g.busy(!0);var h=g.createStateObject(b,d,e),i=g.getHashByState(h),j=g.getState(!1),k=g.getHashByState(j),l=g.getHash();return g.storeState(h),g.expectedStateId=h.id,g.recycleState(h),g.setTitle(h),i===k?(g.busy(!1),!1):i!==l&&i!==g.getShortUrl(c.location.href)?(g.setHash(i,!1),!1):(g.saveState(h),g.Adapter.trigger(a,"statechange"),g.busy(!1),!0)},g.replaceState=function(a,b,c,d){if(g.getHashByUrl(c))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(d!==!1&&g.busy())return g.pushQueue({scope:g,callback:g.replaceState,args:arguments,queue:d}),!1;g.busy(!0);var e=g.createStateObject(a,b,c),f=g.getState(!1),h=g.getStateByIndex(-2);return g.discardState(f,e,h),g.pushState(e.data,e.title,e.url,!1),!0}),g.emulated.pushState&&g.getHash()&&!g.emulated.hashChange&&g.Adapter.onDomLoad(function(){g.Adapter.trigger(a,"hashchange")})},typeof g.init!="undefined"&&g.init()}(window),function(a,b){"use strict";var c=a.console||b,d=a.document,e=a.navigator,f=a.sessionStorage||!1,g=a.setTimeout,h=a.clearTimeout,i=a.setInterval,j=a.clearInterval,k=a.JSON,l=a.alert,m=a.History=a.History||{},n=a.history;k.stringify=k.stringify||k.encode,k.parse=k.parse||k.decode;if(typeof m.init!="undefined")throw new Error("History.js Core has already been loaded...");m.init=function(){return typeof m.Adapter=="undefined"?!1:(typeof m.initCore!="undefined"&&m.initCore(),typeof m.initHtml4!="undefined"&&m.initHtml4(),!0)},m.initCore=function(){if(typeof m.initCore.initialized!="undefined")return!1;m.initCore.initialized=!0,m.options=m.options||{},m.options.hashChangeInterval=m.options.hashChangeInterval||100,m.options.safariPollInterval=m.options.safariPollInterval||500,m.options.doubleCheckInterval=m.options.doubleCheckInterval||500,m.options.storeInterval=m.options.storeInterval||1e3,m.options.busyDelay=m.options.busyDelay||250,m.options.debug=m.options.debug||!1,m.options.initialTitle=m.options.initialTitle||d.title,m.intervalList=[],m.clearAllIntervals=function(){var a,b=m.intervalList;if(typeof b!="undefined"&&b!==null){for(a=0;a<b.length;a++)j(b[a]);m.intervalList=null}},m.debug=function(){(m.options.debug||!1)&&m.log.apply(m,arguments)},m.log=function(){var a=typeof c!="undefined"&&typeof c.log!="undefined"&&typeof c.log.apply!="undefined",b=d.getElementById("log"),e,f,g,h,i;a?(h=Array.prototype.slice.call(arguments),e=h.shift(),typeof c.debug!="undefined"?c.debug.apply(c,[e,h]):c.log.apply(c,[e,h])):e="\n"+arguments[0]+"\n";for(f=1,g=arguments.length;f<g;++f){i=arguments[f];if(typeof i=="object"&&typeof k!="undefined")try{i=k.stringify(i)}catch(j){}e+="\n"+i+"\n"}return b?(b.value+=e+"\n-----\n",b.scrollTop=b.scrollHeight-b.clientHeight):a||l(e),!0},m.getInternetExplorerMajorVersion=function(){var a=m.getInternetExplorerMajorVersion.cached=typeof m.getInternetExplorerMajorVersion.cached!="undefined"?m.getInternetExplorerMajorVersion.cached:function(){var a=3,b=d.createElement("div"),c=b.getElementsByTagName("i");while((b.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c[0]);return a>4?a:!1}();return a},m.isInternetExplorer=function(){var a=m.isInternetExplorer.cached=typeof m.isInternetExplorer.cached!="undefined"?m.isInternetExplorer.cached:Boolean(m.getInternetExplorerMajorVersion());return a},m.emulated={pushState:!Boolean(a.history&&a.history.pushState&&a.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(e.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(e.userAgent)),hashChange:Boolean(!("onhashchange"in a||"onhashchange"in d)||m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<8)},m.enabled=!m.emulated.pushState,m.bugs={setHash:Boolean(!m.emulated.pushState&&e.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(e.userAgent)),safariPoll:Boolean(!m.emulated.pushState&&e.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(e.userAgent)),ieDoubleCheck:Boolean(m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(m.isInternetExplorer()&&m.getInternetExplorerMajorVersion()<7)},m.isEmptyObject=function(a){for(var b in a)return!1;return!0},m.cloneObject=function(a){var b,c;return a?(b=k.stringify(a),c=k.parse(b)):c={},c},m.getRootUrl=function(){var a=d.location.protocol+"//"+(d.location.hostname||d.location.host);if(d.location.port||!1)a+=":"+d.location.port;return a+="/",a},m.getBaseHref=function(){var a=d.getElementsByTagName("base"),b=null,c="";return a.length===1&&(b=a[0],c=b.href.replace(/[^\/]+$/,"")),c=c.replace(/\/+$/,""),c&&(c+="/"),c},m.getBaseUrl=function(){var a=m.getBaseHref()||m.getBasePageUrl()||m.getRootUrl();return a},m.getPageUrl=function(){var a=m.getState(!1,!1),b=(a||{}).url||d.location.href,c;return c=b.replace(/\/+$/,"").replace(/[^\/]+$/,function(a,b,c){return/\./.test(a)?a:a+"/"}),c},m.getBasePageUrl=function(){var a=d.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(a,b,c){return/[^\/]$/.test(a)?"":a}).replace(/\/+$/,"")+"/";return a},m.getFullUrl=function(a,b){var c=a,d=a.substring(0,1);return b=typeof b=="undefined"?!0:b,/[a-z]+\:\/\//.test(a)||(d==="/"?c=m.getRootUrl()+a.replace(/^\/+/,""):d==="#"?c=m.getPageUrl().replace(/#.*/,"")+a:d==="?"?c=m.getPageUrl().replace(/[\?#].*/,"")+a:b?c=m.getBaseUrl()+a.replace(/^(\.\/)+/,""):c=m.getBasePageUrl()+a.replace(/^(\.\/)+/,"")),c.replace(/\#$/,"")},m.getShortUrl=function(a){var b=a,c=m.getBaseUrl(),d=m.getRootUrl();return m.emulated.pushState&&(b=b.replace(c,"")),b=b.replace(d,"/"),m.isTraditionalAnchor(b)&&(b="./"+b),b=b.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),b},m.store={},m.idToState=m.idToState||{},m.stateToId=m.stateToId||{},m.urlToId=m.urlToId||{},m.storedStates=m.storedStates||[],m.savedStates=m.savedStates||[],m.normalizeStore=function(){m.store.idToState=m.store.idToState||{},m.store.urlToId=m.store.urlToId||{},m.store.stateToId=m.store.stateToId||{}},m.getState=function(a,b){typeof a=="undefined"&&(a=!0),typeof b=="undefined"&&(b=!0);var c=m.getLastSavedState();return!c&&b&&(c=m.createStateObject()),a&&(c=m.cloneObject(c),c.url=c.cleanUrl||c.url),c},m.getIdByState=function(a){var b=m.extractId(a.url),c;if(!b){c=m.getStateString(a);if(typeof m.stateToId[c]!="undefined")b=m.stateToId[c];else if(typeof m.store.stateToId[c]!="undefined")b=m.store.stateToId[c];else{for(;;){b=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof m.idToState[b]=="undefined"&&typeof m.store.idToState[b]=="undefined")break}m.stateToId[c]=b,m.idToState[b]=a}}return b},m.normalizeState=function(a){var b,c;if(!a||typeof a!="object")a={};if(typeof a.normalized!="undefined")return a;if(!a.data||typeof a.data!="object")a.data={};b={},b.normalized=!0,b.title=a.title||"",b.url=m.getFullUrl(m.unescapeString(a.url||d.location.href)),b.hash=m.getShortUrl(b.url),b.data=m.cloneObject(a.data),b.id=m.getIdByState(b),b.cleanUrl=b.url.replace(/\??\&_suid.*/,""),b.url=b.cleanUrl,c=!m.isEmptyObject(b.data);if(b.title||c)b.hash=m.getShortUrl(b.url).replace(/\??\&_suid.*/,""),/\?/.test(b.hash)||(b.hash+="?"),b.hash+="&_suid="+b.id;return b.hashedUrl=m.getFullUrl(b.hash),(m.emulated.pushState||m.bugs.safariPoll)&&m.hasUrlDuplicate(b)&&(b.url=b.hashedUrl),b},m.createStateObject=function(a,b,c){var d={data:a,title:b,url:c};return d=m.normalizeState(d),d},m.getStateById=function(a){a=String(a);var c=m.idToState[a]||m.store.idToState[a]||b;return c},m.getStateString=function(a){var b,c,d;return b=m.normalizeState(a),c={data:b.data,title:a.title,url:a.url},d=k.stringify(c),d},m.getStateId=function(a){var b,c;return b=m.normalizeState(a),c=b.id,c},m.getHashByState=function(a){var b,c;return b=m.normalizeState(a),c=b.hash,c},m.extractId=function(a){var b,c,d;return c=/(.*)\&_suid=([0-9]+)$/.exec(a),d=c?c[1]||a:a,b=c?String(c[2]||""):"",b||!1},m.isTraditionalAnchor=function(a){var b=!/[\/\?\.]/.test(a);return b},m.extractState=function(a,b){var c=null,d,e;return b=b||!1,d=m.extractId(a),d&&(c=m.getStateById(d)),c||(e=m.getFullUrl(a),d=m.getIdByUrl(e)||!1,d&&(c=m.getStateById(d)),!c&&b&&!m.isTraditionalAnchor(a)&&(c=m.createStateObject(null,null,e))),c},m.getIdByUrl=function(a){var c=m.urlToId[a]||m.store.urlToId[a]||b;return c},m.getLastSavedState=function(){return m.savedStates[m.savedStates.length-1]||b},m.getLastStoredState=function(){return m.storedStates[m.storedStates.length-1]||b},m.hasUrlDuplicate=function(a){var b=!1,c;return c=m.extractState(a.url),b=c&&c.id!==a.id,b},m.storeState=function(a){return m.urlToId[a.url]=a.id,m.storedStates.push(m.cloneObject(a)),a},m.isLastSavedState=function(a){var b=!1,c,d,e;return m.savedStates.length&&(c=a.id,d=m.getLastSavedState(),e=d.id,b=c===e),b},m.saveState=function(a){return m.isLastSavedState(a)?!1:(m.savedStates.push(m.cloneObject(a)),!0)},m.getStateByIndex=function(a){var b=null;return typeof a=="undefined"?b=m.savedStates[m.savedStates.length-1]:a<0?b=m.savedStates[m.savedStates.length+a]:b=m.savedStates[a],b},m.getHash=function(){var a=m.unescapeHash(d.location.hash);return a},m.unescapeString=function(b){var c=b,d;for(;;){d=a.unescape(c);if(d===c)break;c=d}return c},m.unescapeHash=function(a){var b=m.normalizeHash(a);return b=m.unescapeString(b),b},m.normalizeHash=function(a){var b=a.replace(/[^#]*#/,"").replace(/#.*/,"");return b},m.setHash=function(a,b){var c,e,f;return b!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.setHash,args:arguments,queue:b}),!1):(c=m.escapeHash(a),m.busy(!0),e=m.extractState(a,!0),e&&!m.emulated.pushState?m.pushState(e.data,e.title,e.url,!1):d.location.hash!==c&&(m.bugs.setHash?(f=m.getPageUrl(),m.pushState(null,null,f+"#"+c,!1)):d.location.hash=c),m)},m.escapeHash=function(b){var c=m.normalizeHash(b);return c=a.escape(c),m.bugs.hashEscape||(c=c.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),c},m.getHashByUrl=function(a){var b=String(a).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return b=m.unescapeHash(b),b},m.setTitle=function(a){var b=a.title,c;b||(c=m.getStateByIndex(0),c&&c.url===a.url&&(b=c.title||m.options.initialTitle));try{d.getElementsByTagName("title")[0].innerHTML=b.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(e){}return d.title=b,m},m.queues=[],m.busy=function(a){typeof a!="undefined"?m.busy.flag=a:typeof m.busy.flag=="undefined"&&(m.busy.flag=!1);if(!m.busy.flag){h(m.busy.timeout);var b=function(){var a,c,d;if(m.busy.flag)return;for(a=m.queues.length-1;a>=0;--a){c=m.queues[a];if(c.length===0)continue;d=c.shift(),m.fireQueueItem(d),m.busy.timeout=g(b,m.options.busyDelay)}};m.busy.timeout=g(b,m.options.busyDelay)}return m.busy.flag},m.busy.flag=!1,m.fireQueueItem=function(a){return a.callback.apply(a.scope||m,a.args||[])},m.pushQueue=function(a){return m.queues[a.queue||0]=m.queues[a.queue||0]||[],m.queues[a.queue||0].push(a),m},m.queue=function(a,b){return typeof a=="function"&&(a={callback:a}),typeof b!="undefined"&&(a.queue=b),m.busy()?m.pushQueue(a):m.fireQueueItem(a),m},m.clearQueue=function(){return m.busy.flag=!1,m.queues=[],m},m.stateChanged=!1,m.doubleChecker=!1,m.doubleCheckComplete=function(){return m.stateChanged=!0,m.doubleCheckClear(),m},m.doubleCheckClear=function(){return m.doubleChecker&&(h(m.doubleChecker),m.doubleChecker=!1),m},m.doubleCheck=function(a){return m.stateChanged=!1,m.doubleCheckClear(),m.bugs.ieDoubleCheck&&(m.doubleChecker=g(function(){return m.doubleCheckClear(),m.stateChanged||a(),!0},m.options.doubleCheckInterval)),m},m.safariStatePoll=function(){var b=m.extractState(d.location.href),c;if(!m.isLastSavedState(b))c=b;else return;return c||(c=m.createStateObject()),m.Adapter.trigger(a,"popstate"),m},m.back=function(a){return a!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.back,args:arguments,queue:a}),!1):(m.busy(!0),m.doubleCheck(function(){m.back(!1)}),n.go(-1),!0)},m.forward=function(a){return a!==!1&&m.busy()?(m.pushQueue({scope:m,callback:m.forward,args:arguments,queue:a}),!1):(m.busy(!0),m.doubleCheck(function(){m.forward(!1)}),n.go(1),!0)},m.go=function(a,b){var c;if(a>0)for(c=1;c<=a;++c)m.forward(b);else{if(!(a<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(c=-1;c>=a;--c)m.back(b)}return m};if(m.emulated.pushState){var o=function(){};m.pushState=m.pushState||o,m.replaceState=m.replaceState||o}else m.onPopState=function(b,c){var e=!1,f=!1,g,h;return m.doubleCheckComplete(),g=m.getHash(),g?(h=m.extractState(g||d.location.href,!0),h?m.replaceState(h.data,h.title,h.url,!1):(m.Adapter.trigger(a,"anchorchange"),m.busy(!1)),m.expectedStateId=!1,!1):(e=m.Adapter.extractEventData("state",b,c)||!1,e?f=m.getStateById(e):m.expectedStateId?f=m.getStateById(m.expectedStateId):f=m.extractState(d.location.href),f||(f=m.createStateObject(null,null,d.location.href)),m.expectedStateId=!1,m.isLastSavedState(f)?(m.busy(!1),!1):(m.storeState(f),m.saveState(f),m.setTitle(f),m.Adapter.trigger(a,"statechange"),m.busy(!1),!0))},m.Adapter.bind(a,"popstate",m.onPopState),m.pushState=function(b,c,d,e){if(m.getHashByUrl(d)&&m.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(e!==!1&&m.busy())return m.pushQueue({scope:m,callback:m.pushState,args:arguments,queue:e}),!1;m.busy(!0);var f=m.createStateObject(b,c,d);return m.isLastSavedState(f)?m.busy(!1):(m.storeState(f),m.expectedStateId=f.id,n.pushState(f.id,f.title,f.url),m.Adapter.trigger(a,"popstate")),!0},m.replaceState=function(b,c,d,e){if(m.getHashByUrl(d)&&m.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(e!==!1&&m.busy())return m.pushQueue({scope:m,callback:m.replaceState,args:arguments,queue:e}),!1;m.busy(!0);var f=m.createStateObject(b,c,d);return m.isLastSavedState(f)?m.busy(!1):(m.storeState(f),m.expectedStateId=f.id,n.replaceState(f.id,f.title,f.url),m.Adapter.trigger(a,"popstate")),!0};if(f){try{m.store=k.parse(f.getItem("History.store"))||{}}catch(p){m.store={}}m.normalizeStore()}else m.store={},m.normalizeStore();m.Adapter.bind(a,"beforeunload",m.clearAllIntervals),m.Adapter.bind(a,"unload",m.clearAllIntervals),m.saveState(m.storeState(m.extractState(d.location.href,!0))),f&&(m.onUnload=function(){var a,b;try{a=k.parse(f.getItem("History.store"))||{}}catch(c){a={}}a.idToState=a.idToState||{},a.urlToId=a.urlToId||{},a.stateToId=a.stateToId||{};for(b in m.idToState){if(!m.idToState.hasOwnProperty(b))continue;a.idToState[b]=m.idToState[b]}for(b in m.urlToId){if(!m.urlToId.hasOwnProperty(b))continue;a.urlToId[b]=m.urlToId[b]}for(b in m.stateToId){if(!m.stateToId.hasOwnProperty(b))continue;a.stateToId[b]=m.stateToId[b]}m.store=a,m.normalizeStore(),f.setItem("History.store",k.stringify(a))},m.intervalList.push(i(m.onUnload,m.options.storeInterval)),m.Adapter.bind(a,"beforeunload",m.onUnload),m.Adapter.bind(a,"unload",m.onUnload));if(!m.emulated.pushState){m.bugs.safariPoll&&m.intervalList.push(i(m.safariStatePoll,m.options.safariPollInterval));if(e.vendor==="Apple Computer, Inc."||(e.appCodeName||"")==="Mozilla")m.Adapter.bind(a,"hashchange",function(){m.Adapter.trigger(a,"popstate")}),m.getHash()&&m.Adapter.onDomLoad(function(){m.Adapter.trigger(a,"hashchange")})}},m.init()}(window)
/* End */
;; /* /bitrix/templates/aspro_max/components/bitrix/catalog/main/script.min.js?172995497812625*/
; /* /bitrix/templates/aspro_max/components/bitrix/catalog.element/main4/script.min.js?172995497889155*/
; /* /bitrix/templates/aspro_max/components/bitrix/sale.gift.main.products/main/script.min.js?17299549783522*/
; /* /bitrix/templates/aspro_max/components/bitrix/catalog.bigdata.products/main/script.min.js?172995497823267*/
; /* /bitrix/templates/aspro_max/js/jquery.history.js?172995497821571*/
