$(document).ready(function(){removeWcagLink();setupWcagCookies();bindWcagButtons();bindAttachments();blueimp.Gallery();backToTop();$(".bip-page__content table").wrap('
');$("#printButton").click(function(){window.print()})});function removeWcagLink(){$(".slabowidzacy3").remove()}function bindAttachments(){$("#filesContent").on("show.bs.collapse",function(){if($("#filesContent #filesSpinner").length>0){let request=new Request;let data="Action=GET_BIP_ATTACHED_FILES2&PageId="+PAGE_ID;request.post(URL_CLIENT_REQUEST,data,function(data){if(typeof data.partialView!="undefined"&&typeof data.result!="undefined"){request.parsePartial(data.partialView,"#filesContent")}},"json")}})}function backToTop(){$(window).scroll(function(){if($(this).scrollTop()>400){$("#goTopBipButton").fadeIn()}else{$("#goTopBipButton").fadeOut()}});$("#goTopBipButton").click(function(){$("body,html").animate({scrollTop:$("body").offset().top},800);return false})}function bindWcagButtons(){$("#btn-wcag__toggler").click(function(){if($(this).hasClass("wcag-toolbox-hidden")){$(this).find($(".fa")).removeClass("fa-plus-square");$(this).find($(".fa")).addClass("fa-minus-square");$(this).find($(".toggler-text")).html("Ukryj panel ułatwień dostępu");setCookie("wcag_hide_toolbox","0",12,"../index.html","",0,"Lax")}else{$(this).find($(".fa")).removeClass("fa-minus-square");$(this).find($(".fa")).addClass("fa-plus-square");$(this).find($(".toggler-text")).html("Pokaż panel ułatwień dostępu");setCookie("wcag_hide_toolbox","1",12,"../index.html","",0,"Lax")}$(this).toggleClass("wcag-toolbox-hidden")});$("#small").click(function(){resetFontSize();setCookie("wcag_font_size","",-1,"../index.html","",0,"Lax")});$("#medium").click(function(){resetFontSize();setCookie("wcag_font_size","medium",12,"../index.html","",0,"Lax");$("html").addClass("font-size-medium")});$("#large").click(function(){resetFontSize();setCookie("wcag_font_size","large",12,"../index.html","",0,"Lax");$("html").addClass("font-size-large")});$("#contrast-normal").click(function(){resetContrast();setCookie("wcag_contrast_type","",-1,"../index.html","",0,"Lax")});$("#black-yellow").click(function(){resetContrast();setCookie("wcag_contrast_type","black-yellow",12,"../index.html","",0,"Lax");$("html").addClass("black-yellow")});$("#black-white").click(function(){resetContrast();setCookie("wcag_contrast_type","black-white",12,"../index.html","",0,"Lax");$("html").addClass("black-white")});$("#white-black").click(function(){resetContrast();setCookie("wcag_contrast_type","white-black",12,"../index.html","",0,"Lax");$("html").addClass("white-black")});$("#yellow-black").click(function(){resetContrast();setCookie("wcag_contrast_type","yellow-black",12,"../index.html","",0,"Lax");$("html").addClass("yellow-black")});$("#letterspacing").click(function(){const letterSpacing=ReadCookie("wcag_letter-spacing");if(letterSpacing===undefined||letterSpacing===""){setCookie("wcag_letter-spacing","1",12,"../index.html","",0,"Lax");$("html").addClass("letter-spacing-large")}else{setCookie("wcag_letter-spacing","",-1,"../index.html","",0,"Lax");$("html").removeClass("letter-spacing-large")}});$("#lineheight").click(function(){const lineHeight=ReadCookie("wcag_line-height");if(lineHeight===undefined||lineHeight===""){setCookie("wcag_line-height","1",12,"../index.html","",0,"Lax");$("html").addClass("line-height-large")}else{setCookie("wcag_line-height","",-1,"../index.html","",0,"Lax");$("html").removeClass("line-height-large")}});$("#resetsettings").click(function(){resetSettings()})}function resetSettings(){$("html").removeClass("font-size-medium font-size-large line-height-large letter-spacing-large black-white black-yellow white-black yellow-black");setCookie("wcag_font_size","",-1,"../index.html","",0,"Lax");setCookie("wcag_contrast_type","",-1,"../index.html","",0,"Lax");setCookie("wcag_line-height","",-1,"../index.html","",0,"Lax");setCookie("wcag_letter-spacing","",-1,"../index.html","",0,"Lax");if(ReadCookie("read_links")==="1"){$("#read_links").click()}window.speechSynthesis.cancel()}function resetContrast(){$("html").removeClass("black-white black-yellow white-black yellow-black")}function resetFontSize(){$("html").removeClass("font-size-medium font-size-large")}function setupWcagCookies(){const wcagContrast=ReadCookie("wcag_contrast_type");if(wcagContrast!==undefined&&wcagContrast!==""){$("html").addClass(wcagContrast)}const fontSize=ReadCookie("wcag_font_size");if(fontSize!==undefined&&fontSize!==""){$("html").addClass("font-size-"+fontSize)}const letterSpacing=ReadCookie("wcag_letter-spacing");if(letterSpacing!==undefined&&letterSpacing==="1"){$("html").addClass("letter-spacing-large")}const lineHeight=ReadCookie("wcag_line-height");if(lineHeight!==undefined&&lineHeight==="1"){$("html").addClass("line-height-large")}}