<?php 
$layout=theme_get_option('blog','layout');
if(empty($layout) || $layout == 'default'){
	$layout = theme_get_option('general','layout');
}	
$introduce_type = theme_get_option('blog','introduce_type');
get_header(); 
?>
<?php theme_generator('introduce',null,$introduce_type);?>
<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 echo theme_generator('breadcrumbs','blog');?>
<?php 
$exclude_cats = theme_get_option('blog','exclude_categorys');
$exclude_cats_for_blog_page = theme_get_option('blog','exclude_categorys_for_blog_page');
$exclude_cats = array_merge($exclude_cats, $exclude_cats_for_blog_page);
global $wp_version;
if(version_compare($wp_version, "3.1", '>=')){//fix wordpress 3.1 paged query 
	$paged = (get_query_var('paged')) ?intval(get_query_var('paged')) : intval(get_query_var('page'));
}else{
	$paged = intval(get_query_var('paged'));
}
$paged = intval(get_query_var('paged'));
foreach ($exclude_cats as $key => $value) {
	$exclude_cats[$key] = -$value;
}
$query_string = "cat=".implode(",",$exclude_cats)."&paged=$paged";
query_posts($query_string);
get_template_part( 'loop','blog');
?>
			<?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(); ?>
