<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<?php get_header(); ?>
<?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
	<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
<?php } ?>
<div id="page" class="<?php mts_single_page_class(); ?>">
    <article class="<?php mts_article_class(); ?>" itemscope="" itemtype="http://schema.org/BlogPosting">
   		<div id="content_box">
      		<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
        		<div class="single_page">
                	<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                 		<?php $header_animation = mts_get_post_header_effect(); ?>
                 		<?php if(!empty($header_animation))	{ ?>
							<?php if ( 'parallax' === $header_animation ) {?>
								<?php if (mts_get_thumbnail_url()) : ?>
	        						<div id="parallax" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div>
	    						<?php endif; ?>
							<?php } else if ( 'zoomout' === $header_animation ) {?>
		 						<?php if (mts_get_thumbnail_url()) : ?>
	        						<div id="zoom-out-effect"><div id="zoom-out-bg" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div></div>
	    						<?php endif; ?>
							<?php } ?>
						<?php } else {
							if ( has_post_thumbnail() ) {
							echo '<div class="featured-thumbnail">'; the_post_thumbnail('slider1',array('class' => 'attachment-featured wp-post-image')); echo '</div>'; 
							} 
						} ?>

        				<header>
            				<h1 class="title single-title entry-title" itemprop="headline"><?php the_title(); ?></h1>
        				</header><!--.headline_area-->
						<div class="post-single-content box mark-links entry-content">
             				<div class="thecontent" itemprop="articleBody">
								<?php if ($mts_options['mts_posttop_adcode'] != '') { ?>
									<?php $toptime = $mts_options['mts_posttop_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$toptime day")), get_the_time("Y-m-d") ) >= 0) { ?>
										<div class="topad">
											<?php echo do_shortcode($mts_options['mts_posttop_adcode']); ?>
										</div>
									<?php } ?>
								<?php } ?>
								<?php the_content(); ?>
								<?php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="current"><span class="currenttext">', 'link_after' => '</span></span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => '<i class="fa fa-angle-right"></i>', 'previouspagelink' => '<i class="fa fa-angle-left"></i>', 'pagelink' => '%','echo' => 1 )); ?>
								<?php if ($mts_options['mts_postend_adcode'] != '') { ?>
									<?php $endtime = $mts_options['mts_postend_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$endtime day")), get_the_time("Y-m-d") ) >= 0) { ?>
										<div class="bottomad">
											<?php echo do_shortcode($mts_options['mts_postend_adcode']); ?>
										</div>
									<?php } ?>
								<?php } ?>
							</div><!--.post-single-content-->
						</div><!--.single_post-->
						<?php comments_template( '', true ); ?>
					<?php endwhile; /* end loop */ ?>
				</div>
			</div>
		</div>
  	</article>
	<?php get_sidebar(); ?>
	<?php get_footer(); ?>