<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title><?php
	global $page,$paged;
	wp_title('|',true,'right');
	bloginfo('name');
	$site_description = get_bloginfo('description','display');
	if ($site_description && (is_home() || is_front_page()))	echo " | $site_description";
	if ($paged >= 2 || $page >= 2) echo ' | ' . sprintf(__('Page %s','kippis'),max($paged,$page));
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
global $kippis_is_smartphone;
global $kippis_options;
if ((!empty($kippis_options['kippis_favicon']['url'])) && ($kippis_options['kippis_favicon_enable'] == 'on')) {
  echo '<link rel="shortcut icon" href="' . $kippis_options['kippis_favicon']['url'] . '" />' . "\n";
}
kippis_enable_sidebars();
kippis_echo_css();
if ($kippis_is_smartphone) {
  ?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <?php
}
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="all">
  <div id="page">
    <?php
      if ($kippis_options['kippis_main_menu_bar_position'] == 'above_header') {
        echo '<nav id="main_menu" role="navigation">';
        wp_nav_menu(array('theme_location' => 'primary','fallback_cb' => false));
        echo '</nav>';
      }
    ?>
    <header id="pagehead">
<!-- Site Title Begin -->
      <hgroup>
        <?php
        if ($kippis_options['kippis_sitetitle_enable'] == 'on') {
          echo '<h1 id="site-title"><a href="' . esc_url(home_url('/')) . '" rel="home">' . get_bloginfo('name') . '</a></h1>';
        }
        if ($kippis_options['kippis_tagline_enable'  ] == 'on') {
          echo '<h2 id="site-description">' . get_bloginfo('description') . '</h2>';
        }
        ?>
      </hgroup>
<!-- Site Title End -->
<!-- Searchform Begin -->
      <?php
      if (!$kippis_is_smartphone) {
        if ($kippis_options['kippis_search_box_header'] != 'no') get_search_form();
      }
      else {
        if ($kippis_options['kippis_mobile_search_box_header_enable'] == 'on') get_search_form();
      }
      ?>
<!-- Searchform End -->
    </header>
<!-- Menu Begin -->
    <?php
      if (!$kippis_is_smartphone) {
        if ($kippis_options['kippis_main_menu_bar_position'] == 'below_header') {
          echo '<nav id="main_menu" role="navigation">';
          wp_nav_menu(array('theme_location' => 'primary','fallback_cb' => false));
          echo '</nav>';
        }
      }
      else {
        if ($kippis_options['kippis_mobile_menu_enable'] == 'on') {
          echo '<div id="main_menu_mobile_toggle" onclick="main_menu_mobile_toggle(' . "'#main_menu_mobile'" . ');">'
             . __('Menu','kippis')
             . '</div>'
             . '<nav id="main_menu_mobile" role="navigation">';
          wp_nav_menu(array('container_class' => 'menu_mobile','fallback_cb' => '','menu' => 'Mobile'));
          echo '</nav>';
        }
      }
    ?>
<!-- Menu End -->
    <div id="pagebody">

