<?php
/*
Template Name: Blog
*/
?>

<?php get_header(); ?>
<div id="blog">
    
    <div id="page-title">
    	<h3 class="title">Blog</h3>
    </div>

    <div id="page-description">
    	<p>Hot off the press &mdash; what’s fresh at the Labs.</p>
    </div>

    <div id="page-tools">
    		<p><a class="rss" href="<?php bloginfo('rss2_url');?>">Entries</a> &nbsp; <a class="rss" href="<?php bloginfo('comments_rss2_url');?>">Comments</a></p>
    </div>

    <div id="content">
        
    <div id="supercol-left">

	<?php 
	    query_posts();
	    if (have_posts()) : while (have_posts()) : the_post();
	?>

        	<!--Entry-->
        	<div class="entry" id="post-<?php the_ID(); ?>">
        	<div class="col-span-two">
        		<h2 class="date"><?php the_time('m.d.Y') ?></h2>
        		<p>
        		<a class="author" href="<?php the_author_url(); ?>"><?php the_author(); ?></a><br />
        	<?php
        	    foreach(get_the_category() as $category):
        	        if( $category->cat_ID > 1):
        	?>
                <a class="category" href="<?php echo get_category_link($category->cat_ID);?>"><?php echo $category->cat_name ?></a><br />  
            <?php 
                    endif;
                endforeach;
            ?>
        		<a class="comment" href="#comments">Comments (<?php comments_number('0', '1', '%'); ?>)</a><br />
        		</p>
        	</div>
        	<div class="col-span-post">
        		<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
	            <?php the_content() ?>
        	</div>
        	<br clear="all" /></div><!--end entry-->

	<?php endwhile; else: ?>

		<p>Sorry, no posts matched your criteria.</p>

<?php endif; ?>

    </div><!--end supercol-left-->

    <div id="supercol-right">
	<?php include(TEMPLATEPATH . '/sidebar_blog.php'); ?>
    </div><!--end supercol-right-->
    
    <br clear="all" />	
    </div><!--end content-->
    
</div>
<?php get_footer(); ?>
