HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/sportivo.komma.pro/wwwroot/js/popUp.js
/**
 * Created by Pascal on 29/03/16.
 */
$(function () {

    var mouseTrack = false;

    $(document).on("mousemove", function (event) {
        if (mouseTrack == true) {
            if (getCookie('popUpCookie') != 'true') {
                if (event.clientY <= 80) {
                    $('.pop-up-container').addClass('show');
                }
            }
        }
    });

    setTimeout(function () {
        mouseTrack = true;

    }, 4000);


    setTimeout(function () {
        if (getCookie('popUpCookie') != 'true') {
            $('.pop-up-container').addClass('show');
        }

    }, 30000);

    $('.pop-up-container').click(function () {
        $('.pop-up-container').removeClass('show');
        setCookie('popUpCookie', 'true', 30);
    });

    $('.pop-up-container .wrapper .exit').click(function () {
        $('.pop-up-container').removeClass('show');
        setCookie('popUpCookie', 'true', 30);
    });

    $('.pop-up-container .wrapper').click(function (event) {
        event.stopPropagation();
    });

    $('.pop-up-submit').click(function () {
        setCookie('popUpCookie', 'true', 30);
        $('.pop-up-container .information form').submit();
    });

});


function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
    var expires = "expires=" + d.toUTCString();
    document.cookie = cname + "=" + cvalue + "; " + expires;
}

function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1);
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}