<?php
global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
?>
<?php get_header(); ?>

	<div id="middle">
	
		<div class="post">
			
			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   			
 			<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    		
    		<div class="post-meta"><?php the_category(', ') ?> | <?php the_author_posts_link(); ?> |	<?php the_time('F j, Y') ?> at  <?php the_time() ?>    <?php edit_post_link( __('Edit'), ' | ', ''); ?></div> <hr />
    		
			<?php the_content(' '); ?>
			
			
			<div class="nextpage"><?php wp_link_pages(); ?></div> 
			<div class="post-meta"><?php the_tags( __( '<span class="tag-links">Tags: ', 'wpbx' ), ", ", "</span>\n" ) ?></div>
 	
 	
			<div id="socialicons">
				<ul>
					<li><a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/twitter.png" alt="Tweet This!" />Tweet This</a></li>
					<li><a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" rel="external,nofollow" target="_blank"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/facebook.png" alt="Share on Facebook" />Share on Facebook</a></li>
 					<li><a href="http://digg.com/submit?phase=2&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/digg.png" alt="Digg it!" />Digg This</a></li>
					<li><a href="http://del.icio.us/post?v=4&noui&jump=close&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/delicious.png" alt="Add to Delicious!" />Save to delicious</a></li>
					<li><a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/stumble.png" alt="Stumble it" />Stumble it</a></li>
					<li><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/feed.png" alt="Subscribe by RSS" />RSS Feed</a></li>
				</ul> 
			</div> <!-- end social box-->
 	
 	
			<div id="comments">
				<?php comments_template(); ?>
			</div>  
			
			
			<?php endwhile; else: ?>

			<p>Sorry, no posts matched your criteria.</p>
			
			<?php endif; ?>

		</div> <!-- end post -->
	
	</div> <!-- end middle -->
 
  
<?php get_sidebar(); ?>
<?php get_footer(); ?>