<?php get_header(); ?>
<?php /* Get author data */
	if(get_query_var('author_name')) :
	$curauth = get_userdatabylogin(get_query_var('author_name'));
	else :
	$curauth = get_userdata(get_query_var('author'));
	endif;
?>

			<!--BEGIN #page-title-wrap--> 
            <div id="page-title-wrap">		
	
				<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
                <?php /* If this is a category archive */ if (is_category()) { ?>
                    <h1 class="page-title"><?php printf(__('All posts in %s', 'framework'), single_cat_title('',false)); ?></h1>
                <?php /* If this is a category archive */ } elseif (is_search()) { ?>
                    <h1 class="page-title"><?php printf(__('Search results:', 'framework')); echo ' "'.$s.'"'; ?></h1>
                <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
                    <h1 class="page-title"><?php printf(__('All posts tagged %s', 'framework'), single_tag_title('',false)); ?></h1>
                <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
                    <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('F jS, Y'); ?></h1>
                 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
                    <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('F, Y'); ?></h1>
                <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
                    <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('Y'); ?></h1>
                <?php /* If this is an author archive */ } elseif (is_author()) { ?>
                    <h1 class="page-title"><?php _e('All posts by', 'framework') ?> <?php echo $curauth->display_name; ?></h1>
                <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
                    <h1 class="page-title"><?php _e('Blog Archives', 'framework') ?></h1>
                <?php } else { ?>
                
                	<?php $blog = get_post(get_option('tz_blog_page')); ?>

                    <h1 class="page-title"><?php echo $blog->post_title; ?><span> / </span></h1>
                    <p><?php echo $blog->post_content; ?></p>
                    
                <?php } ?>

            <!--END #page-title-wrap-->
            </div>
			
            <!--BEGIN #posts-wrap-->
            <div id="posts-wrap" class="clearfix">
            
                <!--BEGIN #primary .hfeed-->
                <div id="primary" class="hfeed">			

                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    
                    <!--BEGIN .hentry -->
                    <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                        
                        <!--BEGIN .entry-title-wrap -->
                        <div class="entry-title-wrap clearfix">			
                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>
                        <!--END #entry-title-wrap -->
                        </div>
                        
                        <!--BEGIN .entry-meta-wrap-->
                        <div class="entry-meta-wrap clearfix">
                        
                            <!--BEGIN .entry-meta .entry-header-->
                            <div class="entry-meta entry-header">
                                <span class="author"><?php the_author_posts_link(); ?> <span>/</span></span>
                                <span class="published"><?php the_time( get_option('date_format') ); ?> <span>/</span></span>
                                <span class="entry-categories"><?php the_category(', ') ?> <span>/</span></span>
                                <span class="comment-count"><?php comments_popup_link(__('No Comments', 'framework'), __('1 Comment', 'framework'), __('% Comments', 'framework')); ?></span>
                                <?php edit_post_link( __('edit', 'framework'), '<span class="edit-post"> <span>/</span> ', '</span>' ); ?>
                            <!--END .entry-meta entry-header -->
                            </div>
                            
                        <!--END #entry-meta-wrap-->
                        </div>
                        
                        <?php /* if the post has a WP 2.9+ Thumbnail */
                        if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
                        <div class="post-thumb">
                            <a title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>" href="<?php the_permalink(); ?>"><?php the_post_thumbnail('blog-thumbnail'); /* post thumbnail settings configured in functions.php */ ?></a>
                        </div>
                        <?php } ?>
    
                        <!--BEGIN .entry-content -->
                        <div class="entry-content">
                            <?php the_content(__('Continue Reading &rarr;', 'framework')); ?>
                        <!--END .entry-content -->
                        </div>
    
                    <!--END .hentry-->  
                    </div>
    
                    <?php endwhile; ?>
    
                    <!--BEGIN .navigation .page-navigation -->
                    <div class="navigation page-navigation">
                        <div class="nav-next"><?php next_posts_link(__('&larr; Older Entries', 'framework')) ?></div>
                        <div class="nav-previous"><?php previous_posts_link(__('Newer Entries &rarr;', 'framework')) ?></div>
                    <!--END .navigation .page-navigation -->
                    </div>
    
                <?php else : ?>
    
                    <!--BEGIN #post-0-->
                    <div id="post-0" <?php post_class(); ?>>
                    
                    	<!--BEGIN .entry-title-wrap -->
                        <div class="entry-title-wrap clearfix">			
                            <h2 class="entry-title"><?php _e('Error 404 - Not Found', 'framework') ?></h2>
                        <!--END #entry-title-wrap -->
                        </div>
                    
                        <!--BEGIN .entry-content-->
                        <div class="entry-content">
                            <p><?php _e("Sorry, but you are looking for something that isn't here.", "framework") ?></p>
                        <!--END .entry-content-->
                        </div>
                    
                    <!--END #post-0-->
                    </div>
    
                <?php endif; ?>
                <!--END #primary .hfeed-->
                </div>
    
    			<?php get_sidebar(); ?>
                
            </div>
            <!--END #posts-wrap-->

<?php get_footer(); ?>