{form->hidden name="pageAccess" id="pageAccess" value="{$pageAccess}"}
{form->hidden name="trackItem"  value=""}

{*<!--Ajax loader Start---------------------------------------------------------------------------------------------------------------->*}
<div class="pop_loader hide"> <div class="light-bg padding">
<img src="{$view_images}/loader-small.gif" width="64" height="64" alt="Loding"> {$language.lblLoading}</div></div>
<div class="hide-content"></div>
<div class="popupUpSubscribe active" style="display:block;"></div>
{*<!--Ajax loader End---------------------------------------------------------------------------------------------------------------->*}
{*<!-- Login popup Start------------------------------------------------------------------------------------------------------------------------------ -->*}
<div class="popupSignupLogin" style="display:block;">
  <div class="popupsectionlogin popupShowLogin">
   <iframe id="iframeLogin" name="loginPopup" src="" class="quickpopup popupShowLogin"  frameborder="0" width="100%" height="100%" marginwidth="5" marginheight="5">
   
   </iframe>
      </div>
</div>

{*<!-- Login popup End------------------------------------------------------------------------------------------------------------------------------ -->*}
<div id="fb-root" class="fb-root01"></div>
<header>
<div class="header-topest clearfix d-none d-lg-block hidden-sm">
  <div class="container">
    <div class="d-flex"> 
    {if $view_common_languages|@count>1}
    <div class="mr-auto">
    {include file='CommonLanguageOptions.tpl'}
    </div>
    {/if}
    {if $view_all_currencies|@count>1}
    <div class="mr-auto">
    {include file='CommonCurrencyOptions.tpl'}
    </div>
    {/if}
    <ul class="accountDetails list-unstyled m-0">
     {assign var="commonUserID" value=$commonUserID|default:''}
      {if $commonUserID|default:0 > 0} 
      <li class="padding-horizontal hidden-sm hidden-xs">{html->anchor href="user/account/" class="wallet sprite-bf" content="{$availableBalance|price}" title="{$language.lblMyWallet}"}</li>
      {/if}
     
       
      
      {form->hidden name="redirectLoginUrl" id="redirectLoginUrl"}
      <li class="drop-menu-track dropdown d-none d-lg-block">
         <a class="dropdown-toggle" data-toggle="dropdown">
         {if $commonUserID>0}{$language.lblWelcome}
         {$commonUserName} 
         {else}
         {$language.lblTrackMyOrder} 
         {/if}</a>
         <ul class="dropdown-menu track_Order py-3">
            <li class="px-3">
               {html->anchor href="/user/purchases/" rel="purchases" class="{$loginPopupClass}" caption=$language.lblMyPurchases redirect="user/purchases"}
               {form->hidden name="redirectOrderUrl" value="user/purchases"}
            </li>
           
            {if $commonUserID == "" } 
        
            <li class="padding-horizontal track_Li px-3 mt-2 border-top"> 
               <p class="dark pt-2 mb-2">{$language.lblTrackMyOrder}</p>
               <div class="input-group input-group-md">
                  {form->textbox name="trackItem1" class="form-control" placeholder="{$language.lblOrderID}/ {$language.lblEmailID}"}
                  <span class = "input-group-btn">
                  {form->button name="submitTrack" value="{$language.lblGoButton}" class="btn btn-primary submitTrack responsive1"}
                  </span>
               </div>
            </li>
            {/if}
            {if $commonUserID>0}
            {form->hidden name="userLogined" id="userLogined" value="Yes"}
            <li class="px-3"> 
               {if $httpsSiteUrl|default:''!=""}
               {html->anchor href="/user/account/"  secureURL="{$httpsSiteUrl}/user/account/" caption=$language.lblMyAccount} 
               {else}
               {html->anchor href="/user/account/"  caption=$language.lblMyAccount}
               {/if} 
            </li>
            <li class="px-3"> 
               {if $httpsSiteUrl|default:''!=""} 
               {html->anchor href="/user/logout/" secureURL="{$httpsSiteUrl}/user/logout/" id="logout-link" caption="{$language.lbllogout}" class="logout-link"}   
               {else}
               {html->anchor href="/user/logout/" id="logout-link" caption="{$language.lbllogout}" class="logout-link"}
               {/if}
            </li>
            {/if}
         </ul>
      </li>

       {if $commonUserID == ""} 
       <li class="padding-left">
       {form->hidden name="userLogined" id="userLogined" value="No"}
       {html->anchor  section="login" caption="{$language.lblLogin}" class="hidden-sm hidden-xs popuplogin"} <span class="hidden-sm hidden-xs">/</span> 
       {html->anchor section ="signup" caption="{$language.lblSignUp}" class="popuplogin hidden-sm hidden-xs"}
       </li>
       {/if}    


     </ul>
  </div>
</div>
</div>
<div class="header-top pos-rel">
      <div class="container padding-vertical clearfix">
         <div class="row position-relative m-0">
{*<!----------------------Heder left logo and nav toggler  Start -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}   
            <div class="col-lg-2 col-5 p-0 mr-auto text-left" id="o-wrapper">
            <span class="icon-menu-bar icon-menu d-lg-none" id="navigate"></span> 
			 <div id="logo" class="logo">
			   {if $defaultLogo} 
			     {html->anchor href="/" title="{$commonSiteName}" class="img-fluid" target="_self" content="<img src='{$view_public_path}/uploads/languages/logo/{$defaultLogo}' alt='Logo' class='img-fluid'>"}
                {else}
                    {if $commonCompanyLogo} 
                        {html->anchor href="/" title="{$commonSiteName}" class="img-fluid" target="_self" content="<img src='{$commonCompanyLogo}' border='0' alt='Logo' class='img-fluid'>"}
					{else}
					   {html->anchor href="/" title="{$commonSiteName}"  caption="{$commonSiteName}"}
					{/if} 
              {/if}
             </div>
            </div>
{*<!----------------------Heder left logo and nav toggler  ends -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*} 
{*<!----------------------Search Section  Start Algolia OR Normal Search-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}          
            <div class="search col-lg-7 mr-auto p-lg-0"> 
               <div class="clearfix">
                 {* <div class="col-xs-3  rmv-padding serch-drop">
                   {form->select name="searchCategory" class="form-control input-lg rmv-border-radius" options=$mainCategories|default:'' caption="0->{$language.lblAllCategories}"}
                 </div> *}
                 <div class="input-group input-group-lg search_ico">
                   {form->textbox name="searchKeyword" class="form-control form-control-lg"  placeholder="{$language.lblSearchforall}" autocomplete="off"}
                   <span class="input-group-btn">

                   {form->button name="serachButton" value="{$language.lblCSearch}" class="btn btn-primary btn-lg serachBtn responsive1"}
                   </span>
                 </div>
               </div>
               <div class="searchResult" id="searchResult"></div>
               <div class="search-error-outer alert alert-danger" style="display: none;">
                 <div class="search-error">{$language.errChooseCategory}</div>
               </div>
            </div>
{*<!----------------------Search Section  End -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}   
{*<!----------------------Cart drop down whish list and user signup  Section  Start -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}                       
            <div class="col-lg-2 col right-top-section text-right p-0">
            <ul class="clearfix list-unstyled text-right">
                 <li class="d-lg-none">
                <a href="javascript:void(0);" class="local-search hidden-md hidden-lg" title="Search"><i class="icon-search">  </i></a>
            </li>
          
              {assign var="commonUserID" value=$commonUserID|default:''}
 
            {form->hidden name="redirectLoginUrl" id="redirectLoginUrl"}
               {if $commonUserID>0}
            <li class="d-lg-none dropdown mob-dropmenu drop-menu-track">
               <a href="javascript:void(0);" data-toggle="dropdown"><i class="icon-user"></i></a> 
               {/if}
               <ul class="track_Order p-3 dropdown-menu pull-right">
               <li>{html->anchor href="/user/edit/" caption="{$commonUserName}"}</li>
               {if $commonUserID|default:0 > 0} 
              
              <li>{html->anchor href="user/account/"  content="{$language.lblMyWallet}" title="{$language.lblMyWallet}"}</li>
               {/if}
                  <li>
                     {html->anchor href="/user/purchases/" rel="purchases" class="{$loginPopupClass}" caption=$language.lblMyPurchases redirect="user/purchases"}
                     {form->hidden name="redirectOrderUrl" value="user/purchases"}
                  </li>
                  
                  {if $commonUserID == "" } 
                  <li class="padding-horizontal"> 
                     <p class="dark">{$language.lblTrackMyOrder}</p>
                     <div class="input-group input-group-sm">
                        {form->textbox name="trackItem2" class="form-control" placeholder="{$language.lblOrderID}/ {$language.lblEmailID}"}
                        <span class = "input-group-btn">
                        {form->button name="submitTrack" value="{$language.lblGoButton}" class="btn btn-primary submitTrack2 responsive2"}
                        </span>
                     </div>
                  </li>
                  {/if}
                  {if $commonUserID>0}
                  {form->hidden name="userLogined" id="userLogined" value="Yes"}
                  
                  <li> 
                     {if $httpsSiteUrl|default:''!=""} 
                     {html->anchor href="/user/logout/" secureURL="{$httpsSiteUrl}/user/logout/" id="logout-link" caption="{$language.lbllogout}" class="logout-link"}   
                     {else}
                     {html->anchor href="/user/logout/" id="logout-link" caption="{$language.lbllogout}" class="logout-link"}
                     {/if}
                  </li>
                  {/if}
               </ul>
            </li>
            {if $commonUserID == "" } 
            {form->hidden name="userLogined" id="userLogined" value="No"}
            <li class="d-lg-none">
               {html->anchor  section="login" caption="<i class='icon-user'></i>" class=" popuplogin"}
            </li>
            {/if} 

             {if $commonUserID == "" } 
             {else}
             {/if}
             {if $wishListHide|default:'' eq 'No'}
               <li>
                {html->anchor href="/user/wishlist/" redirect="/user/wishlist/" class="icon-heart-outline d-none d-lg-block popuplogin" caption="{$language.lblWishlist}"}
                  {html->anchor href="/user/wishlist/" redirect="/user/wishlist/" class="icon-heart-outline d-lg-none  popuplogin"}  
                  </li>
                  {/if}
                   
                <li>
                {if $statPageName|default:''!='cart'}
               <!-- cart section starts -->
               {include file='cart/CartNotification.tpl'} 
               {* {include file='cart/CartPopUp.tpl'} *}
               <span class="cart-popup-box"></span>
               <!--Common Cart notification starts--> 
               <span class="cart-dropdown-box"></span>
            
               <!--Common Cart notification ends-->
               <!-- cart section ends -->
               {/if}
               </li>
               </ul>
            </div>
{*<!----------------------Cart drop down whish list and user signup  Section  Start -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}            
         </div>
    
      </div>
   </div>

   <div class="header-bottom text-left">
      <div class="container padding-vertical-half">
<div class="d-flex ">
{*<!----------------------Main Menu Start -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*} 
        
        <div class="let-overflow mr-auto">

          <div class="clearfix log-notify d-lg-none text-ellipsis">
            <span class="icon-user light h2style"></span>
            {if $commonUserID == "" } 
              {html->anchor  section="login" caption="{$language.lblLogin}" class="popuplogin"}
              <span class="light">/</span> 
              {html->anchor section ="signup" caption="{$language.lblSignUp}" class="popuplogin"}
            {else}
              {html->anchor href="/user/account/"  caption="{$language.lblWelcome} <span class='LogedName'>{$commonUserName}</span>"}
            {/if}  
          </div>

          {if $view_common_languages|@count>1}
            <div class="d-lg-none clearfix">
              {include file='CommonLanguageOptions.tpl'}
            </div>
          {/if}

          <div class="site_main_menu c-buttons">
               {* <button type="button" id="c-button--slide-left" class="navbar-toggle collapsed c-button navbutton" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                 <span class="sr-only">Toggle navigation</span>
                 <span class="icon-bar"></span>
                 <span class="icon-bar"></span>
                 <span class="icon-bar"></span>
               </button> *}
                {*<!----------------------Navigation menu Start -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}         
            <nav class="menu_content c-menu c-menu--slide-left" id="c-menu--slide-left">
              <i class="c-menu__close icon-cross d-lg-none" id="c-button--slide-left"></i>
              {custommenu->showMenu menukey='main_navigation' seperator='li'}
            </nav> 
            {*<!----------------------Navigation menu End -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*}  
           
            <div class="clearfix d-lg-none">
                
              
             
      
              <div class="dropdown">
                 <a href="javascript:void(0)" class="menu-jb-ntn md-tarckorder" data-toggle="dropdown">
                   {if $commonUserID == "" } 
                   {$language.lblTrackMyOrder} 
                   {/if}
                 </a>
                 <ul class="dropdown-menu pt-3 pull-right track_Order m-0">
                    {if $commonUserID == "" } 
                    <li class="padding-horizontal track_Li"> 
                       {* <p class="dark">{$language.lblTrackMyOrder}</p> *}
                       <div class="input-group input-group-sm">
                          {form->textbox name="trackItem3" class="form-control" placeholder="{$language.lblOrderID}/ {$language.lblEmailID}"}
                          <span class = "input-group-btn">
                          {form->button name="submitTrack" value="{$language.lblGoButton}" class="btn btn-primary submitTrack responsive3"}
                          </span>
                       </div>
                    </li>
                    {/if}
                 </ul>
              </div>
            </div>

          </div>
{*<!----------------------Main Menu End -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->*} 
        
        
        </div>
         

         </div>
      </div>
   </div>
        <div id="c-mask" class="c-mask"></div>
   
   <script type="text/javascript">	
      var showCartNotification = "{$showCartNotification|default:''}";
      var AjaxCurrLanguage     =  "{$AjaxCurrLanguage|default:''}";
      var lblYourShoppingCart = "{$language.lblYourShoppingCart}";
      var lblYourCart = "{$language.lblYourCart}";
      var lblCartEmpty = "{$language.lblCartEmpty}";
      var lblUpdate = "{$language.lblUpdate}";
      var lblCartSubTotal = "{$language.lblCartSubTotal}";
      var lblCartTotal = "{$language.lblCartTotal}";
      var lblCartContinueShopping = "{$language.lblCartContinueShopping}";
      var lblContinue             = "{$language.lblContinue}";
      var lblContinueShopping     = "{$language.lblContinueShopping}";
      var lblCartItemNameAddedSuccessfully= "{$language.lblCartItemNameAddedSuccessfully}";
      var lblThere                  = "{$language.lblThere}";
      var lblItemsInShopping        = "{$language.lblItemsInShopping}";
      var lblItemInShopping         = "{$language.lblItemInShopping}";
      var lblCartCheckOut = "{$language.lblCartCheckOut}";
      var lblCartClose = "{$language.lblCartClose}";
      var lblCartItems = "{$language.lblCartItems}";
      var lblCartStockNotAvailable = "{$language.lblCartStockNotAvailable}";
      var lblCartYouHaveExceededLimit = "{$language.lblCartYouHaveExceededLimit}";
      var lblCartProductTypeMisMatch = "{$language.lblCartProductTypeMisMatch}";
      var lblCartInvalidCurrencyConfig = "{$language.lblCartInvalidCurrencyConfig}";
      var lblCartCurrencyNotMatching = "{$language.lblCartCurrencyNotMatching}";
      var lblCartProductNotTipped = "{$language.lblCartProductNotTipped}";
      var lblCartItemAddedSuccessfully = "{$language.lblCartItemAddedSuccessfully}";
      var lblCartItemRemovedSuccessfully = "{$language.lblCartItemRemovedSuccessfully}";
      var lblCartItemsRemovedSuccessfully = "{$language.lblCartItemsRemovedSuccessfully}";
      var lblPromoDiscount = "{$language.lblPromoDiscount}";
      var lblAccountCredit = "{$language.lblAccountCredit}";
      var lblServiceCharge = "{$language.lblServiceCharge}";
      var lblShippingCharge = "{$language.lblShippingCharge}";
      var lblTaxAmount = "{$language.lblTaxAmount}";
      var msgConfirmGift = "{$language.msgConfirmGift}";
      var lblItem = "{$language.lblItem}";
      var lblQty = "{$language.lblQty}";
      var lblUnitPrice = "{$language.lblUnitPrice}";
      var lblDeleteItem = "{$language.lblDeleteItem}";
      var lblCartProductNotTippedExisting = "{$language.lblCartProductNotTippedExisting}";
      var lblCartPleaseSaveGiftDetails = "{$language.lblCartPleaseSaveGiftDetails}";
      var currencyForJS = {$currencyForJS};
      var lblCartSingleItemCheckoutError = "{$language.lblCartSingleItemCheckoutError}";
      var lblCartSingleItemsCheckoutError = "{$language.lblCartSingleItemsCheckoutError}";
      var AlertText= '{$language.lblAlert}';
      {if $productsToJs|default:''!=''}
      var products= {$productsToJs};
      {/if}
      var __ANALYTICS_MODULE	= {$__ANALYTICS_MODULE};
      var __AFFILIATE_MODULE	= {$__AFFILIATE_MODULE};
      var targetPath			= "{$targetPath}";
      var targetPathType		= "{$targetPathType}";
      var statPageName		= "{$statPageName|default:''}";
      var enterOrderID		= "{$language.errEnterOrderID}";
      var errValidOrderID		= "{$language.errValidOrderID}";
      var msgCheckEmail		= "{$language.msgCheckEmail}";
       $(document).ready(function(){
           $('.local-search').click(function () {
               $('.search').toggleClass('active');
               var searchHeight= $('.search').outerHeight();
           });
         $(document).click(function(e) {
        if (!$(e.target).is('.search, .local-search, .local-search *, .search *')) {
            $('.search').removeClass('active');
        }
        });
           
var hederfixing = function () {
  if (window.matchMedia('(min-width: 992px)').matches) {
      $("body").css("padding-top",'');
      if (!$('body').hasClass('remove-fix')) {
          var headerouter      = $("header").outerHeight();
          var menuPosition      = $(".header-bottom").offset().top;
          var headerBottom     = $(".header-bottom").outerHeight();
          var affixDiff = headerouter - headerBottom;
          $(".header-bottom").affix({
              offset: menuPosition  
          });    

          $(".header-bottom").on("affix.bs.affix", function() {
            $("body").css("padding-top", headerBottom);
          });

          $(".header-bottom").on("affix-top.bs.affix", function() {
            $("body").css("padding-top","0");
          }); 
    }
  }
    else{
        if (!$('body').hasClass('remove-fix')) {
          var headerouter      = $("header").outerHeight();  
          $("header").addClass("affix"); 
          $("body").css("padding-top",headerouter);
        }
    }
};

$(document).ready(hederfixing);
$(window).resize(hederfixing);
         
         $('#navigate').click(function() {
          if ($(this).hasClass("m-active")) {
            $(this).removeClass('m-active');
            $('.header-bottom').removeClass('is-active');
            $('header').removeClass('menu-open');
            $('body').css('overflow', '');
          }
          else {
            $(this).addClass('m-active');
            $('.header-bottom').addClass('is-active');
            $('header').addClass('menu-open');
            $('body').css('overflow', 'hidden');
          }
         }); 

          $('#c-button--slide-left').click(function() {
            $('#navigate').removeClass('m-active');
            $('.header-bottom').removeClass('is-active');
            $('header').removeClass('menu-open');
            $('body').css('overflow', '');
          }); 

           $('.md-tarckorder').click(function(event) {
             /* Act on the event */
             $('.track_Order').slideToggle();
           });

            var slideLeft = new Menu({
              wrapper: '#o-wrapper',
              type: 'slide-left',
              menuOpenerClass: '.c-button',
              maskId: '#c-mask'
            });

            var slideLeftBtn = document.querySelector('#c-button--slide-left');
            // var slideLeftBtn = document.querySelector('#navigate');

            slideLeftBtn.addEventListener('click', function(e) {
              e.preventDefault;
              slideLeft.open();
            });

            if (window.matchMedia('(max-width: 991px)').matches) {
                // if ($(this).has(".child_1").length) {
              $(".menu_items > li").each(function() {
                if ($(this).has("ul").length) {
                  $(this).prepend('<span class="show-sub"></span>');
                  $(this).children("ul").addClass("child_1");
                }
              });

              // $(".child_1 .subitems ul:first-child li,.grand_sub_menu ul:first-child li").each(function() {
              $(".child_1 > li > ul > li").each(function() {
                if ($(this).has("ul").length) {
                  $(this).prepend('<span class="show-sub2"></span>');
                }
              });

              $(".menu_items .show-sub").click(function() {
                if ($(this).hasClass("active")) {
                  $(this).parent("li").children('.child_1').slideUp();
                  $(this).removeClass("active");
                } else {
                  $(this).parent("li").children('.child_1').slideDown();
                  $(this).addClass("active");
                }

              });

              $(".menu_items .show-sub2").click(function() {
                if ($(this).hasClass("active")) {
                  // $(this).parent("li").children('.grand_sub_menu').slideUp();
                  $(this).siblings('ul').slideUp();
                  $(this).removeClass("active");
                } else {
                  // $(this).parent("li").children('.grand_sub_menu').slideDown();
                  $(this).siblings('ul').slideDown();
                  $(this).addClass("active");
                }
              });


              $(".right-top-section .icon-search").click(function() {
                $(".search-container").slideToggle();
              });
            }
            else {
              $(".menu_items > li").each(function() {
                if ($(this).has("ul").length) {
                  // down-arr
                  $(this).children("a,span").addClass('down-arr');
                }
              });
            }
           

       });

     </script>
   {$cartToJs|default:''}
   <style>
	.hide.active{
		display:block !important;
	}
   </style>
</header>

