<%@ Control Language="c#" AutoEventWireup="true" Codebehind="LeftNavTop2Level.ascx.cs" Inherits="XpShop.WebUI.Modules.LeftNavTop2Level" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<div class="leftnavtops clear">
	<div class="tm"></div>
	<div id="catmm">
	    <ul id="xp-top-cat-menu" class="clear">
	    <asp:Repeater Runat="server" ID="rptTopCategory">
		    <ItemTemplate>
			    <li class="clear">
				    <div class="categorys-logo"><a href='<%=webSite %>categorys-<%# DataBinder.Eval(Container.DataItem,"CategoryID")%>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem,"Name")%></a></div>
				    <div id="cat_menu2" class="cat_menu cat-menu<%# Container.ItemIndex + 1%>">
				        <ul>
				            <asp:Repeater Runat="server" ID="rptSubCategory" DataSource='<%# GetSubCategory(DataBinder.Eval(Container.DataItem,"CategoryNo").ToString())%>'>
					            <ItemTemplate>
						            <li class="subon clear" style="color:#D0D0D0;">
							            <div class="subon-div">
							                <%--<a<%# (int)DataBinder.Eval(Container.DataItem,"ProductNum") > 0 ? " href='"+ webSite  +"categorys-"+ DataBinder.Eval(Container.DataItem,"CategoryID")+"."+config.html+"'" : ""%>><%# DataBinder.Eval(Container.DataItem,"Name")%></a>--%>
							                <a href='<%=webSite %>categorys-<%# DataBinder.Eval(Container.DataItem,"CategoryID")%>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem,"Name")%></a>
							            </div>
						                <ul>
						                    <asp:Repeater Runat="server" ID="rptSubCategory" DataSource='<%# GetSubCategory(DataBinder.Eval(Container.DataItem,"CategoryNo").ToString())%>'>
					                            <ItemTemplate>
						                            <li>
							                            <a href='<%=webSite %>categorys-<%# DataBinder.Eval(Container.DataItem,"CategoryID")%>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem,"Name")%></a>
						                            </li>
					                            </ItemTemplate>
				                            </asp:Repeater>
						                </ul>
						            </li>
					            </ItemTemplate>
				            </asp:Repeater>  
			            </ul>
				    </div>
			    </li>
		    </ItemTemplate>
	    </asp:Repeater>
	        
	    </ul>
	    <div class="xp-all-category"><a href="/<%=ShopFolder %>Category.aspx">全部商品分类>></a></div>
	</div>
	
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $('#xp-top-cat-menu li').hover(function(){
            if($(this).find('li.subon').length > 0){
            $(this).addClass('xp-li-on');
             $(this).find('#cat_menu2').show();
             }
        },function(){
            $(this).removeClass('xp-li-on');
            $(this).find('#cat_menu2').hide();
        });
    });
</script>