@{
    string templateDirectory = ViewBag.TemplateDirectory;
    var siteData = Html.SiteData();
    int topColumnId = Html.TopColumnId();
}

<div class="top">
    <div class="container">
        <div class="top-bar clearfix">
                <div class="logo fl"><a href="/"><img src="@Model" alt="PageAdmin学校网站管理系统"></a></div>
                <div class="top-box fr text-right">
                    <div class="fanti text-right">
                        <a name="StranLink" id="StranLink" href="javascript:StranBody()" title="點擊以繁體中文方式浏覽">简体中文</a>
                        <script src="@templateDirectory/Js/TtoS.js"></script>
                        <a href="http://www.pageadmin.net" class="us">联系我们</a>
                    </div>
                    <div class="ss-box fr clearfix">
                        <input class="s-input" id="searchkw" type="text" placeholder="请输入关键字"><button class="s-btn"></button>
                    </div>

                    <script type="text/javascript">
                        var keyword = "";
                        var $s_input = $(".s-input");
                        $(".s-btn").on("click", function () {
                            keyword = $s_input.val();
                            if (keyword != "") {
                                location.href = "@Html.ColumnUrl(4235)?kw=" + keyword;
                            }
                        });
                        $(".s-input").on("keydown", function (event) {
                            var key = event.which;
                            if (key == 13){
                                keyword = $s_input.val();
                                if (keyword != "") {
                                    location.href = "@Html.ColumnUrl(4235)?kw=" + keyword;
                                }
                            }
                        });
                 
                    </script>
                </div>
        </div>
        <div class="nav">
            @Html.SiteColumnHtml()
        </div>
    </div>
</div>
<script>
    $nav = $(".nav");
    $nav_li = $nav.find("li");
    $nav.find("li[data-id='@topColumnId']").addClass("on");
    $nav_li.stop().on("mouseenter", function () {
        $(this).addClass("on").siblings("li").removeClass("on");
    })
    $nav_li.stop().on("mouseleave", function () {
        $nav.find("li[data-id='@topColumnId']").addClass("on").siblings("li").removeClass("on");
    })
</script>


