(function () {
var COOKIE_NAME = 'ann_dismissed';
var RESET_HOURS = 12;
function setCookie(name, ms) {
var expires = new Date(Date.now() + ms).toUTCString();
document.cookie = name + '=1; expires=' + expires + '; path=/; SameSite=Lax';
}
function getCookie(name) {
return document.cookie.match(new RegExp('(?:^|;\\s*)' + name + '='));
}
var overlay = document.querySelector('.pop-up-overlay');
if (!overlay) return;
// If no cookie, show the banner as flex
if (!getCookie(COOKIE_NAME)) {
overlay.style.display = 'flex';
}
// Set cookie and hide when user clicks "Continue to site"
var cta = document.querySelector('.pop-up-cta');
if (cta) {
cta.addEventListener('click', function () {
setCookie(COOKIE_NAME, RESET_HOURS * 60 * 60 * 1000);
overlay.style.display = 'none';
});
}
})();