function doCookieModalModalOpen(){new Foundation.Reveal($("#gdpr")).open(),e.preventDefault(),$(".cookieControlTrigger").css("opacity","0"),$(".cookieControlTrigger").attr("aria-pressed","true")}var json_str=getCookie("CookieNotice");function doCookieModalModalClose(){new Foundation.Reveal($("#gdpr")).close(),e.preventDefault(),$("#welcomeCookies").show(),$("#reviewCookies").hide(),$("#reviewCookies").attr("aria-hidden","true"),$(".cookieControlTrigger").css("opacity","1"),$(".cookieControlTrigger").attr("aria-pressed","false")}function checkCookie(e){var o=getCookie(e);return"0"===o?"0":"1"===o?"1":"-1"}function getCookie(e){return document.cookie.length>0&&(c_start=document.cookie.indexOf(e+"="),-1!=c_start)?(c_start=c_start+e.length+1,c_end=document.cookie.indexOf(";",c_start),-1==c_end&&(c_end=document.cookie.length),unescape(document.cookie.substring(c_start,c_end))):""}function createCookie(e,o){var t,i=new Date;i.setTime(i.getTime()+15552e6),t="; expires="+i.toUTCString(),"https:"===location.protocol?document.cookie=e+"="+o+t+"; path=/; secure; samesite=lax;":document.cookie=e+"="+o+t+"; path=/; samesite=lax;"}""===json_str?doCookieModalModalOpen():doCookieModalModalClose(),$("#reviewCookiesTrigger").on("click",(function(){$("#welcomeCookies").hide(),$("#reviewCookies").show(),$("#reviewCookies").attr("aria-hidden","false"),$(this).attr("aria-pressed","true");var e="1",o="",t=getCookie("CookieNotice");if(""===t){t=JSON.stringify(["statistics=1","marketing=0"])}return JSON.parse(t).forEach((function(t,i){var c=t.split("="),n=c[1];"statistics"===c[0]&&(e=n);"marketing"===c[0]&&(o=n)})),"1"===e?$("#Statistics-yes-no").prop("checked",!0):$("#Statistics-yes-no").prop("checked",!1),"1"===o?$("#Marketing-yes-no").prop("checked",!0):$("#Marketing-yes-no").prop("checked",!1),$("#customSettings").show(),!1})),$("#reviewCookies input[name='cookiesSwitches']:checkbox").on("change",(function(){var e=$("#reviewCookies input:checkbox").length;$("#reviewCookies input:checkbox:checked").length<e?$("#customSettings").show():$("#customSettings").hide()})),$("#cookieControl").click((function(){$(".cookieControlTrigger").css("opacity","0"),$(".cookieControlTrigger").attr("aria-pressed","true"),$("html, body").animate({scrollTop:0}),doCookieModalModalOpen()})),$("#customSettingsSubmit").click((function(){var e=new Date;e.setTime(e.getTime()+15552e6);var o="statistics=0",t="marketing=0";$("#Statistics-yes-no").is(":checked")&&(o="statistics=1"),$("#Marketing-yes-no").is(":checked")&&(t="marketing=1");var i=[o,t];createCookie("CookieNotice",JSON.stringify(i)),doCookieModalModalClose()})),$("#recommendedSettingsSubmit").click((function(){$("input:checkbox[name='cookiesSwitches']").prop("checked",!0);return createCookie("CookieNotice",JSON.stringify(["statistics=1","marketing=1"])),setTimeout((function(){doCookieModalModalClose()}),500),!1}));