<?php
/**
 * The Template for displaying all single posts.
 *
 * @package progression
 * @since progression 1.0
 */

get_header(); ?>


<?php if(of_get_option('blog_sidebar_single', '1')): ?><div id="container-sidebar"><!-- sidebar content container --><?php endif; ?>
	<?php while ( have_posts() ) : the_post(); ?>
		
		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>


			<?php if(get_post_meta($post->ID, 'videoembed_videoembed', true)): ?>
				<div class="blog-post-image video-post-image"><?php echo get_post_meta($post->ID, 'videoembed_videoembed', true) ?></div>
			<?php else: ?>
				<?php if(has_post_thumbnail()): ?>
				<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large'); ?>
				<div class="blog-post-image">
				<a href="<?php echo $image[0]; ?>" rel="prettyPhoto">
					<?php the_post_thumbnail('progression-blog'); ?>
				</a>
				</div>
				<?php endif; ?>
			<?php endif; ?>

			<div class="blog-post-background">
				<h2 class="post-title"><?php the_title(); ?></h2>
				<div class="post-details-meta"><?php progression_posted_on(); ?></div><!-- close .blog-post-details -->
				<div class="blog-post-excerpt">
					<?php the_content(); ?>
				</div><!-- close .blog-post-excerpt -->	
				<?php the_tags('<!--div class="tag-cloud">Tag Cloud: ', ', ', '</div></div-->'); ?>
			</div><!-- close .blog-post-background -->
		</div><!-- #post-<?php the_ID(); ?> -->
		

		<?php
			// If comments are open or we have at least one comment, load up the comment template
			if ( comments_open() || '0' != get_comments_number() )
				comments_template( '', true );
		?>

	<?php endwhile; // end of the loop. ?>


<div class="clearfix"></div>
<?php if(of_get_option('blog_sidebar_single', '1')): ?></div><!-- close #container-sidebar -->
<?php get_sidebar(); ?><?php endif; ?>
<?php get_footer(); ?>