<?php get_header(); ?>

<div id="middle_wrap">
		<div id="content">
		<?php if (have_posts()) : ?>
			<?php $post = $posts[0]; ?>
			<?php if (is_category()) { ?><h2 class="heading_2">Archive for '<?php echo single_cat_title(); ?>'</h2>
			<?php } elseif (is_day()) { ?><h2 class="heading_2">Archive for <?php the_time('F jS, Y'); ?></h2>
			<?php } elseif (is_month()) { ?><h2 class="heading_2">Archive for <?php the_time('F, Y'); ?></h2>
			<?php } elseif (is_year()) { ?><h2 class="heading_2">Archive for the year <?php the_time('Y'); ?></h2>
			<?php } elseif (is_search()) { ?><h2 class="heading_2">Search results</h2>
			<?php } elseif (is_author()) { ?><h2 class="heading_2">Archive by Author</h2>
			<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?><h2 class="heading_2">Archives</h2>
			<?php } ?>

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

			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
			<div class="post_details"><p>Posted on <?php the_time('F j, Y'); ?>, under <?php the_category(', ') ?>.</p><div class="comments"><a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a></div></div>
			<?php the_content(); ?>
	
			<?php endwhile; ?>

		<div class="more_entries"><h2><?php next_posts_link('&laquo; Older Entries') ?> &nbsp; <?php previous_posts_link ('Recent Entries &raquo;') ?></h2></div>

		<?php endif; ?>
	
		</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>