!function () { const e = "\n body:not(.in-sitecore) .jhGated {\n display: none !important;\n }\n body.fonzie:not(.in-sitecore) .jhGate {\n display: none !important;\n }\n body.fonzie:not(.in-sitecore) .jhGated {\n display: inline-block !important;\n }\n "; const t = document.createElement("style"); t.type = "text/css"; if (t.styleSheet) { t.styleSheet.cssText = e; } else { t.appendChild(document.createTextNode(e)); } document.head.appendChild(t); }(); const userLevels = { none: 0, webuser: 1, member: 2, pps: 3 }; function getCookieValue(e) { const t = document.cookie.split(";"); for (let n = 0; n < t.length; n++) { const s = t[n].trim(); if (s.startsWith(e + "=")) return decodeURIComponent(s.substring(e.length + 1)); } return null; } function isCookieExpired(e) { const t = new Date(); return new Date(e) < t; } function getUserStatus() { const e = getCookieValue("Ticket"); if (!e) return "none"; const t = e.match(/expires&([^&]*)/); const n = t ? t[1] : null; const s = e.indexOf("&aces&"); if (-1 === s) return "webuser"; const o = e.indexOf("&", s + 6); const i = e.substring(s + 6, -1 !== o ? o : e.length).split("*"); return i.some((e) => e.startsWith("pps,")) ? (n && isCookieExpired(n) ? "expired" : "pps") : i.some((e) => e.startsWith("member,")) ? (n && isCookieExpired(n) ? "expired" : "member") : "webuser"; } function getRequiredLevelFromClassList(e) { return e.contains("jhGated-pps") ? "pps" : e.contains("jhGated-webuser") ? "webuser" : "member"; } document.addEventListener("DOMContentLoaded", () => { const e = getUserStatus(); document.querySelectorAll(".jhGated").forEach((t) => { const n = getRequiredLevelFromClassList(t.classList); if (userLevels[e] < userLevels[n]) { t.remove(); } else { t.style.display = "inline-block"; document.body.classList.add("fonzie"); } }); });
By clicking submit, your club agrees to: