; /* Start:"a:4:{s:4:"full";s:114:"/bitrix/components/bitrix/catalog/templates/.default/bitrix/catalog.element/.default/script.min.js?146606903154086";s:6:"source";s:94:"/bitrix/components/bitrix/catalog/templates/.default/bitrix/catalog.element/.default/script.js";s:3:"min";s:98:"/bitrix/components/bitrix/catalog/templates/.default/bitrix/catalog.element/.default/script.min.js";s:3:"map";s:98:"/bitrix/components/bitrix/catalog/templates/.default/bitrix/catalog.element/.default/script.map.js";}"*/ (function(t){if(!!t.JCCatalogElement){return}var i=function(t){i.superclass.constructor.apply(this,arguments);this.nameNode=BX.create("span",{props:{className:"bx_medium bx_bt_button",id:this.id},style:typeof t.style==="object"?t.style:{},text:t.text});this.buttonNode=BX.create("span",{attrs:{className:t.ownerClass},children:[this.nameNode],events:this.contextEvents});if(BX.browser.IsIE()){this.buttonNode.setAttribute("hideFocus","hidefocus")}};BX.extend(i,BX.PopupWindowButton);t.JCCatalogElement=function(t){this.productType=0;this.config={useCatalog:true,showQuantity:true,showPrice:true,showAbsent:true,showOldPrice:false,showPercent:false,showSkuProps:false,showOfferGroup:false,useCompare:false,useStickers:false,mainPictureMode:"IMG",showBasisPrice:false,basketAction:["BUY"],showClosePopup:false};this.checkQuantity=false;this.maxQuantity=0;this.stepQuantity=1;this.isDblQuantity=false;this.canBuy=true;this.isGift=false;this.currentBasisPrice={};this.canSubscription=true;this.currentIsSet=false;this.updateViewedCount=false;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"],offers:["TREE_ID","TREE_ITEM_ID","DISPLAY_PROP_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","ADD_BASKET_ID","BASKET_ACTIONS_ID","NOT_AVAILABLE_MESS"],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_",TREE_ID:"_skudiv",TREE_ITEM_ID:"_prop_",DISPLAY_PROP_DIV:"_sku_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",ADD_BASKET_ID:"_add_basket_link",BASKET_ACTIONS_ID:"_basket_actions",NOT_AVAILABLE_MESS:"_not_avail",MAGNIFIER_ID:"_magnifier",MAGNIFIER_AREA_ID:"_magnifier_area",OFFER_GROUP:"_set_group_",COMPARE_LINK_ID:"_compare_link"};this.visual={};this.basketMode="";this.product={checkQuantity:false,maxQuantity:0,stepQuantity:1,startQuantity:1,isDblQuantity:false,canBuy:true,canSubscription:true,name:"",pict:{},id:0,addUrl:"",buyUrl:"",slider:{},sliderCount:0,useSlider:false,sliderPict:[]};this.mess={};this.basketData={useProps:false,emptyProps:false,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.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.obPopupWin=null;this.basketUrl="";this.basketParams={};this.obPopupPict=null;this.magnify={obMagnifier:null,obMagnifyPict:null,obMagnifyArea:null,obBigImg:null,obBigSlider:null,magnifyShow:false,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;if(typeof t==="object"){this.params=t;this.initConfig();if(!!this.params.MESS){this.mess=this.params.MESS}switch(this.productType){case 0:case 1:case 2:this.initProductData();break;case 3:this.initOffersData();break;default:this.errorCode=-1}this.initBasketData();this.initCompareData()}if(0===this.errorCode){BX.ready(BX.delegate(this.Init,this))}this.params={};BX.addCustomEvent("onSaleProductIsGift",BX.delegate(this.onSaleProductIsGift,this));BX.addCustomEvent("onSaleProductIsNotGift",BX.delegate(this.onSaleProductIsNotGift,this))};t.JCCatalogElement.prototype.onSaleProductIsGift=function(t,i){var s=function(t,i){for(var s=0;s>>1:0;if(a!==this.currentImg.screenOffsetY){BX.style(this.obPictAligner,"marginTop",a+"px");this.currentImg.screenOffsetY=a}this.currentImg.screenOffsetX=e.width>>1:0;this.currentImg.screenWidth=e.width;this.currentImg.screenHeight=e.height}};t.JCCatalogElement.prototype.scaleImg=function(t,i){var s,e,a,r={};if(i.width>=t.width&&i.height>=t.height){r.width=t.width;r.height=t.height}else{s=i.width/t.width;e=i.height/t.height;a=Math.min(s,e);r.width=Math.max(1,parseInt(a*t.width,10));r.height=Math.max(1,parseInt(a*t.height,10))}return r};t.JCCatalogElement.prototype.showMagnifier=function(t){if(!this.magnify.magnifyShow){this.calcMagnifierParams();this.calcMagnifyAreaSize();this.calcMagnifyAreaPos(t);this.calcMagnifyPictSize();this.calcMagnifyPictPos();this.setMagnifyAreaParams(true);this.setMagnifyPictParams(true);this.setMagnifierParams(true);BX.bind(document,"mousemove",BX.proxy(this.moveMagnifierArea,this))}};t.JCCatalogElement.prototype.hideMagnifier=function(){if(!this.magnify.magnifyShow){if(!!this.magnify.obMagnifier){BX.adjust(this.magnify.obMagnifier,{style:{display:"none"}})}if(!!this.magnify.obMagnifyArea){BX.adjust(this.magnify.obMagnifyArea,{style:{display:"none"}})}BX.unbind(document,"mousemove",BX.proxy(this.moveMagnifierArea,this))}};t.JCCatalogElement.prototype.moveMagnifierArea=function(t){var i,s=BX.pos(this.obPict),e={},a={},r={};i=this.inRect(t,s);if(this.inBound(s,i)){e=this.intersectArea(i,s);switch(e.X){case-1:this.magnify.areaParams.left=this.currentImg.screenOffsetX;break;case 0:this.magnify.areaParams.left=this.currentImg.screenOffsetX+i.X-(this.magnify.areaParams.width>>>1);break;case 1:this.magnify.areaParams.left=this.currentImg.screenOffsetX+s.width-this.magnify.areaParams.width;break}switch(e.Y){case-1:this.magnify.areaParams.top=0;break;case 0:this.magnify.areaParams.top=i.Y-(this.magnify.areaParams.height>>>1);break;case 1:this.magnify.areaParams.top=s.height-this.magnify.areaParams.height;break}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);a.left=this.magnify.areaParams.left+"px";a.top=this.magnify.areaParams.top+"px";BX.adjust(this.magnify.obMagnifyArea,{style:a});r.marginLeft=this.magnify.magnifyPictParams.marginLeft+"px";r.marginTop=this.magnify.magnifyPictParams.marginTop+"px";BX.adjust(this.magnify.obMagnifyPict,{style:r})}else{this.outMagnifierArea();this.hideMagnifier()}};t.JCCatalogElement.prototype.onMagnifierArea=function(){this.magnify.magnifyShow=true};t.JCCatalogElement.prototype.outMagnifierArea=function(){this.magnify.magnifyShow=false};t.JCCatalogElement.prototype.calcMagnifierParams=function(){if(!!this.magnify.obBigImg){var t=BX.pos(this.magnify.obBigImg,true);this.magnify.magnifierParams.width=t.width;this.magnify.magnifierParams.height=t.height;this.magnify.magnifierParams.top=t.top;this.magnify.magnifierParams.left=t.left+t.width+2}};t.JCCatalogElement.prototype.setMagnifierParams=function(t){if(!!this.magnify.obMagnifier){t=!!t;var i={top:this.magnify.magnifierParams.top+"px",left:this.magnify.magnifierParams.left+"px",width:this.magnify.magnifierParams.width+"px",height:this.magnify.magnifierParams.height+"px"};if(t){i.display=""}BX.adjust(this.magnify.obMagnifier,{style:i})}};t.JCCatalogElement.prototype.setMagnifyAreaParams=function(t){if(!!this.magnify.obMagnifier){t=!!t;var i={top:this.magnify.areaParams.top+"px",left:this.magnify.areaParams.left+"px",width:this.magnify.areaParams.width+"px",height:this.magnify.areaParams.height+"px"};if(t){i.display=""}BX.adjust(this.magnify.obMagnifyArea,{style:i})}};t.JCCatalogElement.prototype.calcMagnifyAreaPos=function(t){var i,s,e;s=BX.pos(this.obPict);i=this.inRect(t,s);if(this.inBound(s,i)){e=this.intersectArea(i,s);switch(e.X){case-1:this.magnify.areaParams.left=this.currentImg.screenOffsetX;break;case 0:this.magnify.areaParams.left=this.currentImg.screenOffsetX+i.X-(this.magnify.areaParams.width>>>1);break;case 1:this.magnify.areaParams.left=this.currentImg.screenOffsetX+s.width-this.magnify.areaParams.width;break}switch(e.Y){case-1:this.magnify.areaParams.top=0;break;case 0:this.magnify.areaParams.top=i.Y-(this.magnify.areaParams.height>>>1);break;case 1:this.magnify.areaParams.top=s.height-this.magnify.areaParams.height;break}}};t.JCCatalogElement.prototype.inBound=function(t,i){return 0<=i.Y&&t.height>=i.Y&&(0<=i.X&&t.width>=i.X)};t.JCCatalogElement.prototype.inRect=function(t,i){var s=BX.GetWindowSize(),e={X:0,Y:0,globalX:0,globalY:0};e.globalX=t.clientX+s.scrollLeft;if(t.offsetX&&t.offsetX<0)e.globalX-=t.offsetX;e.X=e.globalX-i.left;e.globalY=t.clientY+s.scrollTop;if(t.offsetY&&t.offsetY<0)e.globalY-=t.offsetY;e.Y=e.globalY-i.top;return e};t.JCCatalogElement.prototype.intersectArea=function(t,i){var s={X:0,Y:0},e=this.magnify.areaParams.width>>>1,a=this.magnify.areaParams.height>>>1;if(t.X<=e){s.X=-1}else if(t.X>=i.width-e){s.X=1}else{s.X=0}if(t.Y<=a){s.Y=-1}else if(t.Y>=i.height-a){s.Y=1}else{s.Y=0}return s};t.JCCatalogElement.prototype.calcMagnifyAreaSize=function(){var t,i,s;if(this.magnify.magnifierParams.widththis.product.slider.START){this.product.slider.START++;BX.adjust(this.product.slider.LIST,{style:{marginLeft:this.product.slider.START*20+"%"}});BX.adjust(this.product.slider.RIGHT,{style:this.sliderEnableArrow})}if(0<=this.product.slider.START){BX.adjust(this.product.slider.LEFT,{style:this.sliderDisableArrow})}}}};t.JCCatalogElement.prototype.ProductSliderRowRight=function(){var t=BX.proxy_context;if(!!t){if(this.sliderRowShowSize=this.product.slider.COUNT){BX.adjust(this.product.slider.RIGHT,{style:this.sliderDisableArrow})}}}};t.JCCatalogElement.prototype.ProductSelectSliderImg=function(){var t="",i=BX.proxy_context;if(!!i&&i.hasAttribute("data-value")){t=i.getAttribute("data-value");this.SetProductMainPict(t)}};t.JCCatalogElement.prototype.SetProductMainPict=function(t){var i=-1,s=0,e=0,a="",r="",o=null;if(0this.sliders[i].START){this.sliders[i].START++;BX.adjust(this.sliders[i].LIST,{style:{marginLeft:this.sliders[i].START*20+"%"}});BX.adjust(this.sliders[i].RIGHT,{style:this.sliderEnableArrow})}if(0<=this.sliders[i].START){BX.adjust(this.sliders[i].LEFT,{style:this.sliderDisableArrow})}}}};t.JCCatalogElement.prototype.SliderRowRight=function(){var t="",i=-1,s,e=BX.proxy_context;if(!!e&&e.hasAttribute("data-value")){t=e.getAttribute("data-value");for(s=0;s=this.sliders[i].COUNT){BX.adjust(this.sliders[i].RIGHT,{style:this.sliderDisableArrow})}}}};t.JCCatalogElement.prototype.SelectSliderImg=function(){var t="",i=[],s=BX.proxy_context;if(!!s&&s.hasAttribute("data-value")){t=s.getAttribute("data-value");i=t.split("_");this.SetMainPict(i[0],i[1])}};t.JCCatalogElement.prototype.SetMainPict=function(t,i){var s=-1,e=-1,a,r,o="",h=null,n="";for(a=0;a';this.obPopupPict.setContent(i);this.obPopupPict.show();return BX.PreventDefault(t)};t.JCCatalogElement.prototype.QuantityUp=function(){var t=0,i=true,s;if(0===this.errorCode&&this.config.showQuantity&&this.canBuy&&!this.isGift){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10);if(!isNaN(t)){t+=this.stepQuantity;if(this.checkQuantity){if(t>this.maxQuantity){i=false}}if(i){if(this.isDblQuantity){t=Math.round(t*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=t;s={DISCOUNT_VALUE:this.currentBasisPrice.DISCOUNT_VALUE*t,VALUE:this.currentBasisPrice.VALUE*t,DISCOUNT_DIFF:this.currentBasisPrice.DISCOUNT_DIFF*t,DISCOUNT_DIFF_PERCENT:this.currentBasisPrice.DISCOUNT_DIFF_PERCENT,CURRENCY:this.currentBasisPrice.CURRENCY};this.setPrice(s)}}}};t.JCCatalogElement.prototype.QuantityDown=function(){var t=0,i=true,s;if(0===this.errorCode&&this.config.showQuantity&&this.canBuy&&!this.isGift){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value,10);if(!isNaN(t)){t-=this.stepQuantity;if(tthis.maxQuantity){t=this.maxQuantity}}if(ts){t=s<=1?this.stepQuantity:s*this.stepQuantity;t=Math.round(t*this.precisionFactor)/this.precisionFactor}}this.obQuantity.value=t}else{this.obQuantity.value=this.stepQuantity}}else{this.obQuantity.value=this.stepQuantity}i={DISCOUNT_VALUE:this.currentBasisPrice.DISCOUNT_VALUE*this.obQuantity.value,VALUE:this.currentBasisPrice.VALUE*this.obQuantity.value,DISCOUNT_DIFF:this.currentBasisPrice.DISCOUNT_DIFF*this.obQuantity.value,DISCOUNT_DIFF_PERCENT:this.currentBasisPrice.DISCOUNT_DIFF_PERCENT,CURRENCY:this.currentBasisPrice.CURRENCY};this.setPrice(i)}};t.JCCatalogElement.prototype.QuantitySet=function(t){var i="",s;if(this.errorCode===0){this.canBuy=this.offers[t].CAN_BUY;if(this.canBuy){if(!!this.obBasketActions){BX.style(this.obBasketActions,"display","")}if(!!this.obNotAvail){BX.style(this.obNotAvail,"display","none")}}else{if(!!this.obBasketActions){BX.style(this.obBasketActions,"display","none")}if(!!this.obNotAvail){BX.style(this.obNotAvail,"display","")}}if(this.config.showQuantity){this.isDblQuantity=this.offers[t].QUANTITY_FLOAT;this.checkQuantity=this.offers[t].CHECK_QUANTITY;if(this.isDblQuantity){this.maxQuantity=parseFloat(this.offers[t].MAX_QUANTITY);this.stepQuantity=Math.round(parseFloat(this.offers[t].STEP_QUANTITY)*this.precisionFactor)/this.precisionFactor}else{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;if(!!this.obMeasure){if(!!this.offers[t].MEASURE){BX.adjust(this.obMeasure,{html:this.offers[t].MEASURE})}else{BX.adjust(this.obMeasure,{html:""})}}if(!!this.obQuantityLimit.all){if(!this.checkQuantity){BX.adjust(this.obQuantityLimit.value,{html:""});BX.adjust(this.obQuantityLimit.all,{style:{display:"none"}})}else{s=this.offers[t].MAX_QUANTITY;if(!!this.offers[t].MEASURE){s+=" "+this.offers[t].MEASURE}BX.adjust(this.obQuantityLimit.value,{html:s});BX.adjust(this.obQuantityLimit.all,{style:{display:""}})}}if(!!this.obBasisPrice){if(!!this.offers[t].BASIS_PRICE){i=BX.message("BASIS_PRICE_MESSAGE");i=i.replace("#PRICE#",BX.Currency.currencyFormat(this.offers[t].BASIS_PRICE.DISCOUNT_VALUE,this.offers[t].BASIS_PRICE.CURRENCY,true));i=i.replace("#MEASURE#",this.offers[t].MEASURE);BX.adjust(this.obBasisPrice,{style:{display:""},html:i})}else{BX.adjust(this.obBasisPrice,{style:{display:"none"},html:""})}}}this.currentBasisPrice=this.offers[t].BASIS_PRICE}};t.JCCatalogElement.prototype.SelectOfferProp=function(){var t=0,i="",s=[],e=null,a=BX.proxy_context;if(!!a&&a.hasAttribute("data-treevalue")){if(typeof document.activeElement==="object")document.activeElement.blur();i=a.getAttribute("data-treevalue");s=i.split("_");this.SearchOfferPropIndex(s[0],s[1]);e=BX.findChildren(a.parentNode,{tagName:"li"},false);if(!!e&&00?a[0]:r[0];else l[s]=a[0]}this.UpdateRow(h,l[s],e,a)}this.selectedValues=l;this.ChangeInfo()}};t.JCCatalogElement.prototype.RowLeft=function(){var t="",i=-1,s,e=BX.proxy_context;if(!!e&&e.hasAttribute("data-treevalue")){t=e.getAttribute("data-treevalue");for(s=0;sthis.showStart[i]){this.showStart[i]++;BX.adjust(this.obTreeRows[i].LIST,{style:{marginLeft:this.showStart[i]*20+"%"}});BX.adjust(this.obTreeRows[i].RIGHT,{style:this.treeEnableArrow})}if(0<=this.showStart[i]){BX.adjust(this.obTreeRows[i].LEFT,{style:this.treeDisableArrow})}}}};t.JCCatalogElement.prototype.RowRight=function(){var t="",i=-1,s,e=BX.proxy_context;if(!!e&&e.hasAttribute("data-treevalue")){t=e.getAttribute("data-treevalue");for(s=0;s=this.showCount[i]){BX.adjust(this.obTreeRows[i].RIGHT,{style:this.treeDisableArrow})}}}};t.JCCatalogElement.prototype.UpdateRow=function(t,i,s,e){var a=0,r=0,o="",h=0,n="",l={},f=null,u=false,c=false,p=false,d=0,m=this.treeEnableArrow,g=this.treeEnableArrow,I=0;if(-1-1?this.offers[this.offerNum].ID:0,newId:0};for(i=0;i

'+BX.message("COMPARE_MESSAGE_OK")+"

";if(this.config.showClosePopup){e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_COMPARE_REDIRECT"),events:{click:BX.delegate(this.CompareRedirect,this)},style:{marginRight:"10px"}}),new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_CLOSE_POPUP"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}else{e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_COMPARE_REDIRECT"),events:{click:BX.delegate(this.CompareRedirect,this)}})]}}else{s='

'+(!!t.MESSAGE?t.MESSAGE:BX.message("COMPARE_UNKNOWN_ERROR"))+"

";e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}this.obPopupWin.setTitleBar(a);this.obPopupWin.setContent(s);this.obPopupWin.setButtons(e);this.obPopupWin.show();return false};t.JCCatalogElement.prototype.CompareRedirect=function(){if(!!this.compareData.comparePath)location.href=this.compareData.comparePath;else this.obPopupWin.close()};t.JCCatalogElement.prototype.InitBasketUrl=function(){this.basketUrl=this.basketMode==="ADD"?this.basketData.add_url:this.basketData.buy_url;switch(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);break}this.basketParams={ajax_basket:"Y"};if(this.config.showQuantity){this.basketParams[this.basketData.quantity]=this.obQuantity.value}if(!!this.basketData.sku_props){this.basketParams[this.basketData.sku_props_var]=this.basketData.sku_props}};t.JCCatalogElement.prototype.FillBasketProps=function(){if(!this.visual.BASKET_PROP_DIV)return;var t=0,i=null,s=false,e=null;if(this.basketData.useProps&&!this.basketData.emptyProps){if(!!this.obPopupWin&&!!this.obPopupWin.contentContainer)e=this.obPopupWin.contentContainer}else{e=BX(this.visual.BASKET_PROP_DIV)}if(!!e){i=e.getElementsByTagName("select");if(!!i&&!!i.length){for(t=0;t

'+this.product.name+"

";if(this.config.showClosePopup){e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate(this.BasketRedirect,this)},style:{marginRight:"10px"}}),new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_CLOSE_POPUP"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}else{e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate(this.BasketRedirect,this)}})]}}else{s='

'+(!!t.MESSAGE?t.MESSAGE:BX.message("BASKET_UNKNOWN_ERROR"))+"

";e=[new i({ownerClass:this.obProduct.className,text:BX.message("BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}this.obPopupWin.setTitleBar(a);this.obPopupWin.setContent(s);this.obPopupWin.setButtons(e);this.obPopupWin.show()}return false};t.JCCatalogElement.prototype.BasketRedirect=function(){location.href=!!this.basketData.basketUrl?this.basketData.basketUrl:BX.message("BASKET_URL")};t.JCCatalogElement.prototype.InitPopupWindow=function(){if(!!this.obPopupWin)return;this.obPopupWin=BX.PopupWindowManager.create("CatalogElementBasket_"+this.visual.ID,null,{autoHide:false,offsetLeft:0,offsetTop:0,overlay:true,closeByEsc:true,titleBar:true,closeIcon:{top:"10px",right:"10px"}})};t.JCCatalogElement.prototype.onPopupWindowShow=function(t){BX.bind(document,"click",BX.proxy(this.popupWindowClick,this))};t.JCCatalogElement.prototype.onPopupWindowClose=function(t,i){BX.unbind(document,"click",BX.proxy(this.popupWindowClick,this))};t.JCCatalogElement.prototype.popupWindowClick=function(){if(!!this.obPopupPict&&typeof this.obPopupPict==="object"){if(this.obPopupPict.isShown())this.obPopupPict.close()}};t.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=true;BX.ajax.post(this.viewedCounter.path,this.viewedCounter.params,BX.delegate(function(){this.updateViewedCount=false},this))}};t.JCCatalogElement.prototype.allowViewedCount=function(t){t=!!t;this.currentIsSet=true;if(t)this.incViewedCounter()}})(window); /* End */ ;; /* /bitrix/components/bitrix/catalog/templates/.default/bitrix/catalog.element/.default/script.min.js?146606903154086*/ //# sourceMappingURL=page_f4d83e20a9f8fc0a44bd0393dcb08d36.map.js