<?php get_header(); ?>

<?php get_sidebar(); ?>

<div class="text">

	<?php if (have_posts()) : ?>

		<h2 class="pagetitle">Search Results</h2>

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

			<div class="post">
			<div class="date">
			<?php the_time('M'); ?><br /><span class="day"><?php the_time('d'); ?></span></div>
			<h1 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
				<?php the_excerpt(); ?>
				<div class="postinfo">
					<div class="alignleft">Author <?php the_author(); ?></div>
					<div class="alignright"><a href="<?php the_permalink(); ?>#comments">Comments (<?php comments_number('0','1','%'); ?></a>)</div>
				</div>
			</div>
			<div class="postline"></div>

		<?php endwhile; ?>

		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
		</div>

	<?php else : ?>

		<h1 class="title">Not Found</h1>
		<p>Sorry, no post matched your criteria. Try a different search?</p>

	<?php endif; ?>

</div>

<?php get_footer(); ?>