HEX
Server: LiteSpeed
System: Linux dal1.hostclusters.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User: vslw (1496)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/vslw/public_html/wp-content/themes/soledad/js/exit.js
(function ($) {
    "use strict";

    // Exit Popup Functionality
    function exitPopup() {
        // Check if age verification is required and not confirmed
        if (sessionStorage.getItem("penci_epopup_show") === "shown") {
            return;
        }

        // Show the popup
        function showPopup() {
            $.magnificPopup.open({
                items: {
                    src: ".penci-epopup-content",
                },
                type: "inline",
                removalDelay: 500, // Delay removal to allow out-animation
                tClose: false,
                tLoading: false,
                callbacks: {
                    beforeOpen: function () {
                        this.st.mainClass = "mfp-ani-wrap penci-promo-popup-wrapper";
                    },
                    close: function () {
                        sessionStorage.setItem("penci_epopup_show", "shown");
                    },
                },
            });
        }

        // Set a flag to trigger only once
        let exitIntentShown = false;

        // Detect mouseleave at the top of the page
        document.addEventListener("mouseout", function (e) {
            if (e.clientY < 50 && !exitIntentShown) {
                showPopup();
                exitIntentShown = true;
            }
        });
    }

    // Initialize on document ready
    $(document).ready(exitPopup);
})(jQuery);