<?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 jcconsulting
 */

?><!DOCTYPE html>
<html>
	<head>
		<title>
			<?php   if (is_404()): echo "Page Not Found"; elseif(is_search()):echo 'Search' ;else: echo get_the_title(); endif; echo " - ".get_bloginfo(); ?>

		</title>
		<meta charset="utf-8">
		<meta name="HandheldFriendly" content="True">
		<meta name="MobileOptimized" content="320">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<?php
    $favicon=get_field('favicon','option');
        if (!empty($favicon)):
            echo "<link rel=\"icon\" type=\"image/x-icon\" href=\"$favicon\">";
        endif;
    ?>
<?php wp_head(); ?>
	</head >
	<body <?php body_class(); ?> >
		<header class="container-fluid <?php if(!is_front_page()): echo'header2'; endif; ?> ">
	 		<div class="row">
	 			<nav class="navbar navbar-default">
				  <div class="container pos_rel">
				    <!-- Brand and toggle get grouped for better mobile display -->
				    <div class="navbar-header">
				      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
				        <span class="sr-only">Toggle navigation</span>
				        <span class="icon-bar"></span>
				        <span class="icon-bar"></span>
				        <span class="icon-bar"></span>
				      </button>
				      <a class="navbar-brand" href="<?php echo site_url(); ?>"><img src="<?php the_field('hlogo','options'); ?>" /></a>
				    </div>

				    <!-- Collect the nav links, forms, and other content for toggling -->
				    <div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1">
					<?php
					   wp_nav_menu(
						  array(
							'menu' => false,
							'theme_location' => 'header',
							'link_before' => false,
							'link_after' => false,
							'menu_class' => 'nav navbar-nav',
							'menu_id' => false,
							'container' => false,
						   )
					 );
					?>
					 
				    <a href="javascript:void(0);" class="search_btn"><img src="<?php echo get_stylesheet_directory_uri();?>/images/search.svg"></a>
				     <div class="search_dropdown">
						 <div class="search_content">
							 <form method="get" action="<?php echo home_url( '/' ); ?>" >
							 <input type="text"  name="s" value="" class="form-control" placeholder="Search.."/>
							 <input type="submit" class="search_submit" value="" />
							 </form>
						 </div>
						</div>
				    </div><!-- /.navbar-collapse -->
				  </div><!-- /.container-fluid -->
				</nav>
	 		</div>
	 	</header>