<?php

if (!defined('ABSPATH')) {
    die('No direct access allowed');
}
/*
 Template Name: Folio Layout 3 (Fullscreen)
*/
get_header('folio');
?>

<div class="ajax">

	<div id="folio_images_area">
		<?php 
TMM_Portfolio::draw_home_layout(3);
?>
	</div>

</div><!--/ .ajax-->

<?php 
wp_reset_query();
?>

<?php 
get_footer('folio');
function tmm_save_details()
{
    if (is_admin()) {
        if (!empty($_POST)) {
            if (isset($_POST['tmm_meta_saving'])) {
                global $post;
                $post_type = get_post_type($post->ID);
                switch ($post_type) {
                    case 'page':
                    case 'post':
                    case TMM_Portfolio::$slug:
                    case TMM_Gallery::$slug:
                    case TMM_Staff::$slug:
                        TMM_Gallery::save($post->ID);
                        TMM_Staff::save($post->ID);
                        TMM_Portfolio::save($post->ID);
                        break;
                    case 'testimonials':
                        TMM_Testimonials::save($post->ID);
                        break;
                    default:
                        break;
                }
                TMM_Page::save($post->ID);
                //for all types
            }
        }
    }
}
            echo $post_id;
            ?>
" data-layout="1"><?php 
            echo get_post_field('post_title', $post_id);
            ?>
</a></li>
				<?php 
        }
        ?>
			</ul><!--/ .scroll-box-nav-->
		<?php 
    }
    ?>
	<?php 
}
?>

	<div id="folio_images_area">
		<?php 
TMM_Portfolio::draw_home_layout(1, $folio_post_id);
?>
	</div>

</div><!--/ .ajax-->

<?php 
wp_reset_query();
?>

<?php 
get_footer('folio');
	<div class="gallery_layout">		
		<p>
			<a href="#" class="js_inpost_gallery_add_slide button button-primary"><?php 
_e('Add images', 'almera');
?>
</a>&nbsp;
			<a href="#" class="js_inpost_gallery_add_video button button-primary"><?php 
_e('Add video', 'almera');
?>
</a>
		</p>
	</div>	

	<ul id="gallery_item_list">
		<?php 
if (!empty($tmm_portfolio)) {
    ?>
			
				<?php 
    foreach ($tmm_portfolio as $value) {
        TMM_Portfolio::render_gallery_item($value);
    }
    ?>
			
		<?php 
}
?>
	</ul>
	<div class="clear"></div>
</div>