<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Big Blue
 */

?><!DOCTYPE html>
<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 wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'big-blue' ); ?></a>

	<header id="masthead" class="site-header" role="banner">
        
        <div class="search-form-container">
            <div class="container">
                <div class="serch-form-coantainer">
                    <div class="row">
                        <div class="col-md-12">
                            <?php get_search_form(); ?>                    
                        </div>
                    </div>
                </div>
            </div>
        </div><!-- search-form-container -->
        <div class="top-bar <?php if ( has_header_image() ) { echo 'has_header-image';} ?>">
			<?php if ( has_header_image() ) { ?>
                <img src="<?php header_image(); ?>" height="<?php echo intval(get_custom_header()->height); ?>" width="<?php echo intval(get_custom_header()->width); ?>" class="header-image" />
            <?php } ?>
            
            <div class="site-branding">
                <div class="container">
                
                    <div class="row">
                        <div class="col-md-12">
                            <div class="site-info">
                                <?php 
                                    if ( function_exists( 'the_custom_logo' ) ) {
                                        the_custom_logo();
                                    }
                                ?>
                                    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" title="<?php esc_attr_e('home', 'big-blue'); ?>"><?php bloginfo( 'name' ); ?></a></h1>
                                    <p class="site-description"><?php bloginfo( 'description' ); ?></p>
                                
                            </div>
                        </div>
                    </div>
                </div>
                
            </div><!-- .site-branding -->
        </div>

    <div class="container">
        <div class="row">
        
             <div class="col-md-12">
             		<?php if ( has_nav_menu( 'social' ) ) {
						wp_nav_menu(
							array(
								'theme_location'  => 'social',
								'container'       => 'div',
								'container_id'    => 'menu-social',
								'container_class' => 'menu',
								'menu_id'         => 'menu-social-items',
								'menu_class'      => 'menu-items',
								'depth'           => 1,
								'link_before'     => '<span class="screen-reader-text">',
								'link_after'      => '</span>',
								'fallback_cb'     => '',
							)
						);
					
					} ?>
                    <ul class="social-meidia">
						<?php if ( get_theme_mod( 'big_blue_facebook_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_facebook_setting' ) ); ?>" title="<?php esc_attr_e('Facebook', 'big-blue'); ?>"><i class="fa fa-facebook"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_twitter_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_twitter_setting' ) ); ?>" title="<?php esc_attr_e('Twitter', 'big-blue'); ?>"><i class="fa fa-twitter"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_google_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_google_setting' ) ); ?>" title="<?php esc_attr_e('Google Plus', 'big-blue'); ?>"><i class="fa fa-google-plus"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_pinterest_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_pinterest_setting' ) ); ?>" title="<?php esc_attr_e('Pinterest', 'big-blue'); ?>"><i class="fa fa-pinterest"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_linkedin_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_linkedin_setting' ) ); ?>" title="<?php esc_attr_e('Linkedin', 'big-blue'); ?>"><i class="fa fa-linkedin"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_youtube_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_youtube_setting' ) ); ?>" title="<?php esc_attr_e('Youtube', 'big-blue'); ?>"><i class="fa fa-youtube"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_tumblr_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_tumblr_setting' ) ); ?>" title="<?php esc_attr_e('Tumblr', 'big-blue'); ?>"><i class="fa fa-tumblr"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_instagram_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_instagram_setting' ) ); ?>" title="<?php esc_attr_e('Instagram', 'big-blue'); ?>"><i class="fa fa-instagram"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_flickr_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_flickr_setting' ) ); ?>" title="<?php esc_attr_e('Flickr', 'big-blue'); ?>"><i class="fa fa-flickr"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_vimeo_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_vimeo_setting' ) ); ?>" title="<?php esc_attr_e('Vimeo', 'big-blue'); ?>"><i class="fa fa-vimeo-square"></i></a></li>
                        <?php } ?>
                        <?php if ( get_theme_mod( 'big_blue_rss_setting' ) ){ ?>
                            <li><a href="<?php echo esc_url( get_theme_mod( 'big_blue_rss_setting' ) ); ?>" title="<?php esc_attr_e('RSS', 'big-blue'); ?>"><i class="fa fa-rss"></i></a></li>
                        <?php } ?>  
                        <?php if ( get_theme_mod( 'big_blue_email_setting' ) ) : ?>
                            <li><a href="<?php echo esc_url('mailto:'.get_theme_mod('big_blue_email_setting'));?>"  title="<?php esc_attr_e('Email', 'big-blue'); ?>"><i class="fa fa-envelope"></i></a></li>
                    
					<?php endif; ?>                                                     
                    </ul>
                    <div class="search-icon-wrapper">
                        <span id="search-icon"><i class="fa fa-search"></i></span>
                    </div>
                    
                    <div class="main-nav-wrapper">
                        <nav id="site-navigation" class="main-navigation" role="navigation">
                            <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><i class="fa fa-bars"></i></button>
                            <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
                        </nav><!-- #site-navigation -->
                    </div>
                </div>
            
            </div>
        </div>
        
	</header><!-- #masthead -->
    
    <div id="content" class="site-content">
		