<?php
/*
 ______ _____   _______ _______ _______ _______ ______ _______ 
|   __ \     |_|    ___|_     _|   |   |       |   __ \   _   |
|    __/       |    ___| |   | |       |   -   |      <       |
|___|  |_______|_______| |___| |___|___|_______|___|__|___|___|

P L E T H O R A T H E M E S . C O M            (c) 2016

Description: Handles all Header parts. Is included as part of index.php

Header containers attribute handlers 
for Plethora_Theme::add_container_attr() )

	'header', 
	'header_topbar', 
	'header_main'
	'content', 
	'content_top', 
	'content_main'
	'content_main_left'

=================================

Header template part handlers 
for Plethora_Theme::add_container_part() )

	'head_before'
	'body_open'
	'header_topbar'
	'header_main'
	'mediapanel'
	'content_top'
	'content_main_loop_before'
*/
?><!doctype html><?php Plethora_Theme::dev_comment( null, 'page_info' ); ?>
<html class="no-js" <?php language_attributes(); ?>>
<head>
	<link rel="icon" type="image/x-icon" href="/wp-content/uploads/2023/10/logo-social-icon-favicon.png">
<meta charset="<?php bloginfo( 'charset' ); ?>"><?php 
	/**
	 * 'plethora_head_before' hook
	 *
	 * @hooked Plethora_Theme::head_meta() - 10 ( Meta settings )
	 * @hooked Plethora_Theme::favicons() - 20 ( Favicons )
	 */
	 do_action('plethora_head_before');  

	  // Call wp_head
	 wp_head(); ?>
	
	<!-- Google Tag Manager -->
	<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
	})(window,document,'script','dataLayer','GTM-NCLJWHM8');</script>
	<!-- End Google Tag Manager -->

	 
	 
	 <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-TGCLK3DL1V"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-TGCLK3DL1V');
    </script>	
	
	<?php if( !is_front_page() && !is_singular( 'room' ) ) : ?>
		<!-- Sojern Container Tag cp_v3_js, Pixel Version: 1 -->
		<script src='https://static.sojern.com/utils/sjrn_autocx.js'></script>
		<script>
		  (function () {
			/* Please fill the following values. */
			var params = {
			  hpr: "The Regent Grand", /* Hotel Property */
			  hpid: "72566b6d-7ca4-4a83-9605-449e6472c82a", /* Property ID */
			  sha256_eml: "", /* Hashed Email SHA256 */
			  sha1_eml: "", /* Hashed Email SHA1 */
			  md5_eml: "", /* Hashed Email MD5 */
			  ccid: "", /* Client Cookie id */
			  pt:"TRACKING",
			};

			/* Please do not modify the below code. */
			params.et = {"HOME_PAGE":null,"SEARCH":"hs","PRODUCT":"hpr","SHOPPING_CART":"hcart","CONVERSION":"hc","TRACKING":null}[params.pt] || '';
			try{params = Object.assign({}, sjrn_params, params);}catch(e){}
			var paramsArr = [];
			for(key in params) { paramsArr.push(key + '=' + encodeURIComponent(params[key])) };

			var pl = document.createElement('iframe');
			pl.type = 'text/html';
			pl.setAttribute('style','height:0; width: 0; display:none;');
			pl.async = true;
			pl.src = "https://static.sojern.com/cip/c/206.html?f_v=cp_v3_js&p_v=1&" + paramsArr.join('&');
			(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(pl);
		  })();
		</script>
		<!-- End Sojern Tag -->	
	<?php endif; ?>
	
	<!-- Meta Pixel Code -->
	<script>
	!function(f,b,e,v,n,t,s)
	{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
	n.callMethod.apply(n,arguments):n.queue.push(arguments)};
	if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
	n.queue=[];t=b.createElement(e);t.async=!0;
	t.src=v;s=b.getElementsByTagName(e)[0];
	s.parentNode.insertBefore(t,s)}(window, document,'script',
	'https://connect.facebook.net/en_US/fbevents.js');
	fbq('init', '1490469471879867');
	fbq('track', 'PageView');
	</script>
	<noscript><img height="1" width="1" style="display:none"
	src=https://www.facebook.com/tr?id=1490469471879867&ev=PageView&noscript=1
	/></noscript>
	<!-- End Meta Pixel Code -->

	
</head>
<body <?php body_class(); ?>>
	<!-- Google Tag Manager (noscript) -->
	<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NCLJWHM8"
	height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
	<!-- End Google Tag Manager (noscript) -->

	<?php
	 /**
	 * 'plethora_body_open' hook
	 *
	 * @hooked Plethora_Theme::wrapper_overflow_open() - 10 ( overflow wrapper opening div )
	 * 
	 */
	 do_action('plethora_body_open'); 

	/**
	* Main page wrapper open ( closing tag on footer.php )
	*/
	Plethora_Theme::dev_comment(' START >> ========================= PAGE WRAPPER ========================', 'layout');
	?>
	<div<?php echo Plethora_Theme::get_container_attrs( 'page' ); ?>>

	<?php

	 if ( has_action( 'plethora_header_topbar' ) || has_action( 'plethora_header_main' ) ) { 

		/**
		* Header wrapper open
		*/
	 	Plethora_Theme::dev_comment(' START >> ========================= HEADER ========================', 'layout');
		?>
		<div<?php echo Plethora_Theme::get_container_attrs( 'header' ); ?>>
		<?php

		 /**
		 * 'plethora_header_topbar' hooks
		 */
		 if ( has_action( 'plethora_header_topbar' ) ) {
		 	
			/**
			* Header Top Bar wrapper open
			*/
		 	Plethora_Theme::dev_comment(' START >> ========================= HEADER TOP BAR ========================', 'layout');
			?>
			<div<?php echo Plethora_Theme::get_container_attrs( 'header_topbar' ); ?>> 
				<div class="<?php echo Plethora_Theme::get_container_type( 'header' ); ?>">
			<?php

		 		do_action('plethora_header_topbar');

			/**
			* Header Top Bar wrapper close
			*/
			?>
				</div>
			</div>
			<?php
	 		Plethora_Theme::dev_comment(' << FINISH ==================== HEADER TOP BAR ====================', 'layout');
		 }

		 /**
		 * 'plethora_header_main' hooks
		 */
		 if ( has_action( 'plethora_header_main' ) ) {
		 	

			/**
			* Header main section wrapper open
			*/
		 	Plethora_Theme::dev_comment(' START >> ========================= HEADER MAIN ========================', 'layout');
			?>
			<div class="header_deal_bar">BLACK FRIDAY SPECIAL OFFER! <b>SAVE 20% OFF ALL ROOMS.</b> ENTER PROMO CODE <b>BLACKFRIDAY20</b>.</div>
<!--
			<script>
				// Set the target date and time
				const targetDate = new Date('November 24, 2023 00:01:00 EST');

				function formatNumber(number) {
					return number < 10 ? `0${number}` : number;
				}

				function updateCountdown() {
					// Get the current date and time
					const currentDate = new Date();

					// Calculate the time remaining
					const timeRemaining = targetDate - currentDate;

					// Calculate days, hours, minutes, and seconds
					const days = Math.floor(timeRemaining / (1000 * 60 * 60 * 24));
					const hours = Math.floor((timeRemaining % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
					const minutes = Math.floor((timeRemaining % (1000 * 60 * 60)) / (1000 * 60));
					const seconds = Math.floor((timeRemaining % (1000 * 60)) / 1000);

					// Display the countdown with preceding '0'
					const formattedDays = formatNumber(days);
					const formattedHours = formatNumber(hours);
					const formattedMinutes = formatNumber(minutes);
					const formattedSeconds = formatNumber(seconds);

					document.getElementById('countdown').innerHTML = `${formattedDays}:${formattedHours}:${formattedMinutes}:${formattedSeconds}`;

					// Check if the countdown has reached zero
					if (timeRemaining <= 0) {
						document.getElementById('countdown').innerHTML = 'Countdown expired!';
					}
				}

				// Update the countdown every second
				setInterval(updateCountdown, 1000);
			</script>
-->
			<div<?php echo Plethora_Theme::get_container_attrs( 'header_main' ); ?>>
				<div class="<?php echo Plethora_Theme::get_container_type( 'header' ); ?>">
			<?php

		 		do_action('plethora_header_main');

			/**
			* Header main section wrapper close
			*/
			?>
				</div>
				<?php
				/**
				* Off-container position: After Header Main Container Markup
				*/
				do_action( 'plethora_header_main_after_container_markup' ); 
				?>			
			</div>
			<?php
	 		Plethora_Theme::dev_comment('  << FINISH ==================== HEADER MAIN ====================', 'layout');
		 }

		/**
		* Header wrapper close
		*/
		?>
		</div>
		<?php
	 	Plethora_Theme::dev_comment('  << FINISH ========================= HEADER ========================', 'layout');
	} 


	/**
	* 'plethora_media_panel' hooks
	*/
	if ( has_action( 'plethora_mediapanel' ) ) {

		/**
		* Media Panel wrapper open ( note that containers are given on media panel template parts )
		*/
		Plethora_Theme::dev_comment(' START >> ========================= MEDIA PANEL ========================', 'layout');
		?>
		<div<?php echo Plethora_Theme::get_container_attrs( 'mediapanel' ); ?>>
		<?php

				do_action('plethora_mediapanel');

		/**
		* Media Panel  wrapper close
		*/
		?>
		</div>
		<?php
		Plethora_Theme::dev_comment('  << FINISH ==================== MEDIA PANEL ====================', 'layout');
	}

	Plethora_Theme::dev_comment('   >> START ========================= CONTENT  ========================', 'layout');
	?>
	<div<?php echo Plethora_Theme::get_container_attrs( 'content' ); ?>>
	<?php

		/**
		* Content titles section
		*/
		if ( has_action( 'plethora_content_titles' ) ) {

			/**
			* Content titles open
			*/
		 	Plethora_Theme::dev_comment('  START >> ==================== CONTENT TITLES  ===================', 'layout');
			?> 
			<div<?php echo Plethora_Theme::get_container_attrs( 'content_titles' ); ?>> 
				<div class="<?php echo Plethora_Theme::get_container_type( 'content' ); ?>">
			<?php

					/**
					* Content titles section hook
					*/
					do_action('plethora_content_titles');

			/**
			* Content titles close
			*/
			?>
				</div>
			</div>
			<?php
		 	Plethora_Theme::dev_comment('  FINISH >> =================== CONTENT TITLES ==================', 'layout');
		}	
		
		/**
		* Top content section
		*/
		if ( has_action( 'plethora_content_top' ) ) {

			/**
			* Top content section open
			*/
		 	Plethora_Theme::dev_comment('  START >> ==================== CONTENT TOP  ===================', 'layout');
			?> 
			<div<?php echo Plethora_Theme::get_container_attrs( 'content_top' ); ?>> 
				<div class="<?php echo Plethora_Theme::get_container_type( 'content' ); ?>">
					<div class="row">
			<?php

					/**
					* Top content section hook
					*/
					do_action('plethora_content_top');

			/**
			* Top content section close
			*/
			?>
					</div>
				</div>
			</div>
			<?php
		 	Plethora_Theme::dev_comment('  FINISH >> =================== CONTENT TOP ==================', 'layout');
		}	

		/**
		* Main Content section open
		*/
		Plethora_Theme::dev_comment('  START >> ========================= CONTENT MAIN ========================', 'layout');
		?> 
		<div<?php echo Plethora_Theme::get_container_attrs( 'content_main' ); ?>> 
			<div class="<?php echo Plethora_Theme::get_container_type( 'content' ); ?>">
				<div class="row">
		<?php

			/**
			* Main Content LEFT ( Left sidebar )
			*/
  			$layout = Plethora_Theme::get_layout();
		  	if ( $layout === 'left_sidebar' ) { get_sidebar(); } 

			/**
			* Main Content LOOP section open
			*/
			Plethora_Theme::dev_comment('  START >> ========================= CONTENT MAIN LOOP ========================', 'layout');
			?> <div<?php echo Plethora_Theme::get_container_attrs( 'content_main_loop' ); ?>> <?php

				/**
				* 'plethora_content_main_loop_before' hook
				*/
				do_action( 'plethora_content_main_loop_before' ); 