<?php get_header(); ?>

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

	<?php if(is_single() || is_page()) { ?>
	
		<h1 id="post-<?php the_ID(); ?>"><a href="<?php bloginfo('url'); ?>">&laquo;</a> <?php the_title(); ?></h1>
	
	<?php } else { ?>

		<h1 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>"><?php the_title(); ?> &raquo;</a></h1>
	
	<?php } ?>
	
	<div class="metadata">
	
		<div class="alignright">

			<?php the_date(); ?>

		</div>
		
		<img src="<?php bloginfo('template_directory');?>/images/comment.gif" alt="" align="middle" />
		<?php comments_number('0', '1', '%' ); ?>
		
		<?php if(comments_open()) { ?>

			- <a href="<?php comments_link(); ?>"><?php _e('add yours','BlogOne'); ?> &raquo;</a>

		<?php } ?>
	
	</div>
	
	<?php the_content(__('Click here to read more &raquo;','BlogOne')); ?>

	<div class="metadata_bottom">

		<?php _e('added to','BlogOne'); ?> <?php the_category(', ', 'multiple'); ?>
		<?php _e('by','BlogOne'); ?> <?php the_author_link(); ?>
		<?php the_tags(__('<br />tags:','BlogOne'),', ', ''); ?>

	</div>
	
	<?php if(is_single() || is_page()) { ?>
	
	<div class="metadata_link">
	
		[
		<img src="<?php bloginfo('template_directory');?>/images/link.gif" alt=""  align="middle" />
		<a href="<?php the_permalink() ?>"><?php _e('Link to this post','BlogOne'); ?></a> |
		
		<img src="<?php bloginfo('template_directory');?>/images/trackback.gif" alt="" align="middle" />
		<a href="<?php trackback_url(); ?>"><?php _e('Trackback URl','BlogOne'); ?></a> |
		
		<img src="<?php bloginfo('template_directory');?>/images/comment.gif" alt="" align="middle" />
		<?php post_comments_feed_link(__('Comment feed','BlogOne'),'','') ?> 
		]
		
	</div>
	
	<div class="bottomad">
	
		<a href="#"><img src="<?php bloginfo('template_directory');?>/images/468.png" alt="your ad here"/></a>
	
	</div>
		
	<?php } ?>
	
	<?php comments_template(); ?>

<?php endwhile; ?>
<?php else: ?>

	<p><?php _e('Sorry, no posts matched your criteria.','BlogOne'); ?></p>

<?php endif; ?>

<div>
	<span class="previous-entries"><?php next_posts_link(__('&laquo; Previous posts','BlogOne')) ?></span>
	<span class="next-entries"><?php previous_posts_link(__('Next posts &raquo;','BlogOne')) ?></span>
</div>



<?php

get_sidebar();
get_footer();

?>