(function () {
    var a, b, c, d, e, f, g, h, i, j, k, l, m = [].slice,
    n = [].indexOf ||
    function (a) {
        for (var b = 0,
        c = this.length; c > b; b++) if (b in this && this[b] === a) return b;
        return -1
    },
    o = {}.hasOwnProperty,
    p = function (a, b) {
        function c() {
            this.constructor = a
        }
        for (var d in b) o.call(b, d) && (a[d] = b[d]);
        return c.prototype = b.prototype,
        a.prototype = new c,
        a.__super__ = b.prototype,
        a
    },
    q = function (a, b) { };
    d = {},
    f = function () {
        function a() {
            "function" == typeof this.init && this.init.apply(this, arguments)
        }
        return a.include = function (a) {
            this
        },
        a
    } (),
    e = function (b) {
        return p(d, b)
    } (f),
    b = function (b) {
        return p(e, b)
    } (f),
    g = this.Spine = {},
    g.Events = c,
    g.Model = e,
    f.create = f.sub = b.create = b.sub = e.sub = function (a, b) {
        var c;
        return c = function (a) {
            function b() {
                return b.__super__.constructor.apply(this, arguments)
            }
            return p(b, a),
            b
        } (this),
        c
    },
    g.Class = f
}).call(this),
function () {
    var a = window.NTES || {};
    a.event.Mouseenter = function (a, b, c) {
        var d, e = document.createElement("div"),
        f = "onmouseenter" in e,
        g = a,
        h = "",
        i = c;
        switch (g) {
            case "mouseenter":
                h = "mouseover";
                break;
            case "mouseleave":
                h = "mouseout";
                break;
            default:
                return null
        }
        return g = f ? g : h,
        d = f ? b : function (a) {
            var c = a.relatedTarget;
            for (!a.relatedTarget && a.fromElement && (a.relatedTarget = a.fromElement == a.target ? a.toElement : a.fromElement); c && c != this; ) try {
                c = c.parentNode
            } catch (d) {
                c = this
            }
            c != this && b.call(this, a)
        },
        i.addEvent(g, d),
        {
            eventName: g,
            eventHandler: d
        }
    }
} (),
function (a) {
    var b = function () {
        var b = this;
        b.selector = ".js_N_navSelect",
        b.unfoldClassName = "ntes-nav-select-unfold",
        b.menus = a(b.selector),
        b.eventsCache = [],
        b.init(),
        b.prevIndex = 0
    };
    b.prototype = {
        constructor: b,
        init: function () {
            var b = this;
            NTES.each(b.menus,
            function (c, d) {
                var e = a(d),
                f = {},
                g = NTES.event.Mouseenter("mouseenter",
                function () {
                    a(this);
                    b.timerList && b.prevIndex === c ? (clearTimeout(b.timerList), b.timerList = void 0) : b.timerList = setTimeout(function () {
                        b.unfoldMenu(c),
                        b.timerList = void 0
                    },
                    100)
                },
                e),
                h = NTES.event.Mouseenter("mouseleave",
                function () {
                    a(this);
                    b.timerList && b.prevIndex === c ? (clearTimeout(b.timerList), b.timerList = void 0) : b.timerList = setTimeout(function () {
                        b.foldMenu(),
                        b.timerList = void 0
                    },
                    100)
                },
                e),
                j = function (d) {
                    a(this);
                };
            })
        },
        unfoldMenu: function (b) {
            var c = this;
            a(c.menus[c.prevIndex]).removeCss(c.unfoldClassName),
            a(c.menus[b]).addCss(c.unfoldClassName),
            c.prevIndex = b
        },
        foldMenu: function () {
            var b = this;
            a(b.menus[b.prevIndex]).removeCss(b.unfoldClassName)
        }
    },
    a.plugin = a.plugin || {},
    a.plugin.NTESSelectMenu = b
} ($),
function () {
    var a = this,
    b = function () { };
    a.NTESCommonNavigator = a.NTESCommonNavigator || {},
    a.console = a.console || {
        log: b,
        error: b,
        trace: b,
        info: b
    },
    a.NTESCommonNavigator.namespace = function () {
        var b, c, d, e, f = arguments,
        g = null;
        for (b = 0, e = f.length; e > b; b++) for (d = ("" + f[b]).split("."), g = a.NTESCommonNavigator, c = "NTESCommonNavigator" == d[0] ? 1 : 0; c < d.length; c += 1) g[d[c]] = g[d[c]] || {},
        g = g[d[c]];
        return g
    }
} .call(this),
NTESCommonNavigator.namespace("NTESCommonNavigator.core"),
NTESCommonNavigator.core.Constant = {
    Path: {
        WB_PATH: "http://t.163.com/service/newMessage/",
        DEFAULT_MAIL_PATH: "http://email.163.com#from=163nav_icon"
    },
    Domain: {
        DOMAIN: ["126.com", "yeah.net", "163.com", "188.com", "vip.163.com", "vip.126.com"]
    }
},
NTESCommonNavigator.namespace("NTESCommonNavigator.core"),
NTESCommonNavigator.core.Event = {
    Base: {
        DATA_LOADED: "event_core_data_loaded",
        DATA_CHANGED: "event_core_data_changed"
    }
},
NTESCommonNavigator.namespace("NTESCommonNavigator.base"),
NTESCommonNavigator.base.Class = function () {
    {
        var a = Spine.Class.create();
        Spine.Events
    }
    return a.include(Spine.Events),
    a.include({
        extend: a.extend
    }),
    new a
},
NTESCommonNavigator.namespace("NTESCommonNavigator.ui"),
NTESCommonNavigator.ui.NavBar = function () {
    init = function () {
        selectMenu = new NTES.plugin.NTESSelectMenu
    },
    init()
},
NTESCommonNavigator.namespace("NTESCommonNavigator.core"),
NTESCommonNavigator.core.Model = function () {
    var a = NTESCommonNavigator.base.Class(),
    a
},
NTESCommonNavigator.namespace("NTESCommonNavigator.core"),
NTESCommonNavigator.core.View = function (a) {
    var b = NTESCommonNavigator.base.Class(),
    c = NTESCommonNavigator.ui.NavBar(),
    b
},
NTESCommonNavigator.namespace("NTESCommonNavigator.core"),
NTESCommonNavigator.core.Controller = function () {
    var a = NTESCommonNavigator.base.Class(),
    b = NTESCommonNavigator.core.Model(),
    c = NTESCommonNavigator.core.View(b),
    a
};

NTES.ready(function () {
    var App = NTESCommonNavigator.core.Controller,
    Event = NTESCommonNavigator.core.Event.Base,
    ModelEvent = NTESCommonNavigator.core.Event.Model,
    app = App();
    app.bind(Event.DATA_CHANGED,
    function (data) { });
    app.bind(ModelEvent.MAIL_INFO_LOADED,
    function (data) { });
    app.bind(ModelEvent.LOFTER_INFO_LOADED,
    function (data) { });
    app.refresh();
});

//猜你喜欢滚动
NTES.ready(function () {

    Scrl.prototype = {
        show: function (i) {
            var t = this;
            t.index = i < 0 ? t._len - 1 : i > t._len - 1 ? 0 : i;
            t._scrl.onStart = function () {
                t._ctrls.removeCss("current current_static");
                t._ctrls.$(t.index).addCss("current current_static");
            }
            t._scrl.scrollTo(t._step * t.index);
        }
    }

    function switchVersion() {
        NTES.ajax.importJs(api_interest,
        function () { },
        'utf-8');
    }
    if (window.localAddress) {
        switchVersion();
    } else {
        NTES.ajax.importJs(api_ip,
        function () {
            switchVersion();
        },
        'gbk');
    }
})();