1const cookiesPolicyBtns=document.querySelectorAll("[href='#cookies-policy']");cookiesPolicyBtns&&cookiesPolicyBtns.forEach(btn=>{btn.classList.add("cky-banner-element")}),$(window).on("load",(function(){$(".footer .spacer").css("margin-left",$(".contact-box").position().left),$("nav.tray .content").css("padding-left",$("nav.main ul li:first-child").position().left),$(".custom-collapse.open").each((function(){$(".collapse",this).css("max-height",$(".collapse-wrapper",this).outerHeight()+"px")}))})),$(window).on("resize",(function(){$(".footer .spacer").css("margin-left",$(".contact-box").position().left),$("nav.tray .content").css("padding-left",$("nav.main ul li:first-child").position().left)})),$("a.search").on("click",(function(e){e.stopPropagation(),$("a.search").fadeOut("fast"),$(window).outerWidth()<1104&&$("a.logo").fadeOut("fast"),$(".search-bar").fadeIn("fast").css("display","flex")})),$(".search-bar").on("click",(function(e){e.stopPropagation()})),$(".search-bar input").on("keyup",(function(){""!=$(this).val()?$(".search-bar .icons").addClass("active"):$(".search-bar .icons").removeClass("active")})),$(".search-bar .search-off-btn").on("click",(function(){$(".search-bar input").val(""),$(".search-bar .icons").removeClass("active")})),$(".search-bar input").on("keypress",(function(event){var keycode;if("13"==(event.keyCode?event.keyCode:event.which))return $(this).closest("form").submit(),!1})),$(".tray-on").on("click",(function(e){e.preventDefault();var obj=$(this),tray;if($(obj).hasClass("on"))return $(".tray-on").removeClass("on"),$("nav.tray").removeClass("shw").removeClass("opc"),$("nav.main a.logo, nav.main .to-white, nav.main a.logo-unia").removeClass("white"),setTimeout((function(){$("nav.tray").hasClass("shw")||$("nav.tray").css("display","none")}),300),!1;switch($(".tray-on").removeClass("on"),$(obj).addClass("on"),obj.data("info")){case"Napoje i skÅadniki":tray="drinks";break;case"Rynek i konsumenci":tray="consumers";break;case"Modele wspóÅpracy":tray="cooperation";break;case"Dlaczego Grana":tray="grana";break;case"Pracuj z nami":tray="work"}"block"==$("nav.tray").css("display")&&$("nav.tray").removeClass("shw").addClass("opc"),$("nav.tray").css("display","block"),$("nav.tray .content-box > div").removeClass("active"),$('nav.tray .content-box > div[data-tray="'+tray+'"]').addClass("active"),setTimeout((function(){$("nav.tray").addClass("shw").removeClass("opc"),$("nav.main a.logo, nav.main .to-white, nav.main a.logo-unia").addClass("white")}),100)})),$.hideMenu=function(){$(".tray-on").removeClass("on"),$("nav.tray").removeClass("shw").removeClass("opc"),$("nav.main a.logo, nav.main .to-white, nav.main a.logo-unia").removeClass("white"),setTimeout((function(){$("nav.tray").hasClass("shw")||$("nav.tray").css("display","none")}),300)},$(".tray-off").on("mouseenter",$.hideMenu),$(window).on("click",(function(e){$(".search-bar .icons").is(":visible")&&($(".search-bar input").val(""),$(".search-bar .icons").removeClass("active"),$(".search-bar").fadeOut("fast"),$("a.search, a.logo").fadeIn("fast")),$("nav.tray").is(":visible")&&$(".search-bar .icons").is(":hidden")&&!$(e.target).hasClass("tray-on")?$.hideMenu():$(e.target).hasClass("tray-on")})),$("#menuMobileAccordion").on("show.bs.collapse",(function(e){var card=$(e.target).parent();$("button",card).addClass("active")})),$("#menuMobileAccordion").on("hide.bs.collapse",(function(e){var card=$(e.target).parent();$("button",card).removeClass("active")})),$(".production-steps .collapse").on("show.bs.collapse",(function(e){var card=$(e.target).parent();if($("a.collapse-btn",card).addClass("active"),void 0!==$("a.collapse-btn",card).data("slide-to")&&$($("a.collapse-btn",card).data("slide-to")).length){var offset=$($("a.collapse-btn",card).data("slide-to")).offset();$("html, body").animate({scrollTop:offset.top-20},500)}})),$(".production-steps .collapse").on("hide.bs.collapse",(function(e){var card=$(e.target).parent();$("a.collapse-btn",card).removeClass("active")})),$(".rodo-box .collapse").on("show.bs.collapse",(function(e){var card=$(e.target).parent();$("a.collapse-btn",card).addClass("active")})),$(".rodo-box .collapse").on("hide.bs.collapse",(function(e){var card=$(e.target).parent();$("a.collapse-btn",card).removeClass("active")})),$(".page-template .collapse").on("show.bs.collapse",(function(e){var card=$(e.target).parent();if($("a.collapse-btn",card).addClass("active"),void 0!==$("a.collapse-btn",card).data("slide-to")&&$($("a.collapse-btn",card).data("slide-to")).length){var offset=$($("a.collapse-btn",card).data("slide-to")).offset();$("html, body").animate({scrollTop:offset.top-20},500)}})),$(".page-template .collapse").on("hide.bs.collapse",(function(e){var card=$(e.target).parent();$("a.collapse-btn",card).removeClass("active")})),$('[data-toggle="custom-collapse"]').on("click",(function(e){e.preventDefault();var obj=$(this),parent=$(obj).parent();
1if($(obj).hasClass("active"))$(".collapse",parent).css("max-height","0px"),$(obj).removeClass("active");else{var maxHeight=$(".collapse-wrapper",parent).outerHeight();$(".collapse",parent).css("max-height",maxHeight+"px"),$(obj).addClass("active")}})),$(window).on("resize",(function(){$(".custom-collapse").each((function(){var parent=$(this),maxHeight;parseInt($(".collapse",parent).css("max-height"),10)>0&&$(".collapse",parent).css("max-height",$(".collapse-wrapper",parent).outerHeight()+"px")}))})),$.scrollEvent=function(){$(".scrollEvent").click((function(){var target=$(this).data("target");if((void 0!==target||""!=target)&&$(target).length){var scroll_time=1e3,offset_correction=0;if(void 0!==$(this).data("time")||""!=$(this).data("time")){var s_t=parseInt($(this).data("time"));isNaN(s_t)||(scroll_time=s_t)}if(void 0!==$(this).data("offset")||""!=$(this).data("offset")){var o_c=parseInt($(this).data("offset"));isNaN(o_c)||(offset_correction=o_c)}var offset=$(target+":first").offset();return $("html, body").animate({scrollTop:offset.top+offset_correction},scroll_time),!1}}))};var playerInstances={},loadFlag=!1,paginationCurrentPage=1;$.eventsLoadFcnInit=function(){$("body").on("click",".events .eventsLoaderEvent",(function(){var t=$(this);return!loadFlag&&(loadFlag=!0,$(".spinner-border",t).removeClass("d-none"),setTimeout((function(){$.post(t.data("action"),{langId:t.data("lang"),part:paginationCurrentPage,sectionId:t.data("section"),sectionGroupId:t.data("sectiongroup"),url:t.data("url")},(function(data){return"ok"==data.status&&($(".events .content-box > article").last().after(data.html),paginationCurrentPage++,$(".spinner-border",t).addClass("d-none"),data.end?(loadFlag=!0,$(t.closest("div")).addClass("invisible")):loadFlag=!1,!1)}),"json")}),500),!1)}))},$.fn.whiteSpaces=function(){if($(this).length<1)return!1;$(this).each((function(){var str=$(this).html();str=str.replace(/\s([a-z]{1})\s/gi," $1 "),$(this).html(str)}))},$((function(){$.scrollEvent(),$.eventsLoadFcnInit(),$("h1").whiteSpaces(),$("h2").whiteSpaces(),$("h3").whiteSpaces(),$("p").whiteSpaces(),$("h1.section").whiteSpaces(),$("h2.section").whiteSpaces(),$("p.section").whiteSpaces(),$(".text-editor p").whiteSpaces(),$(".properties-box .item p").whiteSpaces(),$(".steps-box .title-box h3 span").whiteSpaces(),$(".steps-box .item header h2 span").whiteSpaces(),$(".news-box .item p").whiteSpaces(),$(".page-cooperation .info-box h2").whiteSpaces(),$(".work-steps .steps article h3").whiteSpaces(),$(".reason-box p.feature").whiteSpaces(),$(".reliable-partner .numbers-box .text p").whiteSpaces(),$(".grana-business-content article .text-editor p").whiteSpaces(),$(".lay-container").length&&$('[data-toggle="custom-collapse"]:first').length&&$('[data-toggle="custom-collapse"]:first').click(),$("ul.packshotsFilterEvent li a").click((function(){var filter=$(this).data("filter");if(filter){var i=1,firstActive=0;$(".right .filter-list").each((function(){var show=0;$(".downloads article.item",this).each((function(i){$(this).closest(".insert-btn").length||($('[data-filter="'+filter+'"]',this).length?($(this).show(),show=1):$(this).hide())})),show?($(this).show(),firstActive||(firstActive=i)):$(this).hide(),i++}))}else $(".right .filter-list").each((function(){$(".downloads article.item",this).each((function(i){$(this).closest(".insert-btn").length||$(this).show()})),$(this).show(),firstActive=1}));return setTimeout((function(){var offset=$(".right .filter-list:eq("+(firstActive-1)+")").offset();$("html, body").animate({scrollTop:offset.top-20},500)}),200),!1}))}));var properties=$(".intro-drinks-v1 .properties-box"),propertiesCurrent=0,propertiesMax,propertiesCols,news=$(".intro-news-module .news-box"),newsCurrent=0,newsMax,recipes=$(".intro-recipe-rotator"),recipesCurrent=0,recipesMax,recipesTexts,rotators=$(".recipe-example-rotator"),rotatorsCurrent=[],rotatorsMax=[],rotatorsTexts=[],quots=$(".module-quot:not(.mod-tpl)"),quotsCurrent=[],quotsMax=[],quotsTexts=[],sliders=$(".module-slider:not(.quote-slider-module):not(.mod-tpl)"),slidersCurrent=[],slidersMax=[],slidersTexts=[],sliders2=$(".module-slider.quote-slider-module:not(.mod-tpl)"),sliders2Current=[],sliders2Max=[],sliders2Texts=[],sliders2OnSlide=[],brands=$(".brands-list"),brandsCurrent=[],brandsMax=[],historyrotator=$(".page-history .rotator"),historyrotatorCurrent=0,historyrotatorMax,historyrotatorMargins=[];let ytIframes,ytFronts;$(window).on("load",(function(){$.setProperties(),$.setNews(),recipesTexts=recipes.data("texts"),$.setRecipes();for(var i=0;i<rotators.length;i++)rotatorsCurrent[i]=0,$(rotators[i]).data("index",i),rotatorsTexts[i]=$(rotators[i]).data("texts"),$(rotators[i]).setRotators();for(var i=0;i<quots.length;i++)quotsCurrent[i]=0,$(quots[i]).data("index",i),quotsTexts[i]=$(quots[i]).data("quots"),$(quots[i]).setQuots(),quotsTexts[i].length<2?$(".buttons",quots[i]).css("display","none"):$(".buttons",quots[i]).css("display","flex");for(var i=0;i<sliders.length;i++)slidersCurrent[i]=0,$(sliders[i]).data("index",i),slidersTexts[i]=$(sliders[i]).data("text"),$(sliders[i]).setSliders(),slidersTexts[i].length<2?$(".btn-wrapper",sliders[i]).css("display","none"):$(".btn-wrapper",sliders[i]).css("display","flex");for(var i=0;i<sliders2.length;i++)sliders2Current[i]=0,$(sliders2[i]).data("index",i),sliders2Texts[i]=$(sliders2[i]).data("text"),sliders2OnSlide[i]=$(sliders2[i]).data("onslide"),$(sliders2[i]).setSliders2(),sliders2OnSlide[i]<2&&sliders2Texts[i].length<2||sliders2OnSlide[i]>1&&sliders2Texts[i].length<sliders2OnSlide[i]+1?$(".btn-wrapper",sliders2[i]).css("display","none"):$(".btn-wrapper",sliders2[i]).css("display","flex");for(var i=0;i<brands.length;i++)brandsCurrent[i]=0,$(brands[i]).data("index",i),$(brands[i]).setBrands();$.setHistoryRotator()})),$(window).on("resize",(function(){propertiesCurrent=0,$.setProperties(),newsCurrent=0,$.setNews(),recipesCurrent=0,$.setRecipes();for(var i=0;i<rotators.length;i++)rotatorsCurrent[i]=0,$(rotators[i]).setRotators();for(var i=0;i<quots.length;i++)quotsCurrent[i]=0,$(quots[i]).setQuots();for(var i=0;i<sliders.length;i++)slidersCurrent[i]=0,$(sliders[i]).setSliders();for(var i=0;i<brands.length;i++)brandsCurrent[i]=0,$(brands[i]).setBrands();$.setHistoryRotator()})),$.fn.cssPercentageWidth=function(){var item=parseFloat($(this).css("width")),parent=parseFloat($(this).parent().css("width")),ret=Math.round(100*item/parent);return 33==ret?33.3333:ret},$.fn.numberAddZero=function(){var val=parseInt($(this).html());val<10&&(val="0"+val),$(this).html(val)},document.addEventListener("swiped",(function(e){var check=[$(e.target)[0],$(e.target).parent()[0],$(e.target).parent().parent()[0],$(e.target).parent().parent().parent()[0],$(e.target).parent().parent().parent().parent()[0],$(e.target).parent().parent().parent().parent().parent()[0],$(e.target).parent().parent().parent().parent().parent().parent()[0]];check.forEach((function(i){switch(i){case properties.parent()[0]:"left"==e.detail.dir?$.nextProperties():"right"==e.detail.dir&&$.prevProperties();break;case news[0]:"left"==e.detail.dir?$.nextNews():"right"==e.detail.dir&&$.prevNews();break;case recipes[0]:"left"==e.detail.dir?$.nextRecipes():"right"==e.detail.dir&&$.prevRecipes();break;case historyrotator[0]:"left"==e.detail.dir?$.nextHistoryRotator():"right"==e.detail.dir&&$.prevHistoryRotator()}}));for(var a=0;a<rotators.length;a++)check.forEach((function(i){switch(i){case rotators[a]:"left"==e.detail.dir?$(rotators[a]).nextRotators():"right"==e.detail.dir&&$(rotators[a]).prevRotators()}}));for(var a=0;a<quots.length;a++)check.forEach((function(i){switch(i){case quots[a]:"left"==e.detail.dir?$(quots[a]).nextQuots():"right"==e.detail.dir&&$(quots[a]).prevQuots()}}));for(var a=0;a<sliders.length;a++)check.forEach((function(i){switch(i){case sliders[a]:"left"==e.detail.dir?$(sliders[a]).nextSliders():"right"==e.detail.dir&&$(sliders[a]).prevSliders()}}));for(var a=0;a<brands.length;a++)check.forEach((function(i){switch(i){case brands[a]:"left"==e.detail.dir?$(brands[a]).nextBrands():"right"==e.detail.dir&&$(brands[a]).prevBrands()}}))})),$(".intro-news-module .controls-rotator a:first").on("click",(function(e){e.preventDefault(),$.prevNews()})),$(".intro-news-module .controls-rotator a:last").on("click",(function(e){e.preventDefault(),$.nextNews()})),$(".intro-recipe-rotator .controls-rotator a:first").on("click",(function(e){e.preventDefault(),$.prevRecipes()})),$(".intro-recipe-rotator .controls-rotator a:last").on("click",(function(e){e.preventDefault(),$.nextRecipes()})),$(".recipe-example-rotator .control:first-child > a").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().parent().prevRotators()})),$(".recipe-example-rotator .control:last-child > a").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().parent().nextRotators()})),$(".module-quot .buttons .prev").on("click",(function(e){e.preventDefault(),$(this).parent().parent().prevQuots()})),$(".module-quot .buttons .next").on("click",(function(e){e.preventDefault(),$(this).parent().parent().nextQuots()})),$(".module-slider .btn-wrapper .prev").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().prevSliders()})),$(".module-slider .btn-wrapper .next").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().nextSliders()})),$(".module-slider.quote-slider-module .btn-wrapper .prev").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().prevSliders2()})),$(".module-slider.quote-slider-module .btn-wrapper .next").on("click",(function(e){e.preventDefault(),$(this).parent().parent().parent().nextSliders2()})),$(".brands-list .prev").on("click",(function(e){e.preventDefault(),$(this).parent().parent().prevBrands()})),$(".brands-list .next").on("click",(function(e){e.preventDefault(),$(this).parent().parent().nextBrands()})),$("a.next",historyrotator).on("click",(function(e){e.preventDefault(),$.prevHistoryRotator()})),$("a.prev",historyrotator).on("click",(function(e){e.preventDefault(),$.nextHistoryRotator()})),$.correctProperties=function(width){50==width?(propertiesMax=$(".item",properties).length-2,propertiesCols=2):33.3333==width?(propertiesMax=$(".item",properties).length-3,propertiesCols=3):(propertiesMax=$(".item",properties).length-1,propertiesCols=1)},$.setProperties=function(){var width=$(".item:first",properties).cssPercentageWidth();$.correctProperties(width);var margin=propertiesCurrent*width,items=$(".item",properties).length;$(".item:first",properties).css("margin-left","-"+margin+"%"),$(".intro-drinks-v1 .scrollbar .scrollbtn").css("width",propertiesCols/items*100+"%").css("left",propertiesCurrent*(100/items)+"%")},$.nextProperties=function(){propertiesCurrent<propertiesMax&&propertiesCurrent++,$.setProperties()},$.prevProperties=function(){propertiesCurrent>0&&propertiesCurrent--,$.setProperties()},$.setNewsCounter=function(){var counter=$(".intro-news-module .counter");$("span:first",counter).html(newsCurrent+1).numberAddZero(),$("span:last",counter).html(newsMax+1).numberAddZero()},$.setNews=function(){var width=$(".item:first",news).cssPercentageWidth();if(newsMax=$(".item",news).length-1,100==width){var margin=newsCurrent*width;$(".item:first",news).css("margin-left","-"+margin+"%"),$.setNewsCounter()}else $(".item:first",news).css("margin-left","0")}
1,$.nextNews=function(){newsCurrent<newsMax?newsCurrent++:newsCurrent=0,$.setNews()},$.prevNews=function(){newsCurrent>0?newsCurrent--:newsCurrent=newsMax,$.setNews()},$.setRecipesCounter=function(){var counter=$(".counter",recipes);$("span:first",counter).html(recipesCurrent+1).numberAddZero(),$("span:last",counter).html(recipesMax+1).numberAddZero()},$.setRecipes=function(){var width=$(".item:first",recipes).cssPercentageWidth();if(recipesMax=$(".item",recipes).length-1,100==width){var margin=recipesCurrent*width;$(".item:first",recipes).css("margin-left","-"+margin+"%"),$(".item",recipes).removeClass("active"),$(".item:eq("+recipesCurrent+")",recipes).addClass("active"),$(".description-box h3.rotator, .description-textbox",recipes).addClass("dimmed"),setTimeout((function(){$(".description-box h3.rotator",recipes).html(recipesTexts[recipesCurrent].title),$(".description-box .description-textbox p",recipes).html(recipesTexts[recipesCurrent].description),$(".description-box h3.rotator, .description-textbox",recipes).removeClass("dimmed")}),300),$.setRecipesCounter()}else $(".item:first",recipes).css("margin-left","0")},$.nextRecipes=function(){recipesCurrent<recipesMax?recipesCurrent++:recipesCurrent=0,$.setRecipes()},$.prevRecipes=function(){recipesCurrent>0?recipesCurrent--:recipesCurrent=recipesMax,$.setRecipes()},$.fn.setRotators=function(){var i=$(this).data("index"),width=$(".item:first",this).cssPercentageWidth();rotatorsMax[i]=$(".item",this).length-1;var margin=rotatorsCurrent[i]*width;$(".item:first",this).css("margin-left","-"+margin+"%"),$(".title",this).addClass("dimmed"),setTimeout(function(){var i=$(this).data("index");void 0!==rotatorsTexts[i][rotatorsCurrent[i]].title?$(".title > p",this).html(rotatorsTexts[i][rotatorsCurrent[i]].title):$(".title > p",this).html(rotatorsTexts[i][rotatorsCurrent[i]]),$(".title",this).removeClass("dimmed")}.bind(this),300)},$.fn.nextRotators=function(){var i=$(this).data("index");rotatorsCurrent[i]<rotatorsMax[i]?rotatorsCurrent[i]++:rotatorsCurrent[i]=0,$(this).setRotators()},$.fn.prevRotators=function(){var i=$(this).data("index");rotatorsCurrent[i]>0?rotatorsCurrent[i]--:rotatorsCurrent[i]=rotatorsMax[i],$(this).setRotators()},$.fn.setQuots=function(){var i=$(this).data("index");quotsMax[i]=quotsTexts[i].length-1,$("h2, h3, p",this).addClass("dimmed"),setTimeout(function(){var i=$(this).data("index");$("h2, h3",this).html(quotsTexts[i][quotsCurrent[i]].header),$("p",this).html(quotsTexts[i][quotsCurrent[i]].quot),$("h2, h3, p",this).removeClass("dimmed")}.bind(this),400)},$.fn.nextQuots=function(){var i=$(this).data("index");quotsCurrent[i]<quotsMax[i]?quotsCurrent[i]++:quotsCurrent[i]=0,$(this).setQuots()},$.fn.prevQuots=function(){var i=$(this).data("index");quotsCurrent[i]>0?quotsCurrent[i]--:quotsCurrent[i]=quotsMax[i],$(this).setQuots()},$.fn.setSlidersCounter=function(){var i=$(this).data("index"),counter=$(".counter",this);$("span:first",counter).html(slidersCurrent[i]+1).numberAddZero(),$("span:last",counter).html(slidersMax[i]+1).numberAddZero()},$.fn.setSliders=function(){var i=$(this).data("index"),width=$("figure:first",this).cssPercentageWidth();slidersMax[i]=$("figure",this).length-1;var margin=slidersCurrent[i]*width;$("figure:first",this).css("margin-left","-"+margin+"%"),$(".wrapper",this).addClass("dimmed"),setTimeout(function(){var i=$(this).data("index");$(".wrapper",this).html(slidersTexts[i][slidersCurrent[i]]),$(".wrapper",this).removeClass("dimmed"),$(this).setSlidersCounter()}.bind(this),300)},$.fn.nextSliders=function(){var i=$(this).data("index");slidersCurrent[i]<slidersMax[i]?slidersCurrent[i]++:slidersCurrent[i]=0,$(this).setSliders()},$.fn.prevSliders=function(){var i=$(this).data("index");slidersCurrent[i]>0?slidersCurrent[i]--:slidersCurrent[i]=slidersMax[i],$(this).setSliders()},$.fn.setSliders2Counter=function(){var i=$(this).data("index"),counter=$(".counter",this);$("span:first",counter).html(sliders2Current[i]+1).numberAddZero(),$("span:last",counter).html(sliders2Max[i]+1).numberAddZero()},$.fn.setSliders2=function(){var i=$(this).data("index"),width=$("figure:first",this).cssPercentageWidth();console.log(i,width),sliders2OnSlide[i]>1?sliders2Max[i]=$(".element:first figure",this).length-1:sliders2Max[i]=$("figure",this).length-1;var margin=sliders2Current[i]*width;$(".element",this).each((function(){$("figure:first",this).css("margin-left","-"+margin+"%")})),$(".wrapper",this).addClass("dimmed"),setTimeout(function(){var i=$(this).data("index");let eq=0;$(".element",this).each((function(){void 0!==sliders2Texts[i][sliders2Current[i]*sliders2OnSlide[i]+eq]?$(".wrapper",this).html(sliders2Texts[i][sliders2Current[i]*sliders2OnSlide[i]+eq]):$(".wrapper",this).html(""),eq++})),$(".wrapper",this).removeClass("dimmed"),$(this).setSliders2Counter()}.bind(this),300)},$.fn.nextSliders2=function(){var i=$(this).data("index");sliders2Current[i]<sliders2Max[i]?sliders2Current[i]++:sliders2Current[i]=0,$(this).setSliders2()},$.fn.prevSliders2=function(){var i=$(this).data("index");sliders2Current[i]>
10?sliders2Current[i]--:sliders2Current[i]=sliders2Max[i],$(this).setSliders2()},$.fn.setBrands=function(){var i=$(this).data("index"),width=$("article:first",this).cssPercentageWidth();if(100==width){brandsMax[i]=$("article",this).length-1;var margin=brandsCurrent[i]*width;$("article:first",this).css("margin-left","-"+margin+"%"),$("article",this).addClass("dimmed"),setTimeout(function(){var i=$(this).data("index");$("article",this).removeClass("dimmed")}.bind(this),600)}else $("article:first",this).css("margin-left","0")},$.fn.nextBrands=function(){var i=$(this).data("index");brandsCurrent[i]<brandsMax[i]?brandsCurrent[i]++:brandsCurrent[i]=0,$(this).setBrands()},$.fn.prevBrands=function(){var i=$(this).data("index");brandsCurrent[i]>0?brandsCurrent[i]--:brandsCurrent[i]=brandsMax[i],$(this).setBrands()},$.setHistoryRotator=function(){$(historyrotator).each((function(){var historymargin=0;historyrotatorMax=$("figure",historyrotator).length-1,historyrotatorMargins=[],$("figure",historyrotator).each((function(){var margin=Math.round($(this).width()/2);historyrotatorMargins.push(margin+historymargin),historymargin+=Math.round($(this).width()+parseInt($(this).css("margin-left")))})),$("figure:first",historyrotator).css("margin-right","calc(50% - "+historyrotatorMargins[historyrotatorCurrent]+"px)");var titles=$(historyrotator).data("title");$("p",historyrotator).html(titles[historyrotatorCurrent])}))},$.prevHistoryRotator=function(){historyrotatorCurrent<historyrotatorMax?historyrotatorCurrent++:historyrotatorCurrent=0,$.setHistoryRotator()},$.nextHistoryRotator=function(){historyrotatorCurrent>0?historyrotatorCurrent--:historyrotatorCurrent=historyrotatorMax,$.setHistoryRotator()};let ytPlayers=[];const consentLang=document.querySelector("html").getAttribute("lang");let consentYtLockPLTemplate='<div class="p-4"><p class="mb-2 text-center">Aby obejrzeÄ ten materiaÅ na stronie <b>grana.pl</b>, musisz wyraziÄ zgode na funkcjonalne i reklamowe pliki cookie.</p><p class="text-center"><a class="youtubeConsentBtn" style="color: #EE7601; font-weight: bold;" href="#">Wyraź zgodÄ</a> lub obejrzyj bezpoÅrednio na YouTube: <a class="ytOutsideBtn" style="color: #EE7601; font-weight: bold;" href="" target="_blank">Kliknij tutaj</a>.</p></div>',consentYtLockENTemplate='<div class="p-4"><p class="mb-2 text-center">To view this content on <b>grana.pl</b>, you need to consent to functional and advertising cookies.</p><p class="text-center">Please <a class="youtubeConsentBtn" style="color: #EE7601; font-weight: bold;" href="#">give your consent</a> or watch directly on YouTube: <a class="ytOutsideBtn" style="color: #EE7601; font-weight: bold;" href="" target="_blank">Click here</a>.</p></div>',consentYtLock=document.createElement("div");function extractVideoId(url){const regex=/embed\/([a-zA-Z0-9_-]+)/,match=url.match(regex);return match?match[1]:null}function youTubeInit(){ytFronts=document.querySelectorAll(".front"),ytFrontsConsent=document.querySelectorAll(".front-consent-off"),ytIframes.forEach((iframe,index)=>{iframe.setAttribute("src",iframe.getAttribute("data-src")),ytFrontsConsent[index].classList.add("d-none")});let tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";let firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}function onYouTubeIframeAPIReady(){ytIframes.forEach((iframe,index)=>{let player=new YT.Player(iframe,{events:{onReady:function(event){ytFronts[index].addEventListener("click",(function(){event.target.playVideo()}))}}});ytPlayers.push(player)})}consentYtLock.classList.add("front-consent-off"),consentYtLock.innerHTML="pl-PL"==consentLang?consentYtLockPLTemplate:consentYtLockENTemplate,$(window).on("load",(function(){ytIframes=document.querySelectorAll("iframe.iframe"),ytIframes.forEach((iframe,index)=>{let ytID,ytUrl=`https://www.youtube.com/watch?v=${extractVideoId(iframe.getAttribute("data-src"))}`;consentYtLock.querySelector(".ytOutsideBtn").setAttribute("href",ytUrl),iframe.insertAdjacentElement("beforebegin",consentYtLock.cloneNode(!0))}),$("body.sg .preloader").waypoint({handler:function(direction){switch(direction){case"down":$(this.element).removeClass("preloader")}},offset:"75%"})})),$(".front").on("click",(function(){$(this).fadeOut()})),document.addEventListener("cookieyes_banner_load",(function(event){getCkyConsent().categories.functional&&getCkyConsent().categories.advertisement&&document.querySelector("iframe.iframe")&&youTubeInit()})),document.addEventListener("cookieyes_consent_update",(function(event){getCkyConsent().isUserActionCompleted&&document.querySelector("iframe.iframe")&&(event.detail.accepted.includes("functional")&&event.detail.accepted.includes("advertisement")&&youTubeInit(),(event.detail.rejected.includes("functional")||event.detail.rejected.includes("advertisement"))&&window.location.reload())}));let contentBox=document.querySelector("main");contentBox&&contentBox.addEventListener("click",event=>{event.target.closest(".youtubeConsentBtn")&&(event.preventDefault(),document.getElementById("ckySwitchfunctional").checked=!0,document.getElementById("ckySwitchadvertisement").checked=!0,performBannerAction("accept_partial"))});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.