<?php
/**
 * The template part for displaying the tour section on homepage
 *
 * @package Meridian One
 * @since 1.0
 */
?>
<?php
	
	$title = false;
	$video = false;
	$image = false;

	if ( meridian_one_get_theme_option( 'home_tour_section_title' ) ) {
		$title = meridian_one_get_theme_option( 'home_tour_section_title' );
	}
	
	if ( meridian_one_get_theme_option( 'home_tour_section_video_url' ) ) {
		$video = meridian_one_get_theme_option( 'home_tour_section_video_url' );
	}

	if ( meridian_one_get_theme_option( 'home_tour_section_image' ) ) {
		$image = meridian_one_get_theme_option( 'home_tour_section_image' );
	}

?>
<div id="tour" class="section section-tour" <?php if ( $image ) echo 'style="background-image:url(' . esc_url( $image ) . ')"'; ?>>

	<div class="section-tour-inner">
		<?php if ( $video ) : ?>
			<div class="section-tour-play"><a href="<?php echo esc_url( $video ); ?>" class="section-tour-hook"><span class="fa fa-play"></span></a></div>
		<?php endif; ?>
		<?php if ( $title ) : ?>
			<div class="section-tour-title"><?php echo esc_html( $title ); ?></div>
		<?php endif; ?>
	</div><!-- section-tour-inner -->

</div><!-- .section-tour -->