<?php get_header(); ?>

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

	<?php // Get number of search results
	    $results = new WP_Query("s=$s&showposts=-1"); 
	    $term = wp_specialchars($s, 1); 
	    $number = $results->post_count;
	    wp_reset_query(); 
	?>

	<h1 class="archive-title"><?php echo $number; ?> <?php _e('entries found for',TS_DOMAIN); ?> "<?php echo $term; ?>"</h1>

	<?php while (have_posts()) : the_post(); ?>
	    
	<div <?php post_class(); ?>>
	
	    <h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
	
	    <?php the_content('',TRUE); ?>
	    
	    <?php the_more(); ?>
	    
	</div><!-- end post -->
	
	<?php endwhile; ?>
	
	<?php include(TEMPLATEPATH . '/lib/inc/paging.php'); ?>
	
	<?php else : ?>
	
	<div class="post">

	    <h3><?php _e('Error 404, no posts found!',TS_DOMAIN); ?></h3>
	    <p><?php _e('Sorry, no posts matched your criteria.',TS_DOMAIN); ?></p>
	    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
	
	</div>

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