<?php 
global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
$dateformat = get_option('date_format');
$timeformat = get_option('time_format');
get_header(); ?>


<div id="content">
<div class="wrap">
    
	<div id="main">
	      
	<div class="column column-double column-last widget">
	<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
	<?php /* If this is a category archive */ if (is_category()) { ?>
	<h2><?php single_cat_title(); ?></h2>
	<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
	<h2><?php _e('Archive for','wpzoom');?>: <?php single_tag_title(); ?></h2>
	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
	<h2><?php _e('Archive for','wpzoom');?>: <?php the_time('F jS, Y'); ?></h2>
	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
	<h2><?php _e('Archive for','wpzoom');?>: <?php the_time('F, Y'); ?></h2>
	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
	<h2><?php _e('Archive for','wpzoom');?>: <?php the_time('Y'); ?></h2>
	<?php /* If this is an author archive */ } ?>
	          
	<div class="posts">
	
	<?php
	 
	while (have_posts()) : the_post();
	  
	$i++;
	$m++;
	update_post_caches($posts);
	unset($img);
	
	?>
	
	<div class="post">
	            
	<h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
	<?php
	if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
		$thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' );
		$img = $thumbURL[0]; 
	}
								
	else {
		unset($img);
		if ($wpzoom_cf_use == 'Yes')
		{
			$img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
		}
		else
		{
			if (!$img)
			{
				$img = catch_that_image($post->ID);
			}
		}
	}
	if ($img){ 
	$img = wpzoom_wpmu($img);
	?>
	<div class="cover"><a href="<?php the_permalink(); ?>" rel="bookmark,nofollow" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&amp;h=80&amp;w=120&amp;zc=1" width="120" height="80" alt="<?php the_title(); ?>" /></a></div>
	<?php } ?>
	<p><?php the_content_limit(240, __('read more &raquo;', 'wpzoom')); ?></p>
	<p class="postmetadata"><?php the_time("$dateformat $timeformat"); ?> / <a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number(__('no comments', 'wpzoom'),__('1 comment', 'wpzoom'),__('% comments', 'wpzoom')); ?></a><?php edit_post_link( __('EDIT', 'wpzoom'), ' / ', ''); ?></p>
	              
	<div class="clear">&nbsp;</div>
	</div>
	
	<?php endwhile; ?>
	
	</div><!-- end .posts -->
	          
	</div><!-- end .column -->
	
	<div class="clear">&nbsp;</div>
	
	<div class="navigation">
		<p><?php next_posts_link(__('&laquo; Older Entries', 'wpzoom')); ?><?php previous_posts_link(__('Newer Entries &raquo;', 'wpzoom')); ?></p>
	</div>
	        
	<div class="clear">&nbsp;</div>
	      
	</div><!-- end #main -->
      
	<div id="sidebar">
	      
		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : endif; ?>
		  
		<?php if ($wpzoom_tabs_show_archives == 'Yes') { include(TEMPLATEPATH . '/tabs.php');  } ?>
		        
		<div class="clear">&nbsp;</div>
	      
	</div><!-- end #sidebar -->
    
      
	<div class="clear">&nbsp;</div>

</div><!-- end .wrap -->
</div><!-- end #content -->
  
<?php get_footer(); ?>