﻿/*
* knps common script
* http://www.knps.or.kr
*
* 2009 Kim minseok
* lemonfish@gmail.com
*
* Date: 2009-01-12
* Revision: 1
*/




(function() {

    function a(url, delaySec) {
        var u = url;
        if (delaySec && delaySec > 0) {
            setTimeout(function() { window.location = url; }, delaySec * 1000);
        } else {
            window.location = url;
        }
    }
    function b() {
        var str = "";
        if (arguments.length > 1) {
            var cnt = arguments.length;
            for (var i = 0; i < cnt; i++) {
                str = arguments[i];
                if (str == null || $.trim(str) == "") {
                    return true;
                }
            }
        } else {
            var str = arguments[0];
            if (str == null || $.trim(str) == "") {
                return true;
            }
        }
        return false;
    }

    window.knps =
    {
        version: "1.0",

        redirect: a,
        isEmpty: b

    }

})();

// 19 국립공원 최상위 메뉴 이미지 오버처리
$(function() { $(".swap19").hover(function() { $(this).attr("src", $(this).attr("src").split("o.").join(".")); }, function() { $(this).attr("src", $(this).attr("src").split(".").join("o.")); }); });

// 연구원 최상위 메뉴 이미지 오버처리
$(function() { $(".rswap").hover(function() { $(this).attr("src", $(this).attr("src").split(".").join("s.")); }, function() { $(this).attr("src", $(this).attr("src").split("s.").join(".")); }); });

// 에코투어
$(function() { $(".swapeco").hover(function() { $(this).attr("src", $(this).attr("src").split("o.").join("oo.")); }, function() { $(this).attr("src", $(this).attr("src").split("o.").join(".")); }); });

$(function() { $(".swap").hover(function() { $(this).attr("src", $(this).attr("src").split(".").join(".")); }, function() { $(this).attr("src", $(this).attr("src").split(".").join(".")); }); });

$(function() { $("a.popup").click(function() { window.open(this.href, $(this).attr("id") ? "w_" + $(this).attr("id") : "", $(this).attr("rel") ? $(this).attr("rel") : ""); return false; }); });