var tmpswf;
var swfobject = function() {
    var l = "undefined",
        T = "object",
        A = "Shockwave Flash",
        e = "ShockwaveFlash.ShockwaveFlash",
        S = "application/x-shockwave-flash",
        z = "SWFObjectExprInst",
        f = "onreadystatechange",
        w = window,
        L = document,
        V = navigator,
        B = false,
        a = [J],
        Q = [],
        v = [],
        q = [],
        N, y, m, j, r = false,
        C = false,
        P, o, O = true,
        u = function() {
            var ah = typeof L.getElementById != l && typeof L.getElementsByTagName != l && typeof L.createElement != l,
                ad = V.userAgent.toLowerCase(),
                af = V.platform.toLowerCase(),
                aa = af ? /win/.test(af) : /win/.test(ad),
                Y = af ? /mac/.test(af) : /mac/.test(ad),
                ab = /webkit/.test(ad) ? parseFloat(ad.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
                ae = !+"\v1",
                ac = [0, 0, 0],
                X = null;
            if (typeof V.plugins != l && typeof V.plugins[A] == T) {
                X = V.plugins[A].description;
                if (X && !(typeof V.mimeTypes != l && V.mimeTypes[S] && !V.mimeTypes[S].enabledPlugin)) {
                    B = true;
                    ae = false;
                    X = X.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
                    ac[0] = parseInt(X.replace(/^(.*)\..*$/, "$1"), 10);
                    ac[1] = parseInt(X.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
                    ac[2] = /[a-zA-Z]/.test(X) ? parseInt(X.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
                }
            } else {
                if (typeof w.ActiveXObject != l) {
                    try {
                        var Z = new ActiveXObject(e);
                        if (Z) {
                            X = Z.GetVariable("$version");
                            if (X) {
                                ae = true;
                                X = X.split(" ")[1].split(",");
                                ac = [parseInt(X[0], 10), parseInt(X[1], 10), parseInt(X[2], 10)]
                            }
                        }
                    } catch (ag) {}
                }
            }
            return {
                w3: ah,
                pv: ac,
                wk: ab,
                ie: ae,
                win: aa,
                mac: Y
            }
        }(),
        M = function() {
            if (!u.w3) {
                return
            }
            if ((typeof L.readyState != l && L.readyState == "complete") || (typeof L.readyState == l && (L.getElementsByTagName("body")[0] || L.body))) {
                H()
            }
            if (!r) {
                if (typeof L.addEventListener != l) {
                    L.addEventListener("DOMContentLoaded", H, false)
                }
                if (u.ie && u.win) {
                    L.attachEvent(f, function() {
                        if (L.readyState == "complete") {
                            L.detachEvent(f, arguments.callee);
                            H()
                        }
                    });
                    if (w == top) {
                        (function() {
                            if (r) {
                                return
                            }
                            try {
                                L.documentElement.doScroll("left")
                            } catch (X) {
                                setTimeout(arguments.callee, 0);
                                return
                            }
                            H()
                        })()
                    }
                }
                if (u.wk) {
                    (function() {
                        if (r) {
                            return
                        }
                        if (!/loaded|complete/.test(L.readyState)) {
                            setTimeout(arguments.callee, 0);
                            return
                        }
                        H()
                    })()
                }
                U(H)
            }
        }();

    function H() {
        if (r) {
            return
        }
        try {
            var X = L.getElementsByTagName("body")[0].appendChild(k("span"));
            X.parentNode.removeChild(X)
        } catch (Y) {
            return
        }
        r = true;
        var Z = a.length;
        for (var aa = 0; aa < Z; aa++) {
            a[aa]()
        }
    }

    function s(X) {
        if (r) {
            X()
        } else {
            a[a.length] = X
        }
    }

    function U(Y) {
        if (typeof w.addEventListener != l) {
            w.addEventListener("load", Y, false)
        } else {
            if (typeof L.addEventListener != l) {
                L.addEventListener("load", Y, false)
            } else {
                if (typeof w.attachEvent != l) {
                    K(w, "onload", Y)
                } else {
                    if (typeof w.onload == "function") {
                        var X = w.onload;
                        w.onload = function() {
                            X();
                            Y()
                        }
                    } else {
                        w.onload = Y
                    }
                }
            }
        }
    }

    function J() {
        if (B) {
            c()
        } else {
            p()
        }
    }

    function c() {
        var Z = L.getElementsByTagName("body")[0];
        var X = k(T);
        X.setAttribute("type", S);
        var Y = Z.appendChild(X);
        if (Y) {
            var aa = 0;
            (function() {
                if (typeof Y.GetVariable != l) {
                    var ab = Y.GetVariable("$version");
                    if (ab) {
                        ab = ab.split(" ")[1].split(",");
                        u.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)]
                    }
                } else {
                    if (aa < 10) {
                        aa++;
                        setTimeout(arguments.callee, 10);
                        return
                    }
                }
                Z.removeChild(X);
                Y = null;
                p()
            })()
        } else {
            p()
        }
    }

    function p() {
        var ac = Q.length;
        if (ac > 0) {
            for (var ab = 0; ab < ac; ab++) {
                var ag = Q[ab].id;
                var X = Q[ab].callbackFn;
                var ai = {
                    success: false,
                    id: ag
                };
                if (u.pv[0] > 0) {
                    var aa = E(ag);
                    if (aa) {
                        if (n(Q[ab].swfVersion) && !(u.wk && u.wk < 312)) {
                            d(ag, true);
                            if (X) {
                                ai.success = true;
                                ai.ref = h(ag);
                                X(ai)
                            }
                        } else {
                            if (Q[ab].expressInstall && i()) {
                                var ae = {};
                                ae.data = Q[ab].expressInstall;
                                ae.width = aa.getAttribute("width") || "0";
                                ae.height = aa.getAttribute("height") || "0";
                                if (aa.getAttribute("class")) {
                                    ae.styleclass = aa.getAttribute("class")
                                }
                                if (aa.getAttribute("align")) {
                                    ae.align = aa.getAttribute("align")
                                }
                                var ad = {};
                                var af = aa.getElementsByTagName("param");
                                var Y = af.length;
                                for (var Z = 0; Z < Y; Z++) {
                                    if (af[Z].getAttribute("name").toLowerCase() != "movie") {
                                        ad[af[Z].getAttribute("name")] = af[Z].getAttribute("value")
                                    }
                                }
                                x(ae, ad, ag, X)
                            } else {
                                R(aa);
                                if (X) {
                                    X(ai)
                                }
                            }
                        }
                    }
                } else {
                    d(ag, true);
                    if (X) {
                        var ah = h(ag);
                        if (ah && typeof ah.SetVariable != l) {
                            ai.success = true;
                            ai.ref = ah
                        }
                        X(ai)
                    }
                }
            }
        }
    }

    function h(X) {
        var Z = null;
        var aa = E(X);
        if (aa && aa.nodeName == "OBJECT") {
            if (typeof aa.SetVariable != l) {
                Z = aa
            } else {
                var Y = aa.getElementsByTagName(T)[0];
                if (Y) {
                    Z = Y
                }
            }
        }
        return Z
    }

    function i() {
        return !C && n("6.0.65") && (u.win || u.mac) && !(u.wk && u.wk < 312)
    }

    function x(ab, ad, Z, ac) {
        C = true;
        m = ac || null;
        j = {
            success: false,
            id: Z
        };
        var Y = E(Z);
        if (Y) {
            if (Y.nodeName == "OBJECT") {
                N = I(Y);
                y = null
            } else {
                N = Y;
                y = Z
            }
            ab.id = z;
            if (typeof ab.width == l || (!/%$/.test(ab.width) && parseInt(ab.width, 10) < 310)) {
                ab.width = "310"
            }
            if (typeof ab.height == l || (!/%$/.test(ab.height) && parseInt(ab.height, 10) < 137)) {
                ab.height = "137"
            }
            L.title = L.title.slice(0, 47) + " - Flash Player Installation";
            var X = u.ie && u.win ? "ActiveX" : "PlugIn",
                ae = "MMredirectURL=" + w.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + X + "&MMdoctitle=" + L.title;
            if (typeof ad.flashvars != l) {
                ad.flashvars += "&" + ae
            } else {
                ad.flashvars = ae
            }
            if (u.ie && u.win && Y.readyState != 4) {
                var aa = k("div");
                Z += "SWFObjectNew";
                aa.setAttribute("id", Z);
                Y.parentNode.insertBefore(aa, Y);
                Y.style.display = "none";
                (function() {
                    if (Y.readyState == 4) {
                        Y.parentNode.removeChild(Y)
                    } else {
                        setTimeout(arguments.callee, 10)
                    }
                })()
            }
            W(ab, ad, Z)
        }
    }

    function R(Y) {
        if (u.ie && u.win && Y.readyState != 4) {
            var X = k("div");
            Y.parentNode.insertBefore(X, Y);
            X.parentNode.replaceChild(I(Y), X);
            Y.style.display = "none";
            (function() {
                if (Y.readyState == 4) {
                    Y.parentNode.removeChild(Y)
                } else {
                    setTimeout(arguments.callee, 10)
                }
            })()
        } else {
            Y.parentNode.replaceChild(I(Y), Y)
        }
    }

    function I(X) {
        var ab = k("div");
        if (u.win && u.ie) {
            ab.innerHTML = X.innerHTML
        } else {
            var aa = X.getElementsByTagName(T)[0];
            if (aa) {
                var Y = aa.childNodes;
                if (Y) {
                    var Z = Y.length;
                    for (var ac = 0; ac < Z; ac++) {
                        if (!(Y[ac].nodeType == 1 && Y[ac].nodeName == "PARAM") && !(Y[ac].nodeType == 8)) {
                            ab.appendChild(Y[ac].cloneNode(true))
                        }
                    }
                }
            }
        }
        return ab
    }

    function W(ae, ac, ag) {
        var af, ai = E(ag);
        if (u.wk && u.wk < 312) {
            return af
        }
        if (ai) {
            if (typeof ae.id == l) {
                ae.id = ag
            }
            if (u.ie && u.win) {
                var ad = "";
                for (var aa in ae) {
                    if (ae[aa] != Object.prototype[aa]) {
                        if (aa.toLowerCase() == "data") {
                            ac.movie = ae[aa]
                        } else {
                            if (aa.toLowerCase() == "styleclass") {
                                ad += ' class="' + ae[aa] + '"'
                            } else {
                                if (aa.toLowerCase() != "classid") {
                                    ad += " " + aa + '="' + ae[aa] + '"'
                                }
                            }
                        }
                    }
                }
                var ab = "";
                for (var Z in ac) {
                    if (ac[Z] != Object.prototype[Z]) {
                        ab += '<param name="' + Z + '" value="' + ac[Z] + '" />'
                    }
                }
                ai.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ad + ">" + ab + "</object>";
                v[v.length] = ae.id;
                af = E(ae.id)
            } else {
                var ah = k(T);
                ah.setAttribute("type", S);
                for (var Y in ae) {
                    if (ae[Y] != Object.prototype[Y]) {
                        if (Y.toLowerCase() == "styleclass") {
                            ah.setAttribute("class", ae[Y])
                        } else {
                            if (Y.toLowerCase() != "classid") {
                                ah.setAttribute(Y, ae[Y])
                            }
                        }
                    }
                }
                for (var X in ac) {
                    if (ac[X] != Object.prototype[X] && X.toLowerCase() != "movie") {
                        G(ah, X, ac[X])
                    }
                }
                ai.parentNode.replaceChild(ah, ai);
                af = ah
            }
        }
        return af
    }

    function G(X, Z, aa) {
        var Y = k("param");
        Y.setAttribute("name", Z);
        Y.setAttribute("value", aa);
        X.appendChild(Y)
    }

    function g(Y) {
        var X = E(Y);
        if (X && X.nodeName == "OBJECT") {
            if (u.ie && u.win) {
                X.style.display = "none";
                (function() {
                    if (X.readyState == 4) {
                        D(Y)
                    } else {
                        setTimeout(arguments.callee, 10)
                    }
                })()
            } else {
                X.parentNode.removeChild(X)
            }
        }
    }

    function D(Y) {
        var X = E(Y);
        if (X) {
            for (var Z in X) {
                if (typeof X[Z] == "function") {
                    X[Z] = null
                }
            }
            X.parentNode.removeChild(X)
        }
    }

    function E(Y) {
        var Z = null;
        try {
            Z = L.getElementById(Y)
        } catch (X) {}
        return Z
    }

    function k(X) {
        return L.createElement(X)
    }

    function K(Y, Z, X) {
        Y.attachEvent(Z, X);
        q[q.length] = [Y, Z, X]
    }

    function n(Y) {
        var X = u.pv,
            Z = Y.split(".");
        Z[0] = parseInt(Z[0], 10);
        Z[1] = parseInt(Z[1], 10) || 0;
        Z[2] = parseInt(Z[2], 10) || 0;
        return (X[0] > Z[0] || (X[0] == Z[0] && X[1] > Z[1]) || (X[0] == Z[0] && X[1] == Z[1] && X[2] >= Z[2])) ? true : false
    }

    function b(X, aa, Y, ad) {
        if (u.ie && u.mac) {
            return
        }
        var ab = L.getElementsByTagName("head")[0];
        if (!ab) {
            return
        }
        var Z = (Y && typeof Y == "string") ? Y : "screen";
        if (ad) {
            P = null;
            o = null
        }
        if (!P || o != Z) {
            var ac = k("style");
            ac.setAttribute("type", "text/css");
            ac.setAttribute("media", Z);
            P = ab.appendChild(ac);
            if (u.ie && u.win && typeof L.styleSheets != l && L.styleSheets.length > 0) {
                P = L.styleSheets[L.styleSheets.length - 1]
            }
            o = Z
        }
        if (u.ie && u.win) {
            if (P && typeof P.addRule == T) {
                P.addRule(X, aa)
            }
        } else {
            if (P && typeof L.createTextNode != l) {
                P.appendChild(L.createTextNode(X + " {" + aa + "}"))
            }
        }
    }

    function d(Y, Z) {
        if (!O) {
            return
        }
        var X = Z ? "visible" : "hidden";
        if (r && E(Y)) {
            E(Y).style.visibility = X
        } else {
            b("#" + Y, "visibility:" + X)
        }
    }

    function t(X) {
        var Y = /[\\\"<>\.;]/;
        var Z = Y.exec(X) != null;
        return Z && typeof encodeURIComponent != l ? encodeURIComponent(X) : X
    }
    var F = function() {
        if (u.ie && u.win) {
            window.attachEvent("onunload", function() {
                var Y = q.length;
                for (var X = 0; X < Y; X++) {
                    q[X][0].detachEvent(q[X][1], q[X][2])
                }
                var ab = v.length;
                for (var ac = 0; ac < ab; ac++) {
                    g(v[ac])
                }
                for (var aa in u) {
                    u[aa] = null
                }
                u = null;
                for (var Z in swfobject) {
                    swfobject[Z] = null
                }
                swfobject = null
            })
        }
    }();
    return {
        registerObject: function(Y, Z, ab, X) {
            if (u.w3 && Y && Z) {
                var aa = {};
                aa.id = Y;
                aa.swfVersion = Z;
                aa.expressInstall = ab;
                aa.callbackFn = X;
                Q[Q.length] = aa;
                d(Y, false)
            } else {
                if (X) {
                    X({
                        success: false,
                        id: Y
                    })
                }
            }
        },
        getObjectById: function(X) {
            if (u.w3) {
                return h(X)
            }
        },
        embedSWF: function(X, ad, aa, ac, af, ah, ag, Z, ab, Y) {
            var ae = {
                success: false,
                id: ad
            };
            if (u.w3 && !(u.wk && u.wk < 312) && X && ad && aa && ac && af) {
                d(ad, false);
                s(function() {
                    aa += "";
                    ac += "";
                    var ak = {};
                    if (ab && typeof ab === T) {
                        for (var am in ab) {
                            ak[am] = ab[am]
                        }
                    }
                    ak.data = X;
                    ak.width = aa;
                    ak.height = ac;
                    var an = {};
                    if (Z && typeof Z === T) {
                        for (var al in Z) {
                            an[al] = Z[al]
                        }
                    }
                    if (ag && typeof ag === T) {
                        for (var aj in ag) {
                            if (typeof an.flashvars != l) {
                                an.flashvars += "&" + aj + "=" + ag[aj]
                            } else {
                                an.flashvars = aj + "=" + ag[aj]
                            }
                        }
                    }
                    if (n(af)) {
                        var ai = W(ak, an, ad);
                        if (ak.id == ad) {
                            d(ad, true)
                        }
                        ae.success = true;
                        ae.ref = ai
                    } else {
                        if (ah && i()) {
                            ak.data = ah;
                            x(ak, an, ad, Y);
                            return
                        } else {
                            d(ad, true)
                        }
                    }
                    if (Y) {
                        Y(ae)
                    }
                })
            } else {
                if (Y) {
                    Y(ae)
                }
            }
        },
        switchOffAutoHideShow: function() {
            O = false
        },
        ua: u,
        getFlashPlayerVersion: function() {
            return {
                major: u.pv[0],
                minor: u.pv[1],
                release: u.pv[2]
            }
        },
        hasFlashPlayerVersion: n,
        createSWF: function(Y, X, Z) {
            if (u.w3) {
                return W(Y, X, Z)
            } else {
                return undefined
            }
        },
        showExpressInstall: function(X, Y, Z, aa) {
            if (u.w3 && i()) {
                x(X, Y, Z, aa)
            }
        },
        removeSWF: function(X) {
            if (u.w3) {
                g(X)
            }
        },
        createCSS: function(X, Y, aa, Z) {
            if (u.w3) {
                b(X, Y, aa, Z)
            }
        },
        addDomLoadEvent: s,
        addLoadEvent: U,
        getQueryParamValue: function(X) {
            var Y = L.location.search || L.location.hash;
            if (Y) {
                if (/\?/.test(Y)) {
                    Y = Y.split("?")[1]
                }
                if (X == null) {
                    return t(Y)
                }
                var aa = Y.split("&");
                for (var Z = 0; Z < aa.length; Z++) {
                    if (aa[Z].substring(0, aa[Z].indexOf("=")) == X) {
                        return t(aa[Z].substring((aa[Z].indexOf("=") + 1)))
                    }
                }
            }
            return ""
        },
        expressInstallCallback: function() {
            if (C) {
                var X = E(z);
                if (X && N) {
                    X.parentNode.replaceChild(N, X);
                    if (y) {
                        d(y, true);
                        if (u.ie && u.win) {
                            N.style.display = "block"
                        }
                    }
                    if (m) {
                        m(j)
                    }
                }
                C = false
            }
        }
    }
}();

function setCookie(c, h, a) {
    var b = new Date();
    b.setDate(b.getDate() + a);
    cookies = c + "=" + escape(h) + ";path=/";
    if (typeof a != "undefined") {
        cookies += ";expires=" + b.toGMTString() + ";"
    }
    document.cookie = cookies
}

function board(b) {
    (function(T) {
        var U = T(b);
        var ab = U.attr("data-default_style");
        var ad = U.attr("data-bdBubble");
        var J = U.attr("data-lstViewer");
        var X = U.attr("data-bdFilesType");
        var R = U.attr("data-bdImgOpt");
        var N = U.attr("data-bdImgLink");
        var H = U.attr("data-bdNavSide");
        ie8Check = navigator.userAgent.match(/msie [7]/i) || navigator.userAgent.match(/msie [8]/i);
        if (bdLogin) {
            U.find("a.bd_login").click(function() {
                if (confirm(bdLogin.split("@")[0])) {
                    window.location.href = bdLogin.split("@")[1]
                }
                return false
            })
        }
        var Z = U.find("div.bd_cnb");
        var M = U.find("ul.cTab");
        if (Z.length) {
            var a = U.find("li.cnbMore");
            var V = Z.find(">ul>li");
            var S = null;

            function P() {
                var c = T(this);
                if (c.next("ul").is(":hidden") || c.next("ul").length == 0) {
                    V.find(">ul").fadeOut(100);
                    c.next("ul").fadeIn(200)
                }
            }

            function D() {
                V.find("ul").fadeOut(100)
            }
            V.find(">a").mouseover(P).focus(P);
            V.mouseleave(D);
            V.find(">ul").each(function() {
                var c = T(this);
                c.append('<i class="edge"></i>');
                if (ie8Check) {
                    c.prepend('<i class="ie8_only bl"></i><i class="ie8_only br"></i>')
                }
                if (c.width() > T("html,body").width() - c.offset().left) {
                    c.addClass("flip")
                }
            });
            V.find(">ul>li.on").parents("ul:first").show().prev().addClass("on");

            function Q() {
                V.each(function() {
                    if (T(this).offset().top != a.offset().top) {
                        T(this).addClass("cnb_hide").nextAll().addClass("cnb_hide");
                        a.css("visibility", "visible");
                        return false
                    } else {
                        T(this).removeClass("cnb_hide").nextAll().removeClass("cnb_hide");
                        a.css("visibility", "hidden")
                    }
                });
                Z.find(">.bg_f_f9").css("overflow", "visible")
            }
            Q();
            T(window).resize(Q);

            function E() {
                Z.toggleClass("open").find("i.fa").toggleClass("fa-caret-up").toggleClass("fa-caret-down");
                return false
            }
            if ((Z.find(".cnb_hide a,.cnb_hide li").hasClass("on")) && !Z.hasClass("open")) {
                E()
            }
            a.click(E)
        } else {
            if (M.length) {
                M.find(">li>ul>li.on").parents("li:first").addClass("on");
                T(window).resize(function() {
                    var c = M.find(">li>ul").height();
                    if (c > 20) {
                        M.css("margin-bottom", 20 + c)
                    } else {
                        M.removeAttr("style")
                    }
                }).resize()
            }
        }
        if (!ad) {
            U.find("a.bubble").hover(function() {
                var c = T(this);
                if (!c.hasClass("no_bubble") && !c.find(".wrp").length) {
                    c.append('<span class="wrp"><span class="speech">' + c.attr("title") + '</span><i class="edge"></i></span>').removeAttr("title");
                    if (T("html,body").width() - c.offset().left < 80) {
                        c.addClass("left").find(".wrp").css({
                            marginTop: c.parent(".wrp").height() / 2
                        })
                    } else {
                        if (c.offset().top < 80 && !c.parent().parent().hasClass("rd_nav_side")) {
                            c.addClass("btm").find(".wrp").css({
                                marginLeft: -c.find(".wrp").width() / 2
                            })
                        } else {
                            c.find(".wrp").css({
                                marginLeft: -c.find(".wrp").width() / 2
                            })
                        }
                    }
                    if (ie8Check) {
                        c.find(".wrp").prepend('<i class="ie8_only bl"></i><i class="ie8_only br"></i>')
                    }
                }
                if (ie8Check) {
                    return
                }
                if (c.is(".left,.right,.btm")) {
                    c.find(".wrp:hidden").fadeIn(150)
                } else {
                    c.find(".wrp:hidden").css("bottom", "150%").animate({
                        bottom: "100%"
                    }, {
                        duration: 150,
                        specialEasing: {
                            left: "easeInOutQuad"
                        },
                        complete: function() {},
                        step: null,
                        queue: false
                    }).fadeIn(150)
                }
            }, function() {
                if (ie8Check) {
                    return
                }
                T(this).find(".wrp").fadeOut(100)
            })
        }
        var L = U.find(".tg_cnt2");
        U.find(".tg_btn2").click(function() {
            var d = T(this);
            var c = d.attr("data-href");
            if (d.next(c).is(":visible")) {
                d.focus().next().fadeOut(200)
            } else {
                L.filter(":visible").hide();
                d.after(T(c)).next().fadeIn(200).css("display", "block").find("a,input,button:not(.tg_blur2),select,textarea").eq(0).focus()
            }
            return false
        });

        function K() {
            L.filter(":visible").fadeOut(200).prev().focus()
        }
        T(document).keydown(function(c) {
            if (c.keyCode != 27) {
                return true
            }
            return K()
        });
        L.mouseleave(K);
        U.find(".tg_blur2").focusin(K);
        U.find(".tg_close2,#install_ng2 .close").click(K);
        U.find(".itx_wrp label").next().focus(function() {
            T(this).prev().css("visibility", "hidden")
        }).blur(function() {
            if (T(this).val() == "") {
                T(this).prev().css("visibility", "visible")
            } else {
                T(this).prev().css("visibility", "hidden")
            }
        });
        if (ie8Check) {
            U.find(".bd_guest .itx_wrp label").click(function() {
                T(this).next().focus()
            })
        }
        U.find("a.back_to").click(function() {
            T("html,body").animate({
                scrollTop: T(T(this).attr("href")).offset().top
            }, {
                duration: 1000,
                specialEasing: {
                    scrollTop: "easeInOutExpo"
                }
            });
            return false
        });
        var O = U.find(".bd_faq_srch");
        U.find("a.show_srch").click(function() {
            if (O.is(":hidden")) {
                O.fadeIn().find(".itx").focus()
            } else {
                O.fadeOut();
                T(this).focus()
            }
            return false
        });
        U.find(".bd_srch_btm_itx").focus(function() {
            U.find(".bd_srch_btm .itx_wrp").animate({
                width: 140
            }, {
                duration: 1000,
                specialEasing: {
                    width: "easeOutBack"
                }
            }).parent().addClass("on")
        });
        var Y = U.find("a.viewer_with");
        Y.click(function() {
            if (Y.hasClass("on")) {
                T.cookie("cookie_viewer_with", "N");
                Y.removeClass("on");
                U.find(".bd_lst a.hx").removeAttr("onClick")
            } else {
                T.cookie("cookie_viewer_with", "Y");
                Y.addClass("on");
                U.find(".bd_lst a.hx").attr("onClick", "window.open(jQuery(this).attr('data-viewer'),'viewer','width=9999,height=9999,scrollbars=yes,resizable=yes,toolbars=no');return false;")
            }
            return false
        });
        if (T.cookie("cookie_viewer_with") == "Y") {
            U.find(".bd_lst a.hx").attr("onClick", "window.open(jQuery(this).attr('data-viewer'),'viewer','width=9999,height=9999,scrollbars=yes,resizable=yes,toolbars=no');return false;")
        }
        if (J) {
            U.find(".bd_lst a.hx").append('<button class="bg_color" title="' + J + "\" onClick=\"window.open(jQuery(this).parent().attr('data-viewer'),'viewer','width=9999,height=9999,scrollbars=yes,resizable=yes,toolbars=no');return false;\">Viewer</button>")
        }
        U.find(".info_wrp").hover(function() {
            var c = T(this);
            var d = c.find(".info.st,.info.st1");
            var e = U.find("ol.bd_tmb_lst");
            if (e.hasClass("tmb_bg3")) {
                d.stop(true, true).animate({
                    opacity: 0.8
                }, 200)
            } else {
                if (ie8Check) {
                    d.stop(true, true).animate({
                        opacity: 0.7
                    }, 200)
                } else {
                    d.stop(true, true).animate({
                        opacity: 1
                    }, 200)
                }
            }
            c.find(".info").stop(true, true).animate({
                top: 0,
                left: 0
            }, 200)
        }, function() {
            var c = T(this);
            c.find(".info.st,.info.st1").animate({
                opacity: 0
            }, 200);
            c.find(".info.st2").animate({
                top: "-100%"
            }, 200);
            c.find(".info.st3").animate({
                left: "-100%"
            }, 200);
            c.find(".info.st4").animate({
                top: "-100%",
                left: "-100%"
            }, 200)
        });
        var I = U.find("ol.bd_lst");
        if (I.length && !I.hasClass("img_loadN")) {
            I.find(".tmb").each(function() {
                var c = T(this);
                c.imagesLoaded(function() {
                    c.parent().addClass("fin_load").fadeIn(250)
                })
            })
        }
        if (ab == "webzine") {
            var aa = U.find("ol.bd_zine");
            if (aa.attr("data-masonry")) {
                if (aa.attr("data-masonry") != "_N") {
                    aa.imagesLoaded(function() {
                        aa.masonry({
                            itemSelector: "li",
                            isFitWidth: true,
                            isAnimated: true,
                            animationOptions: {
                                duration: 500,
                                easing: "easeInOutExpo",
                                queue: false
                            }
                        })
                    })
                } else {
                    aa.imagesLoaded(function() {
                        aa.masonry({
                            itemSelector: "li",
                            isFitWidth: true
                        })
                    })
                }
            }
        } else {
            if (ab == "gallery") {
                var ac = U.find("ol.bd_tmb_lst");
                if (ac.attr("data-gall_deg")) {
                    if (ie8Check) {
                        return
                    }
                    var W = ac.attr("data-gall_deg");
                    ac.find(".tmb_wrp").each(function() {
                        var c = Math.floor(Math.random() * W * 2 - W);
                        T(this).css({
                            msTransform: "rotate(" + c + "deg)",
                            "-moz-transform": "rotate(" + c + "deg)",
                            "-webkit-transform": "rotate(" + c + "deg)"
                        })
                    })
                }
            } else {
                if (ab == "cloud_gall") {
                    bdCloud(U)
                } else {
                    if (ab == "guest") {
                        U.find("form>.simple_wrt textarea").focus(function() {
                            T(this).parent().parent().next().slideDown()
                        }).autoGrow();
                        U.find("form input[type=submit]").click(function() {
                            T.removeCookie("socialxe_content")
                        });
                        if (U.find("form>div.wysiwyg").length) {
                            if (T("#re_cmt").length) {
                                editorStartTextarea(2, "content", "comment_srl")
                            }
                        } else {
                            T.getScript("modules/editor/tpl/js/editor_common.min.js", function() {
                                if (T("#re_cmt").length) {
                                    editorStartTextarea(2, "content", "comment_srl")
                                }
                                var c = U.find("form.cmt_wrt textarea");
                                if (U.find("form.bd_wrt_main textarea").length) {
                                    T.getScript("files/cache/js_filter_compiled/35d29adbe4b14641f9eac243af40093b." + lang_type + ".compiled.js");
                                    editorStartTextarea(1, "content", "document_srl")
                                }
                                c.each(function() {
                                    editorStartTextarea(T(this).attr("id").split("_")[1], "content", "comment_srl")
                                })
                            })
                        }
                    }
                }
            }
        }
        if (U.attr("data-link_board")) {
            U.find("a.viewer_with").click(function() {
                location.reload();
                return false
            });
            if (U.attr("data-link_board") == 3) {
                bdLinkBoard(U)
            }
        }
        if (U.find("div.rd").length) {
            bdPrevNext(U);

            function G() {
                var c = U.find(".bd_rd_prev .wrp");
                T(this).append(c).attr("href", U.find(".bd_rd_prev").attr("href"));
                c.css({
                    marginLeft: -c.width() / 2
                })
            }
            U.find("a.rd_prev").mouseover(G).focus(G);

            function F() {
                var c = U.find(".bd_rd_next .wrp");
                T(this).append(c).attr("href", U.find(".bd_rd_next").attr("href"));
                c.css({
                    marginLeft: -c.width() / 2
                })
            }
            U.find("a.rd_next").mouseover(F).focus(F);
            U.find(".fdb_hide,.rd_file.hide,.fdb_lst .cmt_files").hide();
            if (U.find(".rd table.et_vars th").length) {
                U.find(".rd table.et_vars").show()
            }
            if (!U.find(".bd_rd_prev").length) {
                U.find("a.rd_prev").hide()
            }
            if (!U.find(".bd_rd_next").length) {
                U.find("a.rd_next").hide()
            }
            U.find(".print_doc").click(function() {
                if (T(this).hasClass("this")) {
                    print()
                } else {
                    window.open(this.href, "print", "width=860,height=999,scrollbars=yes,resizable=yes").print()
                }
                return false
            });
            U.find(".font_plus").click(function() {
                var c = T(".bd .xe_content");
                var d = parseInt(c.css("fontSize")) + 1;
                c.css("font-size", "" + d + "px");
                return false
            });
            U.find(".font_minus").click(function() {
                var c = T(".bd .xe_content");
                var d = parseInt(c.css("fontSize")) - 1;
                c.css("font-size", "" + d + "px");
                return false
            });
            if (X == "Y") {
                if (U.find(".rd_file li").length == 0) {
                    U.find(".rd_file,.rd_nav .file").hide()
                } else {
                    if (ab != "blog") {
                        U.find(".rd_file strong b").text(U.find(".rd_file li").length)
                    } else {
                        U.find(".rd_file strong b").text(T(this).parents(".rd").find(".rd_file li").length)
                    }
                }
            }
            if (R) {
                U.find(".xe_content img").draggable()
            }
            if (N) {
                U.find(".xe_content img").click(function() {
                    window.location.href = T(this).attr("src")
                })
            }
            if (!H) {
                T(window).scroll(function() {
                    var d = T(this).scrollTop();
                    var c = U.find("div.rd_nav_side .rd_nav");
                    if ((d > U.find("div.rd_body").offset().top) && (d < U.find("hr.rd_end").offset().top - T(this).height())) {
                        c.fadeIn(200)
                    } else {
                        c.fadeOut(200)
                    }
                })
            }
            U.find(".to_sns a").click(function() {
                var g = T(this);
                var f = g.attr("data-type");
                var e = g.parent();
                var h = e.attr("data-url");
                var c = e.attr("data-title");
                if (!f) {
                    return
                } else {
                    if (f == "facebook") {
                        var d = "//www.facebook.com/sharer/sharer.php?u=" + h + "&t=" + c
                    } else {
                        if (f == "twitter") {
                            d = "//twitter.com/home?status=" + c + " " + h
                        } else {
                            if (f == "google") {
                                d = "//plus.google.com/share?url=" + h
                            } else {
                                if (f == "pinterest") {
                                    d = "//pinterest.com/pin/create/bookmarklet/?url=" + h + "&description=" + c
                                }
                            }
                        }
                    }
                }
                window.open(d);
                return false
            });
            if (!U.find(".rd .nametag").length) {
                bdCmtPn(U)
            }
            if (U.find("form.bd_wrt").length) {
                U.find("form>.simple_wrt textarea").focus(function() {
                    T(this).parent().parent().next().slideDown()
                }).autoGrow();
                U.find("form [type=submit]").click(function() {
                    T.removeCookie("socialxe_content")
                });
                if (U.find("form>div.wysiwyg").length) {
                    editorStartTextarea(2, "content", "comment_srl")
                } else {
                    T.getScript("modules/editor/tpl/js/editor_common.min.js", function() {
                        editorStartTextarea(2, "content", "comment_srl");
                        var c = U.find("form.cmt_wrt textarea");
                        if (ab == "blog") {
                            c.each(function() {
                                editorStartTextarea(T(this).attr("id").split("_")[1], "content", "comment_srl")
                            })
                        } else {
                            editorStartTextarea(c.attr("id").split("_")[1], "content", "comment_srl");
                            c.val(T.cookie("socialxe_content")).bind("keydown change", function() {
                                T.cookie("socialxe_content", T(this).val())
                            })
                        }
                    })
                }
            }
        }
    })(jQuery)
}
jQuery(function(c) {
    c("body").append('<div class="fontcheckWrp"><p id="fontcheck_np1" style="font-family:\'나눔손글씨 펜\',\'Nanum Pen Script\',np,monospace,Verdana !important">Sketchbook5, 스케치북5</p><p id="fontcheck_np2" style="font-family:monospace,Verdana !important">Sketchbook5, 스케치북5</p></div>');
    var d = c("div.bd");
    if (c("#fontcheck_np1").width() == c("#fontcheck_np2").width()) {
        d.removeClass("use_np");
        c.removeCookie("use_np")
    } else {
        d.addClass("use_np");
        c.cookie("use_np", "use_np")
    }
});

function bdPrevNext(b) {
    jQuery(document).keydown(function(a) {
        var h = a.target.nodeName.toLowerCase();
        if (h == "textarea" || h == "input" || h == "select") {
            return true
        }
        var g = b.find(".bd_rd_prev");
        var f = b.find(".bd_rd_next");
        if (!jQuery("div.pp_overlay").length) {
            if (a.keyCode == 37 && g.length) {
                window.location.href = g.attr("href")
            } else {
                if (a.keyCode == 39 && f.length) {
                    window.location.href = f.attr("href")
                } else {
                    if (a.keyCode == 27 && jQuery("#viewer").length) {
                        self.close()
                    } else {
                        return true
                    }
                }
            }
        }
    })
}

function reComment(g, f, e) {
    var h = jQuery("#re_cmt").eq(0);
    h.find("input[name=error_return_url]").val("/" + g);
    h.find("input[name=mid]").val(current_mid);
    h.find("input[name=document_srl]").val(g);
    h.appendTo(jQuery("#comment_" + f)).fadeIn().find("input[name=parent_srl]").val(f);
    h.find("a.wysiwyg").attr("href", e);
    h.find("textarea").focus()
}

function bdCmtPn(c) {
    var d = jQuery("#" + c.find(".rd").attr("data-docSrl") + "_comment .bd_pg");
    d.clone().toggleClass("bd_pg cmt_pg").appendTo(d.prev().prev())
}

function bdFaq(a) {
    var d = jQuery("#bdFaq_" + a);
    if (d.hasClass("open")) {
        d.removeClass("open").find(".a").slideUp(200)
    } else {
        d.addClass("open").find(".a").slideDown(200).end().siblings().removeClass("open").find(".a").slideUp(200)
    }
}

function bdCloud(b) {
    (function(t) {
        var q = b.find(".bd_cloud");
        var a = b.find("button.bd_cg_rt");
        var r = b.find("button.bd_cg_rd");
        var s = b.find("button.bd_cg_rf");
        var x = Number(q.attr("data-deg"));
        var w = Number(q.attr("data-y"));
        var y = Number(q.attr("data-tmb"));
        var z = Number(q.attr("data-z"));
        counts = [z + 1];
        q.find("a").draggable({
            containment: "document",
            start: function() {
                t(this).css("zIndex", counts[0] ++)
            }
        });

        function u() {
            q.find("a").each(function() {
                var c = t(this);
                var d = Math.floor(Math.random() * x * 2 - x);
                c.css({
                    top: Math.floor(Math.random() * (w - y - 51)),
                    left: Math.floor(Math.random() * (q.width() - (y + 22))),
                    msTransform: "rotate(" + d + "deg)",
                    "-moz-transform": "rotate(" + d + "deg)",
                    "-webkit-transform": "rotate(" + d + "deg)"
                });
                c.imagesLoaded(function() {
                    c.fadeIn(200)
                })
            })
        }

        function p() {
            q.removeClass("no_rd");
            r.removeClass("off");
            t.removeCookie("cg_rd");
            u()
        }

        function v() {
            q.addClass("no_rd").css("height", "");
            r.addClass("off");
            t.cookie("cg_rd", "N");
            B();
            q.imagesLoaded(function() {
                if (t(window).width() < 640) {
                    q.masonry({
                        itemSelector: "a",
                        isFitWidth: true
                    })
                } else {
                    q.masonry({
                        itemSelector: "a",
                        isFitWidth: true,
                        isAnimated: true,
                        animationOptions: {
                            duration: 500,
                            easing: "easeInOutExpo",
                            queue: false
                        }
                    })
                }
                t(this).find("a").fadeIn(200)
            })
        }

        function A() {
            if (q.hasClass("no_rd")) {
                return true
            }
            q.removeClass("no_rt");
            a.removeClass("off");
            t.removeCookie("cg_rt")
        }

        function B() {
            q.addClass("no_rt");
            a.addClass("off");
            t.cookie("cg_rt", "N")
        }
        s.click(function() {
            if (r.hasClass("off")) {
                q.removeClass("no_rd");
                r.removeClass("off");
                t.removeCookie("cg_rd")
            }
            u()
        });
        r.click(function() {
            if (r.hasClass("off")) {
                p()
            } else {
                v()
            }
        });
        a.click(function() {
            if (a.hasClass("off")) {
                A()
            } else {
                B()
            }
        });
        if (t(window).width() < 640 || r.hasClass("off")) {
            v()
        } else {
            u();
            if (a.hasClass("off")) {
                B()
            }
        }
    })(jQuery)
}

function bdLinkBoard(d) {
    if (d.find("a.viewer_with").hasClass("on")) {
        var c = d.find("a.hx,.bd_tb_lst .link_url a");
        c.each(function() {
            jQuery(this).attr("href", jQuery(this).attr("href") + "?iframe=true&width=100%&height=100%").attr("rel", "prettyPhoto[iframes]")
        });
        c.prettyPhoto({
            hideflash: true,
            social_tools: false
        })
    }
}

function isObject(e) {
    var f = false;
    var d = document.getElementById(e);
    if (d && (d.nodeName === "OBJECT" || d.nodeName === "EMBED")) {
        f = true
    }
    return f
}

function replaceSwfWithEmptyDiv(e) {
    var d = document.getElementById(e);
    if (d) {
        var f = document.createElement("div");
        d.parentNode.insertBefore(f, d);
        swfobject.removeSWF(e);
        f.setAttribute("id", e)
    }
}

function playswf(e) {
    if (isObject("myswf" + e)) {
        replaceSwfWithEmptyDiv("myswf" + e)
    } else {
        if (tmpswf) {
            replaceSwfWithEmptyDiv("myswf" + tmpswf);
            var f = document.getElementById("btn" + tmpswf)
        }
        tmpswf = e;
        var g = document.getElementById("swffile" + e);
        var h = g.value;
        var f = document.getElementById("btn" + e);
        g.value = h;
        swfobject.embedSWF(g.value, "myswf" + e, "365", "150", "7")
    }
}

function loadFile(a) {
    ID3.loadTags(a, function() {
        showTags(a)
    }, {
        tags: ["title", "artist", "album", "lyrics"],
        dataReader: FileAPIReader(file)
    })
}

function showTags(b, c) {
    var a = ID3.getAllTags(b);
    //document.getElementById("title" + c).textContent = a.title || "";
    //document.getElementById("album" + c).textContent = a.album + ' - ' || "";
    document.getElementById("artist" + c).textContent = a.artist || "";
    //document.getElementById("genres" + c).textContent = a.genres || "";
    //document.getElementById("comment" + c).textContent = a.comment || "";
    //document.getElementById("track" + c).textContent = a.track || ""
};