<?php global $qaleb;?>
<div class="ap_main">
<div class="container inn">
<div class="ap_news">
<?php 
	$homeblocks = $qaleb['homeblocksarrangem']['enabled'];	
?>	

<?php 
	if ($homeblocks): foreach ($homeblocks as $key=>$value) {
		switch($key) {
			case 'ads-top': 
				get_template_part( 'inc/ads-top', 'one' );
			break;
			case 'slider-small': 
				get_template_part( 'inc/slider-small', 'one' );
			break;
			case 'slider-main': 
				get_template_part( 'inc/slider-main', 'one' );				
			break;
			case 'tab-post': 
				get_template_part( 'inc/tab-post', 'one' );
			break;
			case 'last-post': 
				get_template_part( 'inc/last-post', 'one' );
			break;
			case 'carousel-small': 
				get_template_part( 'inc/carousel-small', 'one' );
			break;
			case 'boxe-a': 
				get_template_part( 'inc/boxe-a', 'one' );
			break;
			case 'boxe-b': 
				get_template_part( 'inc/boxe-b', 'one' );
			break;
			case 'boxe-c': 
				get_template_part( 'inc/boxe-c', 'one' );
			break;
			case 'ads-bottom': 
				get_template_part( 'inc/ads-bottom', 'one' );
			break;
			}
		}
	endif;
?>
</div>
<div class="co-aside sidebar"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('index') ) : ?><?php endif; ?></div>
<div class="co-ads sidebar"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('ads') ) : ?><?php endif; ?></div>
</div></div><!----------container--------->