<?php get_header(); ?>
					
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>		

		<div id="content-wrapper">
			
			<?php get_sidebar(); ?>
	
			<div id="main-content">	
	
				<?php if(!get_post_meta($post->ID, 'ghostpool_hide_page_title', true)) { ?><h1 class="page-title"><?php the_title(); ?></h1><?php } ?>
				
				<div id="side-post-meta">

					<?php if(get_post_meta($post->ID, 'ghostpool_sidebar_2', true)) { dynamic_sidebar(get_post_meta($post->ID, 'ghostpool_sidebar_2', true)); } else { dynamic_sidebar('default-right'); } ?>
				
				</div>
					
				<?php the_content(); ?>
				
				<?php wp_link_pages('before=<div class="clear"></div><div class="post-navi">&pagelink=<span>%</span>&after=</div>'); ?>		
					
				<?php comments_template(); ?>			
	
			</div>
			
		</div>

	<?php endwhile; endif; ?>	
		
<?php get_footer(); ?>