jQuery(function($) { var hotinfo_config = {"id":"139","0":"139","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","enabled":"1","2":"1","fixed":"0","3":"0","clientdisable":"1","4":"1","timeshowed":"10000","5":"10000","bottom_position":"0","6":"0","bg_color":"rgb(0, 0, 0)","7":"rgb(0, 0, 0)","text_color":"rgb(255, 255, 255)","8":"rgb(255, 255, 255)","font_size":"12","9":"12","text_wrap":"no_wrap","10":"no_wrap","date_created":"2019-12-10 13:42:39","11":"2019-12-10 13:42:39"}; var hotinfo_phrases = [{"id":"707","0":"707","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"Op\u0142atki wigilijne w promocyjnej cenie - ostatnie sztuki - ZAM\u00d3W JU\u017b DZI\u015a ","2":"Op\u0142atki wigilijne w promocyjnej cenie - ostatnie sztuki - ZAM\u00d3W JU\u017b DZI\u015a ","phrase_link":"https:\/\/e-dewocjonalia.eu\/pl\/searchquery\/op%C5%82atek+wigil\/1\/phot\/5?url=op%C5%82atek,wigil","3":"https:\/\/e-dewocjonalia.eu\/pl\/searchquery\/op%C5%82atek+wigil\/1\/phot\/5?url=op%C5%82atek,wigil","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2019-12-10 13:44:32","14":"2019-12-10 13:44:32"},{"id":"721","0":"721","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\ud83c\udf81 Gwarancja dostawy przed \u015bwi\u0119tami* [szczeg\u00f3\u0142y]","2":"\ud83c\udf81 Gwarancja dostawy przed \u015bwi\u0119tami* [szczeg\u00f3\u0142y]","phrase_link":"https:\/\/e-dewocjonalia.eu\/pl\/i\/Dostawa-przed-swietami\/27?preview=true","3":"https:\/\/e-dewocjonalia.eu\/pl\/i\/Dostawa-przed-swietami\/27?preview=true","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2019-12-18 19:36:20","14":"2019-12-18 19:36:20"},{"id":"783","0":"783","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\u27a1 TANI PI\u0104TEK | -10% \ud83d\udccc KOD: PT2020","2":"\u27a1 TANI PI\u0104TEK | -10% \ud83d\udccc KOD: PT2020","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-02-07 10:34:35","14":"2020-02-07 10:34:35"},{"id":"784","0":"784","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\u26f1 TANIA SOBOTA | -11% \ud83d\udccc KOD: SOBOTA","2":"\u26f1 TANIA SOBOTA | -11% \ud83d\udccc KOD: SOBOTA","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-02-07 10:37:53","14":"2020-02-07 10:37:53"},{"id":"785","0":"785","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\u26f1 Dostawa 0z\u0142 kurierem DPD dla zam\u00f3wie\u0144 powy\u017cej 149z\u0142","2":"\u26f1 Dostawa 0z\u0142 kurierem DPD dla zam\u00f3wie\u0144 powy\u017cej 149z\u0142","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-02-07 11:39:14","14":"2020-02-07 11:39:14"},{"id":"847","0":"847","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\ud83c\udf81 Kupuj bezpiecznie online bez wychodzenia z domu! ","2":"\ud83c\udf81 Kupuj bezpiecznie online bez wychodzenia z domu! ","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-03-16 18:40:59","14":"2020-03-16 18:40:59"},{"id":"1261","0":"1261","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\ud83c\udf84 Op\u0142atki wigilijne TYLKO 1,95z\u0142","2":"\ud83c\udf84 Op\u0142atki wigilijne TYLKO 1,95z\u0142","phrase_link":"https:\/\/e-dewocjonalia.eu\/pl\/c\/Oplatki-wigilijne%2C-hostie%2C-komunikanty%2C-cukierki\/83","3":"https:\/\/e-dewocjonalia.eu\/pl\/c\/Oplatki-wigilijne%2C-hostie%2C-komunikanty%2C-cukierki\/83","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-11-25 22:32:05","14":"2020-11-25 22:32:05"},{"id":"1291","0":"1291","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\ud83d\udccc Jeste\u015bmy z Wami ju\u017c 14 lat ! \ud83d\udccc","2":"\ud83d\udccc Jeste\u015bmy z Wami ju\u017c 14 lat ! \ud83d\udccc","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"1","5":"1","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-12-06 22:38:06","14":"2020-12-06 22:38:06"},{"id":"1351","0":"1351","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"\u26f1 DARMOWA DOSTAWA DPD Pickup od 149z\u0142","2":"\u26f1 DARMOWA DOSTAWA DPD Pickup od 149z\u0142","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"1","5":"1","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"","7":"","counter_position":"","8":"","counter_date":"0000-00-00 00:00:00.000000","9":"0000-00-00 00:00:00.000000","freeship_value":"","10":"","freeship_position":"","11":"","freeship_currency_text":"","12":"","freeship_freetext":"","13":"","date_added":"2020-12-23 11:23:04","14":"2020-12-23 11:23:04"},{"id":"5353","0":"5353","shop_id":"60173d5f306f096450193683689e4ad83dd9d38a","1":"60173d5f306f096450193683689e4ad83dd9d38a","phrase_text":"% BLACK FRIDAY % za","2":"% BLACK FRIDAY % za","phrase_link":"","3":"","phrase_targetblank":"0","4":"0","phrase_active":"0","5":"0","phrase_lang_id":"pl_PL","6":"pl_PL","hotinfo_mode":"basic_counter","7":"basic_counter","counter_position":"after_phrase","8":"after_phrase","counter_date":"2023-11-24 00:00:00.000000","9":"2023-11-24 00:00:00.000000","freeship_value":"{\"PLN\":\"\",\"USD\":\"\",\"EUR\":\"\",\"GBP\":\"\",}","10":"{\"PLN\":\"\",\"USD\":\"\",\"EUR\":\"\",\"GBP\":\"\",}","freeship_position":"after_phrase","11":"after_phrase","freeship_currency_text":"PLN","12":"PLN","freeship_freetext":"Gratulacje! Osi\u0105gn\u0105\u0142e\u015b pr\u00f3g darmowej dostawy!","13":"Gratulacje! Osi\u0105gn\u0105\u0142e\u015b pr\u00f3g darmowej dostawy!","date_added":"2023-11-06 13:14:25","14":"2023-11-06 13:14:25"}]; //przygotowanie zmiennych konfiguracyjnych var enabled = null; var fixed = null; var clientdisable = null; var bg_color = null; var text_color = null; var bottom_position = null; var timeshowed = null; var font_size = null; var text_wrap = null; $.each(hotinfo_config, function(index, value){ //each po tablicy z konfiguracja if(index == 'enabled')enabled=value; if(index == 'fixed')fixed=value; if(index == 'clientdisable')clientdisable=value; if(index == 'bg_color')bg_color=value; if(index == 'text_color')text_color=value; if(index == 'bottom_position')bottom_position=value; if(index == 'timeshowed')timeshowed=value; if(index == 'font_size')font_size=value; if(index == 'text_wrap')text_wrap=value; }); if(enabled == 1){ //jesli dodatek jest wlaczony //tworzenie elementu hotinfo i ustawienie podstawowej konfiguracji if(font_size==0){ font_size = 11; } var hotinfo_element = $('
').attr( { 'data-name': "maxsote_hotinfo" }).css( { "width": "100%", "padding": "10px 0", "color": text_color, "background": bg_color, "font-size": font_size+"pt", "text-align": "center", "font-weight": "600", "z-index": "1000", "top": "0", "cursor": "pointer", "position" : "relative", "box-sizing" : "initial" } ); //sprawdzenie czy istnieje w cookie zmienna sygnalizujaca wylaczenie przez uzytkownika var client_disabled = $.cookie("hotinfo_clientdisabled"); if(typeof client_disabled == 'undefined'){ client_disabled = false; } //ustalenie pozycji statycznej hotinfo (gora czy dol strony) if(client_disabled==0 || clientdisable==0){ //jesli uzytkownik nie wylaczyl hotinfo lub nie ma mozliwosci wylaczenia przez uzytkownika if(bottom_position == 1) { hotinfo_element.appendTo("body"); } else { hotinfo_element.prependTo("body"); } } //fix nowa galeria shoper $(".js__gallery_new").css({ "z-index" : "1002" }); //ustalenie css czy hotinfo ma byc fixed if(fixed && fixed==1 && client_disabled==0){ if(bottom_position == 1) //jesli na dole to fixed od dolu { hotinfo_element.css({ "position" : "fixed", "bottom": "0px", "left" : "0px", "top" : "unset" }); $("body").css("padding-bottom","40px"); }else{ //jesli u gory to fixed od gory hotinfo_element.css({ "position" : "fixed", "top": "0px", "left" : "0px" }); $("body").css("padding-top","40px"); //fix basket-contain if($(".basket-contain").length){ var topval = parseInt($(".basket-contain").css('top')); topval += 40; $(".basket-contain").css('top',topval+"px"); } } } //ustalenie czy hotinfo moze zostac wylaczone przez uzytkownika if(clientdisable==1){ //jesli jest taka mozliwosc, dodaj przycisk zamknij $('').css( { "display" : "innline-block", "cursor" : "pointer", "color" : text_color, "font-size" : "22pt", "position" : "absolute", "top" : "50%", "right" : "8px", "border-color" : text_color, "margin" : "-15px 6px 2px 6px", "font-family" : "fontAwesome" } ).html('').attr("title","Wyłącz ten pasek na 1 dzień").appendTo('#MX_hotinfo'); $("#hotinfo_close").click(function(){ $("#MX_hotinfo").slideUp(); $("body").css("padding-bottom","0"); $("body").css("padding-top","0"); //fix basket-contain if($(".basket-contain").length && bottom_position!=1){ var topval = parseInt($(".basket-contain").css('top')); topval -= 40; $(".basket-contain").css('top',topval+"px"); } $.cookie('hotinfo_clientdisabled',1,{path: '/', expires : 1}); }); $(".k_phrase").css("padding","0 30px 0 0"); } //pobieranie szerokości okna i ustalenie maksymalnej szerokosci fraz //var width = $(".container").outerWidth(); //if(!width || width==0 || width=='undefined'){ // width = 1200; //} //sprawdzenie czy jest zawijanie do kolejnej linii if(text_wrap=="wrap"){ //zawijanie tekstu $('').css( { "width" : "88%", "margin" : "0 6%", "text-align" : "center", "white-space" : "wrap", "max-height" : "unset", "line-height": "150%" } ).appendTo('#MX_hotinfo'); $("MX_hotinfo").css("height","auto"); } else{ //po staremu $('').css( { "width" : "88%", "margin" : "0 6%", "text-align" : "center", "white-space" : "nowrap", "text-overflow" : "ellipsis", "overflow" : "hidden", "max-height" : "unset", "line-height": "150%" } ).appendTo('#MX_hotinfo'); //obsługa RWD if($(window).width() < 600){ $("#MX_phrases").css({ "width" : "78%", "margin" : "0 11%" }); //fix search $("form.search_open").css("margin-top","40px"); } } if($(window).width() < 600){ $("#MX_hotinfo").css("z-index","20"); } //funkcja do licznika interval = setInterval(MxTimer, 1000); function MxTimer () { $('.mx_timer').each(function(index, item){ let date = new Date($(item).data('time').replace(/-/g, "/")); let time = date.getTime() - new Date().getTime(); if (time <= 0) { clearInterval(interval); $(item).find('.mx_timer_days .mx_timer_value').html('0'); $(item).find('.mx_timer_hours .mx_timer_value').html('00'); $(item).find('.mx_timer_minutes .mx_timer_value').html('00'); $(item).find('.mx_timer_seconds .mx_timer_value').html('00'); //kod własny $('.mx_flashsale .mx_counter .mx_head').html('Odśwież stronę aby zobaczyć nowy Flash Sale'); return; } let seconds = Math.floor(time / 1000); let minutes = Math.floor(seconds / 60); let hours = Math.floor(minutes / 60); let days = Math.floor(hours / 24); if ($(item).find('.mx_timer_days').length == 0) { $(item).find('.mx_timer_hours .mx_timer_value').html(('0'+hours).slice(-Math.max(2, hours.toString().length))); } else { $(item).find('.mx_timer_days .mx_timer_value').html(days); $(item).find('.mx_timer_hours .mx_timer_value').html(('0'+hours%24).slice(-2)); } $(item).find('.mx_timer_minutes .mx_timer_value').html(('0'+minutes%60).slice(-2)); $(item).find('.mx_timer_seconds .mx_timer_value').html(('0'+seconds%60).slice(-2)); }); } //populacja hotinfo frazami //pobranie obecnego jezyka function APIloader() { if(!window.frontAPI) { setTimeout(APIloader,0); } else { var current_lang = Shop.lang.name; $.each(hotinfo_phrases, function(index, value){ //each po tablicy z konfiguracja if(value['phrase_active']==1 && value['phrase_lang_id']==current_lang){ if(text_wrap=="wrap"){ //zawijanie tekstu $('').html(value['phrase_text']).css( { "width" : "88%", "margin" : "0 6%", "color" : text_color, "text-align" : "center", "white-space" : "wrap", "max-height" : "unset", "line-height": "150%", } ).addClass("hotinfo_phrase_"+index).appendTo('#MX_phrases') $("#MX_hotinfo").css("height","auto"); }else{ $('').html(value['phrase_text']).css( { "width" : "88%", "color" : text_color, "margin" : "0 6%", "text-align" : "center", "white-space" : "nowrap", "text-overflow" : "ellipsis", "overflow" : "hidden", "max-height" : "unset" }).addClass("hotinfo_phrase_"+index).appendTo('#MX_phrases') } } if(!value['phrase_link']==""){ //jesli link nie jest pusty $(".hotinfo_phrase_"+index).attr({ "href": value['phrase_link'] }) } if(!value['phrase_link']=="" && value['phrase_targetblank']==1){ //jesli link nie jest pusty i ma otworzyc w nowej karcie $(".hotinfo_phrase_"+index).attr({ "target": "_blank" }) } //tryb z licznikiem do dowolnej daty if(value['hotinfo_mode']=="basic_counter"){ var counter_position = value['counter_position']; var counter_date = value['counter_date']; let timer = $('