<?php get_header(); ?>

<!-- Begin top thumbnails -->
<div class="home-thumbs">
<?php $home_query = new WP_Query("cat=&showposts=5"); $i = 0; ?>
<ul class="thumbs">
	<?php while ($home_query->have_posts()) : $home_query->the_post();
	    $do_not_duplicate = $post->ID; $i++; ?>
	<?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>
	    <li class="post-<?php the_ID(); ?> thumb-big"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&amp;w=320&amp;h=320&amp;zc=1" alt="<?php the_title(); ?>" /></a></li>
	<?php else : ?>
	    <li class="post-<?php the_ID(); ?> thumb-big"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if(getimage('large')=='') { ?><img src="<?php bloginfo('template_directory') ?>/images/sample.jpg" alt="no image" /><?php } else { ?><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo getimage('large'); ?>&amp;w=320&amp;h=320&amp;zc=1" alt="<?php the_title(); ?>" /><?php } ?></a></li>
	<?php endif; ?>
    <?php endwhile; wp_reset_query(); $i = 0; ?>
</ul>
</div>

<!-- Begin bottom thumbnails -->
<div class="home-thumbs bottom-thumbs">
<?php $home_query_bottom = new WP_Query("cat=&showposts=20&offset=5"); $b = 0; ?>
<ul class="thumbs">
	<?php while ($home_query_bottom->have_posts()) : $home_query_bottom->the_post();
	    $do_not_duplicate = $post->ID; $b++; ?>
	<?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>
	    <li class="post-<?php the_ID(); ?> thumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&amp;w=160&amp;h=160&amp;zc=1" alt="<?php the_title(); ?>" /></a></li>
	<?php else : ?>
	    <li class="post-<?php the_ID(); ?> thumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if(getimage('large')=='') { ?><img src="<?php bloginfo('template_directory') ?>/images/sample.jpg" alt="no image" /><?php } else { ?><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo getimage('large'); ?>&amp;w=160&amp;h=160&amp;zc=1" alt="<?php the_title(); ?>" /><?php } ?></a></li>
	<?php endif; ?>
    <?php endwhile; wp_reset_query(); $b = 0; ?>
</ul>
</div>

</div> <!--end container-->
</body>
</html>