jQuery(function($){if(Shop.values.licenseId!=225478){if($(document).width()<768){return;}} let mx_products_data={};let mx_after_init_ops={};var menu_array={"pl_PL":[{"id":"9385","date_added":"2024-07-19 15:44:40","shop_id":"1208","active":"1","nazwa":"Wszystkie kategorie","lang":"pl_PL","category_id":"0","category_name":"Wszystkie kategorie","ilosc_zagniezdzen":"3","styl":"kafelki","prawy_box":"produkt","prawy_box_html":"","prawy_box_produkt_html1":"","prawy_box_produkt_html2":"","prawy_box_product_count":"1","prawy_box_product_type":"losowe","prawy_box_product_losowe_cat":"tak","prawy_box_product_losowe_promo":"tak","prawy_box_product_zmieniaj":"category","prawy_box_product_ids":"","dolny_box":"0","dolny_box_html":"","dolny_box_produkt_html1":"","dolny_box_produkt_html2":"","dolny_box_product_count":"1","dolny_box_product_type":"losowe","dolny_box_product_losowe_cat":"tak","dolny_box_product_losowe_promo":"tak","dolny_box_product_zmieniaj":"tak","dolny_box_product_ids":"","kolor1":"#ef7508","kolor2":"#3d3d3d","kolor3":"#ffffff","menu_full_width":"0","mode":"full_menu","fs_background":"#aaaaaa","window_background":"#dddddd","pos_top":"0","padding":"0","shadow_spread":"0","shadow_color":"#a4a4a4","border_radius":"0","border_radius_width":"0","animation_time":"30","animation_type":"fade","bg_shade":"header","bg_shade_color":"#000000","bg_shade_opacity":"0.3","li_bg":"0","li_color":"#000000","li_change_color":"0","view_config":"{\"menu_col_count\":2,\"menu_col_width\":{\"1\":20,\"2\":80,\"3\":0},\"menu_width\":\"80\",\"prawy_box_width\":20,\"dolny_col_produkt_left_width\":0,\"dolny_col_produkt_width\":100,\"dolny_col_produkt_right_width\":0,\"menu_col_width_user\":{},\"width_user\":{\"menu_width\":\"80\",\"prawy_box_width\":0},\"menu_col_count_user_add\":0,\"categories_custom_positions\":{\"1\":{},\"2\":{},\"3\":{}},\"menu_grid_colnum\":\"5\",\"menu_grid_catnum\":4,\"menu_grid_showmore\":1,\"menu_grid_moretext\":\"wi\u0119cej...\",\"categories_style\":{\"bold\":{},\"color\":{},\"font-family\":{},\"font-size\":{},\"icon\":{},\"icon_color\":{},\"icon_custom\":{}},\"padding\":{\"menu_col\":\"15\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"15\",\"dolny_box\":\"15\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\",\"bottom_box_cats\":\"15\",\"bottom_box_all\":\"15\"},\"border\":{\"menu_col\":\"border-top:2px solid #ef7508;border-right:2px solid #ef7508;border-bottom:2px solid #ef7508;border-left:2px solid #ef7508;\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"border-top:2px solid #ef7508;border-right:2px solid #ef7508;border-bottom:2px solid #ef7508;border-left:2px solid #ef7508;\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\",\"bottom_box_cats\":\"\",\"bottom_box_all\":\"\"},\"background\":{\"menu_col\":\"\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\",\"bottom_box_cats\":\"\",\"bottom_box_all\":\"\"},\"background_image\":{\"menu_col\":\"\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\",\"bottom_box_cats\":\"\",\"bottom_box_all\":\"\"},\"color\":{\"menu_col\":\"\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\"},\"font-size\":{\"menu_col\":\"\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\"},\"font-family\":{\"menu_col\":\"\",\"menu_col_1\":\"\",\"menu_col_2\":\"\",\"menu_col_3\":\"\",\"prawy_box\":\"\",\"dolny_box\":\"\",\"dolny_box_left\":\"\",\"dolny_box_right\":\"\"},\"categories_hidden\":{},\"categories_children_hidden\":{}}","font_main":"","font_cat1":"","font_cat2":"","font_cat3":"","font_siatka_in":"11","font_siatka_prefix":"","kolor_hover_lvl1":"#000000","kolor_hover_lvl2":"#000000","kolor_hover_lvl3":"#000000","kolor_dziobek_lvl1":"#9d9d9d","kolor_dziobek_lvl2":"#9d9d9d","kolor_produkt_nazwa":"#000000","kolor_produkt_staracena":"#000000","kolor_produkt_cena":"#000000","czcionka_produkt_nazwa":"14","czcionka_produkt_staracena":"12","czcionka_produkt_cena":"14","produkt_efekt":"","bottom_box_all":"","bottom_box_all_html":"","bottom_box_cats":"","bottom_box_cats_html":"","change_kolor_hover_lvl1":"0","change_kolor_hover_lvl2":"0","change_kolor_hover_lvl3":"0","change_kolor_dziobek_lvl1":"1","change_kolor_dziobek_lvl2":"1","change_kolor_produkt_nazwa":"0","change_kolor_produkt_staracena":"0","change_kolor_produkt_cena":"0","bottom_box_cats_div_height":"80","wybrany_szablon":"min_2_kafelki","add_css":"","custom_shadow":"","transition":"0.15","change_product_cat2":"0","siatka_more_bg_color":"","bg_shade_top_margin":"0","menu_width_selector":"","prawy_product_ids":{"131":["935"],"66":["745"],"65":["461"],"108":["1187"],"112":["959"],"118":["1025"],"0":["745"]}}]};var shop_id=1208;let mxFnGetMegamenuHtml=function(shop_id,menu_id,env,config,menu_items,view_config){function mxShow(el){el.show();} function mxHide(el){el.hide();} function mxGetCurrentFontColor(cat_id,menu_col_i){current_font_color=config["kolor2"];if(cat_id in view_config["categories_style"]["color"]&&view_config["categories_style"]["color"][cat_id].length>1){current_font_color=view_config["categories_style"]["color"][cat_id];} else if(view_config["color"]["menu_col_"+menu_col_i].length>1){current_font_color=view_config["color"]["menu_col_"+menu_col_i];} else if(view_config["color"]["menu_col"].length>1){current_font_color=view_config["color"]["menu_col"];} return current_font_color;} function mxComputeColumnNumber(cat_divs_cid,cat_pos_3,children_count,children_col_count){cat_pos_3_mod=cat_pos_3;if(children_count%children_col_count==0){cat_pos_3_mod=cat_pos_3+1;} col_computed_i=Math.max(1,Math.ceil(((cat_pos_3_mod)/ children_count)/(1 / children_col_count)));return col_computed_i;} function showProducts(menu_id,prawy_produkt_div_produkty,product_ids){if(env==='admin'){showProductsAdmin(prawy_produkt_div_produkty,product_ids);return true;} if(Shop.values.licenseId==='74187'){} all_products_dict={};for(cat_id in product_ids){for(cp_k in product_ids[cat_id]){all_products_dict[product_ids[cat_id][cp_k]]=1;}} products_0=product_ids[0];products_0=shuffle(products_0);mx_after_init_ops[menu_id]={'first_product':products_0[0],'all_products_dict':all_products_dict,'prawy_produkt_div_produkty':prawy_produkt_div_produkty,'mxGetProductBox':mxGetProductBox,};return true;} let mxGetProductBox=function(current_product){kolor_produkt_nazwa=config["kolor2"];kolor_produkt_staracena=config["kolor2"];kolor_produkt_cena=config["kolor1"];if("kolor_produkt_nazwa"in config&&config["kolor_produkt_nazwa"].length>1&&"change_kolor_produkt_nazwa"in config&&parseInt(config["change_kolor_produkt_nazwa"])>0){kolor_produkt_nazwa=config["kolor_produkt_nazwa"];} if("kolor_produkt_staracena"in config&&config["kolor_produkt_staracena"].length>1&&"change_kolor_produkt_staracena"in config&&parseInt(config["change_kolor_produkt_staracena"])>0){kolor_produkt_staracena=config["kolor_produkt_staracena"];} if("kolor_produkt_cena"in config&&config["kolor_produkt_cena"].length>1&&"change_kolor_produkt_cena"in config&&parseInt(config["change_kolor_produkt_cena"])>0){kolor_produkt_cena=config["kolor_produkt_cena"];} czcionka_produkt_nazwa='inherit';czcionka_produkt_staracena='inherit';czcionka_produkt_cena='inherit';if("czcionka_produkt_nazwa"in config&&config["czcionka_produkt_nazwa"].length>1){czcionka_produkt_nazwa=config["czcionka_produkt_nazwa"]+'px';} if("czcionka_produkt_staracena"in config&&config["czcionka_produkt_staracena"].length>1){czcionka_produkt_staracena=config["czcionka_produkt_staracena"]+'px';} if("czcionka_produkt_cena"in config&&config["czcionka_produkt_cena"].length>1){czcionka_produkt_cena=config["czcionka_produkt_cena"]+'px';} prawy_produkt_a=$('').css({'color':kolor_produkt_nazwa,'font-size':czcionka_produkt_nazwa,'line-height':'24px','text-align':'center','display':'block','padding-bottom':'10px',});if("main_image"in current_product&¤t_product["main_image"].length>0){main_image_path='/environment/cache/images/300_300_productGfx_'+current_product["main_image_filename"];} else{main_image_path='/environment/cache/images/300_300_productGfx___overlay.jpg';} currency_postfix_tmp='';if(env=='admin'){main_image_path=current_product["gfx_url"];currency_postfix_tmp=' zł';} prawy_produkt_img=$('').css({'max-width':'100%','max-height':'210px',});prawy_produkt_img_div=$('
').append(prawy_produkt_img);prawy_produkt_name=$('
'+current_product["name"]+'
');prawy_produkt_a.append(prawy_produkt_img_div);prawy_produkt_a.append(prawy_produkt_name);if("price"in current_product){if(current_product["price"]["gross"]["base"]!=current_product["price"]["gross"]["final"]){prawy_produkt_del=$(''+current_product["price"]["gross"]["base"].replace('.',',')+currency_postfix_tmp+'
').css({'color':kolor_produkt_staracena,'font-size':czcionka_produkt_staracena,'margin-top':'5px',});prawy_produkt_a.append(prawy_produkt_del);} prawy_produkt_price=$('
'+current_product["price"]["gross"]["final"].replace('.',',')+currency_postfix_tmp+'
').css({'font-weight':'bold','color':kolor_produkt_cena,'font-size':czcionka_produkt_cena,});prawy_produkt_a.append(prawy_produkt_price);} return prawy_produkt_a;};function shuffle(a){var j,x,i;for(i=a.length-1;i>0;i--){j=Math.floor(Math.random()*(i+1));x=a[i];a[i]=a[j];a[j]=x;} return a;} default_view_config={"menu_col_count":1,"menu_col_width":{1:0,2:0,3:0,},"menu_width":15,"prawy_box_width":20,"dolny_col_produkt_left_width":0,"dolny_col_produkt_width":100,"dolny_col_produkt_right_width":0,"menu_col_width_user":{},"width_user":{"menu_width":0,"prawy_box_width":0,},"menu_col_count_user_add":0,"categories_custom_positions":{1:{},2:{},3:{},},"menu_grid_colnum":4,"menu_grid_catnum":4,"menu_grid_showmore":1,"menu_grid_moretext":"więcej...","categories_style":{"bold":{},"color":{},"font-family":{},"font-size":{},"icon":{},"icon_color":{},"icon_custom":{},},"padding":{"menu_col":"15","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"15","dolny_box":"15","dolny_box_left":"","dolny_box_right":"","bottom_box_cats":"15","bottom_box_all":"15",},"border":{"menu_col":"border-top:6px solid #0093BF;borer-right:0;border-bottom:0;border-left:0;","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"border-top:6px solid #0093BF;borer-right:0;border-bottom:0;border-left:0;","dolny_box":"","dolny_box_left":"","dolny_box_right":"","bottom_box_cats":"","bottom_box_all":"",},"background":{"menu_col":"","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"","dolny_box":"","dolny_box_left":"","dolny_box_right":"","bottom_box_cats":"","bottom_box_all":"",},"background_image":{"menu_col":"","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"","dolny_box":"","dolny_box_left":"","dolny_box_right":"","bottom_box_cats":"","bottom_box_all":"",},"color":{"menu_col":"","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"","dolny_box":"","dolny_box_left":"","dolny_box_right":"",},"font-size":{"menu_col":"","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"","dolny_box":"","dolny_box_left":"","dolny_box_right":"",},"font-family":{"menu_col":"","menu_col_1":"","menu_col_2":"","menu_col_3":"","prawy_box":"","dolny_box":"","dolny_box_left":"","dolny_box_right":"",},"categories_hidden":{},"categories_children_hidden":{},};for(modk in view_config){if(['menu_col_count','menu_col_width','menu_width','prawy_box_width','dolny_col_produkt_left_width','dolny_col_produkt_width','dolny_col_produkt_right_width',].indexOf(modk)<0){default_view_config[modk]=view_config[modk];}} if(config["ilosc_zagniezdzen"]==1){default_view_config["menu_col_count"]=1;default_view_config["menu_col_width"][1]=100;if(config["styl"]=="lista"){if(default_view_config["menu_col_count_user_add"]==1){default_view_config["menu_width"]=30;} else if(default_view_config["menu_col_count_user_add"]==2){default_view_config["menu_width"]=45;} else if(default_view_config["menu_col_count_user_add"]==3){default_view_config["menu_width"]=60;} else if(default_view_config["menu_col_count_user_add"]>=4){default_view_config["menu_col_count_user_add"]=4;default_view_config["menu_width"]=80;} else{default_view_config["menu_width"]=15;}} else{default_view_config["menu_width"]=60;}} else if(config["ilosc_zagniezdzen"]==2){if(config["styl"]=="lista"){default_view_config["menu_col_count"]=2;if(default_view_config["menu_col_count_user_add"]==1){default_view_config["menu_col_width"][1]=33.33;default_view_config["menu_col_width"][2]=66.66;default_view_config["menu_width"]=45;} else if(default_view_config["menu_col_count_user_add"]==2){default_view_config["menu_col_width"][1]=25;default_view_config["menu_col_width"][2]=75;default_view_config["menu_width"]=60;} else if(default_view_config["menu_col_count_user_add"]>=3){default_view_config["menu_col_count_user_add"]=3;default_view_config["menu_col_width"][1]=20;default_view_config["menu_col_width"][2]=80;default_view_config["menu_width"]=75;} else{default_view_config["menu_col_width"][1]=50;default_view_config["menu_col_width"][2]=50;default_view_config["menu_width"]=30;}} else{default_view_config["menu_col_count"]=1;default_view_config["menu_col_width"][1]=100;default_view_config["menu_width"]=70;}} else if(config["ilosc_zagniezdzen"]==3){if(config["styl"]=="lista"){default_view_config["menu_col_count"]=3;if(default_view_config["menu_col_count_user_add"]==1){default_view_config["menu_col_width"][1]=25;default_view_config["menu_col_width"][2]=25;default_view_config["menu_col_width"][3]=50;default_view_config["menu_width"]=75;} else if(default_view_config["menu_col_count_user_add"]>=2){default_view_config["menu_col_count_user_add"]=2;default_view_config["menu_col_width"][1]=20;default_view_config["menu_col_width"][2]=20;default_view_config["menu_col_width"][3]=60;default_view_config["menu_width"]=80;} else{default_view_config["menu_col_width"][1]=33.33;default_view_config["menu_col_width"][2]=33.33;default_view_config["menu_col_width"][3]=33.33;default_view_config["menu_width"]=60;}} else{default_view_config["menu_col_count"]=2;default_view_config["menu_col_width"][1]=20;default_view_config["menu_col_width"][2]=80;default_view_config["menu_width"]=80;}} for(modk in view_config["menu_col_width_user"]){if(parseInt(view_config["menu_col_width_user"][modk])>0){default_view_config["menu_col_width"][modk]=view_config["menu_col_width_user"][modk];}} for(modk in view_config["width_user"]){if(parseInt(view_config["width_user"][modk])>0){default_view_config[modk]=view_config["width_user"][modk];}} view_config=default_view_config;if(env=='admin'){$('#mx_mega_menu_view_config').val(JSON.stringify(view_config));} var container=$('
').css({});if(config["menu_full_width"]=='tak'){if(env=='admin'){new_container_width='1180px';} else{new_container_width='100%';}} else{new_container_width='100%';} container.css({'width':new_container_width,});if(config["prawy_box"]=='brak'){view_config['prawy_box_width']='0';} var container_flex=$('
').css({'display':'grid','grid-template-columns':view_config["menu_width"]+'% '+view_config['prawy_box_width']+'%','grid-auto-rows':'auto','grid-gap':'0px',});menu_bg_color=config["kolor3"];if(view_config["background"]["menu_col"].length>1){menu_bg_color=view_config["background"]["menu_col"];} if(view_config["background_image"]["menu_col"].length>1){menu_bg_color=menu_bg_color+' '+view_config["background_image"]["menu_col"];} var menu_div=$('
').css({'padding':view_config["padding"]["menu_col"]+'px','background':menu_bg_color,'position':'relative',});if(config["border_radius"]=="1"){menu_div.css({'border-bottom-left-radius':config["border_radius_width"]+'px',});if(config["prawy_box"]=='brak'){menu_div.css({'border-bottom-right-radius':config["border_radius_width"]+'px',});}} if(view_config["border"]["menu_col"].length>0){border_arr=view_config["border"]["menu_col"].slice(0,-1).split(';');for(bk in border_arr){cur_border_arr=border_arr[bk].split(":");menu_div.css(cur_border_arr[0],cur_border_arr[1]);}} if(view_config["font-size"]["menu_col"].length>0){menu_div.css({'font-size':view_config["font-size"]["menu_col"],});} menu_div_flex=$('
').css({'display':'grid','grid-auto-rows':'auto','grid-gap':'0px','width':'100%','height':'100%',});menu_col_divs={};menu_div_template_columns=[];for(col_i=1;col_i<=view_config["menu_col_count"];col_i=col_i+1){menu_div_template_columns.push(view_config["menu_col_width"][col_i]+'%') menu_col_div=$('
').css({}).data('col_i',col_i);if(view_config["font-size"]["menu_col_"+col_i].length>0){menu_col_div.css({'font-size':view_config["font-size"]["menu_col_"+col_i],});} if(view_config["padding"]["menu_col_"+col_i].length>1){menu_col_div.css({'padding':view_config["padding"]["menu_col_"+col_i]+'px',});} menu_bg_color_tmp='';if(view_config["background"]["menu_col_"+col_i].length>1){menu_bg_color_tmp=view_config["background"]["menu_col_"+col_i];} if(view_config["background_image"]["menu_col_"+col_i].length>1){menu_bg_color_tmp=menu_bg_color_tmp+' '+view_config["background_image"]["menu_col_"+col_i];} if(menu_bg_color_tmp.length>0){menu_col_div.css({'background':menu_bg_color_tmp,});} if(view_config["border"]["menu_col_"+col_i].length>0){border_arr=view_config["border"]["menu_col_"+col_i].slice(0,-1).split(';');for(bk in border_arr){cur_border_arr=border_arr[bk].split(":");menu_col_div.css(cur_border_arr[0],cur_border_arr[1]);}} if(env=='admin'){menu_col_div=addAdminFunctionsMenuCol(menu_col_div);} menu_col_divs[col_i]=menu_col_div;menu_div_flex.append(menu_col_divs[col_i]);} menu_div_flex.css({'grid-template-columns':menu_div_template_columns.join(' '),});menu_div.append(menu_div_flex);if("bottom_box_cats"in config&&config["bottom_box_cats"]=="tak"){if(config["ilosc_zagniezdzen"]==1||(config["ilosc_zagniezdzen"]==2&&config["styl"]=="kafelki")){bottom_box_cats_div_left=0;bottom_box_cats_div_width=100;cols_for_padding_change=[1];} else if(config["ilosc_zagniezdzen"]==2||(config["ilosc_zagniezdzen"]==3&&config["styl"]=="kafelki")){bottom_box_cats_div_left=view_config["menu_col_width"][1];bottom_box_cats_div_width=view_config["menu_col_width"][2];cols_for_padding_change=[2];} else if(config["ilosc_zagniezdzen"]==3){bottom_box_cats_div_left=view_config["menu_col_width"][1];bottom_box_cats_div_width=view_config["menu_col_width"][2]+view_config["menu_col_width"][3];cols_for_padding_change=[2,3];} bottom_box_cats_div=$('
'+config["bottom_box_cats_html"]+'
');bottom_box_cats_bg_color='';if("bottom_box_cats"in view_config["background"]&&view_config["background"]["bottom_box_cats"].length>1){bottom_box_cats_bg_color=view_config["background"]["bottom_box_cats"];} if("bottom_box_cats"in view_config["background_image"]&&view_config["background_image"]["bottom_box_cats"].length>1){bottom_box_cats_bg_color=bottom_box_cats_bg_color+' '+view_config["background_image"]["bottom_box_cats"];} if(bottom_box_cats_bg_color.length>0){bottom_box_cats_div.css({'background':bottom_box_cats_bg_color,});} if("bottom_box_cats"in view_config["padding"]&&view_config["padding"]["bottom_box_cats"].length>1){bottom_box_cats_div.find('.mx_mega_menu_bottom_box_cats_in').css({'padding':view_config["padding"]["bottom_box_cats"]+'px',});} if("bottom_box_cats"in view_config["border"]&&view_config["border"]["bottom_box_cats"].length>0){let border_arr=view_config["border"]["bottom_box_cats"].slice(0,-1).split(';');for(let bk in border_arr){let cur_border_arr=border_arr[bk].split(":");bottom_box_cats_div.css(cur_border_arr[0],cur_border_arr[1]);}} if(env=='admin'){bottom_box_cats_div=addAdminFunctionsBottomBoxCats(bottom_box_cats_div);} menu_div.append(bottom_box_cats_div);for(cfp_nk in cols_for_padding_change){cfp_nk_col_id=cols_for_padding_change[cfp_nk];current_col_padding_bottom=0;if(menu_col_divs[cfp_nk_col_id].css('padding-bottom').replace('px','').length>0){current_col_padding_bottom=parseFloat(menu_col_divs[cfp_nk_col_id].css('padding-bottom').replace('px',''));} if("bottom_box_cats_div_height"in config&&parseFloat(config["bottom_box_cats_div_height"])>0){new_col_padding_bottom=parseFloat(config["bottom_box_cats_div_height"])+current_col_padding_bottom;} else{new_col_padding_bottom=100+current_col_padding_bottom;} menu_col_divs[cfp_nk_col_id].css('padding-bottom',new_col_padding_bottom+'px');}} bottom_box_all_append=false;if("bottom_box_all"in config&&config["bottom_box_all"]=="tak"){bottom_box_all_div=$('
'+config["bottom_box_all_html"]+'
');bottom_box_all_div_width=parseFloat(view_config["menu_width"])+parseFloat(view_config['prawy_box_width']);bottom_box_all_div.css({'width':bottom_box_all_div_width+'%',});bottom_box_all_bg_color='';if("bottom_box_all"in view_config["background"]&&view_config["background"]["bottom_box_all"].length>1){bottom_box_all_bg_color=view_config["background"]["bottom_box_all"];} if("bottom_box_all"in view_config["background_image"]&&view_config["background_image"]["bottom_box_all"].length>1){bottom_box_all_bg_color=bottom_box_all_bg_color+' '+view_config["background_image"]["bottom_box_all"];} if(bottom_box_all_bg_color.length>0){bottom_box_all_div.css({'background':bottom_box_all_bg_color,});} if("bottom_box_all"in view_config["padding"]&&view_config["padding"]["bottom_box_all"].length>1){bottom_box_all_div.find('.mx_mega_menu_bottom_box_all_in').css({'padding':view_config["padding"]["bottom_box_all"]+'px',});} if("bottom_box_all"in view_config["border"]&&view_config["border"]["bottom_box_all"].length>0){let border_arr=view_config["border"]["bottom_box_all"].slice(0,-1).split(';');for(let bk in border_arr){let cur_border_arr=border_arr[bk].split(":");bottom_box_all_div.css(cur_border_arr[0],cur_border_arr[1]);}} if(env=='admin'){bottom_box_all_div=addAdminFunctionsBottomBoxAll(bottom_box_all_div);} bottom_box_all_append=true;} category_toggle_parents[menu_id]={};category_toggle_children[menu_id]={};if(env=='admin'){for(k1 in menu_items){category1_id=menu_items[k1]["category_id"];cat_id_to_name[category1_id]=menu_items[k1]["name"];children1=menu_items[k1]["children"];for(k2 in children1){category2_id=children1[k2]["category_id"];cat_id_to_name[category2_id]=children1[k2]["name"];children2=children1[k2]["children"];for(k3 in children2){category3_id=children2[k3]["category_id"];cat_id_to_name[category3_id]=children2[k3]["name"];}}}} cat_divs={1:[],2:[],3:[],};root_cats_count=menu_items.length;menu_col_divs_1_in=$('
');menu_col_divs[1].append(menu_col_divs_1_in);if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]<3){grid_tmp=[];for(gi=0;gi').css({});if(config["styl"]=="kafelki"&&"image"in view_config["categories_style"]&&category1_id in view_config["categories_style"]["image"]&&view_config["categories_style"]["image"][category1_id].length>1){lvl1_div.append('');} if(config["prawy_box_product_zmieniaj"]=="category"&&config["prawy_box_product_type"]!='wybrane'){lvl1_div.hover(function(){cur_c1_id=$(this).data("category_id");if(menu_id in prawy_product_ids&&cur_c1_id in prawy_product_ids[menu_id]&&prawy_product_ids[menu_id][cur_c1_id].length>0){products_from_hovered_cat=prawy_product_ids[menu_id][cur_c1_id];products_from_hovered_cat=shuffle(products_from_hovered_cat);found_product_in_data=false;for(let pfhi=0;pfhi0){$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).html(cat_prawy_produkt_new);cur_min_height=parseFloat($('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).css('min-height').replace('px',''));cur_height=$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).height();if(cur_height>cur_min_height){$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).css('min-height',cur_height+'px');}}}},function(){});} lvl1_div.data("category_id",category1_id);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==1&&config["styl"]=="lista"){children_cols_div=$('
').css({'display':'flex',});children_col_count=1+view_config["menu_col_count_user_add"];children_col_width=Math.round(1/children_col_count*100);children_cols={};for(cur_col_i=1;cur_col_i<=children_col_count;cur_col_i=cur_col_i+1){children_cols[cur_col_i]=$('
').css({'width':children_col_width+'%',});children_cols_div.append(children_cols[cur_col_i]);} menu_col_divs_1_in.append(children_cols_div);} current_font_color=mxGetCurrentFontColor(category1_id,1);lvl1_label=$('').css({'color':current_font_color,'padding':'5px','display':'block',});if((config["ilosc_zagniezdzen"]>1&&children1.length>0&&config["styl"]=="lista")||(config["ilosc_zagniezdzen"]>2&&children1.length>0&&config["styl"]=="kafelki")){lvl1_label.addClass('mx_megamenu_dziobek');lvl1_label.css({'padding-right':'32px',});} if(category1_id in view_config["categories_style"]["icon_custom"]){cur_icon=$('').html(view_config["categories_style"]["icon_custom"][category1_id]);cur_icon.css({'margin-right':'7px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'24px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',}).text(menu_items[k1]["name"]);lvl1_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else if(category1_id in view_config["categories_style"]["icon_color"]){cur_icon=$('').addClass(view_config["categories_style"]["icon"][category1_id]);cur_icon.css({'color':view_config["categories_style"]["icon_color"][category1_id],'margin-right':'7px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'24px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',}).text(menu_items[k1]["name"]);lvl1_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else{lvl1_label.text(menu_items[k1]["name"]);} lvl1_label_div=$('
').append(lvl1_label).data('category_id',category1_id).data('parent_id',0).data('level',1);if(category1_id in view_config["categories_style"]["font-size"]){lvl1_label.css({'font-size':view_config["categories_style"]["font-size"][category1_id],});} if(category1_id in view_config["categories_style"]["bold"]){lvl1_label.css('font-weight','bold');} if(env=='admin'){lvl1_label_div=addAdminFunctionsCategory(lvl1_label_div,1,cat1_current_position);} lvl1_div.append(lvl1_label_div);lvl1_div.data('category_id',category1_id);lvl1_div.data('level',1);cat_divs[1].push(lvl1_div);if(category1_id in view_config["categories_children_hidden"]){continue;} if(config["ilosc_zagniezdzen"]>1){if(config["styl"]=="lista"||config["ilosc_zagniezdzen"]==3){category_toggle_parents[menu_id][category1_id]=lvl1_div;} children1_div=$('
').css({});if(config["styl"]=='lista'||config["ilosc_zagniezdzen"]==3){children1_div.css({'display':'none',});} children1_div_in=$('
');children1_div.append(children1_div_in);if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==3){grid_tmp=[];for(gi=0;gi0&&config["ilosc_zagniezdzen"]==2&&config["styl"]=="lista"){children_cols_div=$('
').css({'display':'flex',});children_col_count=1+view_config["menu_col_count_user_add"];children_col_width=Math.round(1/children_col_count*100);children_cols={};for(cur_col_i=1;cur_col_i<=children_col_count;cur_col_i=cur_col_i+1){children_cols[cur_col_i]=$('
').css({'width':children_col_width+'%',});children_cols_div.append(children_cols[cur_col_i]);} children1_div_in.append(children_cols_div);} cat_divs[2]=[];children1_count=children1.length;cat2_current_position=0;for(k2 in children1){category2_id=children1[k2]["category_id"];if(category2_id in view_config["categories_hidden"]){continue;} cat2_current_position=cat2_current_position+1;children2=children1[k2]["children"];lvl2_div=$('
').data('category_id',category2_id);if(shop_id==97||('change_product_cat2'in config&&config['change_product_cat2']=='1')){if(config["prawy_box_product_zmieniaj"]=="category"&&config["prawy_box_product_type"]!='wybrane'){lvl2_div.hover(function(){cur_c2_id=$(this).data("category_id");if(menu_id in prawy_product_ids&&cur_c2_id in prawy_product_ids[menu_id]&&prawy_product_ids[menu_id][cur_c2_id].length>0){products_from_hovered_cat=prawy_product_ids[menu_id][cur_c2_id];products_from_hovered_cat=shuffle(products_from_hovered_cat);if(products_from_hovered_cat[0]in mx_products_data){current_product=mx_products_data[products_from_hovered_cat[0]];cat_prawy_produkt_new=mxGetProductBox(current_product);$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).html(cat_prawy_produkt_new);} if($('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).length>0){cur_min_height=parseFloat($('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).css('min-height').replace('px',''));cur_height=$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).height();if(cur_height>cur_min_height){$('.mx_megamenu_prawy_produkt_div_produkty_'+menu_id).css('min-height',cur_height+'px');}}}},function(){});}} current_font_color=mxGetCurrentFontColor(category2_id,2);lvl2_label=$('').css({'color':current_font_color,'padding':'5px','display':'block',}) if(config["ilosc_zagniezdzen"]>2&&children2.length>0&&config["styl"]=="lista"){lvl2_label.addClass('mx_megamenu_dziobek');lvl2_label.css({'padding-right':'32px',});} if(category2_id in view_config["categories_style"]["icon_custom"]){cur_icon=$('').html(view_config["categories_style"]["icon_custom"][category2_id]);cur_icon.css({'margin-right':'5px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'32px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',});if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==2){cur_icon_lab.html(config["font_siatka_prefix"]+children1[k2]["name"]);} else{cur_icon_lab.text(children1[k2]["name"]);} lvl2_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else if(category2_id in view_config["categories_style"]["icon_color"]){cur_icon=$('').addClass(view_config["categories_style"]["icon"][category2_id]);cur_icon.css({'color':view_config["categories_style"]["icon_color"][category2_id],'margin-right':'5px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'32px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',});if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==2){cur_icon_lab.html(config["font_siatka_prefix"]+children1[k2]["name"]);} else{cur_icon_lab.text(children1[k2]["name"]);} lvl2_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else{if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==2){lvl2_label.html(config["font_siatka_prefix"]+children1[k2]["name"]);} else{lvl2_label.text(children1[k2]["name"]);}} lvl2_label_div=$('
').append(lvl2_label).data('category_id',category2_id).data('parent_id',category1_id).data('level',2);if(category2_id in view_config["categories_style"]["font-size"]){lvl2_label.css({'font-size':view_config["categories_style"]["font-size"][category2_id],});} if(category2_id in view_config["categories_style"]["bold"]){lvl2_label.css('font-weight','bold');} if(env=='admin'){lvl2_label_div=addAdminFunctionsCategory(lvl2_label_div,2,cat2_current_position);} lvl2_div.append(lvl2_label_div);cat_divs[2].push(lvl2_div);if(category2_id in view_config["categories_children_hidden"]){continue;} if(config["ilosc_zagniezdzen"]>2){children2_div=$('
').css({});children2_div_in=$('
');children2_div.append(children2_div_in);if(config["styl"]=='lista'){children2_div.css({'display':'none',});} if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==3&&config["styl"]=="lista"){children_cols_div=$('
').css({'display':'flex',});children_col_count=1+view_config["menu_col_count_user_add"];children_col_width=Math.round(1/children_col_count*100);children_cols={};for(cur_col_i=1;cur_col_i<=children_col_count;cur_col_i=cur_col_i+1){children_cols[cur_col_i]=$('
').css({'width':children_col_width+'%',});children_cols_div.append(children_cols[cur_col_i]);} children2_div_in.append(children_cols_div);} cat_divs[3]=[];children2_count=children2.length;cat3_current_position=0;for(k3 in children2){category3_id=children2[k3]["category_id"];if(category3_id in view_config["categories_hidden"]){continue;} cat3_current_position=cat3_current_position+1;current_font_color=mxGetCurrentFontColor(category3_id,3);lvl3_div=$('
');lvl3_label=$('').css({'color':current_font_color,'padding':'5px','display':'block',});if(category3_id in view_config["categories_style"]["icon_custom"]){cur_icon=$('').html(view_config["categories_style"]["icon_custom"][category3_id]);cur_icon.css({'margin-right':'5px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'32px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',});if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==3){cur_icon_lab.html(config["font_siatka_prefix"]+children2[k3]["name"]);} else{cur_icon_lab.text(children2[k3]["name"]);} lvl3_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else if(category3_id in view_config["categories_style"]["icon_color"]){cur_icon=$('').addClass(view_config["categories_style"]["icon"][category3_id]);cur_icon.css({'color':view_config["categories_style"]["icon_color"][category3_id],'margin-right':'5px','font-size':'20px','vertical-align':'middle','display':'inline-block','width':'32px','text-align':'center',});cur_icon_lab=$('').css({'display':'inline-block','vertical-align':'middle','width':'calc(100% - 37px)',});if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==3){cur_icon_lab.html(config["font_siatka_prefix"]+children2[k3]["name"]);} else{cur_icon_lab.text(children2[k3]["name"]);} lvl3_label.html($('
').append(cur_icon).html()+$('
').append(cur_icon_lab).html())} else{if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==3){lvl3_label.html(config["font_siatka_prefix"]+children2[k3]["name"]);} else{lvl3_label.text(children2[k3]["name"]);}} lvl3_label_div=$('
').append(lvl3_label).data('category_id',category3_id).data('parent_id',category2_id).data('level',3);lvl3_div.append(lvl3_label_div);if(category3_id in view_config["categories_style"]["font-size"]){lvl3_label.css({'font-size':view_config["categories_style"]["font-size"][category3_id],});} if(category3_id in view_config["categories_style"]["bold"]){lvl3_label.css('font-weight','bold');} if(env=='admin'){lvl3_label_div=addAdminFunctionsCategory(lvl3_label_div,3,cat3_current_position);} cat_divs[3].push(lvl3_div);} lvl2_div.data('category_id',category2_id);lvl2_div.data('level',2);children2_div.data('level',2);if(config["styl"]=="lista"){category_toggle_parents[menu_id][category2_id]=lvl2_div;category_toggle_children[menu_id][category2_id]=children2_div;} added_by_custom_position={};cats_hidden_in_grid=[];cat_pos_3=0;if(view_config['categories_custom_positions'][3][category2_id]){for(loop_cur_pos in view_config['categories_custom_positions'][3][category2_id]){loop_category_id=view_config['categories_custom_positions'][3][category2_id][loop_cur_pos];for(k3 in cat_divs[3]){cat_divs_cid=cat_divs[3][k3].find('.mx_megamenu_label_div').data('category_id');if(cat_divs_cid==loop_category_id){cat_divs[3][k3].find('.mx_megamenu_label_div').data('current_pos',cat_pos_3);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==3&&config["styl"]=="lista"){col_computed_i=mxComputeColumnNumber(cat_divs_cid,cat_pos_3,children2_count,children_col_count);children_cols[col_computed_i].append(cat_divs[3][k3]);} else{children2_div_in.append(cat_divs[3][k3]);} cat_pos_3=cat_pos_3+1;added_by_custom_position[cat_divs_cid]=1;}}}} for(k3 in cat_divs[3]){cat_divs_cid=cat_divs[3][k3].find('.mx_megamenu_label_div').data('category_id');if(!(cat_divs_cid in added_by_custom_position)){cat_divs[3][k3].find('.mx_megamenu_label_div').data('current_pos',cat_pos_3);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==3&&config["styl"]=="lista"){col_computed_i=mxComputeColumnNumber(cat_divs_cid,cat_pos_3,children2_count,children_col_count);children_cols[col_computed_i].append(cat_divs[3][k3]);} else if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==3&&cat_pos_3>=view_config["menu_grid_catnum"]){cats_hidden_in_grid.push(cat_divs[3][k3]);} else{children2_div_in.append(cat_divs[3][k3]);} cat_pos_3=cat_pos_3+1;}} if(cats_hidden_in_grid.length>0){cur_gridmore_bg_color=config["kolor3"];if(view_config["background"]["menu_col"].length>1){cur_gridmore_bg_color=view_config["background"]["menu_col"];} if('siatka_more_bg_color'in config&&(config['siatka_more_bg_color'].length==4||config['siatka_more_bg_color'].length==7)&&config['siatka_more_bg_color'][0]=='#'){cur_gridmore_bg_color=config['siatka_more_bg_color'];} cur_grid_more_div=$('');cur_grid_more_div.css({'box-shadow':'rgb(119, 119, 119) 0px 6px 10px -6px',}) cur_grid_more_div.css({'background-color':cur_gridmore_bg_color,});for(modk in cats_hidden_in_grid){cur_hid_cat=cats_hidden_in_grid[modk];cur_grid_more_div.append(cur_hid_cat);} if(view_config["menu_grid_showmore"]){more_button=$('
'+view_config["menu_grid_moretext"]+'
');more_button.hover(function(){$(this).find('.mx_gr_more_div').fadeIn(10);},function(){$(this).find('.mx_gr_more_div').fadeOut(10);});} else{more_button=$('
');children2_div_in.hover(function(){$(this).find('.mx_gr_more_div').fadeIn(10);},function(){$(this).find('.mx_gr_more_div').fadeOut(10);});} more_button.append(cur_grid_more_div);children2_div_in.append(more_button);} if(config["styl"]=="lista"){menu_col_divs[3].append(children2_div);} else{if(parseInt(config["font_siatka_in"])>0){children2_div.css({'font-size':parseInt(config["font_siatka_in"])+'px',});} else{children2_div.css({'font-size':'11px',});} lvl2_div.append(children2_div);}}} children1_div.data('level',1);category_toggle_children[menu_id][category1_id]=children1_div;added_by_custom_position={};cats_hidden_in_grid=[];cat_pos_2=0;if(view_config['categories_custom_positions'][2][category1_id]){for(loop_cur_pos in view_config['categories_custom_positions'][2][category1_id]){loop_category_id=view_config['categories_custom_positions'][2][category1_id][loop_cur_pos];for(k2 in cat_divs[2]){cat_divs_cid=cat_divs[2][k2].find('.mx_megamenu_label_div').data('category_id');if(cat_divs_cid==loop_category_id){cat_divs[2][k2].find('.mx_megamenu_label_div').data('current_pos',cat_pos_2);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==2&&config["styl"]=="lista"){cat_pos_2_mod=cat_pos_2;if(children1_count%children_col_count==0){cat_pos_2_mod=cat_pos_2+1;} col_computed_i=Math.ceil(((Math.max(1,cat_pos_2_mod))/ children1_count)/(1 / children_col_count));children_cols[col_computed_i].append(cat_divs[2][k2]);} else{if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==2&&cat_pos_2>view_config["menu_grid_catnum"]){cats_hidden_in_grid.push(cat_divs[2][k2]);} else{children1_div_in.append(cat_divs[2][k2]);}} cat_pos_2=cat_pos_2+1;added_by_custom_position[cat_divs_cid]=1;}}}} for(k2 in cat_divs[2]){cat_divs_cid=cat_divs[2][k2].find('.mx_megamenu_label_div').data('category_id');if(!(cat_divs_cid in added_by_custom_position)){cat_divs[2][k2].find('.mx_megamenu_label_div').data('current_pos',cat_pos_2);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==2&&config["styl"]=="lista"){cat_pos_2_mod=cat_pos_2;if(children1_count%children_col_count==0){cat_pos_2_mod=cat_pos_2+1;} col_computed_i=Math.ceil(((Math.max(1,cat_pos_2_mod))/ children1_count)/(1 / children_col_count));children_cols[col_computed_i].append(cat_divs[2][k2]);} else{if(config["styl"]=="kafelki"&&config["ilosc_zagniezdzen"]==2&&cat_pos_2>=view_config["menu_grid_catnum"]){cats_hidden_in_grid.push(cat_divs[2][k2]);} else{children1_div_in.append(cat_divs[2][k2]);}} cat_pos_2=cat_pos_2+1;}} if(cats_hidden_in_grid.length>0){cur_gridmore_bg_color=config["kolor3"];if(view_config["background"]["menu_col"].length>1){cur_gridmore_bg_color=view_config["background"]["menu_col"];} if('siatka_more_bg_color'in config&&(config['siatka_more_bg_color'].length==4||config['siatka_more_bg_color'].length==7)&&config['siatka_more_bg_color'][0]=='#'){cur_gridmore_bg_color=config['siatka_more_bg_color'];} cur_grid_more_div=$('');cur_grid_more_div.css({'box-shadow':'rgb(119, 119, 119) 0px 6px 10px -6px',}) cur_grid_more_div.css({'background-color':cur_gridmore_bg_color,});for(modk in cats_hidden_in_grid){cur_hid_cat=cats_hidden_in_grid[modk];cur_grid_more_div.append(cur_hid_cat);} if(view_config["menu_grid_showmore"]){more_button=$('
'+view_config["menu_grid_moretext"]+'
');more_button.hover(function(){$(this).find('.mx_gr_more_div').fadeIn(10);},function(){$(this).find('.mx_gr_more_div').fadeOut(10);});} else{more_button=$('
');children1_div_in.hover(function(){$(this).find('.mx_gr_more_div').fadeIn(10);},function(){$(this).find('.mx_gr_more_div').fadeOut(10);});} more_button.append(cur_grid_more_div);children1_div_in.append(more_button);} if(config["styl"]=="lista"||config["ilosc_zagniezdzen"]==3){menu_col_divs[2].append(children1_div);} else if(config["ilosc_zagniezdzen"]==2){if(parseInt(config["font_siatka_in"])>0){children1_div.css({'font-size':parseInt(config["font_siatka_in"])+'px',});} else{children1_div.css({'font-size':'11px',});} lvl1_div.append(children1_div);} else{console.log('Maxsote message 93944');}}} added_by_custom_position={};cat_pos_1=0;if(view_config['categories_custom_positions'][1][0]){for(loop_cur_pos in view_config['categories_custom_positions'][1][0]){loop_category_id=view_config['categories_custom_positions'][1][0][loop_cur_pos];for(k1 in cat_divs[1]){cat_divs_cid=cat_divs[1][k1].data('category_id');if(cat_divs_cid==loop_category_id){cat_divs[1][k1].find('.mx_megamenu_label_div').data('current_pos',cat_pos_1);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==1&&config["styl"]=="lista"){cat_pos_1_mod=cat_pos_1;if(root_cats_count%children_col_count==0){cat_pos_1_mod=cat_pos_1+1;} col_computed_i=Math.ceil(((Math.max(1,cat_pos_1_mod))/ root_cats_count)/(1 / children_col_count));children_cols[col_computed_i].append(cat_divs[1][k1]);} else{menu_col_divs_1_in.append(cat_divs[1][k1]);} cat_pos_1=cat_pos_1+1;added_by_custom_position[cat_divs_cid]=1;}}}} for(k1 in cat_divs[1]){cat_divs_cid=cat_divs[1][k1].data('category_id');if(!(cat_divs_cid in added_by_custom_position)){cat_divs[1][k1].find('.mx_megamenu_label_div').data('current_pos',cat_pos_1);if(view_config["menu_col_count_user_add"]>0&&config["ilosc_zagniezdzen"]==1&&config["styl"]=="lista"){cat_pos_1_mod=cat_pos_1;if(root_cats_count%children_col_count==0){cat_pos_1_mod=cat_pos_1+1;} col_computed_i=Math.ceil(((Math.max(1,cat_pos_1_mod))/ root_cats_count)/(1 / children_col_count));children_cols[col_computed_i].append(cat_divs[1][k1]);} else{menu_col_divs_1_in.append(cat_divs[1][k1]);} cat_pos_1=cat_pos_1+1;}} for(category_id in category_toggle_parents[menu_id]){if(category_toggle_parents[menu_id][category_id].data('level')==1&&category_toggle_parents[menu_id][category_id].find('.mx_megamenu_label_div').data('current_pos')==0&&category_id in category_toggle_children[menu_id]){mxShow(category_toggle_children[menu_id][category_id]);if(category_toggle_children[menu_id][category_id].find('.mx_megamenu_lvl2_container').length>0){first_child_id=category_toggle_children[menu_id][category_id].find('.mx_megamenu_lvl2_container').first().data('category_id');if(first_child_id in category_toggle_children[menu_id]){mxShow(category_toggle_children[menu_id][first_child_id]);}}} category_toggle_parents[menu_id][category_id].hover(function(){current_category_id=$(this).data('category_id');for(child_parent_id in category_toggle_children[menu_id]){if(current_category_id==child_parent_id){mxShow(category_toggle_children[menu_id][child_parent_id]);} else if($(this).data('level')<=category_toggle_children[menu_id][child_parent_id].data('level')){mxHide(category_toggle_children[menu_id][child_parent_id]);}}},function(){});} if(env=='admin'){menu_div=addAdminFunctionsMenu(menu_div);} container_flex.append(menu_div);$('.mx_megamenu_label_div').hover(function(){cur_cat_id=$(this).data('category_id');},function(){cur_cat_id=$(this).data('category_id');});var prawy_produkt_div=$('
');if(config["border_radius"]=="1"){prawy_produkt_div.css({'border-bottom-right-radius':config["border_radius_width"]+'px',});} if(view_config["border"]["prawy_box"].length>0){border_arr=view_config["border"]["prawy_box"].slice(0,-1).split(';');for(bk in border_arr){cur_border_arr=border_arr[bk].split(":");prawy_produkt_div.css(cur_border_arr[0],cur_border_arr[1]);}} if(config["prawy_box"]=='produkt'){prawy_produkt_div.append($('
').html(config["prawy_box_produkt_html1"]).css({'margin-bottom':'7px',}));prawy_produkt_div_produkty=$('
').css('min-height','200px');if(config["prawy_box_product_type"]=='wybrane'){product_ids=config["prawy_box_product_ids"].split(',');if(product_ids.length>0){product_ids=shuffle(product_ids);new_product_ids=[];for(i=0;i
').html(config["prawy_box_produkt_html2"]).css({'margin-top':'7px',}));} else if(config["prawy_box"]=='html'){prawy_produkt_div.html(config["prawy_box_html"]);} if(env=='admin'){prawy_produkt_div=addAdminFunctionsProdColumn(prawy_produkt_div);} if(config["prawy_box"]!='brak'){container_flex.append(prawy_produkt_div);} prawy_box_bg_color=config["kolor3"];if(view_config["background"]["prawy_box"].length>1){prawy_box_bg_color=view_config["background"]["prawy_box"];} if(view_config["background_image"]["prawy_box"].length>1){prawy_box_bg_color=prawy_box_bg_color+' '+view_config["background_image"]["prawy_box"];} prawy_produkt_div.css({'padding':view_config["padding"]["prawy_box"],'background':prawy_box_bg_color,});container.append(container_flex);if(bottom_box_all_append){container.append(bottom_box_all_div);} kolor_hover_lvl1=config["kolor1"];kolor_hover_lvl2=config["kolor1"];kolor_hover_lvl3=config["kolor1"];kolor_dziobek_lvl1='#7b858a';kolor_dziobek_lvl2='#7b858a';if("kolor_hover_lvl1"in config&&config["kolor_hover_lvl1"].length>1&&"change_kolor_hover_lvl1"in config&&parseInt(config["change_kolor_hover_lvl1"])>0){kolor_hover_lvl1=config["kolor_hover_lvl1"];} if("kolor_hover_lvl2"in config&&config["kolor_hover_lvl2"].length>1&&"change_kolor_hover_lvl2"in config&&parseInt(config["change_kolor_hover_lvl2"])>0){kolor_hover_lvl2=config["kolor_hover_lvl2"];} if("kolor_hover_lvl3"in config&&config["kolor_hover_lvl3"].length>1&&"change_kolor_hover_lvl3"in config&&parseInt(config["change_kolor_hover_lvl3"])>0){kolor_hover_lvl3=config["kolor_hover_lvl3"];} if("kolor_dziobek_lvl1"in config&&config["kolor_dziobek_lvl1"].length>1&&"change_kolor_dziobek_lvl1"in config&&parseInt(config["change_kolor_dziobek_lvl1"])>0){kolor_dziobek_lvl1=config["kolor_dziobek_lvl1"];} if("kolor_dziobek_lvl2"in config&&config["kolor_dziobek_lvl2"].length>1&&"change_kolor_dziobek_lvl2"in config&&parseInt(config["change_kolor_dziobek_lvl2"])>0){kolor_dziobek_lvl2=config["kolor_dziobek_lvl2"];} var css='';css=css+'#mx_megamenu_container_'+menu_id+' a.mx_megamenu_lvl1_label:hover{ color: '+kolor_hover_lvl1+' !important; }';css=css+'#mx_megamenu_container_'+menu_id+' a.mx_megamenu_lvl2_label:hover{ color: '+kolor_hover_lvl2+' !important; }';css=css+'#mx_megamenu_container_'+menu_id+' a.mx_megamenu_lvl3_label:hover{ color: '+kolor_hover_lvl3+' !important; }';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl1_label.mx_megamenu_dziobek:after { content: "›"; position: absolute; right: 25px; top: 50%; line-height:30px; margin-top:-15px; font-size: 20px; color: '+kolor_dziobek_lvl1+'; height: 0; width: 0; cursor:pointer;}';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl2_label.mx_megamenu_dziobek:after { content: "›"; position: absolute; right: 25px; top: 50%; line-height:30px; margin-top:-15px; font-size: 20px; color: '+kolor_dziobek_lvl2+'; height: 0; width: 0; cursor:pointer;}';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl1_label:hover.mx_megamenu_dziobek:after { color: '+kolor_hover_lvl1+'; }';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl2_label:hover.mx_megamenu_dziobek:after { color: '+kolor_hover_lvl2+'; }';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_label_div a img { vertical-align: middle; }';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl1_container { position: relative; }';css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_lvl2_container {position:relative;}';if('transition'in config&&parseFloat(config['transition'].replace(' ','').replace(',','.'))>0){css=css+'#mx_megamenu_container_'+menu_id+' .mx_megamenu_label_div a { transition: '+config['transition'].replace(' ','').replace(',','.')+'s; }';} css=css+'';css=css+'';css=css+'';css=css+'';if('add_css'in config&&config['add_css'].length>2){css=css+config['add_css'];} if(env=='admin'){css=css+'.rwd-layout-container .rwd-layout-col-12 .edition-form .mx_p_disable p { margin: 0; padding:0;} .rwd-layout-container .rwd-layout-col-12 .edition-form .mx_p_disable p + .rwd-layout-container .rwd-layout-col-12 .edition-form .mx_p_disable p{margin-top:10px}';} var style=document.createElement('style');if(style.styleSheet){style.styleSheet.cssText=css;}else{style.appendChild(document.createTextNode(css));} document.getElementsByTagName('head')[0].appendChild(style);return container;} let mxIsFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')>-1;if(Shop.values.licenseId==225478){let image={};$.each(menu_array['pl_PL'],function(i,v){let viewConfig=$.parseJSON(v.view_config);let imageObj=viewConfig.categories_style.image;if(imageObj){$.extend(image,imageObj);}});let div=$('
').css('display','none');div.text(JSON.stringify(image));$('body').append(div);$(document).ready(function(){if($(window).width()<768){let modElement=$('li.menu-mobile-li.small-menu.flex.flex-4 a.fa.fa-align-justify');modElement.click(function(){setTimeout(function(){let MM_images=$('.modMM_images').text();let MM_images_array=JSON.parse(MM_images);let modElement_child=$('.afa-chevron-down');modElement_child.click(function(){console.log('modElement_child');$('#rwd-menu li[data-category-id]').each(function(){if(!$(this).hasClass('image-appended')){console.log($(this).text());let categoryId=$(this).data('category-id');let imageSrc=MM_images_array[categoryId];if(imageSrc){let imgElement=$('').attr('src',imageSrc);$(this).prepend(imgElement);} $(this).addClass('image-appended');}});});},500);});}});} category_toggle_parents={};category_toggle_children={};prawy_product_ids={};$(document).ready(function(){let current_lang=Shop.lang.name;let MX_MENU=$('nav.innermenu');let MX_CONTAINERS={};MX_MENU.find('ul.menu-list').css('overflow','visible');$('body').css({'overflow-x':'hidden',});let mxMMAPILoader=function(){if(!window.frontAPI){setTimeout(mxMMAPILoader,0);return;} if(!(current_lang in menu_array)){return;} let initMxMegamenu=function(){let all_shades=$('
');for(let k in menu_array[current_lang]){let current_menu=menu_array[current_lang][k];$('.menu-list > li#hcategory_'+current_menu["category_id"]+' .submenu').css({'visibility':'hidden',});} for(let k in menu_array[current_lang]){let current_menu=menu_array[current_lang][k];if($('.menu-list > li#hcategory_'+current_menu["category_id"]).length<1){continue;} MX_CONTAINERS[k]={};MX_CONTAINERS[k]['MX_MENU_LI']=$('.menu-list > li#hcategory_'+current_menu["category_id"]).data('mx_menuboks_k',k);let menu_list=[];let getCategoryIdByLiId=function(id){pieces=id.split('_');return pieces[pieces.length-1];};$('.menu-list > li#hcategory_'+current_menu["category_id"]+' .level1 > li').each(function(){let mx_current_li_lvl1=$(this);let mx_current_a_lvl1=mx_current_li_lvl1.find('a').first();let lvl1_dict={"category_id":getCategoryIdByLiId(mx_current_li_lvl1.prop('id')),"name":mx_current_a_lvl1.text().trim(),"url":mx_current_a_lvl1.prop('href'),"children":[],};if(current_menu["ilosc_zagniezdzen"]<2){menu_list.push(lvl1_dict);return true;} mx_current_li_lvl1.find('.level2 > li').each(function(){let mx_current_li_lvl2=$(this);let mx_current_a_lvl2=mx_current_li_lvl2.find('a').first();let lvl2_dict={"category_id":getCategoryIdByLiId(mx_current_li_lvl2.prop('id')),"name":mx_current_a_lvl2.text().trim(),"url":mx_current_a_lvl2.prop('href'),"children":[],};if(current_menu["ilosc_zagniezdzen"]<3){lvl1_dict.children.push(lvl2_dict);return true;} mx_current_li_lvl2.find('.level3 > li').each(function(){let mx_current_li_lvl3=$(this);let mx_current_a_lvl3=mx_current_li_lvl3.find('a').first();let lvl3_dict={"category_id":getCategoryIdByLiId(mx_current_li_lvl3.prop('id')),"name":mx_current_a_lvl3.text().trim(),"url":mx_current_a_lvl3.prop('href'),"children":[],};lvl2_dict.children.push(lvl3_dict);});lvl1_dict.children.push(lvl2_dict);});menu_list.push(lvl1_dict);});if(current_menu["bg_shade"]!='none'){MX_CONTAINERS[k]['BG_SHADE_DIV']=$('
').prop('class','mx_menuboks_bg_shade_div').css({'display':'none','position':'absolute','left':'0px','background':current_menu["bg_shade_color"],'opacity':current_menu["bg_shade_opacity"],'z-index':9,});all_shades.append(MX_CONTAINERS[k]['BG_SHADE_DIV']);} MX_CONTAINERS[k]['REL_CONTAINER_DIV']=$('
').css({'position':'relative','display':'none',}).prop('class','mx_menuboks_REL_CONTAINER_DIV');if(mxIsFirefox){} if(current_menu["pos_top"]>=0){padding_top=current_menu["pos_top"];margin_top=0;} else{padding_top=0;margin_top=current_menu["pos_top"];} MX_CONTAINERS[k]['FS_CONTAINER_DIV']=$('
').css({'position':'absolute','z-index':99,'padding-top':padding_top+'px','top':margin_top+'px','display':'none',}).prop('class','mx_menuboks_FS_CONTAINER_DIV');MX_CONTAINERS[k]['FS_BG_DIV']=$('
').css({}).prop('class','mx_menuboks_FS_BG_DIV');MX_CONTAINERS[k]['WINDOW_DIV']=$('
').css({}).prop('class','mx_menuboks_WINDOW_DIV');if(current_menu["border_radius"]=="1"){MX_CONTAINERS[k]['WINDOW_DIV'].css({'border-bottom-left-radius':current_menu["border_radius_width"]+'px','border-bottom-right-radius':current_menu["border_radius_width"]+'px',});} prawy_product_ids[current_menu["id"]]=current_menu["prawy_product_ids"];MX_CONTAINERS[k]['BOKS_DIV']=$('
').css({'padding':current_menu["padding"]+'px','line-height':'150%',}).prop('class','mx_menuboks_BOKS_DIV').html(mxFnGetMegamenuHtml(current_menu["shop_id"],current_menu["id"],'shop',current_menu,menu_list,JSON.parse(current_menu["view_config"])));MX_CONTAINERS[k]['REL_CONTAINER_DIV'].html(MX_CONTAINERS[k]['FS_CONTAINER_DIV'].html(MX_CONTAINERS[k]['FS_BG_DIV'].html(MX_CONTAINERS[k]['WINDOW_DIV'].html(MX_CONTAINERS[k]['BOKS_DIV']))));MX_CONTAINERS[k]['REL_CONTAINER_DIV'].appendTo(MX_CONTAINERS[k]['MX_MENU_LI']);MX_CONTAINERS[k]['MX_MENU_LI'].hover(function(){$('div').finish();$('li').finish();$.each(MX_CONTAINERS,function(key,value){MX_CONTAINERS[key]['REL_CONTAINER_DIV'].css('display','none');});let cur_k=$(this).data('mx_menuboks_k');MX_CONTAINERS[cur_k]['REL_CONTAINER_DIV'].css('display','block');if(menu_array[current_lang][cur_k]["bg_shade"]!='none'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].css({'z-index':99,'position':'relative',});MX_CONTAINERS[cur_k]['BG_SHADE_DIV'].fadeIn(parseInt(menu_array[current_lang][cur_k]["animation_time"]));} if(menu_array[current_lang][cur_k]["li_bg"]=='1'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].find('a').first().css({'background':menu_array[current_lang][cur_k]["window_background"],});} if(menu_array[current_lang][cur_k]["li_change_color"]=='1'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].find('a').first().css({'color':menu_array[current_lang][cur_k]["li_color"],});} MX_CONTAINERS[cur_k]['MX_MENU_LI'].addClass('mx_menu_li_hover_active');if(menu_array[current_lang][cur_k]["animation_type"]=='slide'){MX_CONTAINERS[cur_k]['FS_CONTAINER_DIV'].slideDown(parseInt(menu_array[current_lang][cur_k]["animation_time"]));} else{MX_CONTAINERS[cur_k]['FS_CONTAINER_DIV'].fadeIn(parseInt(menu_array[current_lang][cur_k]["animation_time"]));}},function(){$('div').finish();$('li').finish();cur_k=$(this).data('mx_menuboks_k');if(menu_array[current_lang][cur_k]["bg_shade"]!='none'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].css({'z-index':'unset','position':'unset',});MX_CONTAINERS[cur_k]['MX_MENU_LI'].find('a').first().css({'background':'unset',});MX_CONTAINERS[cur_k]['BG_SHADE_DIV'].fadeOut(parseInt(menu_array[current_lang][cur_k]["animation_time"]));} if(menu_array[current_lang][cur_k]["li_bg"]=='1'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].find('a').first().css({'background':'unset',});} if(menu_array[current_lang][cur_k]["li_change_color"]=='1'){MX_CONTAINERS[cur_k]['MX_MENU_LI'].find('a').first().css({'color':'unset',});} MX_CONTAINERS[cur_k]['MX_MENU_LI'].removeClass('mx_menu_li_hover_active');if(menu_array[current_lang][cur_k]["animation_type"]=='slide'){MX_CONTAINERS[cur_k]['FS_CONTAINER_DIV'].slideUp(parseInt(menu_array[current_lang][cur_k]["animation_time"]));} else{MX_CONTAINERS[cur_k]['FS_CONTAINER_DIV'].fadeOut(parseInt(menu_array[current_lang][cur_k]["animation_time"]));}});} let mxApiGetProducts=function(ids,page,max_page,func_on_complete){if(page==1){max_page=Math.ceil(ids.length / 50);} let current_ids=ids;if(ids.length>50){current_ids=ids.slice(0,50);} frontAPI.getProducts(function(products){for(let prod_k in products["list"]){mx_products_data[products["list"][prod_k].id]=products["list"][prod_k];} if(page+1>max_page){func_on_complete();return true;} mxApiGetProducts(ids.slice(51),page+1,max_page,func_on_complete);},{urlParams:'?limit=50',ids:current_ids,});};let products_to_download=[];for(let menu_id in mx_after_init_ops){products_to_download.push(mx_after_init_ops[menu_id]["first_product"]);} for(let menu_id in mx_after_init_ops){for(let cur_product_id in mx_after_init_ops[menu_id]["all_products_dict"]){if(cur_product_id==mx_after_init_ops[menu_id]["first_product"]){continue;} products_to_download.push(cur_product_id);}} mxApiGetProducts(products_to_download,1,0,function(){for(let menu_id in mx_after_init_ops){let cur_product_id=mx_after_init_ops[menu_id]["first_product"];if(!(cur_product_id in mx_products_data)){let keys=Object.keys(mx_products_data);cur_product_id=keys[keys.length*Math.random()<<0];} let cur_mxGetProductBox=mx_after_init_ops[menu_id]["mxGetProductBox"];let prawy_produkt_a=cur_mxGetProductBox(mx_products_data[cur_product_id]);mx_after_init_ops[menu_id]["prawy_produkt_div_produkty"].html(prawy_produkt_a);}});all_shades.insertAfter($('nav.innermenu'));$(window).resize(mxResizeBoxes);mxResizeBoxes();setTimeout(function(){mxResizeBoxes();},1000);};let mx_mm_initialized=false;let opozniony_hover=false;$('.menu-list > li').mouseenter(function(){clearTimeout(opozniony_hover);if(!mx_mm_initialized){let init_current_li=$(this);opozniony_hover=setTimeout(function(){init_current_li.mouseenter();},100);}});MX_MENU.mouseenter(function(){if(mx_mm_initialized){return false;} else{mx_mm_initialized=true;initMxMegamenu();}});};let mxResizeBoxes=function(){let menu_offset=MX_MENU.offset();let menu_width=MX_MENU.width();let body_width=$('body').width();for(k in menu_array[current_lang]){if(k in MX_CONTAINERS){current_menu=menu_array[current_lang][k];menu_li_offset=MX_CONTAINERS[k]['MX_MENU_LI'].offset();cvcfg=JSON.parse(current_menu["view_config"]);if(current_menu['prawy_box']=='brak'){prawy_box_csvg_width=0;} else{prawy_box_csvg_width=parseFloat(cvcfg['prawy_box_width']);} menu_csvg_width=parseFloat(cvcfg['menu_width']);menu_width_px=parseFloat(((prawy_box_csvg_width+menu_csvg_width)/100*menu_width).toFixed(2));current_box_shadow='none';if(current_menu["shadow_spread"]>0){if("custom_shadow"in current_menu&¤t_menu["custom_shadow"].length>2){MX_CONTAINERS[k]['FS_BG_DIV'].attr("style",MX_CONTAINERS[k]['FS_BG_DIV'].attr("style")+"; "+current_menu["custom_shadow"]);} else{current_menu["shadow_spread"]=Math.round(current_menu["shadow_spread"]/ 2);current_box_shadow='6px 6px 4px '+current_menu["shadow_color"];MX_CONTAINERS[k]['FS_BG_DIV'].css({'box-shadow':current_box_shadow,});}} if(current_menu["mode"]=='full_screen'){if((menu_li_offset["left"]-menu_offset["left"])>menu_width / 10*5&&$('footer.footer.row').data('mxstyle')!='rocoto'){current_menu_full_box_width=menu_width*(menu_csvg_width+prawy_box_csvg_width)/100;current_menu_full_box_width=(-menu_li_offset["left"]+menu_width-current_menu_full_box_width).toFixed(2);MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':body_width,'left':current_menu_full_box_width+'px',});} else{MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':body_width,'left':'-'+menu_li_offset["left"].toFixed(2)+'px',});} MX_CONTAINERS[k]['FS_BG_DIV'].css({'background':current_menu["fs_background"],});MX_CONTAINERS[k]['WINDOW_DIV'].css({'margin-left':menu_offset["left"].toFixed(2)+'px',});} else{cur_left=0-menu_li_offset["left"]+menu_offset["left"];if((menu_li_offset["left"]-menu_offset["left"])>menu_width / 10*5&&$('footer.footer.row').data('mxstyle')!='rocoto'){current_menu_full_box_width=menu_width*(menu_csvg_width+prawy_box_csvg_width)/100;current_menu_full_box_width=(cur_left+menu_width-current_menu_full_box_width).toFixed(2);szerokosc_od_konca_px=menu_width_px+(menu_li_offset["left"]-menu_offset["left"]);if(szerokosc_od_konca_px>=menu_width){MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':menu_width,'left':current_menu_full_box_width+'px',});} else{MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':menu_width_px,'right':0,});}} else{szerokosc_od_poczatku_px=menu_width_px+menu_li_offset["left"]-menu_offset["left"];if(szerokosc_od_poczatku_px>=menu_width){MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':menu_width,'left':cur_left.toFixed(2)+'px',});} else{MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'width':menu_width_px,'left':0,});}} MX_CONTAINERS[k]['FS_BG_DIV'].css({'background':'0',});MX_CONTAINERS[k]['WINDOW_DIV'].css({'margin-left':'0px',});if(shop_id===1147){let mod_innermenu=$('ul.menu-list.large.standard');let mod_current_menu_full_box_width=(menu_li_offset["left"]-mod_innermenu.offset().left).toFixed(2);MX_CONTAINERS[k]['FS_CONTAINER_DIV'].css({'left':-mod_current_menu_full_box_width+'px',});}} if("menu_width_selector"in current_menu&¤t_menu["menu_width_selector"].length>2&&$(current_menu["menu_width_selector"]).length>0){MX_CONTAINERS[k]['WINDOW_DIV'].css({'width':$(current_menu["menu_width_selector"]).width(),});} else{MX_CONTAINERS[k]['WINDOW_DIV'].css({'width':menu_width,});} if('BG_SHADE_DIV'in MX_CONTAINERS[k]){if(current_menu["bg_shade"]=='all'){position_top=0-menu_offset["top"];bg_shade_height=parseFloat($('body').height());} else{position_top=0+MX_CONTAINERS[k]['MX_MENU_LI'].height();bg_shade_height=parseFloat($('body').height())-menu_offset["top"]-MX_CONTAINERS[k]['MX_MENU_LI'].height();} if("bg_shade_top_margin"in current_menu&&parseFloat(current_menu["bg_shade_top_margin"])>0){position_top=position_top+parseFloat(current_menu["bg_shade_top_margin"]);} MX_CONTAINERS[k]['BG_SHADE_DIV'].css({'width':$(window).width().toFixed(2)+'px','height':bg_shade_height+'px','top':position_top+'px',});}}} $('.mx_menuboks_boks_col').each(function(){let cur_col=$(this);if(cur_col.find('iframe').length>0){cur_col.find('iframe').each(function(){$(this).css('max-width','100%');});}});};mxMMAPILoader();});});