<?php
/**
 * The header template file.
 * @package RetroTale
 * @since RetroTale 1.0.0
*/
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<?php global $retrotale_options_db; ?>
  <meta charset="<?php bloginfo( 'charset' ); ?>" /> 
  <meta name="viewport" content="width=device-width" />  
<?php if ( ! function_exists( '_wp_render_title_tag' ) ) { ?><title><?php wp_title( '|', true, 'right' ); ?></title><?php } ?>  
<?php if ($retrotale_options_db['retrotale_favicon_url'] != ''){ ?>
	<link rel="shortcut icon" href="<?php echo esc_url($retrotale_options_db['retrotale_favicon_url']); ?>" />
<?php } ?>
<?php wp_head(); ?>  
</head> 
<body <?php body_class(); ?> id="wrapper">
<?php if ( !is_page_template('template-landing-page.php') ) { ?>
<?php if ( $retrotale_options_db['retrotale_header_address'] != '' || $retrotale_options_db['retrotale_header_email'] != '' || $retrotale_options_db['retrotale_header_phone'] != '' || $retrotale_options_db['retrotale_header_skype'] != '' ) { ?>
<div class="top-navigation-wrapper">
  <div class="top-navigation">
    <p class="header-contact">
<?php if ( $retrotale_options_db['retrotale_header_address'] != '' ){ ?>
      <span class="header-contact-address"><i class="icon_house" aria-hidden="true"></i><?php echo esc_html($retrotale_options_db['retrotale_header_address']); ?></span>
<?php } ?>
<?php if ( $retrotale_options_db['retrotale_header_email'] != '' ){ ?>
      <span class="header-contact-email"><i class="icon_mail" aria-hidden="true"></i><?php echo esc_html($retrotale_options_db['retrotale_header_email']); ?></span>
<?php } ?>
<?php if ( $retrotale_options_db['retrotale_header_phone'] != '' ){ ?>
      <span class="header-contact-phone"><i class="icon_phone" aria-hidden="true"></i><?php echo esc_html($retrotale_options_db['retrotale_header_phone']); ?></span>
<?php } ?>
<?php if ( $retrotale_options_db['retrotale_header_skype'] != '' ){ ?>
      <span class="header-contact-skype"><i class="social_skype" aria-hidden="true"></i><?php echo esc_html($retrotale_options_db['retrotale_header_skype']); ?></span>
    </p>
<?php } ?> 
  </div>
</div>
<?php }} ?>  
<div id="container-title-wrapper">
  <div id="container-title"> 
<?php if ( $retrotale_options_db['retrotale_logo_url'] == '' ) { ?>
      <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></p>
<?php } else { ?>
      <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img class="header-logo" src="<?php echo esc_url($retrotale_options_db['retrotale_logo_url']); ?>" alt="<?php bloginfo( 'name' ); ?>" /></a>
<?php } ?>
<?php if ( $retrotale_options_db['retrotale_display_site_description'] != 'Hide' ) { ?>
      <p class="site-description"><?php bloginfo( 'description' ); ?></p>
<?php } ?>
  </div>
</div>
<div id="container">
<div id="container-shadow">
  <header id="header">    
<?php if ( !is_page_template('template-landing-page.php') ) { ?>
    <div class="menu-box-wrapper">
    <div class="menu-box">
<?php wp_nav_menu( array( 'menu_id'=>'nav', 'theme_location'=>'main-navigation' ) ); ?>
    </div>
    </div>
<?php } ?>    
<?php if ( is_home() || is_front_page() ) { ?>
<?php if ( get_header_image() != '' ) { ?>    
    <div class="header-image"><img src="<?php esc_url(header_image()); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div>
<?php } ?>
<?php } else { ?>
<?php if ( get_header_image() != '' && $retrotale_options_db['retrotale_display_header_image'] != 'Only on Homepage' ) { ?>
  <div class="header-image">
    <img class="header-img" src="<?php esc_url(header_image()); ?>" alt="<?php bloginfo( 'name' ); ?>" />
  </div>
<?php }} ?>
  </header> <!-- end of header -->
  <div id="wrapper-content">
  <div id="main-content">
  <div id="content">