<?php 
$layout=theme_get_option('blog','layout');
if(empty($layout) || $layout == 'default'){
	$layout = theme_get_option('general','layout');
}	
get_header(); 
?>
<?php theme_generator('introduce');?>
<div id="content-area">
	<div class="wrap-center <?php if($layout=='right'):?>right_sidebar<?php endif;?><?php if($layout=='left'):?>left_sidebar<?php endif;?><?php if($layout=='full'):?>full_width<?php endif;?>">
	<div id="content" class="main">
			<?php theme_generator('breadcrumbs');?>
<?php
	if ( have_posts() )
			the_post();
?>
<?php theme_generator('author_box');?>
<?php
			rewind_posts();
			$exclude_cats = theme_get_option('blog','exclude_categorys');
			foreach ($exclude_cats as $key => $value) {
				$exclude_cats[$key] = -$value;
			}
			if(stripos($query_string,'cat=') === false){
				query_posts($query_string."&cat=".implode(",",$exclude_cats));
			}else{
				query_posts($query_string.implode(",",$exclude_cats));
			}
			get_template_part('loop','author');
?>
<?php theme_generator('blog_page_navgation');?>
				<div class="clear"></div>
			</div>
			  

		<?php if($layout != 'full') get_sidebar(); ?>
		<div class="clear"></div>
	</div>
</div>
<?php get_footer(); ?>
