﻿var yyt = { 
    methods: {
        search: function (a) {
            var b = $.trim($(a).val());
            0 < b.length && "\u8f93\u5165\u5173\u5065\u5b57" != b && (window.location.href = "/search_" + encodeURI($(a).val().trim()) + ".html");
            return !1
        },
        message: function () {
            $("[href='#wjdh-message']").click(function (b) {
                $.get("/message.html", function (a) {
                    $("body").append(a)
                })
            })
        }, 
        fixedNav: function () {
            if (document.getElementById("fixedNav") != null) {
                var a = $("#fixedNav");
                var b = a.offset().top;
                if (b != 0) {
                    if (-1 != a.length) {
                        b = a.offset().top;
                        $(window).scroll(function () {
                            $(window).scrollTop() >= b ? $("#fixedNav").addClass("fixedNav") : $("#fixedNav").removeClass("fixedNav")
                        });

                    }
                }
            }

        }
        
    },
    mounted: function () {
        yyt.methods.fixedNav();
        yyt.methods.message(); 
    }
};
$(function () {
    yyt.mounted()
    
})