<%@ Control Language="c#" AutoEventWireup="true" Codebehind="LeftNavTop2Level.ascx.cs" Inherits="XpShop.WebUI.Modules.LeftNavTop2Level" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<div class="xp-subcat-menu">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
	    <%=GetResourceString("LeftNavigation")%>
	</div>
	<div class="mm">
		<ul id="cat_menu">
		<asp:Repeater Runat="server" ID="rptTopCategory">
			<ItemTemplate>
				<li>
					<div class="topCat clear">
					    <div class="topCat_l"></div>
					    <div class="topCat_r hand"></div>
					    <div class="topCat_m">
					        &nbsp;<a href='<%=webSite %>categorys-<%# DataBinder.Eval(Container.DataItem,"CategoryID")%>.<%=config.html%>'><%# DataBinder.Eval(Container.DataItem,"Name")%></a>
					    </div>
					</div>					
				    <ul class="clear">
					    <asp:Repeater Runat="server" ID="rptSubCategory" DataSource='<%# GetSubCategory(DataBinder.Eval(Container.DataItem,"CategoryNo").ToString())%>'>
						    <ItemTemplate>
							    <li>&nbsp;&nbsp;
								    <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>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$(".topCat").each(function(){
		    var catul = $(this).next();
		    $(this).children(".topCat_r").addClass("jian").toggle(function(){
		        $(this).removeClass("jian").addClass("jia");
		        catul.hide();
		    },function(){
		        $(this).removeClass("jia").addClass("jian");
		        catul.show();
		    });
		});
	});
</script>