<%@ Control Language="c#" AutoEventWireup="true" Codebehind="NavBar.ascx.cs" Inherits="XpShop.WebUI.Modules.NavBar" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<div id="navbar">
    <div class="<%=Request.Url.ToString().ToLower().IndexOf("default.aspx") != -1 ? "index-on" : "index" %>"><a href="<%=webSite %>default.aspx">首&nbsp;页</a></div>
	<ul id="nbar">
        <asp:Repeater runat="server" ID="rptNavBar">
            <ItemTemplate>
                <li class="nav-<%#Container.ItemIndex + 1 %>"><a href="<%# DataBinder.Eval(Container.DataItem,"Inside").ToString()=="1"?webSite+DataBinder.Eval(Container.DataItem,"Link"):DataBinder.Eval(Container.DataItem,"Link") %>" target="<%# DataBinder.Eval(Container.DataItem,"Target") %>"><%# DataBinder.Eval(Container.DataItem,"NavBarName")%></a></li>
            </ItemTemplate>
            <SeparatorTemplate>
                <li class="space"></li>
            </SeparatorTemplate>
        </asp:Repeater>
    </ul>
    <ul id="nbarblank">
        <li><%=GetAD(168)%></li>
    </ul>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        var curUrl = window.location.href.toLowerCase(); 
        $('#nbar a').each(function(){
            var obj = $(this);
            if(obj.attr('href').toLowerCase() == curUrl){$(this).parent().addClass('on')}
        });
        
    });
</script>