<?php

/**

 * The Template for displaying all single posts

 *

 * @package WordPress

 * @subpackage Twenty_Twelve

 * @since Twenty Twelve 1.0

 */



get_header(); ?>



	<div id="primary" class="fixed-width">

		<div id="content" role="main" style="font-family:<?php echo $font_style;?>;font-size:<?php echo $bible_font_size;?>;">



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



				<?php get_template_part( 'content','post'); ?>

				<nav class="nav-single">

					<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>

					<?php $post_cat= get_the_category();

						foreach($post_cat as $p_cat):

							if($p_cat->parent==4):

								$cur_cat = $p_cat->term_id;

							endif;

						endforeach;



					?>

					<?php

					if(!empty($cur_cat)):

						$prev_post	=	get_bible_prev_post($cur_cat,get_the_ID());?>



					<?php $next_post	=	get_bible_next_post($cur_cat,get_the_ID());

					endif;

					?>

					<?php if($prev_post):?>

							<span class="nav-previous"><a href="<?php echo get_permalink($prev_post);?>"><?php echo "<< " . get_the_title($prev_post);?></a></span>

					<?php endif;?>

					<?php if($next_post):?>

						<span class="nav-next"><a href="<?php echo get_permalink($next_post);?>"><?php echo get_the_title($next_post)." >>";?></a></span>

					<?php endif;?>

				</nav><!-- .nav-single -->



				<?php //comments_template( '', true ); ?>



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

		</div><!-- #content -->

	</div><!-- #primary -->



<?php //get_sidebar(); ?>

<?php get_footer(); ?>