<?php get_header(); ?>

    <div class="wrapper">
    
        <div id="secondarytop">
            <!-- nothing to see here -->
        </div>
        
        <div id="secondary">
            
			<div id="content">
				<?php if (have_posts()) : ?>
                <?php while (have_posts()) : the_post(); ?>
                
                <div class="singletitle">
                	<h3><?php the_title() ?></h3>
                </div>
                
                <?php $video = get_post_meta($post->ID, 'postvideo', $single = true); ?>
                <div id="postimage" <?php if($video !== '') { ?><?php echo 'style="display: none;"' ?><?php } else { echo ''; } ?>>
                	<img src="<?php $key="postimage"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title() ?>" />
                </div>
                
                <?php $vid = get_post_meta($post->ID, 'postvideo', $single = true); ?>
                <div id="postvideo" <?php if($vid !== '') { ?><?php echo $thumb; ?><?php } else { echo 'style="display: none;"'; } ?>>
                	<?php $key="postvideo"; echo get_post_meta($post->ID, $key, true); ?>
                </div>
                
                <div id="postcontent">
                    <?php the_content(''); ?>
                </div>
                <?php endwhile; else: ?>
                <?php endif; ?>
                
                <div id="postcomments">
                    <?php comments_template(); ?>
                </div>
            </div>
        
			<?php include (TEMPLATEPATH . '/sidebar-single.php'); ?>        
        
        </div> <!-- end secondary -->
        
    </div> <!-- end wrapper -->

<?php get_footer(); ?>