<?php get_header();?>
<div id="main" class="clear">
	<div id="content">
			<?php if (have_posts()) : ?>
			<div class="post"> 
			<h1 class="bigHead">
					<?php if (is_category()) { ?><?php single_cat_title(); ?>
 	  				<?php } elseif( is_tag() ) { ?><?php single_tag_title(); ?>
					<?php } elseif(is_month()) {?><?php the_time('F Y');?>
					<?php } ?>
			</h1>
			<p>You Are Currently Browsing
					<?php if( is_tag() ) { ?>Posts Tagged&nbsp;<?php single_tag_title(); ?>
					<?php } elseif(is_month()) {?>Archives For&nbsp;<?php the_time('F Y');?>
					<?php } elseif(is_category()) { ?>Category&nbsp;<?php single_cat_title(); ?>
					<?php } ?>	
				
			</p>	
					</div>
		
					<?php while (have_posts()) : the_post(); ?>
		<div class="post">
				<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
				 <p class="small">Posted by&nbsp;<?php the_author() ?>&nbsp;on&nbsp;<?php the_time('jS F') ?>&nbsp;in&nbsp;<?php single_cat_title(); ?></p> 
				<div class="entry">
					<?php the_excerpt(); ?>
					
				</div>
					<div class="tags">
						<div class="alignleft"><p class="small"><?php the_tags('Tags ' , '&bull; ', '<br />'); ?></p></div>
					<div class="alignright"><p class="small"><?php comments_popup_link('Have Your Say', '1 Comment', '% Comments'); ?></p> </div>
					</div>	
			</div>

		<?php endwhile; ?>

<?php if (function_exists('wp_pagenavi')) : ?>
        <div class="center">
          <?php wp_pagenavi(); ?>
        </div>
		<?php else:?>
					<div class="navigation">
						<?php $style_uri = get_bloginfo('template_directory'); ?>
						<div class="alignleft"><?php next_posts_link('<img src="'.$style_uri.'/images/older.png" alt="Older" title="Older" />'); ?></div>
						<div class="alignright"><?php previous_posts_link('<img src="'.$style_uri.'/images/newer.png" alt="Newer" title="Newer" />'); ?></div>
						</div>

		<?php endif; ?>

	<?php else : ?>

		<h2 class="center">Not Found</h2>

	<?php endif; ?>

	</div>

<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
