var _ADULT = (_UBIRTH || _UBIRTH > 0) ? calcAge(_UBIRTH) : 0;
var _VODPAGE = false;
var _VODPAY = (_ADULT < 19) ? false : true;

window.dataLayer = window.dataLayer || [];

function gtag() {
    dataLayer.push(arguments);
}

gtag('js', new Date());

gtag('config', 'UA-153231212-1');

$(window).load(function () {
    chatAlarm();
    $(".search_btn").click(function () {
        f = document.topsearchform;
        if (f.keyword.value == "") {
            alert("검색어를 입력해주세요");
            f.keyword.focus();
            return false;
        }
        f.submit();
    });

//닉네임 클릭시 팝업
    $('.nav_member_nick').on('click', function () {
        $('#pop_my').show();
    });
});

function chatAlarm() {
    $.ajax({
        url: "/feedData/chatStatus",
        dataType: 'json',
        success: function (data) {
            if (data.result > 0) {
                $('.chatAlarm').removeClass('none');
            }
        }
    })
}

function openEvent(url) {
    if (!_UK && url != "/content/eventpage") {
        openPop('#pop_login');
    } else {
        location.href = url;
    }
}