Stay connected

Sign up for our newsletter and get the latest resources, training updates, and testimonies.

By clicking Sign Up you're confirming that you agree with our Terms and Conditions and Privacy Policy and provide consent to receive updates from our organization.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
} }, true); // Escape key is an additional way to close it. document.addEventListener('keydown', function (event) { if ( event.key === 'Escape' && overlay.classList.contains('kp-popup-visible') ) { closePopup(); } }); // Open after seven seconds unless dismissed recently. if (!isDismissed()) { timer = setTimeout(openPopup, 7000); } console.log('Campaign popup controller initialized.'); } if (document.readyState === 'loading') { document.addEventListener( 'DOMContentLoaded', initCampaignPopup, { once: true } ); } else { initCampaignPopup(); } })(); // Clicking anywhere outside the card closes the popup. overlay.addEventListener('click', function (event) { if (!card.contains(event.target)) { closePopup(); } }); // Show after seven seconds. if (!isDismissed()) { timer = window.setTimeout(openPopup, 7000); } // Allow Escape to close it too. document.addEventListener('keydown', function (event) { if ( event.key === 'Escape' && overlay.classList.contains('kp-popup-visible') ) { closePopup(); } }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initPopup); } else { initPopup(); } })(); function openPopup() { if (wasDismissed()) return; overlay.classList.add('kp-popup-visible'); overlay.classList.remove('is-open'); overlay.setAttribute('aria-hidden', 'false'); document.body.style.overflow = 'hidden'; } function closePopup(event) { if (event) { event.preventDefault(); event.stopPropagation(); } overlay.classList.remove('kp-popup-visible', 'is-open'); overlay.setAttribute('aria-hidden', 'true'); overlay.style.setProperty('display', 'none', 'important'); document.body.style.overflow = ''; if (popupTimer) { window.clearTimeout(popupTimer); } try { localStorage.setItem( storageKey, String(Date.now() + sevenDays) ); } catch (error) {} } // Always start hidden. overlay.classList.remove('kp-popup-visible', 'is-open'); overlay.setAttribute('aria-hidden', 'true'); overlay.style.removeProperty('display'); document.body.style.overflow = ''; // Close button: works when clicking its text or nested elements. if (closeButton) { closeButton.addEventListener('click', closePopup, true); } else { console.warn( 'Campaign popup: .campaign-popup-close button not found.' ); } // Close when clicking the dark overlay outside the card. overlay.addEventListener('click', function (event) { if (event.target === overlay) { closePopup(event); } }); // Close with Escape. document.addEventListener('keydown', function (event) { if ( event.key === 'Escape' && overlay.classList.contains('kp-popup-visible') ) { closePopup(event); } }); // Show after seven seconds unless dismissed in the last seven days. if (!wasDismissed()) { popupTimer = window.setTimeout(openPopup, 7000); } } if (document.readyState === 'loading') { document.addEventListener( 'DOMContentLoaded', initCampaignPopup, { once: true } ); } else { initCampaignPopup(); } })(); document.addEventListener('click', function (event) { const button = event.target.closest('.campaign-popup-close'); if (!button) return; const overlay = button.closest('.campaign-popup-overlay'); if (!overlay) return; event.preventDefault(); event.stopPropagation(); overlay.classList.remove('kp-popup-visible', 'is-open'); overlay.style.setProperty('display', 'none', 'important'); overlay.setAttribute('aria-hidden', 'true'); document.body.style.overflow = ''; try { localStorage.setItem( 'kpCampaignDismissedUntil_v2', String(Date.now() + 7 * 24 * 60 * 60 * 1000) ); } catch (error) {} }, true);