(function($){$.fn.getStyles=function(only,except){var product={};var style;var name;if(only&&only instanceof Array){for(var i=0,l=only.length;i-1){var modWy=true;$('#option_'+modOptionWysfromArray).attr('type','number').attr('step','any').css({'display':'block','width':'100%'});if(global_wys_max!=0){$('#option_'+modOptionWysfromArray).attr('max',global_wys_max);$('max: '+global_wys_max+jednostka+'').insertAfter($('#option_'+modOptionWysfromArray));} if(global_wys_min!=0){$('#option_'+modOptionWysfromArray).attr('min',global_wys_min);$(' min: '+global_wys_min+jednostka+' ').insertAfter($('#option_'+modOptionWysfromArray));} break;} else{var modWy=false;}}} var option_szerArray=option_szer.split(',');if(option_szerArray){for(c in option_szerArray){var modOptionSzerfromArray=option_szerArray[c];if($.inArray(modOptionSzerfromArray,modOptionsArray)>-1){var modSze=true;$('#option_'+modOptionSzerfromArray).attr('type','number').attr('step','any').css({'display':'block','width':'100%'});if(global_szer_max!=0){$('#option_'+modOptionSzerfromArray).attr('max',global_szer_max);$('max: '+global_szer_max+jednostka+'').insertAfter($('#option_'+modOptionSzerfromArray));} if(global_szer_min!=0){$('#option_'+modOptionSzerfromArray).attr('min',global_szer_min);$(' min: '+global_szer_min+jednostka+' ').insertAfter($('#option_'+modOptionSzerfromArray));} break;} else{var modSze=false;}}} var option_selArray=option_sel.split(',');var modSel='';if(option_selArray){$.each(option_selArray,function(i,sel_id){if($.inArray(sel_id,modOptionsArraySel)>-1){modSel=true;modOptionSelfromArray=sel_id;}});} var option_iloscArray=option_ilosc.split(',');if(option_iloscArray){for(c in option_iloscArray){var modOptionIloscfromArray=option_iloscArray[c];if($.inArray(modOptionIloscfromArray,modOptionsArray)>-1){var modIl=true;$('#option_'+modOptionIloscfromArray).attr('type','number').attr('step','any');if(dodaj_pole_ilosc==1){$('#option_'+modOptionIloscfromArray).val(1);} break;} else{var modIl=false;}}} if(modSel){if(Shop.values.licenseId==342424){var modServicePaymentName='Opłata serwisowa';var modServicePaymentId=[];var modServicePaymentProductId=[];var product_serwisowy_price=0;var oplataSerwisowa=[$('#option_54'),$('#option_55'),$('#option_56'),$('#option_63'),$('#option_61')];var modOplataSerwisowa_on=false;$.each(oplataSerwisowa,function(i,item){if(item.length){item.prop('checked',true) modOplataSerwisowa_on=true;}});if(modOplataSerwisowa_on){$('label').each(function(){if($(this).text().indexOf(modServicePaymentName)>-1){modServicePaymentProductId=parseInt($(this).text().split('__'+modServicePaymentName)[0]);modServicePaymentId=$('input#'+$(this).attr('for'));}});var product_serwisowy=frontAPI.getProduct({lang:'pl_PL',currency:'PLN',id:modServicePaymentProductId});product_serwisowy_price=product_serwisowy['price']['gross']['final_float'];} $('.notRealAddToBasket').click(function(){let modSprawdzator=[];$('form.form-basket .option_required input, form.form-basket .option_required select').each(function(){if($(this).val()!='wybierz'&&$(this).val()!=null&&$(this).val()!=0&&$(this).val()!=false){modSprawdzator.push('false');} else{modSprawdzator.push('true');}});if($.inArray("true",modSprawdzator)>-1){setTimeout(function(){$('.form-basket button.addtobasket.btn.btn-red').click();},100);} else{if(modServicePaymentId.length>-1){if(modServicePaymentId.is(':checked')){let modIlosc_serviceProduct=$('#option_'+modOptionIloscfromArray).val();frontAPI.addToBasket(function(addInfo){},{data:{product_id:modServicePaymentProductId,quantity:modIlosc_serviceProduct}});setTimeout(function(){$('.form-basket button.addtobasket.btn.btn-red').click();},300);} else{setTimeout(function(){$('.form-basket button.addtobasket.btn.btn-red').click();},300);}}}});} if(modWy&&modSel&&modIl&&!modSze){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+' '+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal+' '+modCurr+'
').insertAfter('#box_productfull .price .main-price');htmlMainPrice.hide();$('.main-price2').hide();$('#option_'+modOptionWysfromArray+', #option_'+modOptionIloscfromArray+', #option_'+modOptionSelfromArray).on('input change',function(){if(dodaj_pole_ilosc===0){modIlosc=1;} else{modIlosc=$('#option_'+modOptionIloscfromArray).val();} var modSelect=parseFloat($('#option_'+modOptionSelfromArray+' option:selected').text());var modWysokosc=parseFloat($('#option_'+modOptionWysfromArray).val());var modIlosc=parseFloat($('#option_'+modOptionIloscfromArray).val());if(modSelect&&modWysokosc&&modIlosc){let modSum_modulo=(modWysokosc*modSelect*option_mnoznik).toFixed(0);let modSum=(modWysokosc*modSelect*modIlosc).toFixed(2);$('.main-price2').copyCSS('.main-price').show();if(modSum_modulo%modOpakowanie===0){htmlShortInline.val(((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();var targetNode=document.querySelector("#box_productfull .price .main-price");var config={childList:true,subtree:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price .main-price2').textContent=((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2))+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){var targetElement=document.querySelector("#box_productfull .price-netto .main-price");var config={childList:true,subtree:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2))+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).change();var targetElement=document.querySelector("#box_productfull .price .main-price");var config={childList:true,subtree:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2))+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);if($('.price-netto').length){var targetElement=document.querySelector("#box_productfull .price-netto .main-price");var config={childList:true,subtree:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2))+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);}}} else{$('.main-price2').hide();}});} else if(modSze&&modWy&&modSel&&modIl){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+' '+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal+' '+modCurr+'
').insertAfter('#box_productfull .price .main-price');htmlMainPrice.hide();$('.main-price2').hide();$('#option_'+modOptionSzerfromArray+', #option_'+modOptionWysfromArray+', #option_'+modOptionIloscfromArray+', #option_'+modOptionSelfromArray).on('input change',function(){if(dodaj_pole_ilosc===0){modIlosc=1;} else{modIlosc=$('#option_'+modOptionIloscfromArray).val();} var modWysokosc=parseFloat($('#option_'+modOptionWysfromArray).val());var modSzerokosc=parseFloat($('#option_'+modOptionSzerfromArray).val());var modSelect=parseFloat($('#option_'+modOptionSelfromArray+' option:selected').text());var modIlosc=parseFloat($('#option_'+modOptionIloscfromArray).val());if(modWysokosc&&modSelect&&modIlosc&&modSzerokosc){$('.main-price2').copyCSS('.main-price').show();let modSum_modulo=(modSzerokosc*modWysokosc*modSelect*modIlosc*option_mnoznik).toFixed(0);let modSum=(modSzerokosc*modWysokosc*modSelect*modIlosc).toFixed(2);if(modSum_modulo%modOpakowanie===0){htmlShortInline.val(((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();var targetElement=document.querySelector("#box_productfull .price .main-price");var config={childList:true,subtree:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price .main-price2').textContent=(parseFloat(modNewPrice)+(parseFloat(product_serwisowy_price)*modIlosc)).toFixed(2)+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);if($('.price-netto').length){var targetElement=document.querySelector("#box_productfull .price-netto .main-price");var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik))).toFixed(2)*modPriceToSum).toFixed(2);var modNewPrice2=(parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice2+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).change();function updateMainPrice(){var modPriceToSum=parseFloat($('#box_productfull .price .main-price').text().replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){$('.main-price2').text((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr);},150);}} function updateNetPrice(){var modPriceToSum=parseFloat($('#box_productfull .price-netto .main-price').text().replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){$('.price-netto .main-price2').text((parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr);},150);}} let targetNodeMainPrice=document.querySelector('#box_productfull .price .main-price');let targetNodeNetPrice=document.querySelector('#box_productfull .price-netto .main-price');let config={childList:true,subtree:true,characterData:true};let callbackMainPrice=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){updateMainPrice();}});};let callbackNetPrice=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){updateNetPrice();}});};let observerMainPrice=new MutationObserver(callbackMainPrice);let observerNetPrice=new MutationObserver(callbackNetPrice);observerMainPrice.observe(targetNodeMainPrice,config);if(document.querySelector('.price-netto')){observerNetPrice.observe(targetNodeNetPrice,config);}}} else{$('.main-price2').hide();}});} else if(modSel&&modWy&&modIl){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+' '+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal+' '+modCurr+'
').insertAfter('#box_productfull .price .main-price');htmlMainPrice.hide();$('.main-price2').hide();$('#option_'+modOptionWysfromArray+', #option_'+modOptionIloscfromArray+', #option_'+modOptionSelfromArray).on('input change',function(){if(dodaj_pole_ilosc==0){modIlosc=1;} else{modIlosc=$('#option_'+modOptionIloscfromArray).val();} var modWysokosc=parseFloat($('#option_'+modOptionWysfromArray).val());var modSelect=parseFloat($('#option_'+modOptionSelfromArray+' option:selected').text());var modIlosc=parseFloat($('#option_'+modOptionIloscfromArray).val());if(modWysokosc&&modSelect&&modIlosc){$('.main-price2').copyCSS('.main-price').show();let modSum_modulo=(modWysokosc*modSelect*modIlosc*option_mnoznik).toFixed(0);let modSum=(modWysokosc*modSelect*modIlosc).toFixed(2);if(modSum_modulo%modOpakowanie===0){htmlShortInline.val(((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();var targetElement=document.querySelector("#box_productfull .price .main-price");var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price .main-price2').textContent=(parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);if($('.price-netto').length){var targetElement=document.querySelector("#box_productfull .price-netto .main-price");var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=(parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).change();var targetElement=document.querySelector("#box_productfull .price .main-price");var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=(parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);if($('.price-netto').length){var targetElement=document.querySelector("#box_productfull .price-netto .main-price");var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=(parseFloat(modNewPrice)+parseFloat(product_serwisowy_price)).toFixed(2)+' '+modCurr;},150);}}}};var observer=new MutationObserver(callback);observer.observe(targetElement,config);}}} else{$('.main-price2').hide();}});}} else{if(modWy&&modSze&&modIl){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+' '+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();$('.main-price2_netto').copyCSS('.main-price');} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal+' '+modCurr+'
').insertAfter('#box_productfull .price .main-price');$('.main-price2').copyCSS('.main-price');htmlMainPrice.hide();$('#option_'+modOptionWysfromArray+', #option_'+modOptionSzerfromArray+', #option_'+modOptionIloscfromArray).on('input',function(){if(dodaj_pole_ilosc==0){modIlosc=1;} else{modIlosc=$('#option_'+modOptionIloscfromArray).val();} var modWysokosc=parseFloat($('#option_'+modOptionWysfromArray).val());var modSzerokosc=parseFloat($('#option_'+modOptionSzerfromArray).val());var modIlosc=parseFloat($('#option_'+modOptionIloscfromArray).val());if(modWysokosc&&modSzerokosc&&modIlosc){let modSum_modulo=(modWysokosc*modSzerokosc*option_mnoznik).toFixed(0);let modSum=(modWysokosc*modSzerokosc*modIlosc).toFixed(2);if(modSum_modulo%modOpakowanie===0){if(Shop.values.licenseId=='150032'||Shop.values.licenseId=='322314'||Shop.values.licenseId=='412711'||shop_id==='75'){htmlShortInline.val(Math.ceil((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();} else{htmlShortInline.val(((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();} const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){let modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);let modNewPrice;if(!isNaN(modPriceToSum)){if(Shop.values.licenseId=='150032'||Shop.values.licenseId=='322314'||Shop.values.licenseId=='412711'||shop_id==='75'){modNewPrice=((Math.ceil((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);} else{modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);} setTimeout(function(){document.querySelector('.price .main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){let modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){let modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2_netto').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);if(shop_id==='75'){htmlShortInline.val(Math.ceil((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();} else{htmlShortInline.val((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).change();} const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}}}});} else{if(modWy&&modSze){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+' '+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal+' '+modCurr+'
').insertAfter('#box_productfull .price .main-price');$('.main-price2').copyCSS('.main-price');htmlMainPrice.hide();$('#option_'+modOptionWysfromArray+', #option_'+modOptionSzerfromArray).on('input',function(){let modWysokosc=parseFloat($('#option_'+modOptionWysfromArray).val());let modSzerokosc=parseFloat($('#option_'+modOptionSzerfromArray).val());if(modWysokosc&&modSzerokosc){let modSum_modulo=(modWysokosc*modSzerokosc*option_mnoznik).toFixed(0);let modSum=(modWysokosc*modSzerokosc).toFixed(2);if(modSum_modulo%modOpakowanie===0){if(Shop.values.licenseId=='150032'||Shop.values.licenseId=='322314'||shop_id==='75'){htmlShortInline.val(Math.ceil((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();} else{htmlShortInline.val(((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2)).change();} const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);var modMathCeil;if(Shop.values.licenseId=='150032'||Shop.values.licenseId=='322314'||shop_id==='75'){modMathCeil=Math.ceil((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2);}else{modMathCeil=((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).toFixed(2);} if(!isNaN(modPriceToSum)){var modNewPrice=(parseFloat(modMathCeil)*parseFloat(modPriceToSum)).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum*option_mnoznik)+parseFloat(option_wartoscDodana)).change();const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum*option_mnoznik)+parseFloat(option_wartoscDodana))).toFixed(2)*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice+' '+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}}}});} else if(modSze&&!modWy){if(active_qty!=1){$('.addtobasket-container input.short.inline').prop('readonly',true).css('background','#f5f5f5');} if($('.price-netto').length){htmlNetto.attr('data-id',modPricePromoFinal_net);$('
'+modPricePromoFinal_net+modCurr+'
').insertAfter('#box_productfull .price-netto .main-price');htmlNetto.hide();} htmlMainPrice.attr('data-id',modPricePromoFinal);$('
'+modPricePromoFinal.replace('.',',')+modCurr+'
').insertAfter('#box_productfull .price .main-price');$('.main-price2').copyCSS('.main-price');htmlMainPrice.hide();if(modIl){$('#option_'+modOptionSzerfromArray+', #option_'+modOptionIloscfromArray).on('input',function(){if(dodaj_pole_ilosc==0){modIlosc=1;} else{modIlosc=$('#option_'+modOptionIloscfromArray).val();} let modSzerokosc=parseFloat($('#option_'+modOptionSzerfromArray).val());if(modSzerokosc&&modIlosc){let modSum_modulo=(modSzerokosc*option_mnoznik).toFixed(0);let modSum=(modSzerokosc*option_mnoznik*modIlosc).toFixed(2);if(modSum_modulo%modOpakowanie===0){htmlShortInline.val((modSum+parseFloat(option_wartoscDodana))).change();const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum)+parseFloat(option_wartoscDodana)).change();const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList,observer){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}}}});} else{$('#option_'+modOptionSzerfromArray).on('input',function(){let modSzerokosc=parseFloat($('#option_'+modOptionSzerfromArray).val());if(modSzerokosc){let modSum_modulo=(modSzerokosc*option_mnoznik).toFixed(0);let modSum=(modSzerokosc*option_mnoznik).toFixed(2);if(modSum_modulo%modOpakowanie===0){htmlShortInline.val((modSum+parseFloat(option_wartoscDodana))).change();const targetNode=document.querySelector("#box_productfull .price .main-price");if(targetNode){const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);} if($('.price-netto').length){const targetNode=document.querySelector("#box_productfull .price-netto .main-price");if(targetNode){const config={childList:true,subtree:true,characterData:true};const callback=function(mutationsList){mutationsList.forEach(function(mutation){if(mutation.type==='childList'||mutation.type==='characterData'){var modPriceToSum=parseFloat(targetNode.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}});};const observer=new MutationObserver(callback);observer.observe(targetNode,config);}}} else{let doZaokraglenia=modSum / modOpakowanie;let modZaokraglony=Math.ceil(parseFloat(doZaokraglenia));modSum=(modZaokraglony*modOpakowanie).toFixed(2);htmlShortInline.val((modSum)+parseFloat(option_wartoscDodana)).change();function processPriceChange(){const priceElement=document.querySelector("#box_productfull .price .main-price");if(priceElement){var modPriceToSum=parseFloat(priceElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}} const targetNode=document.querySelector("#box_productfull .price .main-price");const config={childList:true,subtree:true,characterData:true};const observer=new MutationObserver(function(mutationsList){for(const mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){processPriceChange();}}});if(targetNode){observer.observe(targetNode,config);} if($('.price-netto').length){function processPriceChange(){const priceElement=document.querySelector("#box_productfull .price-netto .main-price");if(priceElement){var modPriceToSum=parseFloat(priceElement.textContent.replace(',','.').replace(/\s/g,'').split(modCurr)[0]).toFixed(2);if(!isNaN(modPriceToSum)){var modNewPrice=((((modSum)+parseFloat(option_wartoscDodana)))*modPriceToSum).toFixed(2);setTimeout(function(){document.querySelector('.price-netto .main-price2').textContent=modNewPrice.replace('.',',')+modCurr;},150);}}} const targetNode=document.querySelector("#box_productfull .price-netto .main-price");const config={childList:true,subtree:true,characterData:true};const observer=new MutationObserver(function(mutationsList){for(const mutation of mutationsList){if(mutation.type==='childList'||mutation.type==='characterData'){processPriceChange();}}});if(targetNode){observer.observe(targetNode,config);}}}}});}}}}},{id:product_id});}} APIloader();}});$(document).ready(function(){$('button.addtobasket.btn.btn-red').click(function(event){event.preventDefault();$('.tooltip').remove();let allFilled=true;$('.form-basket .stocks .option_text.option_required').each(function(){var input=$(this).find('input[type="number"]');var inputId=input.attr('id');var value=parseFloat(input.val());var min=parseFloat(input.attr('min'));var max=parseFloat(input.attr('max'));if(input.val()===''||valuemax){allFilled=false;var tooltipText=input.val()===''?'Uzupełnij wymagane pole':(value