<?php
	/**
	 * header.php
	 * The header used in Ainex
	 * @author Vu Ngoc Linh
	 * @package Ainex
	 * @since 1.0.0
	 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<title><?php echo ( is_home() || is_front_page() ) ? bloginfo('name') : wp_title('| ', true, 'right'); ?></title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="content-language" content="en-us" />
    <meta name="author" content="Vu Ngoc Linh" />
    <meta name="contact" content="vulinhpc@gmail.com" />
    <meta name="copyright" content="Copyright (c)1997-2004 Vu Ngoc Linh. All Rights Reserved." />
    <meta name="keywords" content="stories, tales, harriet, smith, harriet smith, storytelling, day, life, dog, birth, puppies, happy" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	<?php wp_head();?>
</head>
<body <?php body_class(); ?>>
  <?php global $ainex; ?>
  <?php if(isset($ainex['theme_view_layout'])): ?>
    <?php if ($ainex['theme_view_layout']=='boxed'): ?>
        <div class="wrapper_boxed">
    <?php endif; ?>
  <?php else : ?>
    <div class="wrapper_boxed">
  <?php endif; ?>
<div class="site_wrapper">
  <!-- HEADER -->
  <div class="header_inner">
    <header id="header">
        <div class="main_header">
          <?php if ($ainex['header_switch_top']): ?>
            <!-- Top header bar -->
            <div id="topHeader">
              <div class="wrapper">
                <div class="top_contact_info">
                  <div class="container">
                    <?php if ($ainex['header_switch_date']): ?>
                      <div class="date_wrap">
                        <script type="text/javascript">
                          var mydate=new Date()
                          var year=mydate.getYear()
                          if (year < 1000)
                          year+=1900
                          var day=mydate.getDay()
                          var month=mydate.getMonth()
                          var daym=mydate.getDate()
                          if (daym<10)
                          daym="0"+daym
                          var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
                          document.write("<b class='date'>"+montharray[month]+" "+daym+", "+year+"</b>")
                        </script>
                      </div><!-- end date -->
                    <?php endif ?>
                    <?php get_template_part('content-parts/header','top-style' ); ?>
                  </div>
                </div><!-- end top contact info -->
              </div>
            </div>
          <?php endif ?>

          <!-- Top header bar -->
          <div id="trueHeader">
          <div class="wrapper">
            <div class="container">
              <!-- Logo -->
              <div class="one_fourth">
                <?php if ($ainex['custom_logo']['url']): ?>
                  <a href="<?php echo get_home_url(); ?>" class="ainex_logo">
                    <img src="<?php echo $ainex['custom_logo']['url']; ?>" alt="">
                  </a>
                <?php else : ?>
                  <a href="<?php echo get_home_url(); ?>" id="logo"></a>
                <?php endif; ?>
              </div>
              <!-- Menu -->
              <div class="three_fourth last">
                <nav id="access" class="access" role="navigation">
                  <div id="menu" class="menu">
                    <?php get_template_part('content-parts/studio', 'nav'); ?>
                  </div>
                </nav>
              </div>
            </div>
          </div>
        </div>
      </div>
    </header>
  </div>
  <div class="clearfix"></div>