jQuery(function($){var translations_array='{"prefix_lista":{"__default":"","pl_PL":""},"prefix_karta":{"__default":"","pl_PL":""}}';var active='1';var active_karta='1';var amount_type='procent';var bg_type='reset';var width='52';var height='34';var vertical_align='top';var horizontal_align='left';var position_y='0';var position_x='0';var color='';var font_color='#0A1B25';var font_size='16';var font='';var bold='0';var italic='0';var underscore='0';var shop_id='321';var karta_amount_type='procent';var karta_bg_type='reset';var karta_width='52';var karta_height='34';var karta_vertical_align='top';var karta_horizontal_align='left';var karta_position_y='0';var karta_position_x='0';var karta_color='';var karta_font_color='#0A1B25';var karta_font_size='16';var karta_font='';var karta_bold='0';var karta_italic='0';var karta_underscore='0';$(document).ready(function(){var current_lang=Shop.lang.name;translations_array=JSON.parse(translations_array);if(active_karta&&$('#box_productfull').length>0){let product=$('#box_productfull');let product_image_class=false;if(product.find('.mainimg').length>0){product_image_class='.mainimg';} if(product.find('div.price del').length>0&&!product.find('div.price del').hasClass('none')&&product_image_class){old_price=parseFloat(product.find('div.price del').text().replace(/[^0-9.,]/g,"").replace(',','.'));price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(karta_amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} if(!(current_lang in translations_array['prefix_karta'])){show_text=translations_array['prefix_karta']['__default']+show_text;} else{show_text=translations_array['prefix_karta'][current_lang]+show_text;} let wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(karta_bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',karta_width+'px');wstazka.css('height',karta_height+'px');wstazka.css('line-height',karta_height+'px');if(karta_vertical_align=='top'){wstazka.css('top',karta_position_y+'px');} else{wstazka.css('bottom',karta_position_y+'px');} if(karta_horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(karta_horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(karta_position_x);wstazka.css('margin-left',position_x_center+'px');} if(karta_bg_type=='rect'||karta_bg_type=='circ'){wstazka.css('background-color',karta_color);if(karta_bg_type=='circ'){wstazka.css('border-radius','100%');}} if(karta_font_color.length>0){wstazka.css('color',karta_font_color);} if(karta_font_size.length>0){wstazka.css('font-size',karta_font_size+'px');} if(karta_bold=='1'){wstazka.css('font-weight','bold');} if(karta_italic=='1'){wstazka.css('font-style','italic');} if(karta_underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);}} if(active){$('.product').each(function(){var product=$(this);product_image_class=false;if(product.find('.prodimage').length>0){product_image_class='.prodimage';} else if(product.find('.boximgsize').length>0){product_image_class='.boximgsize';} if(shop_id=='186'){old_price=parseFloat(product.find('div.price .mx_mod_otherprice').text());if(old_price>0){price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} let wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);} else{if(product.find('div.price del').length>0&&product_image_class){old_price=parseFloat(product.find('div.price del').text().replace(/[^0-9.,]/g,"").replace(',','.'));price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} let wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(font.length>0){wstazka.css('font-family',font);} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);}}} else{if(product.find('div.price del').length>0&&product_image_class){old_price=parseFloat(product.find('div.price del').text().replace(/[^0-9.,]/g,"").replace(',','.'));price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} if(!(current_lang in translations_array['prefix_lista'])){show_text=translations_array['prefix_lista']['__default']+show_text;} else{show_text=translations_array['prefix_lista'][current_lang]+show_text;} wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(font.length>0){wstazka.css('font-family',font);} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);}}});} $(document).on("wceAppDynamiclistCustomCallback",function(e,data){data.$products.each(function(){var product=$(this);product_image_class=false;if(product.find('.prodimage').length>0){product_image_class='.prodimage';} else if(product.find('.boximgsize').length>0){product_image_class='.boximgsize';} if(shop_id=='186'){old_price=parseFloat(product.find('div.price .mx_mod_otherprice').text());if(old_price>0){price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} let wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);} else{if(product.find('div.price del').length>0&&product_image_class){old_price=parseFloat(product.find('div.price del').text().replace(/[^0-9.,]/g,"").replace(',','.'));price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} let wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(font.length>0){wstazka.css('font-family',font);} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);}}} else{if(product.find('div.price del').length>0&&product_image_class){old_price=parseFloat(product.find('div.price del').text().replace(/[^0-9.,]/g,"").replace(',','.'));price=parseFloat(product.find('div.price em').text().replace(/[^0-9.,]/g,"").replace(',','.'));if(amount_type=='procent'){show_text='-'+Math.round(100-(price*100 / old_price))+'%';} else{currency=product.find('div.price del').first().text().replace(/[0-9.,]/g,"");show_text='-'+(old_price-price).toFixed(2).replace('.',',')+currency;} if(!(current_lang in translations_array['prefix_lista'])){show_text=translations_array['prefix_lista']['__default']+show_text;} else{show_text=translations_array['prefix_lista'][current_lang]+show_text;} wstazka=$('
');wstazka.addClass('maxsote_app_wstazka');wstazka.text(show_text);if(bg_type!='reset'){product.find(product_image_class).css('position','relative');wstazka.css('position','absolute');wstazka.css('z-index','9');wstazka.css('text-align','center');wstazka.css('width',width+'px');wstazka.css('height',height+'px');wstazka.css('line-height',height+'px');if(vertical_align=='top'){wstazka.css('top',position_y+'px');} else{wstazka.css('bottom',position_y+'px');} if(horizontal_align=='left'){wstazka.css('left',position_x+'px');} else if(horizontal_align=='right'){wstazka.css('right',position_x+'px');} else{wstazka.css('left','50%');position_x_center=0-parseInt(width/2)+parseInt(position_x);wstazka.css('margin-left',position_x_center+'px');} if(bg_type=='rect'||bg_type=='circ'){wstazka.css('background-color',color);if(bg_type=='circ'){wstazka.css('border-radius','100%');}} if(font_color.length>0){wstazka.css('color',font_color);} if(font_size.length>0){wstazka.css('font-size',font_size+'px');} if(font.length>0){wstazka.css('font-family',font);} if(bold=='1'){wstazka.css('font-weight','bold');} if(italic=='1'){wstazka.css('font-style','italic');} if(underscore=='1'){wstazka.css('text-decoration','underline');}} product.find(product_image_class).append(wstazka);}}});});});});