<?php get_header(); ?>

<div id="content">

<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>				
<h2 class="pagetitle"><?php echo single_cat_title(); ?> <?php _e( 'Articles', 'ines') ?></h2>
<small><?php echo category_description($category); ?> <?php if(is_category()) : ?><a href="<?php echo bloginfo("url") . "/wp-rss2.php?cat=$cat" ?>">
<?php _e( 'Subscribe to the', 'ines') ?> <?php single_cat_title(); ?> <?php _e( 'articles', 'ines') ?></a><?php endif; ?></small>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle"><?php _e( 'Archive for', 'ines') ?> <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle"><?php _e( 'Archive for', 'ines') ?> <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle"><?php _e( 'Archive for', 'ines') ?> <?php the_time('Y'); ?></h2>
<?php /* If this is a search */ } elseif (is_search()) { ?>
<h2 class="pagetitle"><?php _e( 'Search Results', 'ines') ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle"><?php _e( 'Author Articles', 'ines') ?></h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<?php } ?>
<div class="clearfix"></div><hr class="clear" />
<?php while (have_posts()) : the_post(); ?>

<div class="r2">
<div class="sm"><?php if(function_exists('UTW_ShowTagsForCurrentPost')) { echo ' | Tags: ';UTW_ShowTagsForCurrentPost("commalist");echo ' '; } ?></div>
<div class="sl"></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="smeta">
<?php if ( get_the_author_meta( 'description' ) ) :  ?>
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'author_bio_avatar_size', 20 ) ); ?>
</div>
<?php endif; ?>
<?php _e('by', 'ines') ?> <?php the_author_posts_link(); ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>
<div class="sdate"><?php the_time('M'); ?> <?php the_time('j'); ?></div>

</div>

<div class="entry">
<div class="fr1">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php $image = get_the_post_thumbnail($post->ID, 'browse'); ?><?php echo $image; ?></a>
</div>
<?php the_content_rss(' ', FALSE, ' ', 10); ?>
<div class="clearfix"></div><hr class="clear" />
<div class="read"><a title="<?php _e( 'Read more', 'ines') ?>" href="<?php the_permalink() ?>"><?php _e( 'Read more', 'ines') ?> </a></div>
</div>

</div>

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

<div class="postspace"></div>

<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?>
</div>


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