<?php get_header(); ?>

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

	<?php while (have_posts()) : the_post(); ?>
	    
	    <div <?php if(function_exists('post_class')) : post_class(); else : echo 'class="post"'; endif; ?>>
	
	    	<h2 class="post-title"><?php the_title(); ?></h2>
	    	
	    	<?php if (wp_attachment_is_image($post->id)) {
	    	$att_image = wp_get_attachment_image_src( $post->ID, array(560,560) );
	    	?>
	    	<p class="attachment-image">
	    		<a href="<?php echo wp_get_attachment_url($post->id); ?>" title="<?php the_title(); ?>">
	    			<img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>"  class="attachment-image" alt="<?php the_title(); ?>" />
	    		</a>
	    	</p>
	    	<?php } ?>
	    
	    </div>
	    
	    <?php if(!get_option('deluxe_comments_posts')) comments_template('', true); ?>
	
	<?php endwhile; ?>
	
	<?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(); ?>