<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content= "<?php echo $keywords; ?>" />
<?php } ?>
    <!-- CSS Global Compulsory -->
    <link rel="stylesheet" href="catalog/view/assets/vendor/bootstrap/bootstrap.min.css">

    <!-- CSS Implementing Plugins -->
    <link rel="stylesheet" href="catalog/view/assets/vendor/icon-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="catalog/view/assets/vendor/icon-line/css/simple-line-icons.css">
    <link rel="stylesheet" href="catalog/view/assets/vendor/icon-hs/style.css">
    <link rel="stylesheet" href="catalog/view/assets/vendor/hamburgers/hamburgers.min.css">
    <link rel="stylesheet" href="catalog/view/assets/vendor/animate.css">
    <link rel="stylesheet" href="catalog/view/assets/vendor/slick-carousel/slick/slick.css">
	<link rel="stylesheet" href="catalog/view/assets/vendor/hs-megamenu/src/hs.megamenu.css">
	<link  rel="stylesheet" href="catalog/view/assets/vendor/animate.css">
  
    <!-- CSS wogaoding -->
    <link rel="stylesheet" href="catalog/view/assets/css/wogaoding.css">
    <link rel="stylesheet" href="catalog/view/assets/css/wogaoding-components.css">
	<link rel="stylesheet" href="catalog/view/assets/css/wogaoding-globals.css">
	
   <!-- CSS Customization -->
    <link rel="stylesheet" href="catalog/view/assets/css/custom.css">

    <!-- JS Global Compulsory -->
    <script src="catalog/view/assets/vendor/jquery/jquery.min.js"></script>
    <script src="catalog/view/assets/vendor/jquery-migrate/jquery-migrate.min.js"></script>
    <script src="catalog/view/assets/vendor/popper.min.js"></script>
    <script src="catalog/view/assets/vendor/bootstrap/bootstrap.min.js"></script>

    <!-- JS Implementing Plugins -->
    <script src="catalog/view/assets/vendor/appear.js"></script>
	<script src="catalog/view/assets/vendor/hs-megamenu/src/hs.megamenu.js"></script>
    <script src="catalog/view/assets/vendor/slick-carousel/slick/slick.js"></script>

    <!-- JS wogaoding -->
    <script src="catalog/view/assets/js/hs.core.js"></script>
    <script src="catalog/view/assets/js/components/hs.header.js"></script>
    <script src="catalog/view/assets/js/helpers/hs.hamburgers.js"></script>
    <script src="catalog/view/assets/js/components/hs.scroll-nav.js"></script>
	<script src="catalog/view/assets/js/components/hs.popup.js"></script>
    <script src="catalog/view/assets/js/components/hs.carousel.js"></script>
    <script src="catalog/view/assets/js/components/hs.go-to.js"></script>
	<script  src="catalog/view/assets/js/components/hs.onscroll-animation.js"></script>

    <!-- JS Customization -->
    <script src="catalog/view/assets/js/custom.js"></script>

  
              <!-- JS Plugins Init. -->
              <script >
                $(document).ready(function () {
 
                  // initialization of carousel
                  $.HSCore.components.HSCarousel.init('.js-carousel');

                  // initialization of go to
                  $.HSCore.components.HSGoTo.init('.js-go-to');				  
      });			  
			
    $(window).on('load', function () {
      // initialization of HSScrollNav component
      $.HSCore.components.HSScrollNav.init($('#js-scroll-nav'), {
        duration: 700
      });
      // initialization of header
      $.HSCore.components.HSHeader.init($('#js-header'));
      $.HSCore.helpers.HSHamburgers.init('.hamburger');	
	  
      // initialization of HSMegaMenu component
      $('.js-mega-menu').HSMegaMenu();	  
	  
                  });
              </script>
			  
<?php foreach ($styles as $style) { ?>
<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<?php foreach ($scripts as $script) { ?>
<script src="<?php echo $script; ?>" type="text/javascript"></script>
<?php } ?>
<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>
<?php if ($vie_config->get('config_vie_custom_js')) { ?>
<?php echo html_entity_decode($vie_config->get('config_vie_custom_js'), ENT_QUOTES, 'UTF-8'); ?>
<?php } ?> 
 <?php
if(isset($_COOKIE["customer_autologin_cookie"]) && $_COOKIE["customer_autologin_cookie"]!=''){
	$_SESSION['default']['customer_id']=$_COOKIE["customer_autologin_cookie"];
?>
<script>
if (sessionStorage.reloadHeader) {
} else {
    sessionStorage.reloadHeader = 1;
	location.reload();
}
</script>
<?php
}
?>
</head>
<body class="<?php echo $class; ?>">
<main>
    <!-- Header -->
    <header id="js-header" class="g-hidden-xs-down u-header u-header--sticky-top u-header--toggle-section u-header--change-appearance" data-header-fix-moment="100">
      <div class="u-header__section u-header__section--light g-bg-white g-transition-0_3 g-py-0" data-header-fix-moment-exclude="g-py-0 " data-header-fix-moment-classes="u-shadow-v18 g-py-0">
        <nav class="js-mega-menu navbar navbar-expand-lg u-shadow-v18">
          <div class="container">
            <!-- Responsive Toggle Button -->
            <button class="navbar-toggler navbar-toggler-right btn g-line-height-1 g-brd-none g-pa-0 g-pos-abs g-top-3 g-right-0" type="button" aria-label="Toggle navigation" aria-expanded="false" aria-controls="navBar" data-toggle="collapse" data-target="#navBar">
              <span class="hamburger hamburger--slider">
            <span class="hamburger-box">
              <span class="hamburger-inner"></span>
              </span>
              </span>
            </button>
            <!-- End Responsive Toggle Button -->

            <!-- Logo -->
			<?php if ($logo) { ?>
            <a href="" class="navbar-brand">
              <img src="<?php echo $logo; ?>" alt="<?php echo $name; ?>">
            </a>
			<?php } ?>
            <!-- End Logo -->
			
            
            <!-- Navigation -->

            <div class="collapse navbar-collapse align-items-center flex-sm-row g-pt-10 g-pt-5--lg" id="navBar">
              <ul class="navbar-nav text-uppercase g-font-weight-600 ml-auto">
			    <?php if($custommenu) { ?> <?php echo $custommenu;?> <?php } ?>
			    <?php if ($categories) { ?>
                <?php foreach ($categories as $category) { ?>
				<?php if ($category['children']) { ?>
                <!-- Mega Menu Item -->
                <li class="hs-has-mega-menu nav-item g-mx-20--lg active" data-animation-in="fadeIn" data-animation-out="fadeOut" data-max-width="80%" data-position="right">
                  <a id="mega-menu-label-1" class="nav-link active g-color-black g-px-0" href="<?php echo $category['href']; ?>" aria-haspopup="true" aria-expanded="false"><?php echo $category['name']; ?>
                <span class="sr-only">(current)</span>
                <i class="hs-icon hs-icon-arrow-bottom g-font-size-11 g-ml-7"></i></a>

                  <!-- Mega Menu -->
                  <div class="hs-mega-menu u-shadow-v11 g-text-transform-none font-weight-normal g-brd-top g-brd-bluegray g-brd-top-2 g-mt-7 g-mt-7--lg--scrolling" aria-labelledby="mega-menu-label-1">
                    <div class="row align-items-stretch g-py-20 g-px-30">
					<?php foreach (array_chunk($category['children'], ceil(count($category['children']) / $category['column'])) as $children) { ?>
                        <section class="g-px-5">
                          <ul class="list-unstyled">
						  <?php foreach ($children as $child) { ?>
                            <li class="g-py-5">
                              <a href="<?php echo $child['href']; ?>" class="btn btn-sm u-btn-outline-deeporange g-width-100"><?php echo $child['name']; ?></a>
                            </li>
							<?php } ?>
                          </ul>
                        </section>
					  <?php } ?>
					</div>
                  </div>
                  <!-- End Mega Menu -->
                </li>
                <!-- End Mega Menu Item -->
				<?php } else { ?>
                <li class="nav-item g-mx-20--lg">
                  <a href="<?php echo $category['href']; ?>" class="nav-link px-0"><?php echo $category['name']; ?></a>
                </li>
				<?php } ?>
				<?php } ?>
				<?php } ?>
				
                  <!-- Secondary Button -->
				  <?php if ($navname) { ?>
                  <div class="u-basket d-inline-block g-valign-middle g-ml-0 g-ml-20--lg">
                    <button type="button" class="btn u-btn-<?php echo $buttoncolor; ?> btn-sm g-px-15 dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <span class="sr-only">Toggle Dropdown</span><?php echo $navname; ?>
                    </button>
                    <div class="dropdown-menu">
					  <?php if ($fax) { ?><a target="_blank" class="dropdown-item" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $fax; ?>&site=qq&menu=yes"><i class="g-color-black g-font-size-default fa fa-qq g-mr-10"></i><?php echo $fax; ?></a><?php } ?>
                      <?php if ($telephone) { ?><a class="dropdown-item"><i class="g-color-black g-font-size-default fa fa-phone-square g-mr-10"></i><?php echo $telephone; ?></a><?php } ?>
					  <?php if ($open) { ?><a class="dropdown-item"><i class="g-color-black g-font-size-default fa fa-exclamation-circle g-mr-10"></i><?php echo $open; ?></a><?php } ?>
					  <?php if ($weixinimg) { ?>
					  <div class="dropdown-divider"></div>
                      <div class="text-center">
                      <img class="img-fluid g-width-180 g-height-180 g-mb-0" src="<?php echo $weixinimg; ?>">
                      <h3 class="g-font-size-12 g-font-weight-600 g-mb-10 g-color-deeporange text-center g-px-5">
                      <?php echo $comment; ?>
					  </h3>
                     </div>
                    </div>
					 <?php } ?>
                  </div>
				  <?php } ?>
                  <!-- End Secondary Button -->
              </ul>
            </div>
            <!-- End Navigation -->
          </div>
        </nav>
      </div>
    </header>
    <!-- End Header -->
