<?php
/**
 * The Header for the template.
 *
 * @package WordPress
 */
 
if (!isset( $content_width ) ) $content_width = 1170;

if(session_id() == '') {
	session_start();
}
 
global $letsblog_homepage_style;

?><!DOCTYPE html>
<html <?php language_attributes(); ?> <?php if(isset($pp_homepage_style) && !empty($pp_homepage_style)) { echo 'data-style="'.esc_attr($pp_homepage_style).'"'; } ?>>
<head>
<meta charset="<?php echo get_bloginfo( 'charset' ); ?>" />

<?php
	$tg_mobile_responsive = kirki_get_option('tg_mobile_responsive');
	
	if(!empty($tg_mobile_responsive))
	{
?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<?php
	}
?>

<meta name="format-detection" content="telephone=no">

<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>

<?php
if(is_single())
{
	if(has_post_thumbnail(get_the_ID(), 'blog_f'))
	{
	    $image_id = get_post_thumbnail_id(get_the_ID());
	    $fb_thumb = wp_get_attachment_image_src($image_id, 'thumbnail', true);
	}

	if(isset($fb_thumb[0]) && !empty($fb_thumb[0]))
	{
		$post_content = get_post_field('post_excerpt', $post->ID);
	?>
	<meta property="og:image" content="<?php echo esc_url($fb_thumb[0]); ?>"/>
	<meta property="og:title" content="<?php echo esc_attr(get_the_title()); ?>"/>
	<meta property="og:url" content="<?php echo esc_url(get_permalink($post->ID)); ?>"/>
	<meta property="og:description" content="<?php echo esc_attr(strip_tags($post_content)); ?>"/>
	<?php
	}
}
?>

<?php
	/**
	*	Get favicon URL
	**/
	$tg_favicon = kirki_get_option('tg_favicon');
	
	if(!empty($tg_favicon))
	{
?>
		<link rel="shortcut icon" href="<?php echo esc_url($tg_favicon); ?>" />
<?php
	}
?> 


<?php
	/* Always have wp_head() just before the closing </head>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to <head> such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
	$baseurl2 = "https://bandobash.com/";
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link href="https://fonts.googleapis.com/css?family=Merriweather+Sans:300,300i,400,400i,700,700i,800,800i|Nunito+Sans:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Qwigley" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> 
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/bootstrap.min.css">
<!-- <link rel="stylesheet" type="text/css" href="<?=$baseurl2;?>css/style.css">
<link rel="stylesheet" type="text/css" href="<?=$baseurl2;?>css/media.css"> -->
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/style.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/media.css">


<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/bootstrap.js"></script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113916202-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-113916202-2');
</script>

</head>

<body <?php body_class(); ?>>

	<?php
		//Check if disable right click
		$tg_enable_right_click = kirki_get_option('tg_enable_right_click');
		
		//Check if disable image dragging
		$tg_enable_dragging = kirki_get_option('tg_enable_dragging');
		
		//Check if use AJAX search
		$tg_menu_search_instant = kirki_get_option('tg_menu_search_instant');
		
		//Check if sticky menu
		$tg_fixed_menu = kirki_get_option('tg_fixed_menu');
		
		//Check if display top bar
		$tg_topbar = kirki_get_option('tg_topbar');
		if(THEMEDEMO && isset($_GET['topbar']) && !empty($_GET['topbar']))
		{
			$tg_topbar = true;
		}
		
		//Check if add blur effect
		$tg_page_title_img_blur = kirki_get_option('tg_page_title_img_blur');
		
		//Check filterable link option
		$tg_portfolio_filterable_link = kirki_get_option('tg_portfolio_filterable_link');
		
		//Check slider layout
		$tg_blog_slider_layout = kirki_get_option('tg_blog_slider_layout');
		if(THEMEDEMO && isset($_GET['layout']) && ($_GET['layout'] == 'fullwidth' OR $_GET['layout'] == 'full_fullwidth'))
		{
			$tg_blog_slider_layout = '3cols-slider';
		}
	?>
	<input type="hidden" id="pp_enable_right_click" name="pp_enable_right_click" value="<?php echo esc_attr($tg_enable_right_click); ?>"/>
	<input type="hidden" id="pp_enable_dragging" name="pp_enable_dragging" value="<?php echo esc_attr($tg_enable_dragging); ?>"/>
	<input type="hidden" id="pp_image_path" name="pp_image_path" value="<?php echo get_template_directory_uri(); ?>/images/"/>
	<input type="hidden" id="pp_homepage_url" name="pp_homepage_url" value="<?php echo esc_url(home_url()); ?>"/>
	<input type="hidden" id="pp_ajax_search" name="pp_ajax_search" value="<?php echo esc_attr($tg_menu_search_instant); ?>"/>
	<input type="hidden" id="pp_fixed_menu" name="pp_fixed_menu" value="<?php echo esc_attr($tg_fixed_menu); ?>"/>
	<input type="hidden" id="pp_topbar" name="pp_topbar" value="<?php echo esc_attr($tg_topbar); ?>"/>
	<input type="hidden" id="pp_page_title_img_blur" name="pp_page_title_img_blur" value="<?php echo esc_attr($tg_page_title_img_blur); ?>"/>
	<input type="hidden" id="tg_blog_slider_layout" name="tg_blog_slider_layout" value="<?php echo esc_attr($tg_blog_slider_layout); ?>"/>
	<input type="hidden" id="pp_back" name="pp_back" value="<?php _e( 'Back', THEMEDOMAIN ); ?>"/>
	
	<?php
		//Check footer sidebar columns
		$tg_footer_sidebar = kirki_get_option('tg_footer_sidebar');
	?>
	<input type="hidden" id="pp_footer_style" name="pp_footer_style" value="<?php echo esc_attr($tg_footer_sidebar); ?>"/>
	
	<!-- Begin mobile menu -->
	<div class="mobile_menu_wrapper">
		<a id="close_mobile_menu" href="javascript:;"><i class="fa fa-close"></i></a>
		
		<?php
    	    //Check if display search in header	
    	    $tg_menu_search = kirki_get_option('tg_menu_search');
    	    
    	    if(!empty($tg_menu_search))
    	    {
    	?>
    	<form role="search" method="get" name="searchform" id="searchform" action="<?php echo home_url(); ?>/">
    	    <div>
    	    	<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" autocomplete="off" placeholder="<?php _e( 'Search...', THEMEDOMAIN ); ?>"/>
    	    	<button>
    	        	<i class="fa fa-search"></i>
    	        </button>
    	    </div>
    	    <div id="autocomplete"></div>
    	</form>
    	<?php
    	    }
    	?>
    	
	    <?php 
	    	//Check if has custom menu
			if(is_object($post) && $post->post_type == 'page')
			{
			    $page_menu = get_post_meta($post->ID, 'page_menu', true);
			}	
			
			if ( has_nav_menu( 'side-menu' ) ) 
			{
			    //Get page nav
			    wp_nav_menu( 
			        array( 
			            'menu_id'			=> 'mobile_main_menu',
		                'menu_class'		=> 'mobile_main_nav',
			            'theme_location' 	=> 'side-menu',
			        )
			    ); 
			}
		?>
		
		<!-- Begin side menu sidebar -->
		<div class="page_content_wrapper">
			<div class="sidebar_wrapper">
		        <div class="sidebar">
		        
		        	<div class="content">
		        
		        		<ul class="sidebar_widget">
		        		<?php dynamic_sidebar('Side Menu Sidebar'); ?>
		        		</ul>
		        	
		        	</div>
		    
		        </div>
			</div>
		</div>
		<!-- End side menu sidebar -->
	</div>
	<!-- End mobile menu -->

	<!-- Begin template wrapper -->
	<div id="wrapper">
	
	<?php
	    //Get main menu layout
		//get_template_part("/templates/template-topmenu");
	?>

	<div class="header-banq-pc width-100 height-55px color-red-back posf">
			<div class="posr">
				<div class="main-inner-div1">
					<div class="logo-div fl">
						<a href="https://www.bandobash.com/"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png"></a>
					</div>
					<ul class="header-menus-banq pad0">
						<li><a href="/">Venues</a></li>
						<li><a href="/">Vendors</a></li>
						<li><a href="https://www.bandobash.com/blog">Blogs</a></li>
						<!-- <li><a href="">Events</a></li> -->
						<!-- <li><a href="">Gallery</a></li> -->
					</ul>
					<div class="fr">
						<ul class="header-menus-banq2 pad0">
							<li><a href="www.banqueteasy.com">List your Venue</a></li>
						</ul>
						<ul class="header-menus-banq3 pad0">
															<li><a onclick="getsetid(this);document.getElementById('vendor').value='vendor';" lb-d="signup-box">I am a Vendor</a></li>
								<li><a lb-d="signup-box" onclick="getsetid(this);document.getElementById('vendor').value='';" class="c-pointer">SignUp</a>&nbsp;/&nbsp;<a lb-d="login-box" onclick="getsetid(this)" class="c-pointer">LogIn</a></li>
															<li class="city-d-in-li"><a lb-d="select-city" onclick="getsetid(this)"><span id="header_city">Bhopal</span> &nbsp;<i class="fa fa-angle-down" aria-hidden="true"></i></a></li>
						</ul>
					</div>
				</div>
				<div class="posa color-yellow-back cart-div text-align-center overf">
					<a lb-d="cart-list-d" onclick="getsetid(this)"> <img src="<?php bloginfo('template_directory'); ?>/images/cart-ico.png" class="cart-img"><span class="badge cart-count">10</span></a>
				</div>
			</div>
		</div>
		<!-- ==========================Mobile Header====================== -->
		<div class="mobile_header">
			<div class="filter-div1 fil-1">
				<div class="color-red-back width-100 overf">
					<div class="filter-container">
						<div class="logo-div fl">
							<a href="https://www.bandobash.com/"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png"></a>
						</div>
						<a id="filter-tog" class="menu example5"><span></span></a>
					</div>
				</div>
				<!-- <a lb-d="signup-box" onclick="getsetid(this)" class="c-pointer">SignUp</a>&nbsp;/&nbsp;<a lb-d="login-box" onclick="getsetid(this)" class="c-pointer">LogIn</a> -->
				<div class="mobile-menu-div" tabindex="5" style="overflow: hidden; outline: none; cursor: -webkit-grab;">
					<ul class="mobile-menu-list">
						<li><a href="">Venues</a></li>
						<li><a lb-d="cart-list-d" onclick="getsetid(this)">Cart list</a></li>
						<li><a href="https://www.bandobash.com/blog">Blogs</a></li>
						<li><a lb-d="select-city" onclick="getsetid(this)">Select City</a></li>
						
													<li><a onclick="getsetid(this);document.getElementById('vendor').value='vendor';" lb-d="signup-box">Vendors</a></li>
							<li><a lb-d="signup-box" onclick="getsetid(this);document.getElementById('vendor').value='';" class="c-pointer">SignUp</a></li>
							<li><a lb-d="login-box" onclick="getsetid(this)" class="c-pointer">LogIn</a></li>
													<li><a lb-d="MPD-4-OTP" onclick="getsetid(this)">OTP</a></li>
					</ul>
				</div>
			<div id="ascrail2004" class="nicescroll-rails nicescroll-rails-vr" style="width: 6px; z-index: 8; cursor: -webkit-grab; position: absolute; top: 0px; left: -6px; height: 88px; display: none;"><div class="nicescroll-cursors" style="position: relative; top: 0px; float: right; width: 6px; height: 0px; background-color: transparent; background-clip: padding-box; border-radius: 5px;"></div></div><div id="ascrail2004-hr" class="nicescroll-rails nicescroll-rails-hr" style="height: 6px; z-index: 8; top: 82px; left: 0px; position: absolute; display: none;"><div class="nicescroll-cursors" style="position: absolute; top: 0px; height: 6px; width: 0px; background-color: transparent; background-clip: padding-box; border-radius: 5px;"></div></div></div>
		</div>