<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$title}</title>
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<link href="{$domain}/view/{$tpl_style}/styles/basic.css" rel="stylesheet" type="text/css" />
<link href="{$domain}/view/{$tpl_style}/styles/common.css" type="text/css" rel="stylesheet">
<script src="{$domain}/view/{$tpl_style}/js/jquery.js" type="text/javascript"></script>
<script src="{$domain}/view/{$tpl_style}/js/lazyload.js" type="text/javascript"></script>
<script type='text/javascript' src='{$domain}/view/{$tpl_style}/js/jquery.masonry.min.js'></script> 
<script src="{$domain}/view/{$tpl_style}/js/tooltip.js" type="text/javascript"></script>
<script src="{$domain}/view/{$tpl_style}/js/jselect.js" type="text/javascript"></script>
</head>
<body>
{include file="default/page_header.tpl"}
<script type="text/javascript">
$(document).ready(function()
	{literal}{
	$("#container .pic img").lazyload({
	{/literal}
		placeholder : "{$domain}/view/default/images/grey.gif",
		effect : "fadeIn"
	{literal}
	});
});
{/literal}
{literal}
$(document).ready(function(){
	$("select").sSelect();
});

$(document).ready(function(){	
	$("#fillter").click(function(){
		searchs();
	});	
	
});
</script>
{/literal}

<div id="content">
{if $itemcats}	
 <div class="listcate">
    <ul>
        <li class="sc">        	
				<a href="#">全部</a>			   
        </li>
		  {foreach from=$itemcats item=value name=itemcate} 	
		  		<li >
		  		{if $rewrite}
		  			<a href="{$domain}/{$tao_category}-{$value.cid}-tao-1{$suffix}">{$value.name}</a>
		  		{else}
		  			<a href="?a=category&cid={$value.cid}&tab=tao&page=1">{$value.name}</a>
		  		{/if}
		  		</li>
		  {/foreach}
    </ul>
</div>
{/if}
<div class="filter">
	<div class="left">排序：</div>
	<div class="jselect">
		<select name="selSort" id="selSort" onChange="searchs()">
		    <option>默认排序</option>
		    <option>价格降序</option>
		    <option>价格升序</option>
		    <option>成交量</option>
		    <option>卖家信用</option>
		    <option>人气</option>
		    <option>时间降序</option>
		    <option>时间升序</option>
		</select>
	</div>
	
	<div class="sprice">价格区间：
		<input name="txtStartPrice" type="text" class="listsch" size="5" id="txtStartPrice" value="{$star}" /> 
		元至 <input name="txtEndPrice" type="text" class="listsch" size="5" id="txtEndPrice" value="{$end}" /> 
		元 <input type="image" name="imageField2" id="fillter" src="view/{$tpl_style}/images/fbtn.gif" />
	</div>
	<script language="javascript">
		document.getElementById("selSort").options[{$sort}].selected = true;
	</script>	
</div>
{if $notab}
{if $OneNav}
<div class="tab-panel">
	<ul>			
		{if $rewrite}
			<li><a href="{$domain}/{$b2c_category}-{$OneNav->category}-b2c{$suffix}">商城搜索</a></li>
			<li class="selected"><a href="{$domain}/{$tao_category}-{$OneNav->tao_category}-tao{$suffix}">淘宝搜索</a></li>
		{else}
			<li><a href="?a=category&cid={$OneNav->category}&tab=b2c">商城搜索</a></li>
			<li class="selected"><a href="?a=category&cid={$OneNav->tao_category}&tab=tao">淘宝搜索</a></li>
		{/if}
	</ul>
</div>
{/if}
{/if}
<div id="container">
	{if $items}
	{foreach from=$items item=value name=itemcate} 	
	<div class="col">
		   <div class="pic">
		   {if $rewrite}
                <a href="{$domain}/{$item}-{$value.iid}{$suffix}" rel="{$value.pic_url}" class="tooltip" title="{$value.title}" target="_blank">                
                    <img src="{$domain}/view/default/images/grey.gif" original="{$value.pic_url}" alt="{$value.title}" /></a>
           {else}
             <a href="./?a=item&iid={$value.iid}" rel="{$value.pic_url}" class="tooltip" title="{$value.title}" target="_blank">                
                    <img src="{$domain}/view/default/images/grey.gif" original="{$value.pic_url}" alt="{$value.title}" /></a>
           {/if}
           </div>
            <h3>
            	{if $rewrite}
                	<a href="{$domain}/{$item}-{$value.iid}{$suffix}" target="_blank">{$value.title}</a>
                {else}
                	<a href="./?a=item&iid={$value.iid}" target="_blank">{$value.title}</a>
                {/if}
            </h3>
            <div class="mallprice">
                <div class="left">
                    <div>优惠价 <strong>{$value.price}</strong>元</div>
                    <div class="malltitle">          
						<a href="javascript:void(0);" onclick= "window.open ('{$value.detail_url}');">淘宝：{$value.nick}</a>
				 有售</div>
                </div>
                <div class="right">
					<a href="javascript:void(0);" onclick= "window.open ('{$value.detail_url}');"></a>
				</div>
           </div>
	</div>
	{/foreach}
	{/if}
</div>
<div>{$pagetext}</div>
<script>
{literal}
function searchs(){
	{/literal}		
	var sort=document.getElementById("selSort").selectedIndex;
	var sp=document.getElementById("txtStartPrice").value;	
	if(sp==""|| isNaN(sp))sp="0";	
		
	var ep=document.getElementById("txtEndPrice").value;
	if(ep=="" || isNaN(ep))ep="1000";	
	{if $rewrite}
		var url="{$domain}/{$tao_category}-{$cid}"+"-"+sort+"-"+sp+"-"+ep+"{$suffix}";
	{else}
		var url="./index.php?a=category&cid={$cid}&tab=tao"+"&sort="+sort+"&star="+sp+"&end="+ep;
	{/if}
	window.location.href=url;
{literal}
}
{/literal}
</script>
{literal}
<script type="text/javascript">
$(function(){
  $('#container').masonry({
    itemSelector : '.col',
    columnWidth : 245
  });
});

</script>
{/literal}
</div>
{include file="default/page_bottom.tpl"}
</body>
</html>