<div id="main-content">
	<?php if(is_active_sidebar('timer-widget-area')){
		echo '<div class="timer-wrap">';
		dynamic_sidebar('timer-widget-area');
		echo '</div>';
	}	
	if(is_active_sidebar('frontpage-video-widget-area')){
		$fp_video = custom_widget_shortcode('frontpage-video');
		$fp_video_url = '';
		if($fp_video != ""){
			preg_match('/<div class="textwidget">(.*?)<\/div>/si', $fp_video, $match);
			if($match[1]){
				$fp_video_url = wp_strip_all_tags($match[1]);
				$urls = explode("?", $fp_video_url);
				$id = '';
				if(count($urls)>0){
					$id = substr($urls[0], (strrpos($urls[0], '/')+1));					
				}				
				?>
				<div class="promo-video-wrap"<?php if(has_post_thumbnail()){ echo ' style="background-image: url('.wp_get_attachment_url(get_post_thumbnail_id()).');"'; } ?>>
					<div class="promo-video">				
						<div class="video-left">
							<div class="video-iframe-height">
								<div class="lyte-wrapper">
									<div class="lyte-remove"></div>
									<iframe id="promo-video-id-<?php echo $id; ?>" src="<?php echo $fp_video_url; ?>" width="515" height="259" allow="autoplay; encrypted-media" allowfullscreen></iframe>	
								</div>
							</div>
						</div>		
					</div>
				</div>				
				<?php
			}
		}
	}
	if(is_active_sidebar('frontpage-widget-area')){
		echo '<div class="frontpage-wrap">';
		//dynamic_sidebar('frontpage-widget-area');
		$frontpage = custom_widget_shortcode('frontpage');
		$frontpage = preg_replace('/class="textwidget"/', '/class="textwidget animated-element animation-top"/', $frontpage);
		echo $frontpage;
		echo '</div>';
	} ?>	
</div>