{*<?php exit();?>*}
<div id="header">
	<div id="top">
		<div class="main">
			<div class="left">您好，欢迎来到{$site_name}！</div>
			<div class="right">
				{if !$global.user_id}
				<a href="{url entrance=$global.entrance channel='user'}">用户中心</a>|
				<a href="{url entrance=$global.entrance channel='user' mod='register'}">快速注册</a>|
				{else}
				<a href="{url entrance=$global.entrance channel='user'}">{$global.user_name}</a>|
				<a href="{url entrance=$global.entrance channel='user'}">用户中心</a>|
				<a href="{url entrance=$global.entrance channel='user' mod='logout'}">退出登录</a>|
				{/if}
				<a href="{url entrance=$global.entrance channel='user' mod='order_sheet'}">查看订单</a>|
				<a href="{url entrance=$global.entrance channel='help'}">帮助中心</a>
			</div>
		</div>
	</div>
	<div class="main">
		<div class="logo"><a href=""><img src="{$S_FRONT_URL}images/logo.jpg" /></a></div>
		<div class="search">
			<div class="form">
				<form id="form_search" method="post" action="{url entrance=$global.entrance channel='search'}">
					<input name="cat" type="hidden" value="0" />
					<input class="text" name="key" type="text" maxlength="30" onkeydown="if(event.keyCode == 13)do_search();" value="{$default_search}" />
					<input class="bt" type="button" onclick="do_search()" value="搜商品" />
				</form>
			</div>
			<div class="hot_word">
				{foreach from=$hot_search name=hot_search item=item}
				<a href="{url entrance=$global.entrance channel='search' cat=0 key=$item}">{$item}</a>{if !$smarty.foreach.hot_search.last}&nbsp;|&nbsp;{/if}
				{/foreach}
			</div>
			<script language="javascript">
				var default_search = "{$default_search}";
			</script>
			{literal}
			<script language="javascript">
				$("#form_search .text").focus(function(){
					if($(this).val() == default_search)
					{
						$(this).val("");
					}
					$(this).css("color","#000");
				});
				$("#form_search .text").blur(function(){
					if($(this).val() == "")
					{
						$(this).val(default_search);
						$(this).css("color","#999");
					}
				});
			</script>
			{/literal}
		</div>
		<div id="cart">
			<div class="img"></div>
			<a class="word" href="{url entrance=$global.entrance channel='flow'}">去购物车结算</a>
			{if $cart}
			<div class="cart_list">
				<div class="line"></div>
				<div class="inner">
					<table>
						{foreach from=$cart name=cart item=item}
						<tr>
							<td class="title"><a href="{url channel='goods' id=$item.id}" target="_blank">{$item.short_title}</a></td>
							<td class="num">{$item.number}件</td>
							<td class="price">￥{$item.subtotal}</td>
						</tr>
						{/foreach}
					</table>
				</div>
			</div>
			{/if}
		</div>
		{literal}
		<script language="javascript">
			$("#cart").mouseover(function(){
				$("#cart .cart_list").show();
			});
			$("#cart").mouseout(function(){
				$("#cart .cart_list").hide();
			});
		</script>
		{/literal}
	</div>
	<div id="nav">
		<div class="main">
			<div class="cat_head">全部商品分类</div>
			{foreach from=$nav name=nav item=item}
			<a href="{$item.url}" {if $item.target == 1}target="_blank"{/if}>{$item.name}</a>
			{/foreach}
			<div class="clear"></div>
		</div>
	</div>
</div>
<!-- 新秀 -->
