<!DOCTYPE html>
      <html ng-app="myapp"> 
          <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">
          {if $settingsCanonicalLink|default:''=='Yes'}
          <link rel="canonical" href="{$selCategoryDet.productCategoryKey|default:''}"/>
          {/if}
          <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'}
          {include file='CommonJavaScript.tpl'}

        </head>
        <body ng-controller="SearchCtrl"> 
            {*<!---------------------------------- Begin : Outer Pane --------------------------------------->*}
          <div id="main" class="outer">
            {*<!--------------------------Begin : Header Pane----------------------------------------------->*} 
            {include file='CommonTop.tpl'} 
            {*<!----------------------------- End : Header -------------------------------------------------------->*}
            <div id="content-wrapper" ng-show="!query">
              {*<!--------------------- Begin : Content Pane --------------------------------------------->*}
              <div class="container">
                  <div id="common_message"></div>
                  <div id="unsubscribe_message"></div>
                  <div id="common_message_referal"></div>
                  <div id="invalid_email"></div>
                        <div class="banner-container clearfix margin-btm-30">
                          {include file='BannerSlider.tpl'}
                        </div>
                        {if ! (count($brandInfo|default:array())>0)}  
                        <h1 class="h4-style text-center margin-top">			
                          {$selCategoryDet['productCategoryName']|default:''}	
                        </h1>
                        {/if}
                        <div class="light-bg menu pos-rel margin-btm-30">
                        {form->hidden name="selectedCategory"}
                                    
                          {if $brandID  > 0}
                            	{$brandCategoryMenu}
                             
                          {else}
                            	{$breadCrumb} 
                             
                            
                          {/if}
                      </div>
                         {if count($brandInfo|default:array())>0}
                        <div class="brand-info whiteBx clearfix">
                          <h2>{$brandInfo['brandName']}	</h2>
                          <div class="light-bg padding clearfix">
                            {if $brandInfo['brandIcon']!=''}						
                            <img src="{$view_public_path}/uploads/brand/small/{$brandInfo['brandIcon']}"	
                              height="{$brand_icon_height}" 
                              alt="{$brandInfo['brandName']}" 							
                              width="{$brand_icon_width}" class="pull-left margin-right" />
                            {/if}
                            {$brandInfo['brandDescription']|unescape:"html"}	
                          </div>
                        </div>
                        {/if}
                        {*if $pageDefaultView|default:'widget_and_category_with_products' == 'widget_and_category_with_products' *}	

                        {*<!----------------- START : Widget Start Here ----------------------------------->*}
                    {if count($listWidget|default:array())>0} 
                  {foreach $listWidget as $key=>$widget}

                  <div class="widgetSlide">
                    <!-- Dont remove the class "widget_elements" , ID and Data Attributes -->
                    <div class=" " id="widget_element_{$widget['widgetID']}" data-class="widget_elements" data-widget="{$widget['widgetID']}"  data-href="/index/ajaxgetwidget/widgetid/{$widget['widgetID']}/widgetdisplayedon/{$widget['widgetDisplayedOn']}/key/{$key}/"  >
                    </div>
                  </div>
                  {/foreach}
                     {/if}
                      {*<!----------------------- END : Widget End Here ---------------------------------------->*}
                      {if $listCategoryWiseProducts|count|default:0>0}
                      <div class="productListing ">
                        {foreach $listCategoryWiseProducts as $productCategoryID=>$resProducts}
                        <div class="clearfix brand-listing">
                          {if count($resProducts)>0}
                          {if count($resProducts)>{$numberOfProductCount-1}}
                          {if isset($categoryDetails[$productCategoryID]['productCategoryName'])}
                          {if $brandKey|default:''!=''}
                          {html->anchor href="brand/{$brandKey}/{$productCategoryID|sef_path:'catalog'} " class="flt-right Fsbold view" content="{$language.lblViewAll}"}
                          {else}
                          {html->anchor href="{$productCategoryID|sef_path:'catalog'} " class="pull-right view" content="{$language.lblViewAll}"}	
                          {/if}
                          {/if}
                          {/if}
                          {if isset($categoryDetails[$productCategoryID]['productCategoryName'])}
                          <h3>
                            {$language.lblPopularProducts}{$categoryDetails[$productCategoryID]['productCategoryName']}
                          </h3>
                          {/if}
                          {include file="{$pageLayout}CatalogGridBlock.tpl"} 
                          {/if}
                        </div>
                        {/foreach}
                      </div>
                      {else}
                          {if $pageDefaultView!='widget_only'}
                              {include file='IndexNoProduct.tpl'}
                          {/if}
                      {/if}
                      <div id="CategoryPopup">
                        {form->start name="formProductOptions"}{form->close}
                      </div>
                {include file='RecentlyViewed.tpl'}
              </div>
            </div>
            {*<!---------------------------------------- End : Content Pane -------------------------------------->*}
        
          {*<!---------------------------------- Begin : Footer --------------------------> *}
          {include file='CommonBottom.tpl'} 
          {*<!------------------------------- End : Footer -------------------------------------->*}
          </div>
          {include file="{$pageLayout}js_templates/CatalogGridBlock.tpl"}
          <!-- End : Outer Pane --> 
          <script type="text/javascript">
            var lblphone = '{$language.lblEnterContactNumber}';
            var lblRemove = '{$language.lblRemove}';
            var productCurrency = 1;
            var selCategoryID = '{$selCategoryDet["productCategoryID"]|default:''}';
            var languageID = '{$languageID|default:1}';
            var catIDAndSubcategories = '{$catIDAndSubcategories|default:''}';
            var categoryID='{$resBreadcrumbs[0]["productCategoryID"]|default:''}';
            var searchKeyword = '{$searchKeyword|default:''}';
            var originCatalogID = '{$originCatalogID|default:''}';
            var brandID = '{$brandID|default:0}';
          </script> 
          {include file='CommonJavaScriptBottom.tpl'}
          {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 $priceMinQueryString}
            __priceRangeMinCustom = {$priceMinQueryString};
            {/if}
            {if $priceMaxQueryString}
            __priceRangeMaxCustom = {$priceMaxQueryString};
            {/if}
            {/if}
            var  __discountQueryString='{$discountQueryString|default:''}';
            var  __queryStringMode='{$queryStringMode|default:''}';
            var  userGroupID='{$userGroupID|default:0}';
            var  default_catalog_listing='{$default_catalog_listing|default:''}';
            var detailPageProductID =0;
          </script>
          {html->script_group_start name="{$compiled_js_path}/catalog.default.categorycatalog.js"}
            {html->script src="{$common_frontend_js}/jquery.mCustomScrollbar.concat.min.js"}
            {html->script src="{$common_js}/jquery.lazyload.js"}
            {html->script src="{$common_frontend_js}/addtocompare.feature.js"}
            {html->script src="{$common_frontend_js}/brandcatalog.page.js"}
            {html->script src="{$common_frontend_js}/buyNow.js"}
            {html->script src="{$common_frontend_js}/recommendation.page.js"}
            {html->script src="{$common_frontend_js}/widget.page.js"}
            {html->script src="{$common_frontend_js}/product.page.js"}
          {html->script_group_end} 

          <script type="text/javascript">
            $(document).ready(function() {
            
            	$("img.lazy").lazyload({ 
            		effect : "fadeIn",
            		threshold:200
            	}).trigger("scroll");
            	{$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");
            	
            	$(".days_dash").each( function() {
            	if(!$(this).is(':visible') ) {
            		$(this).parent('.time-block').addClass("hourblock");
            	} 
            });
           
            {$menuScript|default:''}
            
                 });
          </script>
     
        </body>
      </html>
