<?php get_header(); ?>
<?php
global $wp_query;
$postid = $wp_query->post->ID;
if ( get_post_meta( $postid, 'post_featpages', true ) == "Yes" ) { ?>
<?php include (TEMPLATEPATH . '/featured-pages.php'); ?>
<?php } ?>
<div id="page" class="clearfix">
<div id="contentleft">
<?php if ( get_post_meta( $postid, 'post_featcontent', true ) == "Narrow Width Featured Content Slider" ) { ?>
<?php include (TEMPLATEPATH . '/featured-narrow.php'); ?>
<?php } ?>
<?php include (TEMPLATEPATH . '/banner468.php'); ?>
<?php if ( get_post_meta( $postid, 'post_featgalleries', true ) == "Yes" ) { ?>
<?php include (TEMPLATEPATH . '/featured-galleries.php'); ?>
<?php } ?>
<?php if ( get_post_meta( $postid, 'post_featvideo', true ) == "Yes" ) { ?>
<?php include (TEMPLATEPATH . '/featured-videos.php'); ?>
<?php } ?>
<div id="content" class="maincontent">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post clearfix" id="post-main-<?php the_ID(); ?>">
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
<div class="entry">
<h1 class="page-title"><?php the_title(); ?></h1>
<?php if ( get_post_meta( $post->ID, 'video_embed', true ) ) { ?>
<div class="single-video">
<?php echo get_post_meta( $post->ID, 'video_embed', true ); ?>
</div>
<?php } ?>
<?php the_content(); ?>
<div style="clear:both;"></div>
<?php wp_link_pages(); ?>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<?php include (TEMPLATEPATH . '/sidebar-narrow.php'); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>