<?php
/**
 * The main template file for display page.
 *
 * @package WordPress
*/

get_template_part("lib/fallback.home.lib");

/**
*	Get Current page object
**/
$page = get_page($post->ID);

/**
*	Get current page id
**/
if(!isset($current_page_id) && isset($page->ID))
{
    $current_page_id = $page->ID;
}

if(!isset($hide_header) OR !$hide_header)
{
	get_header(); 
}

if(!isset($hide_header) OR !$hide_header)
{
?>	
</div>

<?php
if(!is_front_page())
{
?>
<div class="page_caption">
	<div class="caption_inner">
		<div class="caption_header">
			<h1><span><?php _e( 'Our Shop', THEMEDOMAIN ); ?></span></h1>
		</div>
	</div>
	
	<hr class="hr_page_caption"/>
</div>
<br class="clear"/>

<!-- Begin content -->
<div id="content_wrapper">

    <div class="inner">
    
    	<!-- Begin main content -->
    	<div class="inner_wrapper">
    	
    		<div class="standard_wrapper">
    	
<?php
}

} //End is not front page
?>
				<div class="sidebar_content">
    				<?php woocommerce_content();  ?>
				</div>
				
				<div class="sidebar_wrapper">
    	
		    	    <div class="sidebar_top"></div>
		    	
		    	    <div class="sidebar">
		    	    
		    	    	<div class="content">
		    	    
		    	    		<ul class="sidebar_widget">
		    	    		<?php 
		    	    			if(!is_single())
		    	    			{
		    	    				dynamic_sidebar('Shop Sidebar'); 
		    	    			}
		    	    			else
		    	    			{
			    	    			dynamic_sidebar('Single Product Sidebar'); 
		    	    			}
		    	    		?>
		    	    		</ul>
		    	    	
		    	    	</div>
		    	
		    	    </div>
		    	
		    	    <div class="sidebar_bottom"></div>
		    	    <br class="clear"/>
		    	    
		    	</div>
    
    		</div>
    		<br class="clear"/>
    		
   		 </div>
   	 	<!-- End main content -->
   	 	
</div>
			
<?php 
if(!isset($hide_header) OR !$hide_header OR is_null($hide_header))
{
?>			

<?php get_footer(); ?>

<?php
}
?>