; /* Start:"a:4:{s:4:"full";s:107:"/bitrix/templates/aspro_mshop/components/bitrix/catalog.section/catalog_block/script.min.js?169205190646193";s:6:"source";s:87:"/bitrix/templates/aspro_mshop/components/bitrix/catalog.section/catalog_block/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ var fRand=function(){return Math.floor(arguments.length>1?1e6*Math.random()+0:1*Math.random())},waitForFinalEvent=function(){var timers={};return function(callback,ms,uniqueId){uniqueId||(uniqueId=fRand()),timers[uniqueId]&&clearTimeout(timers[uniqueId]),timers[uniqueId]=setTimeout(callback,ms)}}();!function(window){window.JCCatalogSectionOnlyElement||(window.JCCatalogSectionOnlyElement=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.JCCatalogSectionOnlyElement.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)),$(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 .sale_block .value span").html(this.currentPrices[this.currentPriceSelected].PERCENT),$(this.obProduct).find(".with_matrix").show(),"N"!=arMShopOptions.THEME.SHOW_TOTAL_SUMM&&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)-1)return $thisObProduct.find("a").attr("onclick",onclickAction),!1}))}},window.JCCatalogSection.prototype.checkHeight=function(){this.containerHeight=parseInt(this.obProduct.parentNode.offsetHeight,10),isNaN(this.containerHeight)&&(this.containerHeight=0)},window.JCCatalogSection.prototype.setHeight=function(){0this.maxQuantity&&(boolSet=!1),boolSet&&(this.isDblQuantity&&(curValue=Math.round(curValue*this.precisionFactor)/this.precisionFactor),this.obQuantity.value=curValue)))},window.JCCatalogSection.prototype.QuantityDown=function(){var curValue=0,boolSet=!0,calcPrice;0===this.errorCode&&this.showQuantity&&this.canBuy&&(curValue=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10),isNaN(curValue)||((curValue-=this.stepQuantity)this.maxQuantity&&(curValue=this.maxQuantity),curValueintCount&&(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.JCCatalogSection.prototype.QuantitySet=function(index){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.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.obQuantity&&(this.obQuantity.value=this.defaultCount,this.obQuantity.disabled=!this.canBuy),this.obMeasure&&(this.offers[index].MEASURE?BX.adjust(this.obMeasure,{html:this.offers[index].MEASURE}):BX.adjust(this.obMeasure,{html:""}))),this.currentBasisPrice=this.offers[index].BASIS_PRICE)},window.JCCatalogSection.prototype.SelectOfferProp=function(){var i=0,value="",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 a").attr("href",this.offers[this.offerNum].URL),$(this.obProduct).find(".quantity_block .values").length&&$(this.obProduct).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($(this.obProduct),this.offers[index].DISCOUNT_ACTIVE);var obj=this.offers[index],th=$(this.obProduct).closest(".catalog_item_wrapp"),_th=this;void 0!==type&&(this.init_type=type),"undefined"!=typeof arBasketAspro?this.setActualDataBlock(th,obj):void 0!==window.frameCacheVars&&BX.addCustomEvent("onFrameDataReceived",(function(){_th.setActualDataBlock(th,obj)})),this.setPriceAction("","Y")}},window.JCCatalogSection.prototype.setActualDataBlock=function(th,obj){this.setLikeBlock(th,".like_icons .wish_item_button",obj,"DELAY"),this.setLikeBlock(th,".like_icons .compare_item_button",obj,"COMPARE"),this.setBuyBlock(th,obj),this.ajaxMode&&this.setAjaxModeAttrOnclick(th,"a",obj)},window.JCCatalogSection.prototype.setAjaxModeAttrOnclick=function(th,className,obj){var _th=this,block,element;th.find(className).each((function(){var attrOnclick=$(this).attr("onclick");if(void 0!==attrOnclick){var urlElement=_th.url,attrHref=$(this).attr("href"),numberStartToStartString=attrOnclick.indexOf(urlElement);startString=attrOnclick.substring(0,numberStartToStartString),numberStartToEndString=attrOnclick.indexOf("bxajaxid"),endString=attrOnclick.substring(numberStartToEndString,attrOnclick.length),newAttrOnclick=startString+attrHref+"&"+endString,$(this).attr("onclick",newAttrOnclick)}}))},window.JCCatalogSection.prototype.setLikeBlock=function(th,className,obj,type){var block=th;"DELAY"==type&&(obj.CAN_BUY&&"ADD"===obj.CONFIG.ACTION?block.find(className).css("display","block"):block.find(className).hide()),block.find(className).attr("data-item",obj.ID),block.find(className).find("span").attr("data-item",obj.ID),arBasketAspro[type]&&(block.find(className).find(".to").removeClass("added").css("display","block"),block.find(className).find(".in").hide(),void 0!==arBasketAspro[type][obj.ID]&&(block.find(className).find(".to").hide(),block.find(className).find(".in").css("display","block")))},window.JCCatalogSection.prototype.setBuyBlock=function(th,obj){var buyBlock=th.find(".offer_buy_block"),input_value=obj.CONFIG.MIN_QUANTITY_BUY;if(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),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='-+";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('
'),buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).hide()):buyBlock.find(".counter_wrapp .counter_block").length?buyBlock.find(".counter_wrapp .counter_block").html(counterHtml).show():(buyBlock.find(".counter_wrapp").prepend('
'),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=$('
');if(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),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('
'+obj.HTML+"
"),arBasketAspro.BASKET&&void 0!==arBasketAspro.BASKET[obj.ID]&&markProductAddBasket(obj.ID),arBasketAspro.SUBSCRIBE&&void 0!==arBasketAspro.SUBSCRIBE[obj.ID]&&markProductSubscribe(obj.ID)),"NOTHING"!==obj.CONFIG.ACTION)if("ADD"==obj.CONFIG.ACTION&&obj.CAN_BUY&&"N"!=obj.SHOW_ONE_CLICK_BUY){var ocb=''+obj.ONE_CLICK_BUY+"";buyBlock.find(".wrapp_one_click").length?buyBlock.find(".wrapp_one_click").html(ocb):buyBlock.append('
'+ocb+"
")}else buyBlock.find(".wrapp_one_click").length&&buyBlock.find(".wrapp_one_click").remove();else 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),"Y"==arMShopOptions.THEME.CHANGE_TITLE_ITEM&&$(this.obProduct).find(".item-title a").text(obj.NAME),"init_type"in this&&"click"==this.init_type&&$(window).resize()},window.JCCatalogSection.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).find(".compare_item.to").hide(),$(this.obCompare).find(".compare_item.added").show()):($(this.obCompare).find(".compare_item.added").hide(),$(this.obCompare).find(".compare_item.to").show())}},window.JCCatalogSection.prototype.ItemInfoResult=function(result){result.HTML&&($(this.obBasketActions).html(result.HTML),$(this.obBasketActions).show(),this.obBuyBtn=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.obBuyBtn,"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")),basketParams={ajax_action:"Y"},BX.ajax.loadJSON(arMShopOptions.SITE_DIR+"ajax/get_basket_count.php",basketParams,BX.delegate(this.BasketCountResult,this))},window.JCCatalogSection.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.JCCatalogSection.prototype.BasketStateRefresh=function(buy_basket){this.offers[this.offerNum].SUBSCRIBE_ACTIVE?($(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .to-subscribe").hide(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .in-subscribe").show()):($(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .to-subscribe").show(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .in-subscribe").hide()),this.offers[this.offerNum].BASKET_ACTIVE?($(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID).addClass("wide"),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .button_block").addClass("wide"),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .to-cart").hide(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .in-cart").show(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .counter_block").hide()):($(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID).removeClass("wide"),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .button_block").removeClass("wide"),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .to-cart").show(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .in-cart").hide(),$(this.obProduct).find(".hover_block .o_"+this.offers[this.offerNum].ID+" .counter_block").show()),BX.style(this.obBasketActions,"opacity","1"),$(this.obBasketActions).closest(".counter_wrapp").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.JCCatalogSection.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),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()),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.offers[this.offerNum].PRICES&&this.setPrice(this.offers[this.offerNum].PRICES,measure),"N"!=arMShopOptions.THEME.SHOW_TOTAL_SUMM){var check_quantity;if("ALWAYS"==arMShopOptions.THEME.SHOW_TOTAL_SUMM&&(this.offers[this.offerNum].check_quantity=!0),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]&&setPriceItem(product,this.offers[this.offerNum].offer_set_quantity,this.currentPrices[this.currentPriceSelected].PRICE,check_quantity,is_sku)}},window.JCCatalogSection.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.JCCatalogSection.prototype.getMinPriceRange=function(){var range;for(var i in this.currentQuantityRanges)this.currentQuantityRanges.hasOwnProperty(i)&&(!range||parseInt(this.currentQuantityRanges[i].SORT_FROM)/'+measure+""),$(this.obProduct).find(".not_matrix").hide(),$(this.obProduct).find(".with_matrix .price_value_block").html(strPrice),this.showOldPrice&&parseFloat(this.currentPrices[this.currentPriceSelected].BASE_PRICE)>parseFloat(this.currentPrices[this.currentPriceSelected].PRICE)?($(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)),$(this.obProduct).find(".with_matrix .discount").css("display","inline-block")):($(this.obProduct).find(".with_matrix .discount").html(""),$(this.obProduct).find(".with_matrix .discount").css("display","none")),this.currentPrices[this.currentPriceSelected].PERCENT>0?($(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 .sale_block .value span").html(this.currentPrices[this.currentPriceSelected].PERCENT),$(this.obProduct).find(".with_matrix .sale_block").show()):$(this.obProduct).find(".with_matrix .sale_block").hide(),$(this.obProduct).find(".sale_block.normal").hide(),$(this.obProduct).find(".with_matrix").show(),BX.adjust(this.obPrice,{html:sPriceMatrix});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.JCCatalogSection.prototype.setPrice=function(change,sku,obPrices,measure,product,offer){var strPrice,obData;if(this.obPrice){var measure=this.offers[this.offerNum].MEASURE&&"Y"==this.offers[this.offerNum].SHOW_MEASURE?this.offers[this.offerNum].MEASURE:"",product=$(this.obProduct),obPrices,check_quantity="",is_sku=void 0!==sku&&"Y"==sku;if("object"==typeof(obPrices=this.offers[this.offerNum].PRICES)){var strPrice="",count=Object.keys(obPrices).length;for(var j in strPrice='
',$(this.obProduct).find(".with_matrix").hide(),$(this.obProduct).find(".not_matrix").show(),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()),obPrices)obPrices[j]&&("GROUP_NAME"in obPrices[j]&&count>1&&(strPrice+='
',strPrice+=obPrices[j].GROUP_NAME,strPrice+="
"),strPrice+='
',strPrice+=''+getCurrentPrice(obPrices[j].DISCOUNT_VALUE,obPrices[j].CURRENCY,obPrices[j].PRINT_DISCOUNT_VALUE)+"",measure&&(strPrice+='/'+measure+""),strPrice+="
",obPrices[j].DISCOUNT_VALUE!==obPrices[j].VALUE&&(this.showOldPrice&&(strPrice+='
',strPrice+=''+getCurrentPrice(obPrices[j].VALUE,obPrices[j].CURRENCY,obPrices[j].PRINT_VALUE)+"",strPrice+="
"),this.showPercent&&(strPrice+='
',obPrices[j].DISCOUNT_DIFF_PERCENT>0&&obPrices[j].DISCOUNT_DIFF_PERCENT<100&&(strPrice+='
-',strPrice+=""+obPrices[j].DISCOUNT_DIFF_PERCENT+"",strPrice+="%
"),strPrice+='
',strPrice+=''+BX.message("ITEM_ECONOMY")+"",strPrice+=''+getCurrentPrice(obPrices[j].DISCOUNT_DIFF,obPrices[j].CURRENCY,obPrices[j].PRINT_DISCOUNT_DIFF)+"",strPrice+="
",strPrice+='
')));this.showPercent&&($(this.obPrice).closest(".cost").find(".sale_block:not(.matrix)").hide(),$(this.obPrice).closest(".cost").find(".sale_block:not(.matrix) .text span").html("")),this.showOldPrice&&$(this.obPrice).closest(".cost").find(".price.discount").hide(),strPrice+="
",BX.adjust(this.obPrice,{html:strPrice});var eventdata={product:product,measure:measure,config:this.config,offer:this.offers[this.offerNum],obPrices:obPrices};BX.onCustomEvent("onAsproSkuSetPrice",[eventdata])}}},window.JCCatalogSection.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)},window.JCCatalogSection.prototype.Compare=function(){var compareParams,compareLink;if($(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).data("changed","Y"),$(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).find(".compare_item.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.JCCatalogSection.prototype.CompareResult=function(result){var popupContent,popupButtons,popupTitle;return"object"==typeof result&&("OK"===result.STATUS?(BX.onCustomEvent("OnCompareChange"),this.compareData.Added?($(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).find(".to").hide(),$(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).find(".in").show()):($(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).find(".in").hide(),$(this.obProduct).find(".like_icons .o_"+this.offers[this.offerNum].ID).find(".to").show()),jsAjaxUtil.InsertDataToNode(arMShopOptions.SITE_DIR+"ajax/show_compare_preview_top.php","compare_line",!1)):console.log(BX.message("ADD_ERROR_COMPARE")),!1)},window.JCCatalogSection.prototype.CompareRedirect=function(){this.compareData.comparePath?location.href=this.compareData.comparePath:this.obPopupWin.close()},window.JCCatalogSection.prototype.InitBasketUrl=function(){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());break;case 3:this.basketUrl=this.basketUrl.replace("#ID#",this.offers[this.offerNum].ID)}this.basketParams={ajax_basket:"Y"},this.showQuantity&&(this.basketParams[this.basketData.quantity]=$(this.obProduct).find(".counter_wrapp").find(".counter_block .text").val()),this.basketData.sku_props&&(this.basketParams[this.basketData.sku_props_var]=this.basketData.sku_props)},window.JCCatalogSection.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