<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
?>
<!DOCTYPE html><!-- HTML 5 -->
<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' ); ?>" />
    <?php /* Embeds HTML5shiv to support HTML5 elements in older IE versions plus CSS Backgrounds */ ?>
    <!--[if lt IE 9]>
    <script src="<?php echo esc_url(get_template_directory_uri()); ?>/js/html5shiv.min.js" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="wrapper" class="hfeed">
    <?php do_action('pmthemes_above_header'); ?>
    <?php $theme_options = pmthemes_theme_options();
        if ( isset($theme_options['topbar_show']) and ($theme_options['topbar_show'] == true)
            and $theme_options['top_bar_loc'] == 'top-bar-most' ) :
            get_template_part('template-parts/top-bar');
        endif;
        if ( isset($theme_options['topnav_down']) and $theme_options['topnav_down'] == false ) :
            get_template_part('template-parts/top-navigation');
        endif;
    ?>
    <div id="header-wrap">
        <?php if ( isset($theme_options['topnav_down']) and $theme_options['topnav_down'] == true and
            isset($theme_options['header_line_enable']) and $theme_options['header_line_enable'] == true ) :
        echo '<div class="header-line"></div>';
        endif; ?>
        <header id="header" class="clearfix" role="banner">
            <div id="logo" class="clearfix">
                <?php do_action('pmthemes_site_title'); ?>
                <div class="clear"></div>
                <?php if ( isset($theme_options['header_tagline']) and $theme_options['header_tagline'] == true ) : ?>
                    <h2 class="site-description"><?php echo bloginfo('description'); ?></h2>
                <?php endif; ?>
            </div>
            <?php if ( isset($theme_options['nav_on_header']) and $theme_options['nav_on_header'] == 'main-menu-header' ){
                get_template_part('template-parts/main-navigation');
            } else {
                if (is_active_sidebar('head-content')) : ?>
                    <div id="header-banner" class="clearfix">
                        <?php dynamic_sidebar('head-content'); ?>
                    </div>
                <?php endif;
            }?>
        </header>
    </div>
    <?php
        if ( isset($theme_options['topnav_down']) and $theme_options['topnav_down'] == true ) :
            get_template_part('template-parts/top-navigation');
        endif;
        if ( isset($theme_options['nav_on_header']) and $theme_options['nav_on_header'] == 'main-menu-below' ) :
            get_template_part('template-parts/main-navigation');
        endif;
        if ( isset($theme_options['topbar_show']) and ($theme_options['topbar_show'] == true)
            and $theme_options['top_bar_loc'] == 'top-bar-under' ) :
            get_template_part('template-parts/top-bar');
        endif;
        if ( isset($theme_options['sticky_navi']) and $theme_options['sticky_navi'] == true ) :
            pmthemes_nav_sticky();
        endif;
        pmthemes_display_custom_header();
    ?>
    <?php do_action('pmthemes_before_content_wrap'); ?>
    <div id="content-wrap">