<%@ Control Language="c#" AutoEventWireup="true" Codebehind="NavBar.ascx.cs" Inherits="XpShop.WebUI.Modules.NavBar" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Register TagPrefix="uc1" TagName="HomeTop_LeftNavTop2Level" Src="HomeTop_LeftNavTop2Level.ascx" %>
<div id="navbar">
    <div class="xp-w clear">
        <uc1:HomeTop_LeftNavTop2Level id="HomeTop_LeftNavTop2Level" runat="server"></uc1:HomeTop_LeftNavTop2Level>
        
        <ul id="nbar">
	        <asp:Repeater runat="server" ID="rptNavBar">
                <ItemTemplate>
                    <li><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>
            </asp:Repeater>
	    </ul>
	</div>
</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>