<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Favicon-->
<?php 
	$favicon = noo_get_image_option('noo_custom_favicon', '');
	if ($favicon != ''): ?>
	<link rel="shortcut icon" href="<?php echo esc_url($favicon); ?>" />
<?php
endif; ?>
<!--[if lt IE 9]>
<script src="<?php echo NOO_FRAMEWORK_URI . '/vendor/respond.min.js'; ?>"></script>
<![endif]-->
<?php wp_head(); ?>
</head>

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

	<div class="site">

	<?php
	$rev_slider_pos = home_slider_position(); ?>
	<?php
		if($rev_slider_pos == 'above') {
			noo_get_layout( 'slider-revolution');
		}
	?>
	<header class="noo-header <?php noo_header_class(); ?>" id="noo-header" role="banner">
		<?php noo_get_layout('topbar'); ?>
		<?php noo_get_layout('navbar'); ?>
	</header>

	<?php
		if($rev_slider_pos == 'below') {
			noo_get_layout( 'slider-revolution');
		}
	?><?php 
// Variables
$prefix = '_noo_agent';

$avatar_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
if( empty($avatar_src) ) {
	$avatar_src		= NOO_ASSETS_URI . '/images/default-avatar.png';
} else {
	$avatar_src		= $avatar_src[0];
}
// Handle option [show hide map]
$extra_class      = '';
$extra_wrap_class = '';
if ( !noo_get_option('noo_events_hide_map', false) ) {
	// Maps info
	$map_latitude		= noo_get_post_meta( get_the_ID(), "_gmap_latitude", '40.71421714027808' );
	$map_longitude		= noo_get_post_meta( get_the_ID(), "_gmap_longitude", '-74.00538682937622' );
	wp_enqueue_script('google-map','http'.(is_ssl() ? 's':'').'://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&libraries=places',array('jquery'), '1.0', true);
	wp_enqueue_style( 'noo-event', NOO_FRAMEWORK_ADMIN_URI . '/assets/css/noo_event.css');

	$nooEventMap = array(
		'latitude'=>$map_latitude,
		'longitude'=>$map_longitude,
		'localtion_disable'=>1,
	);
	wp_register_script( 'noo-event', NOO_ASSETS_URI . '/js/event_map.js', array( 'jquery','google-map'), null, true );
	wp_localize_script('noo-event', 'nooEventMap', $nooEventMap);
	wp_enqueue_script('noo-event');	
} else {
	$extra_class = 'clear-absolute';
	$extra_wrap_class = 'content-wrap container-boxed max';
}
//Event Location
$event_address		= noo_get_post_meta( get_the_ID(), "_address", '' );
$event_startdate	= Noo_Event::get_start_date( get_the_ID(), false );
$event_enddate		= Noo_Event::get_end_date( get_the_ID(), false );
$event_author		= noo_get_post_meta( get_the_ID(), "_author", '' );
$event_phone		= noo_get_post_meta( get_the_ID(), "_phone", '' );
$event_website		= noo_get_post_meta( get_the_ID(), "_website", '' );
$event_email		= noo_get_post_meta( get_the_ID(), "_email", '' );
$facebook			= noo_get_post_meta( get_the_ID(), "_facebook", '' );
$twitter			= noo_get_post_meta( get_the_ID(), "_twitter", '' );
$google     		= noo_get_post_meta( get_the_ID(), "_google", '' );
$linkedin			= noo_get_post_meta( get_the_ID(), "_linkedin", '' );
$pinterest			= noo_get_post_meta( get_the_ID(), "_pinterest", '' );
?>

<?php
list($heading, $archive_title, $archive_desc) = get_page_heading();
if( ! empty($heading) ) :
	$heading_image = get_page_heading_image();
?>
	<?php if( noo_get_option( 'noo_page_heading', true ) ) : ?>
		<?php if(!noo_get_post_meta(get_the_ID(), '_noo_wp_page_hide_page_title', false) ) { ?>
			<?php if( !empty( $heading_image ) ) : ?>
				<header class="noo-page-heading heading-bg-image" style="padding:50px 0 20px 0;" >
			<?php else : ?>
				<header class="noo-page-heading">
			<?php endif; ?>
				<div class="container-boxed max">
					<div class="page-heading-info ">
						<h1 class="page-title"><?php noo_nth_word(esc_html($heading),'first'); ?></h1>
					</div>
					<div class="noo-page-breadcrumb">
						<?php if( noo_get_option( 'noo_breadcrumbs', true ) ) noo_get_layout('breadcrumbs'); ?>
					</div>
				</div><!-- /.container-boxed -->
			</header>
		<?php } ?>
	<?php endif; ?>
<?php endif; ?>
<div class="main-content container-fullwidth max offset">
	<div class="row">
		<div class="noo-main col-md-12" role="main" style="padding-top:30px;">
			<?php while ( have_posts() ) : the_post(); ?>
				<article id="post-<?php the_ID(); ?>" class="noo-event">
					<div class="content-wrap container-boxed max offset">
						<div class="content row">
							<div class="col-sm-10 col-sm-offset-1">
                               
								<?php the_content(); ?>
								<?php wp_link_pages(); ?>
								<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'noo' ), 'after' => '</div>' ) ); ?>
				
								
							</div>
						</div>
					</div>


					<div class="clearfix"></div>
				</article> <!-- /#post- -->
				<?php if ( comments_open() ) : ?>
				<div class="content-wrap container-boxed max offset">
					<div class="content row">
						<div class="col-sm-8 col-sm-offset-2">
							<?php comments_template( '', true ); ?>
						</div>
					</div>
				</div>
				<?php endif; ?>
			<?php endwhile; ?>
			<a href="../" title="Voir tous les &eacute;v&egrave;nements"><h3 style="text-align:center;color:#5eb8f6;margin-top:0">Revenir &agrave; la liste des &eacute;v&egrave;nements</h3></a>
			<img src="http://www.larbreauxetoiles.fr/wp-content/themes/noo-yogi/assets/images/3-bulles-85.png" style="float:right;margin-right:300px;padding-bottom:30px;" />
		</div>
		<?php //get_sidebar(); ?>
	</div> <!-- /.row -->

</div> <!-- /.container-boxed.max.offset -->
<?php get_footer(); ?>