<?php

/**

 * Template Name: Home

 * 

 * If you want to set up an alternate home page, just use this template for your page.

 *

 * @package GameKing

 * @subpackage Template

 * @since GameKing 1.0

 */



get_header(); ?>

<?php get_template_part('homescroll-featured'); ?>



<?php 

	$args = (array)get_option('dp_home_featured');

	if(!empty($args['posts_per_page'])) {

		if(!empty($args['layout']) && $args['layout'] == 'full-width')

			get_template_part('home-featured-full-width'); 

		else

			get_template_part('home-featured'); 

	}

?>





			

<div id="main"><div class="wrap cf">

<?php // Middle Navigation

				if(get_option('dp_middle_nav_status')) {

					$nav_menu = wp_nav_menu(array('theme_location'=>'middle', 'container'=>'', 'depth'=>1, 'echo'=>0, 'fallback_cb' => '')); 



					// The fallback menu

					if(empty($nav_menu))

						$nav_menu = '<ul class="menu">'.wp_list_categories(array('show_option_all'=>'', 'title_li'=>'', 'echo'=>0)).'</ul>';	

					echo '<div id="middle-nav">'.$nav_menu.'</div><!-- end #middle-nav -->';

				}

			?>

	<div id="content">

	<?php

		// Output home sections based on user's settings

		$sections = get_option('dp_home_sections');

		if(!empty($sections)) {

			foreach($sections as $section_args) {

				dp_section_box($section_args);

			}

		}

	?>

	</div><!-- end #content -->

	

	<?php get_sidebar(); ?>

</div></div><!-- end #main -->



<?php get_footer(); ?>