<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div class="container">
 *
 * @package SKT Solar Energy
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
	<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php do_action( 'wp_body_open' ); ?>
<a class="skip-link screen-reader-text" href="#content_navigator">
<?php esc_html_e( 'Skip to content', 'skt-solar-energy' ); ?>
</a>
<?php
	$showpagebanner = esc_html(get_theme_mod('inner_page_banner_option', 1));
	$showpostbanner = esc_html(get_theme_mod('inner_post_banner_option', 1));
	$pagethumb = esc_html(get_theme_mod('inner_page_banner_thumb'));
	$postthumb = esc_html(get_theme_mod('inner_post_banner_thumb'));
	
	$fb_link = get_theme_mod('hdr_fb_link'); 
	$twitt_link = get_theme_mod('hdr_twitt_link');
	$youtube_link = get_theme_mod('hdr_youtube_link');
	$instagram_link = get_theme_mod('hdr_instagram_link');
	$linkedin_link = get_theme_mod('hdr_linkedin_link'); 

	$email_add = esc_html(get_theme_mod('email_add')); 
	$contact_no = esc_html(get_theme_mod('contact_no')); 
	$contact_top_address = esc_html(get_theme_mod('contact_top_address')); 
	$contact_top_address_two = esc_html(get_theme_mod('contact_top_address_two')); 
	$hidetopbar = esc_html(get_theme_mod('hide_header_topbar', 1));	
?>
<div id="main-set">
<div class="header">
	<div class="container">
    <div class="logo">
		<?php skt_solar_energy_the_custom_logo(); ?>
        <div class="clear"></div>
		<?php	
        $description = get_bloginfo( 'description', 'display' );
        ?>
        <div id="logo-main">
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
        <h2 class="site-title"><?php bloginfo('name'); ?></h2>
        <?php if ( $description || is_customize_preview() ) :?>
        <p class="site-description"><?php echo esc_html($description); ?></p>                          
        <?php endif; ?>
        </a>
        </div>
    </div> 
<?php
if( $hidetopbar == '') { ?>    
    <div class="header-right"> 
        <div class="emltp"><?php if(!empty($contact_no)){ if ( is_rtl() ) {?><img src="<?php echo esc_url(get_template_directory_uri()); ?>/images/icon-phone-rtl.png" alt="" /><?php } else{?><img src="<?php echo esc_url(get_template_directory_uri()); ?>/images/icon-phone.png" alt="" /><?php } ?>
        <strong><?php echo esc_html($contact_no); ?></strong><?php } ?>  <?php if(!empty($email_add)){ ?><span><?php echo esc_html( antispambot( $email_add ) ); ?></span><?php } ?></div>
        <div class="sintp"><?php if(!empty($contact_top_address)){?><img src="<?php echo esc_url(get_template_directory_uri()); ?>/images/icon-home.png" alt="" /> <strong><?php echo esc_html($contact_top_address); ?></strong><?php } ?><?php if(!empty($contact_top_address_two)){?><span><?php echo esc_html($contact_top_address_two); ?></span><?php } ?></div>
        <div class="header-social-icons"><div class="social-icons">
    	<?php 
            if (!empty($fb_link)) { ?>
            <a title="<?php echo esc_attr__('Facebook','skt-solar-energy'); ?>" class="fb" target="_blank" href="<?php echo esc_url($fb_link); ?>"></a> 
            <?php }  
            if (!empty($twitt_link)) { ?>
            <a title="<?php echo esc_attr__('Twitter','skt-solar-energy'); ?>" class="tw" target="_blank" href="<?php echo esc_url($twitt_link); ?>"></a> 
            <?php }    
            if (!empty($youtube_link)) { ?>
            <a title="<?php echo esc_attr__('Youtube','skt-solar-energy'); ?>" class="tube" target="_blank" href="<?php echo esc_url($youtube_link); ?>"></a> 
            <?php }   
            if (!empty($instagram_link)) { ?>
            <a title="<?php echo esc_attr__('Instagram','skt-solar-energy'); ?>" class="insta" target="_blank" href="<?php echo esc_url($instagram_link); ?>"></a> 
            <?php }   
            if (!empty($linkedin_link)) { ?>
            <a title="<?php echo esc_attr__('Linkedin','skt-solar-energy'); ?>" class="in" target="_blank" href="<?php echo esc_url($linkedin_link); ?>"></a> 
            <?php } ?>   
            </div></div>
        <div class="clear"></div>                
    </div>
<?php } ?>
        <div class="clear"></div>
        </div> <!-- container -->     
           <div class="clear"></div>
    
    	<div class="navmenuarea">
        <div id="navigation">
        <div class="container">
        <nav id="site-navigation" class="main-navigation">
				<button type="button" class="menu-toggle">
					<span></span>
					<span></span>
					<span></span>
				</button>
		<?php wp_nav_menu( array('theme_location' => 'primary', 'container' => 'ul', 'menu_id' => 'primary', 'menu_class' => 'primary-menu menu' ) ); ?>
			</nav>
            </div>
            </div> 
            <div class="clear"></div>
        </div>   
  </div>
  <div class="clear"></div> 
  
  </div><!--main-set-->
  <?php if( !is_home() && !is_front_page() && is_page()) {?>
      <div class="clear"></div>
      <div class="inner-banner-thumb">
      	<?php if($showpagebanner == '') {?>
        <?php 	if ( has_post_thumbnail() ) {
                    echo esc_url(the_post_thumbnail('full'));
                }else{
			if(!empty($pagethumb)){ ?>
            <img src="<?php echo esc_url($pagethumb); ?>" />
            <?php } } ?>
        <?php } ?>    
        <div class="banner-container <?php if($showpagebanner != '') {?>black-title<?php }?>"><h1><?php the_title(); ?></h1></div>
        <div class="clear"></div>
      </div>
  <?php } ?>
  <?php if( !is_home() && !is_front_page() && !is_page() && is_single() && 'post' == get_post_type()) {?>
      <div class="clear"></div>
   
	  <div class="kco_page_banner">
	  <div class="container">
	  <h1><?php the_title(); ?></h1>
	  </div>
	  
  <?php } ?>  
  <?php if (is_category() || is_archive()) { ?>
  <div class="clear"></div>
  <div class="inner-banner-thumb">
      	<?php if($showpostbanner == '') {?>
        <?php 
			if(!empty($postthumb)){ ?>
            <img src="<?php echo esc_url($postthumb); ?>" />
            <?php }   ?>
         <?php } ?>   
        <div class="banner-container <?php if($showpostbanner != '') {?>black-title<?php }?>">
  	    <?php if ( class_exists( 'WooCommerce' ) ) {
		if(is_shop()) {
			?><h1><?php woocommerce_page_title(); ?></h1><?php
		}else{
		?><h1><?php the_archive_title(); ?></h1><?php	
		}
	}else{ ?>
    <h1><?php the_archive_title(); ?></h1>
    <?php } ?>	
  </div>
        <div class="clear"></div>
      </div>
  <?php } ?>  
  <div class="clear"></div> 
  