<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Luzuk Premium
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
	<script src="https://use.fontawesome.com/18a9c36ed1.js"></script>
	
	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css">
	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/animate.css" />
	<link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Dancing+Script" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Poppins|Roboto:400,900" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Condensed:700" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">
	<script src="<?php echo get_template_directory_uri(); ?>/js/jquery-3.1.1.slim.min.js" crossorigin="anonymous"></script>
	<!--new for faq-->
	<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.min.js" crossorigin="anonymous"></script>
	<!--new faq-->
	<!--end script for search bar-->
	<script>
		function buttonUp(){
			var valux = $('.sb-search-input').val(); 
			valux = $.trim(valux).length;
			if(valux !== 0){
				$('.sb-search-submit').css('z-index','99');
			} else{
				$('.sb-search-input').val(''); 
				$('.sb-search-submit').css('z-index','-999');
			}
		}

		$(document).ready(function(){
			var submitIcon = $('.sb-icon-search');
			var submitInput = $('.sb-search-input');
			var searchBox = $('.sb-search');
			var isOpen = false;

			$(document).mouseup(function(){
				if(isOpen == true){
					submitInput.val('');
					$('.sb-search-submit').css('z-index','-999');
					submitIcon.click();
				}
			});

			submitIcon.mouseup(function(){
				return false;
			});

			searchBox.mouseup(function(){
				return false;
			});

			submitIcon.click(function(){
				if(isOpen == false){
					searchBox.addClass('sb-search-open');
					isOpen = true;
				} else {
					searchBox.removeClass('sb-search-open');
					isOpen = false;
				}
			});

		});
	</script><!--end script for search bar-->

	<script src="<?php echo get_template_directory_uri(); ?>/js/bootstrap.min.js" type="text/javascript"  ></script>
	<script src="<?php echo get_template_directory_uri(); ?>/js/wow.js" ></script>
	<?php wp_head(); ?>
	<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/ie.css" />
	

</head>

<body <?php body_class(); ?>>
	<div class="main-container">
		<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'Luzuk-premium' ); ?></a>
		<header id="ht-masthead" class="ht-site-header">
			<div class="main-header">
				
					
					<div class="col-md-6 col-sm-6">
						<?php
						$freeshiptext = get_theme_mod('lz_fitness_headermain_freeshiptext', 'SHOP EVENTS & SAVE UO TO <span>65% OFF!</span>'); 
						?>
						<div class="header-menu-box">
							<ul>
								<?php if(!empty($freeshiptext)){ ?>
									<li><?php echo ($freeshiptext);  ?> </li>
								<?php }?> 
							</ul>								
						</div>
					</div>
					<div class="col-md-6 col-sm-6 text-right"> 
						<?php if( get_theme_mod('cds_button_display','show' ) == 'show') :?>
							<div class="headeshopnow">
							<?php
								$headerinquirytitle = get_theme_mod('lz_fitness_headermain_headerinquirytitle', 'Shop Now'); 
								$headerinquiry = get_theme_mod('lz_fitness_header_headerinquiry', 'add link here');
								?>
								<?php if(!empty($headerinquiry)){ ?>
									<a href="<?php echo $headerinquiry ?>" title="headerinquiry"><?php echo ($headerinquirytitle);  ?> <i class="fa fa-arrow-right" aria-hidden="true"></i></a>
								<?php }?> 
							</div>
						<?php endif ?>

						<!-- 	<?php 
							$email = get_theme_mod('lz_fitness_headermain_email', 'contact@example.com');
							$phone = get_theme_mod('lz_fitness_headermain_phone', '0123-0456-789'); 
							?>
							<div class="header-right-box">
								<ul>
									<?php if(!empty($email)){ ?>
										<li>
											<a href="mailto:<?php echo $email;?>">
											<i class="fa fa-envelope"></i><?php echo ($email);  ?></a> 
										</li>
									<?php }?> 
									<?php if(!empty($phone)){ ?>
										<li><i class="fa fa-phone"></i><?php echo ($phone);  ?> </li>
									<?php }?> 
									
								</ul>
							</div> -->
						</div>	

					
						<div class="clearfix"></div>

					</div>
						<div class="header-main-box">
						<div class="col-md-6">
							<p class="ht-site-description"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'description' ); ?></a></p>   
						</div>				

									<div class="col-md-6">
										<div class="site-navigation ">
                        <div class="hamburger-menus">
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                        </div> 
                        <nav class="navigation">
                            <div class="overlaybg"></div><!--  /.overlaybg -->
                            <!-- Main Menu -->
                            <div class="menu-wrapper">
                                <div class="menu-content">
                                    <?php
                                        if( get_post_meta( get_the_ID(), 'intrinsic_header_page_menu', true) !=='0') {
                                            wp_nav_menu ( array(
                                                'menu_class' => 'mainmenu ht-clearfix',
                                                'container'=> 'ul',
                                                'menu' => get_post_meta( get_the_ID(), 'intrinsic_header_page_menu', true),
                                                'theme_location' => 'primary',  
                                            )); 
                                        } else {
                                            wp_nav_menu ( array(
                                                'menu_class' => 'mainmenu ht-clearfix',
                                                'container'=> 'ul',
                                                'theme_location' => 'primary',  
                                            )); 
                                        }
                                    ?>
                                </div> <!-- /.hours-content-->
							<div class="clearfix"></div>
                            </div><!-- /.menu-wrapper --> 
                        </nav>
                        <div class="clearfix"></div>
                    </div><!--  /.site-navigation -->
									</div>
									<div class="clearfix"></div>							
							</div>

					<div class="lower-header">					

							<div class="col-sm-6">
								<div id="sb-search" class="sb-search">
									   <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/'  ) ); ?>">
										<label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'woocommerce' ); ?></label>
										<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search for Products', 'placeholder', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'woocommerce' ); ?>" />
										<input type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" />
										<input type="hidden" name="post_type" value="product" />
									</form>
								</div>	
							</div>
							<div class="col-md-3">
								<?php 							
							$phone = get_theme_mod('lz_fitness_headermain_phone', '+008 3862 499'); 
							?>
							<div class="header-phone upper-header" style="text-align: right;">								
									<?php if(!empty($phone)){ ?>
										<?php echo ($phone);  ?> <i class="fa fa-phone" aria-hidden="true"></i>
									<?php }?>						
								
							</div> 
							</div>

							<div class="col-md-3 col-sm-3 ">	

								<div class="total-count col-md-3 col-sm-3 col-xs-8 padding0 upper-header">				
									<?php if(function_exists ('wc_get_cart_url')){?>				
										<a href="<?php echo wc_get_cart_url();?>" class=""><i class="fa fa-shopping-cart" aria-hidden="true"></i></a>
										<div class="count"><?php global $woocommerce; ?><?php echo WC()->cart->get_cart_contents_count(); ?></div>
									</div>

									<?php
									//$myaccounttitle = get_theme_mod('lz_fitness_headermain_myaccounttitle', 'MY ACCOUNT'); 
									$myaccount = get_theme_mod('lz_fitness_header_myaccount', 'add myaccount page link here');
									?>
									<ul class="header-sm-links col-md-3 col-sm-3 col-xs-4 padding0 upper-header">
										<?php if(!empty($myaccount)){ ?>
											<li><a href="<?php echo $myaccount ?>" title="myaccount"><i class="fa fa-user" aria-hidden="true"></i></a></li>
										<?php }?> 
									</ul>

								
								
								<?php }?>
							</div>

						
							<div class="clearfix"></div>
					</div>
				
				
							<div class="clearfix"></div>
						</header><!-- #masthead -->
					</div>
