<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html  xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml" class="no-js">
<!--<![endif]--><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{$commonMetaTitle}</title>
<meta name="description" content="{$commonMetaDescription|unescape:'html'|escape:'html'}" />
<meta name="viewport" content="width=device-width">
<meta name="Keywords" content="{$commonMetaKeywords|unescape:'html'|escape:'html'}" />
<link rel="image_src" href="{$commonMetaImage|default:''}" />
<meta property="og:title" content="{$commonMetaTitle|unescape:'html'|escape:'html'}"/>
<meta property="og:image" content="{$commonMetaImage|default:''}"/>
{include file='CommonStyles.tpl'}
<link rel="stylesheet" href="{$view_styles}/product-listing.css" />
{include file='CommonJavaScript.tpl' caching=true cache_lifetime=7200}
</head>
<body ng-controller="SearchCtrl"> 
    {*<!-------------------------------- Begin : Outer Pane --------------------------------------->*}
	<div id="main" class="outer">
        {*<!------------------------------------ Begin : Header Pane ------------------------------------>*}
		{if !($resProducts|count >0 && $searchCategory > 0)}
		 {assign var="MENU_LOADED" value="YES"}
		{/if}
		{include file='CommonTop.tpl'}
        {*<!--------------------------------------- End : Header ---------------------------------------------->*}
		<div id="content-wrapper" ng-show="!query">
            {*<!----------------------------------- Begin : Content Pane ------------------------------------------->*}
			<div class="container">
           <div class="row">
               {*<!----------------------- starts : Side Block -------------------------------------->*}

               <div class="clearfix margin-bottom">
                {if $resProducts|default:array()|count >0}
                <div class="sorting-pane rmv-padding {if $pageDefaultView=='products_only' || $pageDefaultView=='widget_and_products'} col-xs-6 {else} col-xs-12{/if}">
                  <div class="sort-left">
                    <a id="sort-by" data-toggle="collapse" class="sprite-bf" data-target="#demo">
                        <h5>{$language.lblSortBy}</h5>
                      <span class="selected_sort">None Applied</span>
                      </a> 
                   
                  </div>
                </div> 
                {/if}
               
                {if $pageDefaultView=='products_only' || $pageDefaultView=='widget_and_products'}
                <div class="sorting-pane rmv-padding filter col-xs-6">
                    <a id="filters" class="sprite-bf">
                        <h5>Filter</h5> 
                        <span class="">None Applied</span>
                    </a> 
                </div>
                {/if}
                <div class="sort-contents col-xs-12 rmv-padding collapse" id="demo">
                <ul>
                      <li>
                        {html->anchor href="" class="sortby" caption="{$language.lblPopularity}" id="popularity"}
                      </li>
                      <li>
                        {html->anchor href="" class="sortby" caption="{$language.lblNewlyListed}" id="new_products"}
                      </li>
                      <li>
                        {html->anchor href="" class="sortby" caption="{$language.lblPriceHightoLow}" id="price_desc"}
                      </li>
                      <li>
                        {html->anchor href="" class="sortby" caption="{$language.lblPriceLowtoHigh}" id="price_asc"}
                      </li>
                      <li>
                        {html->anchor href="" class="sortby" caption="{$language.lblDiscount}" id="spcl_offers"}
                      </li>
                    </ul> 
                </div>
                <div class="filter-contents col-xs-12 rmv-padding collapse">
                    
              {include file="{$pageLayout}/LayeredNavigation.tpl"} 
                
                </div>
            </div>


                  
                    {*<!---------------------- End : Side Block --------------------------------------------->*}
				<div class="right-content-block rightPane col-xs-12" >
                    <div class="list-block">
                <div id="common_message"></div>
				<div id="unsubscribe_message"></div>
				<div id="common_message_referal"></div>
				<div id="invalid_email"></div>
                        {*{include file='addbanner/BannerLeaderboardHeader.tpl'}
				{include file='addbanner/BannerHeader.tpl'}*}
					{if $selCategoryDet['productCategoryName']}<h2 class="margin-bottom rmv-padding caption1">{$selCategoryDet['productCategoryName']}</h2>{/if}
					{if $resProducts|count >0}
					<p class="search-count margin-bottom rmv-padding"><strong><span id="productsCount">{$prodsMaxCount}</span>  {$language.lblCartItems} </strong> {$language.lblfoundfor} <strong>"{if $searchKeyword==''}{$selCategoryDet['productCategoryName']}{else}{$searchKeyword}{/if}"</strong> </p>

					{if $relatedSearch|count|default:0>0}
						<div class="rlt-srh-keywds-out" style="display: block;">
						<div class="related-search-text">{$language.lblSearchesrelatedto}<span class="search-keyword">"{if $searchKeyword==''}<strong>{$selCategoryDet['productCategoryName']}</strong>{else}<strong>{$searchKeyword}</strong>{/if}"</span> :</div>
							<div class="related-search-keywords-inner">
								{foreach $relatedSearch as $relatedKeyword}
									{html->anchor href="search/?keyword={$relatedKeyword.queryText}&in=0"  class="rlt-sr-key btn btn-default btn-xs" content="{$relatedKeyword.queryText}"}
								{/foreach}
							</div>
					</div>
					{/if}

					{/if}

	

					{if $resProducts|count >0}
						<div class="productListing">
							{include file="{$pageLayout}CatalogGridBlock.tpl"}
				
						</div>

						<div id="CategoryPopup">
							{form->start name="formProductOptions"}{form->close}
						</div>
					{else}
						{if $relatedSearchTerms|count|default:0>0}
							{$language.lblDidyoumean}

							{foreach $relatedSearchTerms as $relatedTerm}
								{html->anchor href="search/?keyword={$relatedTerm}&in=0"  content="{$relatedTerm}"}
							{/foreach}
						{/if}
						{include file='IndexNoProduct.tpl'}


					{/if}
                    </div>
                                </div>
				 {include file='RecentlyViewed.tpl'}
			</div>
			{include file='addbanner/BannerLeaderboardFooter.tpl'}
            {*<!-------------------------------- End : Content Pane ------------------------------------------->*}
		</div>
            {*<!------------------------------------------ Begin : Footer ------------------------------------->*}
		{include file='CommonBottom.tpl'}
            {*<!------------------------------------ End : Footer  --------------------------------------->*}
	</div>
<!-- End : Outer Pane -->
<script type="text/javascript">
    var lblphone = '{$language.lblEnterContactNumber}';
	var productCurrency = 1;
	var selCategoryID = '{$selCategoryDet["productCategoryID"]}';
	var languageID = '{$languageID}';
	var searchKeyword = {$searchKeywordArray};
	var originCatalogID = '{$originCatalogID}';
	var categoryID = '{$searchCategory}';
	var catIDAndSubcategories = '{$catIDAndSubcategories}';
	var userGroupID='{$userGroupID}';
	var detailPageProductID = 0;
	var listUsersWishListItems={$listUsersWishListItems|json_encode};
	
	var brandID = 0;

</script>
{include file="{$pageLayout}js_templates/CatalogGridBlock.tpl"}

{include file='CommonJavaScriptBottom.tpl' caching=true cache_lifetime=7200}
{html->messages_script section="Referral" id="common_message_referal"}
{html->messages_script section="Subscribe" id="invalid_email"}
{html->messages_script section="Subscribe" id="common_message"}
{html->messages_script section="Unsubscribe" id="unsubscribe_message"}

<script type="text/javascript">
{if $priceRanges.MINIMUM|default:'' && $priceRanges.MAXIMUM|default:''}	
	var __priceRangeMin = {$priceRanges.MINIMUM};
	var __priceRangeMax = {$priceRanges.MAXIMUM};	
	var __priceRangeMinCustom = '';
	var __priceRangeMaxCustom = '';
	{if isset($priceMinQueryString) && $priceMinQueryString}
		__priceRangeMinCustom = {$priceMinQueryString};
	{/if}
	{if isset($priceMaxQueryString) && $priceMaxQueryString}
		__priceRangeMaxCustom = {$priceMaxQueryString};
	{/if}
{/if}
{if isset($discountQueryString)}
	var __discountQueryString="{$discountQueryString}";
{/if}
{if isset($queryStringMode)}
var __queryStringMode="{$queryStringMode}";
{/if}
var userGroupID="{$userGroupID|default:0}";

var default_catalog_listing="{$default_catalog_listing|default:12}";
var detailPageProductID =0;
var lblBrands = "{$language.lblBrands}";
var lblRemove = "{$language.lblRemove}";
</script>
        
<script type="text/javascript" src="{$common_frontend_js}/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript" src="{$common_js}/jquery.lazyload.js"></script>
<script type="text/javascript" src="{$common_frontend_js}/addtocompare.feature.js"></script>
<script type="text/javascript" src="{$common_frontend_js}/catalog.page.js"></script>
<script type="text/javascript" src="{$common_frontend_js}/buyNow.js"></script>
<script type="text/javascript" src="{$common_mobile_js}/recommendation.page.js"></script>
<script type="text/javascript" src="{$common_frontend_js}/product.page.js"></script>
<script type="text/javascript">

	$(document).ready(function() {
		$("img.lazy").lazyload({
			effect : "fadeIn",
			threshold:200
		});
		{$scriptstringForMenuMove|default:''}
		$(".menuDiv").mouseover(function(){
			var rel = $(this).find('li').first().attr('rel');
			$("#categoryParent_"+rel).addClass("selected");
		}).mouseout(function(){
			var rel = $(this).find('li').first().attr('rel');
			$("#categoryParent_"+rel).removeClass("selected");
			var selectedCategoryKey = $('#selectedCategory').val();
			var selectedCategoryParentId = $('.'+selectedCategoryKey).attr('rel');
			$("#categoryParent_"+selectedCategoryParentId).addClass("active");
		});
		$('.menuDiv').each(function(index) {
			var ID = $(this).attr('id');
			$("#"+ID+" ul").each(function() {
				var elem = $(this);
				if (elem.children().length == 0) {
					elem.remove();
				}
			});
			/*$("#"+ID).css('width', $("#"+ID+" ul").length*170);*/
		});
		var selectedCategoryKey = $('#selectedCategory').val();
		//var selectedCategoryParentId = $('.'+selectedCategoryKey).attr('rel');
		//$("#categoryParent_"+selectedCategoryParentId).addClass("active");
		$("[id='"+selectedCategoryKey+"']").addClass("active");
        
        $(".sortby").click(function(){
		var thisObj = $(this);
        $(".selected_sort").html($(this).text());
        $("#sort-by").trigger( "click" );
         });  
        
	});
	{$menuScript|default:''}
    
    $(document).ready(function(){
            $("#filters").click(function(){
                $(".filter-contents").show();
            });
        });
    
</script>

<script>
    (function($){
        $(window).load(function(){
            $(".listMenuScroll").mCustomScrollbar();
        });
    })(jQuery);
</script>

</body>
</html>
