function consentCookies(n,t,i,r){setCookie(r,i,365,"/",n);i===!0?setRefferer(n):removeRefferer(n);$(".cookie-notification").addClass("d-none");t&&location.reload()}function setRefferer(n){var t,i;window.URLSearchParams&&(t=new URLSearchParams(window.location.search),t.has("referrer")&&(i=JSON.stringify({Name:t.get("referrer"),AdditionalInfo:null}),setCookie("r",i,14,"/",n)))}function removeRefferer(n){setCookie("r","",-1,"/",n)}function setCookie(n,t,i,r,u){var e=new Date,o,f;e.setTime(e.getTime()+i*864e5);o="expires="+e.toGMTString();f=n+"="+t+"; "+o+";";r&&(f+="path="+r+";");u&&(f+="domain="+u+";");window.location.protocol==="https:"&&(f+="secure;samesite=none;");document.cookie=f}function cookieIconHandler(){$("body").append(Mustache.render($("#tpl-cookie-button").html()))}$(document).ready(function(){cookieIconHandler();$(".cookie-notification button").click(function(){consentCookies($(this).data("domain"),$(this).data("refresh"),$(this).data("consent"),$(this).data("cookie"));window.eR&&window.eR.initTagManager&&window.eR.initTagManager()});$("body").has(".cookie-notification").addClass("has-cookieconsent");$(".cookie-notification",$("body").has(".cookie-notification")).find("[data-consent='true']").trigger("focus");var t=$(".js-openCookieModal"),n=$("#cookie-info-modal"),i=$(".js-acceptAllCookies"),r=$(".js-acceptFunctionalCookies");t.on("click",function(t){t.preventDefault();n.modal("show")});n.on("shown.bs.modal",function(){i.on("click",function(){consentCookies($(this).data("domain"),!1,!0,$(this).data("cookie"));n.modal("hide")});r.on("click",function(){consentCookies($(this).data("domain"),!1,!1,$(this).data("cookie"));removeRefferer();n.modal("hide")})});document.cookie.includes("eRecruiterCookieConsent=false")||!document.cookie.includes("eRecruiterCookieConsent")})