<!DOCTYPE html>
<html ng-app="myapp" lang="{$SelCurrLanguage}">
   <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=='Yes'}
      <link rel="canonical" href="{$selCategoryDet.productCategoryKey}"/>
      {/if}*}
      {if $settingsCanonicalLink|default:''=='Yes'} 
      <link rel="canonical" href="{$views_host_share}{$requestURI}"/>
      {/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'}
       
       <link href="{$view_styles}/product-listing.css" rel="stylesheet" type="text/css" media="screen" />
      
   </head>
   <body ng-controller="SearchCtrl"  class="{$languageDirection} remove-fix">
      {*<!----------------------------------------------- Begin : Outer Pane ------------------------------------------>*}
      <div id="main" class="outer">
      {*<!--------------------------------------------- Begin : Header Pane------------------------------------------>*} 
      {assign var="Headerfix" value="No"}
      {assign var="CatalogJS" value="Yes"}
      {include file='CommonTop.tpl'} 
      {*<!--------------------------------------------- End : Header------------------------------------------------>*}
      {*<!-------------------------------------------  Begin : Content Pane------------------------------------------>*}
      <div id="content-wrapper" ng-show="!query" >
         {*<!------------------------------- Breadcrumbs Starts here------------------------------------------------>*}    

         <div class="clearfix bredcrumb d-none d-md-block bg-light py-1 font-small">
            <div class="container">
               <!-- Breadcrumbs Starts here -->
               {html->anchor href="/" caption="{$language.lblHome}" class="text-muted"}
               {if count($brandInfo)>0}
               <span>/</span> 
               {html->anchor href="brand/{$brandInfo['brandKey']}" caption="{$brandInfo['brandName']}" class="text-muted"}
               {foreach $resBreadcrumbs|default:array() as $resBreadcrumb}
               <span>/</span> 
               {if $resBreadcrumb['productCategoryStatus']=='Active'}
               {html->anchor href="brand/{$brandInfo['brandKey']}/{$resBreadcrumb['productCategoryID']|sef_path:'catalog'}" caption="{$resBreadcrumb['productCategoryName']}" class="text-muted"}
               {else}
               {html->anchor caption="{$resBreadcrumb['productCategoryName']}" class="text-muted"}
               {/if}
               {/foreach}
               
               {else}
               {foreach $resBreadcrumbs|default:array() as $resBreadcrumb} 
               <span>/</span>
               {if $resBreadcrumb['productCategoryStatus']=='Active'}

               {html->anchor href="{$resBreadcrumb['productCategoryID']|sef_path:'catalog'}" caption="{$resBreadcrumb['productCategoryName']}" class="text-muted"}
               {else}
               {html->anchor style='cursor:default;' caption="{$resBreadcrumb['productCategoryName']}" class="text-muted"}
               {/if}
               {/foreach}
               {/if}
            </div>
         </div>
         <!-- Breadcrumbs END here -->
         {*<!------------------------------- Breadcrumbs END here--------------------------------------------------- -->*}
         <div class="container">
            {include file='addbanner/BannerLeaderboardHeader.tpl'}
            {include file='addbanner/BannerHeader.tpl'}
            {*<!------------------------------- Common Message Starts  here------------------------------------------ -->*}  
            <div id="common_message"></div>
            <div id="unsubscribe_message"></div>
            <div id="common_message_referal"></div>
            <div id="invalid_email"></div>
            {*<!------------------------------- Common Message END  here---------------------------------------- -->*}
            <div class="catalog overflow row ">
               {*<!------------------------ starts : Side Block -------------------------------------------------->*} 
               <div class="col-lg-3 sort_blk left-content-block p-0">
                  <div class="clearfix d-lg-none">
                    
                     <h3 class="font-bold mb-3">               
                        {$selCategoryDet['productCategoryName']|default:''}       
                     </h3>
                     
                     {if $pageDefaultView=='products_only' || $pageDefaultView=='widget_and_products'}
                     {if count($brandInfo)>0}
                     <h1 class="caption1 float-left"> {$brandInfo['brandName']}</h1>
                     <div class="count text-primary font-semibold h6">&nbsp;&nbsp;[ <span id="productsCount">{$prodsMaxCount}</span> {$language.lblCartItems} ]
                     </div>
                     <div class="brand-info">
                        {* {if $brandInfo['brandIcon']!=''}            
                        <img src="{$view_public_path}/uploads/brand/small/{$brandInfo['brandIcon']}"  
                           height="{$brand_icon_height}"   
                           alt="{$brandInfo['brandName']}"       
                           width="{$brand_icon_width}"/>
                        {/if} *}
                        {$brandInfo['brandDescription']|unescape:"html"}  
                     </div>
                     {/if}
                     {/if}
                  </div>
                  <div class="fx-me pos-rel">
                     {if $resProducts|default:array()|count != 0}
                     <div class="d-flex prdctFilterMo d-lg-none" >
                        <div class="col-6 FltrIco">
                           <span class="pr-2 icon-filter"></span><span>{$language.lblFilter}</span>
                        </div>
                        <div class="col-6 FltrSort">
                           <span>{$language.lblSortBy}</span>
                        </div>
                     </div>
                     {/if}
                     <div class="col-12 mob_sort prdctFilter sorToggle d-lg-none">
                        <div class="Fitlersort TopFilterSort clps-cnt-mob">
                           <div class="sorting-pane">
                              <div class="tabs">
                                 <ul class="list-unstyled m-0 bg-white border pl-0 d-block float-none">
                                    <li class="border-bottom d-block">
                                       <span class="circle_icon {if $default_catalog_listing=='popularity'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby p-3 font-small d-block {if $default_catalog_listing=='popularity'}active{/if}" caption="{$language.lblPopularity}" id="popularity"}
                                    </li>
                                    <li class="border-bottom d-block">
                                       <span class="circle_icon {if $default_catalog_listing=='new_products'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby p-3 font-small d-block {if $default_catalog_listing=='new_products'}active{/if}" caption="{$language.lblNewlyListed}" id="new_products"}
                                    </li>
                                    <li class="border-bottom d-block">
                                       <span class="circle_icon {if $default_catalog_listing=='price_desc'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby p-3 font-small d-block {if $default_catalog_listing=='price_desc'}active{/if}" caption="{$language.lblPriceHightoLow}" id="price_desc"}
                                    </li>
                                    <li class="border-bottom d-block">
                                       <span class="circle_icon {if $default_catalog_listing=='price_asc'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby p-3 font-small d-block {if $default_catalog_listing=='price_asc'}active{/if}" caption="{$language.lblPriceLowtoHigh}" id="price_asc"}
                                    </li>
                                    <li class="border-bottom d-block">
                                       <span class="circle_icon {if $default_catalog_listing=='spcl_offers'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby p-3 font-small d-block {if $default_catalog_listing=='spcl_offers'}active{/if}" caption="{$language.lblDiscount}" id="spcl_offers"}
                                    </li>
                                 </ul>
                              </div>
                           </div>
                        </div>
                     </div>
                     <div class="prdctFilter sorToggle">
                        <div class="leftlistBx category-browse">
                           <div class="refine-search">
                              <div class="filter-head p-3 d-lg-none">
                                 <span class="mfillter icon-cross-fill clearAllSearch">{$language.lblClearAll}</span> 
                                 <h4 class="d-lg-none m-0">{$language.lblFilterBy}</h4>
                              </div>
                              {if ($brandID  > 0 && $resBrandCategories|count>0 ) || (!$brandID  > 0 && $breadCrumb!='')}
                              {form->hidden name="selectedCategory"}
                              <div class="FltrSctn">
                                 <h6 class="expand-clsps ">{$language.lblBrowse}</h6>
                                 {if $brandID  > 0}
                                 <div class="list-wrap">
                                    <div class="clearfix">
                                       <div class="listMenu listMenuScroll clearfix mb-3">
                                          {$brandCategoryMenu}
                                       </div>
                                       {*{html->anchor href="/categories/" class="btn btn-default btn-sm float-right text-uppercase my-3 view-btn d-none d-lg-block" caption="{$language.lblViewMore}"}*}
                                    </div>
                                 </div>
                                 {else}
                                 <div class="list-wrap">
                                    <div class="clearfix">
                                       <div class="listMenu listMenuScroll clearfix mb-3">
                                          {$breadCrumb} 
                                       </div>
                                       {*  {html->anchor href="/categories/" class="btn btn-default btn-sm float-right text-uppercase my-3 view-btn d-none d-lg-block" caption="{$language.lblViewMore}"}  *}
                                    </div>
                                 </div>
                                 {/if}
                              </div>
                              {/if}
                              {if $pageDefaultView=='products_only' || $pageDefaultView=='widget_and_products'}
                              {include file="{$pageLayout}/LayeredNavigation.tpl"} 
                              {/if}
                              {if $listFeaturedBrands|default:array()|count>0 && isset($categoryDetails[$originCatalogID])}
                              <h5>{$language.lblSimilar} {$categoryDetails[$originCatalogID]['productCategoryName']} {$language.lblBrands} </h5>
                              <div class="whiteBx">
                                 <ul class="brand-cat-list">
                                    {foreach $listFeaturedBrands as $brands}
                                    <li class="level-0">
                                       {html->anchor href="brand/{$brands['brandKey']}/{$originCatalogID|sef_path:'catalog'}" caption="{$brands['brandName']} {$categoryDetails[$originCatalogID]['productCategoryName']}"}
                                    </li>
                                    {/foreach}
                                 </ul>
                              </div>
                              {/if}
                              <div class="btn-fix d-lg-none text-right">
                                 <div class="apply-fillter btn btn-primary">{$language.lblApplyFilter}</div>
                              </div>
                           </div>
                        </div>
                        {if $listFeaturedProducts|default:array()|count>0}
                        <div class="leftlistBx category-browse border-top">
                           <h6 class="font-bold">{$language.lblFeatured} {$brandInfo['brandName']} {$language.lblProducts} </h6>
                           <div class="whiteBx smallGridLayout">
                              {foreach $listFeaturedProducts as $featureProduct}
                              <div class="list-01 mb-3">
                                 {html->anchor href="{$featureProduct.productID|sef_path:'product'}" class="img-tag" caption="<img src='{$view_public_path}/uploads/catalog/product/small/{$featureProduct.productImage}' width='100' height='100'/>"}
                                 <div class="tumbimgCaption font-small mt-3">
                                    {html->anchor href="{$featureProduct.productID|sef_path:'product'}" caption="{$featureProduct.productTitle|truncate:30}"}<br>
                                    {if $featureProduct.offerPrice!=$featureProduct.productOptionRegularPrice}
                                    <strike>{$featureProduct.productOptionRegularPrice|price:'':$featureProduct['productDefaultCurrency']:$currentCurrencyID}</strike> 
                                    {/if}
                                    <span>{$featureProduct.offerPrice|price:'':$featureProduct['productDefaultCurrency']:$currentCurrencyID}</span>
                                    {if $featureProduct['tierPrice']>0}
                                    <div>{$language.lblAsLowAs} {$featureProduct['tierPrice']|price:'':$featureProduct['productDefaultCurrency']:$currentCurrencyID}</div>
                                    {/if}
                                 </div>
                              </div>
                              {/foreach}
                           </div>
                        </div>
                        {/if}
                     </div>
                  </div>
                  {*<!-- Begin : facebook 
                     {if $settingsFacebookLikeButtonCode|default:''}
                     	<div class="fb-like-box"> {$settingsFacebookLikeButtonCode} </div>
                     {/if} 
                     <!-- End : facebook --> *}
                  {*<!-- Begin : Twitter --> *}
                  {if $settingsTwitterEnableFeeds|default:'' eq "Yes"}
                  <div class="twitterbox"> {$settingsTwitterWidgetCode} </div>
                  {/if} 
                  {*<!-- End : Twitter -->*}
               </div>
               {*<!---------------------------------- End : Side Block ------------------------------------------------->*} 
               <div class="col-lg-9 col-12 p-0 pb-5 right-content-block">
                  <div class="list-block light-bg pt-3">
                     <div class="clearfix d-none d-lg-block pl-3">
                        {if count($brandInfo) < 1 }
                        {if $selCategoryDet['productCategoryName']|default:'' neq ''}
                        <h1 class="d-inline-block h3 mb-0">{$selCategoryDet['productCategoryName']|default:''}</h1>
                        {else}
                        
                        {/if}
                        <div class="count ml-1 d-inline-block">[ <span id="productsCount">{$prodsMaxCount}</span> {$language.lblCartItems} ]</div>
                        
                        {/if}
                        {if $pageDefaultView=='products_only' || $pageDefaultView=='widget_and_products'}
                        {if count($brandInfo)>0}
                        <h1 class="d-inline-block h3 mb-0"> {$brandInfo['brandName']}</h1>
                        <div class="count ml-1 d-inline-block">[ <span id="productsCount">{$prodsMaxCount}</span> {$language.lblCartItems} ] </div>
                        {if $brandInfo['brandDescription']!=''}
                        <div class="brand-info">
                           {$brandInfo['brandDescription']|unescape:"html"} 
                        </div>
                        {/if}
                        {/if}
                        {/if}
                     </div>
                     <div class ="refined-box-content ml-lg-3 my-2"></div>
                     <div class="clearfix">
                        {if $pageDefaultView == 'widget_only' || $pageDefaultView == 'widget_and_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}
                        {else}
                        {if $pageDefaultView == 'widget_only'}
                        {include file='IndexNoProduct.tpl'}
                        {/if}
                        {/if}
                        {*<!------------------------- END : Widget End Here --------------------------------->*}
                        {/if}
                     </div>
                     {if $pageDefaultView == 'products_only' || $pageDefaultView == 'widget_and_products'}
                     {*<!---------------------- Start : Sort Block --------------------------------------------->*}
                     {if $resProduct|count|default:''>0}
                     <div class="fixing-element d-none d-lg-block">
                        <h6 class="h5 font-bold m-0">								
                           {$selCategoryDet['productCategoryName']|default:''}	
                        </h6>
                        <div class="sorting-pane justify-content-between d-none d-lg-block mb-sm-4 pb-sm-2 border-bottom">
                           <div class="d-flex pl-3">
                                <div class="sort-left pt-1">
                                  <div class="font-semibold font-small m-0 sortBuy">
                                    {$language.lblSortBy} : 
                                 </div>
                                 <ul>
                                    <li class="float-left px-3 border-right font-small">
                                       <span class="circle_icon {if $default_catalog_listing=='popularity'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby position-relative font-rglr {if $default_catalog_listing=='popularity'}active{/if}" caption="{$language.lblPopularity}" id="popularity"}
                                    </li>
                                    <li class="float-left px-3 border-right font-small">
                                       <span class="circle_icon {if $default_catalog_listing=='new_products'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby position-relative font-rglr {if $default_catalog_listing=='new_products'}active{/if}" caption="{$language.lblNewlyListed}" id="new_products"}
                                    </li>
                                    <li class="float-left px-3 border-right font-small">
                                       <span class="circle_icon {if $default_catalog_listing=='price_desc'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby position-relative font-rglr {if $default_catalog_listing=='price_desc'}active{/if}" caption="{$language.lblPriceHightoLow}" id="price_desc"}
                                    </li>
                                    <li class="float-left px-3 border-right font-small">
                                       <span class="circle_icon {if $default_catalog_listing=='price_asc'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby position-relative font-rglr {if $default_catalog_listing=='price_asc'}active{/if}" caption="{$language.lblPriceLowtoHigh}" id="price_asc"}
                                    </li>
                                    <li class="float-left px-3 border-right font-small">
                                       <span class="circle_icon {if $default_catalog_listing=='spcl_offers'}visible{/if}"></span>
                                       {html->anchor href="" class="sortby position-relative font-rglr {if $default_catalog_listing=='spcl_offers'}active{/if}" caption="{$language.lblDiscount}" id="spcl_offers"}
                                    </li>
                                 </ul>
                              </div>
                              <div class="list-type ml-auto">
                                 <div class="gridBx d-inline-block mr-1 p-1 px-2 border">
                                    {html->anchor href="" id="grid" class="gridView viewType icon-grid-view active"}
                                 </div>
                                 <div class="listBx d-inline-block p-1 px-2 border">
                                    {html->anchor href="" id="list" class="listView viewType icon-list-view"}
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                     {/if}
                     {*<!---------------------- End : Sort Block --------------------------------------------->*}
                     {if $resBanner|default:''} 
                     <div class="banner-container ml-3 clearfix">
                        {include file='BannerSlider.tpl'}
                     </div>
                     {/if}
                     {form->hidden name="selectedProductOption" value=""}
                     {include file="{$pageLayout}productCompareBox.tpl"} 
                     <div id ="refined-box-content"></div>
                     <div class="productListing pl-lg-3"> 
                        {include file="{$pageLayout}CatalogGridBlock.tpl"} 
                        {include file="{$pageLayout}js_templates/CatalogGridBlock.tpl"}
                     </div>
                     {if $prodsMaxCount > $productPageCount}
                     <div class="text-center">
                        <a href="javascript:void(0)" id="view_more_products" class="btn btn-secondary mt-4">{$language.lblShowMoreItems}</a>
                     </div>
                     {/if}
                     <div id="CategoryPopup">
                        {form->start name="formProductOptions"}
                        {form->close}
                     </div>
                     {/if}
                  </div>
                  {*<!----------------- START : Category description Start Here ----------------------------------->*}    
                  {if $selCategoryDet["productCategoryFooterText"]|default:''}
                  <div class="mt-4 category-footertext pl-3">
                     {$selCategoryDet["productCategoryFooterText"]|default:''|unescape:"html"}
                  </div>
                  {else if $selCategoryParentDet["productCategoryFooterText"]|default:''}
                  <div class="mt-4 category-footertext pl-3">
                     {$selCategoryParentDet["productCategoryFooterText"]|default:''|unescape:"html"}
                  </div>
                  {/if}
                  {*<!----------------- START : Category description end Here ----------------------------------->*}
               </div>
            </div>
            {include file='catalog/default/freeGiftProduct.tpl'}
         </div>
         <div class="border-top">
            {include file='RecentlyViewed.tpl'}
         </div>
         {include file='addbanner/BannerLeaderboardFooter.tpl'}
         {*<!----------------------------- End : Content Pane -------------------------------------->*}
      </div>
      {*<!-------------------------------------------- Begin : Footer	Pane ------------------------------------------->*} 
      {include file='CommonBottom.tpl'} 
      {*<!----------------------------------------- End : Footer Pane ---------------------------------------------->*}
      <!-- 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:''}';
         var catIDAndSubcategories = '{$catIDAndSubcategories}';
         var categoryID		="{$resBreadcrumbs[0]["productCategoryID"]|default:''}";
         var searchKeyword 	= "{$searchKeyword|default:''}";
         var listUsersWishListItems = {$listUsersWishListItems|json_encode};
         var originCatalogID = '{$originCatalogID}';
         var categoryID = '{$originCatalogID}';
         var brandID 		= '{$brandID}';
         var businessID 		= '{$businessID}';
      </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|floor};
         var __priceRangeMax = {$priceRanges.MAXIMUM|ceil};	
         var __priceRangeMinCustom = '';
         var __priceRangeMaxCustom = '';
         {if $priceMinQueryString}
         __priceRangeMinCustom = {$priceMinQueryString};
         {/if}
         {if $priceMaxQueryString}
         __priceRangeMaxCustom = {$priceMaxQueryString};
         {/if}
         {/if}
         var  __discountQueryString='{$discountQueryString}';
         var  __queryStringMode='{$queryStringMode}';
         var  userGroupID='{$userGroupID}';
         var  default_catalog_listing='{$default_catalog_listing}';
         var detailPageProductID =0;
         var lblBrands ="{$language.lblBrands}";
         var productPageCount = "{$productPageCount|default:''}";
         var lblFollow ='{$language.lblLikeMerchant}';
         var lblUnFollow ='{$language.lblLikedMerchant}';
      </script>
      {html->script_group_start name="{$compiled_js_path}/catalog.default.catalog.js"}
      {html->script src="{$common_js}/jquery.lazyload.js"}
      {html->script src="{$common_frontend_js}/addtocompare.feature.js"}
      {html->script src="{$common_frontend_js}/catalog.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">
         if($(".fixing-element").length){  
             var sortFix = $(".fixing-element").offset().top;
             var sortouterHeight = $(".fixing-element").outerHeight();      
             $(".fixing-element").affix({
                   offset: sortFix  
               });
             $(".fixing-element").on("affix.bs.affix", function() {
                 $("body").css("padding-top", sortouterHeight);
               });
             $(".fixing-element").on("affix-top.bs.affix", function() {
                 $("body").css("padding-top","0");
               }); 
         }
         $(document).ready(function(){
             $(document).on("click", ".apply-fillter,.mfillter", function() {
             /* Act on the event */
             $('.prdctFilter').addClass('sorToggle');
             $('.FltrIco').removeClass('drop-up');
             $('.fx-me').removeClass('filter-open');
              $("body").removeClass("showfilter");
             $('header.affix').css("z-index","9999");    
           }); 
             var leftCntHeight = $(".left-content-block").outerHeight();
             var rightCntHeight = $(".right-content-block").outerHeight();
            
                if ($('.recommend').length > 0) { 
         if (window.matchMedia('(min-width: 991px)').matches){
             $('.fx-me').scrollToFixed({
               marginTop: $('.fixing-element').outerHeight(true),
               limit: function () {
                   return $('.recommend').offset().top - $('.fx-me').outerHeight()  - 60;
                 },
                 zIndex: 999,
                 removeOffsets: true
                 
             }); 
           }
         } else{
         if (window.matchMedia('(min-width: 991px)').matches){
             $('.fx-me').scrollToFixed({
               marginTop: $('.fixing-element').outerHeight(true),
               limit: function () {
                   return $('#footer').offset().top - $('.fx-me').outerHeight()  - 40;
                 },
                 zIndex: 999,
                 removeOffsets: true
                 
             });  
         }
         }  
         
         
           $('.FltrIco').click(function(event) {
             /* Act on the event */
             $('.fx-me').addClass('filter-open')
           });
           $('.addToCompareCommonDiv').hover(function() {
             $('.compairPane').toggleClass('active-now');
           });
         var recomendationdiv = $('.recommend');
         var footertext = $('.category-footertext').length;
         
         if ( $( ".recommend" ).length ) {
         $('.filter-section').scrollToFixed({
                 limit: function() {
                     var limit = 0;
                     if (recomendationdiv) {
                         limit = $(".recommend ").offset().top - $(this).outerHeight(true) - 10;
                     }
                     else {
                         limit = $('#footer').offset().top - $(this).outerHeight(true) - 10;
                     }
                     
                     return limit;
         }
         });
         }
         else{
         $('.filter-section').scrollToFixed({
                 limit: function() {
                     var limit = 0;
                     if (footertext) {
                         limit = $('.category-footertext').offset().top - $(this).outerHeight(true) - 10;
                     }
                      else {
                         limit = $('#footer').offset().top - $(this).outerHeight(true) - 10;
                     }
                     
                     return limit;
                 }    
         });
         }
         if($('.fx-me0').length >0 ){
         
             var sortFix = $(".fixing-element00").offset().top;
             var sortouterHeight = $(".fixing-element00").outerHeight();      
             $(".fixing-element00").affix({
                 offset: sortFix  
             });
             $(".fixing-element00").on("affix.bs.affix", function() {
                 $("body").css("padding-top", sortouterHeight);
             });
         
             $(".fixing-element00").on("affix-top.bs.affix", function() {
                 $("body").css("padding-top","0");
             }); 
         
              if (window.matchMedia('(min-width: 992px)').matches){
         
                 var fixMe = $('.fx-me0'); 
                 if (fixMe.length > 0) {
                     fixMe.scrollToFixed({
                       marginTop: $('.fixing-element').outerHeight(true) + 40,
                       limit: function () {
                           return $('#footer').offset().top - fixMe.outerHeight() - 10;
                         },
                         zIndex: 999,
                         removeOffsets: true
                         
                     }); 
                 } 
               }
              
               $('.FltrIco').click(function(event) {  
                   /* Act on the event */ 
                   $('#fx-me0').removeClass('sorToggle');
         
               });
               $('.FltrSort').click(function(event) {  
                   /* Act on the event */ 
                   $('.mob_sort').removeClass('sorToggle');
         
               });              
               $('#applyfltr').click(function(event) {  
                   /* Act on the event */
                   $('.prdctFilter').addClass('sorToggle');
                   $('.FltrIco').removeClass('drop-up');
                   $('header.affix').css("z-index","9999");
               });   
         
                 $(document).on("click", ".sort_item", function() {
                 $(".FltrSort").text($(this).text());
                 $('.mob_sort').addClass('sorToggle');
                 $(".FltrSort").removeClass('drop-up'); 
                 });
             
             
         }         
          });
          
           
      </script>
      <script type="text/javascript">
         $(document).ready(function() {
         	$("img.lazy").lazyload({ 
         		effect : "fadeIn",
         		threshold:200
         	}).trigger("scroll");
         	$(".days_dash").each( function() {
         	if(!$(this).is(':visible') ) {
         		$(this).parent('.time-block').addClass("hourblock");
         	} 
         });
         });
      </script>
   </body>
</html>