<?php
/**
 * The template for displaying the default homepage layout
 *
 * @package WordPress
 * @subpackage Edition
 * @since Edition 1.0
 */ 
global 
$post_ID,
$tw_order_class,
$tw_section,
$fields_installed;

$tw_order_class = 'first-section'; ?>

<?php if ( $fields_installed ) : ?>
	<div class="default-home">
		<?php
			if ( !is_object( $tw_section ) ) {
			  $tw_section = new stdClass(); 
			}      

			$tw_section->custom = true;
			
			////////////////////
			// Slider Section //
			////////////////////
			$tw_section = themewich_default_home($tw_section, 'slider');	// Get user defined values	
			get_template_part(TW_SECTIONS_DIR . '/section-slider-full'); 	// Section Template 
			$tw_order_class = 'not-first-section'; 							// Set section class

			///////////////////////////
			// Grid Sidebar Section //
			///////////////////////////
			$tw_section = (object) array(); 
			$tw_section->custom = true;

			$tw_section = themewich_default_home($tw_section, 'grid');		// Get user defined values		
			get_template_part(TW_SECTIONS_DIR . '/section-grid-sidebar'); 	// Section Template

			/////////////////
			// Ad Section //
			/////////////////
			$tw_section = (object) array(); 
			$tw_section->custom = true;

			$tw_section = themewich_default_home($tw_section, 'ad');		// Get user defined values	
			get_template_part(TW_SECTIONS_DIR . '/section-ad'); // Section Template

			////////////////////////////
			// Full Category Section //
			////////////////////////////
			$tw_section = (object) array(); 
			$tw_section->custom = true;

			$tw_section = themewich_default_home($tw_section, 'full-section');		// Get user defined values	
			$type = $tw_section->full_feature_type ? 'section-full-' . $tw_section->full_feature_type : 'section-full-page';
			get_template_part(TW_SECTIONS_DIR . '/' . $type); // Section Template 

			///////////////////////
			// Carousel Section //
			///////////////////////
			$tw_section = (object) array(); 
			$tw_section->custom = true;

			$tw_section = themewich_default_home($tw_section, 'carousel');		// Get user defined values	
			get_template_part(TW_SECTIONS_DIR . '/section-slider-carousel'); 	// Section Template
		?>
	</div>
<?php endif; ?>