<?php get_header(); ?>

<?php get_sidebar(); ?>

<div id="main">

<div class="middle">

	<div class="box">



	<h1>Archives</h1>



<?php if ( is_category() || is_day() || is_month() ||

						is_year() ) {

			?>



			<?php /* If this is a 404 page */ if (is_404()) { ?>

			<?php /* If this is a category archive */ } elseif (is_category()) { ?>

			<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>



			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>

			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives

			for the day <?php the_time('l, F jS, Y'); ?>.</p>



			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>

			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives

			for <?php the_time('F, Y'); ?>.</p>



			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>

			<p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives

			for the year <?php the_time('Y'); ?>.</p>



			<?php } ?>

		<?php }?>



	</div>



</div>

<div id="left">

<?php 

$style_classes = array('first','second','third');

$style_index = 0;

if (have_posts()) :

  while (have_posts()) : the_post();

?>

	<div class="substory<?php $k = $style_index%3; echo " $style_classes[$k]"; $style_index++; ?>">

		<?php if(get_post_meta($post->ID, "newsworthy_image_value", $single = true) != "") { ?><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "newsworthy_image_value", $single = true); ?>&amp;h=53&amp;w=140&amp;zc=1 ?>" alt="<?php the_title_attribute(); ?>" /><?php } ?>

		<h2><?php the_title(); ?></h2>

		<?php the_content_limit(57, "more"); ?>

		<div class="postmeta"><a href="<?php the_permalink(); ?>" class="readmore">Read more...</a></div>

	</div>

<?php endwhile; endif; ?>





	<div class="clear">&nbsp;</div>



		

</div>

<div class="clearboth">&nbsp;</div>

</div>



<?php get_footer(); ?>