<?php 
/** 
* @package WordPress 
* @subpackage Restaurant_Gray 
*/ 
//========= put you custom code here ============ 


//.............................................................................
//	CSS STYLE

function addCssStyle(){
	echo "<style type='text/css'>\n";
		// NOTE:  bm_write_current_bg (css class, mode of repeat)
		if ( function_exists('bm_write_current_bg')) echo bm_write_current_bg('body.custom','repeat-x');
	echo "</style> \n";
}
add_action('wp_head', 'addCssStyle');

//.............................................................................
//	CUSTOM HEADER

function hook_header(){
?>
	<div id="custom_header" class ="custom_header level2 level3 level4" >
		<div id="header_logo">
			<div class="one"><?php if ( function_exists('custom_header_logo')) custom_header_logo(); ?></div>		
		</div>
		<div id="header_contact">
			<div class="one"><?php if ( function_exists('custom_header_contact')) custom_header_contact(); ?></div>
		</div>
	</div>
	<div class="clear"></div>
<?php
} 
add_action('thesis_hook_header', 'hook_header');

//.............................................................................
//	CUSTOM MENU

function custom_menu(){
?>	
	<div id="custom_menu" class ="custom_menu level2 level3 level4">
		<?php thesis_nav_menu(); ?>
	</div>
	<div class="clear"></div>
<?php
}
add_action('thesis_hook_before_html', 'custom_menu');

//.............................................................................
//	CUSTOM Dennison+Wolfe PAGE TEMPLATE//
//.............................................................................

function custom_template(){	
	$pathToImageFolder = getImagePath(__FILE__);
	if (is_home() || is_front_page())  {// this is the home page template 
?>
	<div id="home_page"  class="home_page all_template level2 level3 level4" >
		<div id="left_content" class="left_content" >
			<div class="one"><?php if ( function_exists('home_page_left_content_one')) home_page_left_content_one(); ?></div>					
			<div class="two"><?php if ( function_exists('home_page_left_content_two')) home_page_left_content_two(); ?></div>
			<div class="three"><?php if ( function_exists('home_page_left_content_three')) home_page_left_content_three(); ?></div>
			<div class="four"><?php if ( function_exists('home_page_left_content_four')) home_page_left_content_four(); ?></div>
			<div class="clear"></div>	
		</div>
		<div id="right_content" class="right_content" >			
			<div class="one"><?php if ( function_exists('home_page_right_content_one')) home_page_right_content_one(); ?></div>
			<div class="two"><?php if ( function_exists('home_page_right_content_two')) home_page_right_content_two(); ?></div>
			<div class="three"><?php if ( function_exists('home_page_right_content_three')) home_page_right_content_three(); ?></div>
			<div class="four"><?php if ( function_exists('home_page_right_content_four')) home_page_right_content_four(); ?></div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div>
<?php 
	}else{
?>
	<div id="other_page"  class="other_page all_template level2 level3 level4" >
		<div id="left_content" class="left_content" >
			<div class="one"><?php if ( function_exists('other_page_left_content_one')) other_page_left_content_one(); ?></div>					
			<div class="clear"></div>	
		</div>
		<div id="right_content" class="right_content" >
			<div class="one"><?php if ( function_exists('other_page_right_content_one')) other_page_right_content_one(); ?></div>					
			<div class="clear"></div>
		</div>	
		<div class="clear"></div>
	</div>
<?php
	}
}

//.............................................................................
// CUSTOM Dennison+Wolfe TEMPLATE IMPLEMENT

remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');
add_action('thesis_hook_custom_template', 'custom_template');


//.............................................................................
//	begining of side bars 
//.............................................................................

function do_register_sidebar()
{
	register_sidebar(array('name'=>'Homepage - Contact', 'id'=>'homepage-contact', 'before_title'=>'<h2>', 'after_title'=>'</h2>')); 
	register_sidebar(array('name'=>'Homepage - Hours', 'id'=>'homepage-hours', 'before_title'=>'<h2>', 'after_title'=>'</h2>'));
	register_sidebar(array('name'=>'Homepage - Location', 'id'=>'homepage-location', 'before_title'=>'<h2>', 'after_title'=>'</h2>'));
	register_sidebar(array('name'=>'Homepage - Menus', 'id'=>'homepage-menus', 'before_title'=>'<h2>', 'after_title'=>'</h2>'));
	register_sidebar(array('name'=>'Homepage - Footer Location 01', 'id'=>'homepage-footer-01', 'before_title'=>'<div id="homepage-footer-image-1"></div><h2>', 'after_title'=>'</h2>'));
	register_sidebar(array('name'=>'Homepage - Footer Location 02', 'id'=>'homepage-footer-02', 'before_title'=>'<div id="homepage-footer-image-2"></div><h2>', 'after_title'=>'</h2>'));
	register_sidebar(array('name'=>'Homepage - Footer Location 03', 'id'=>'homepage-footer-03', 'before_title'=>'<div id="homepage-footer-image-3"></div><h2>', 'after_title'=>'</h2>'));
}

//.............................................................................
// Homepage - Contact

function homepage_contact(){
	?>
		<div class="homepage-contact">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Contact') ){ ?>
				<ul><li class="widget">No Widgets Added</li></ul>
			<?php } ?>
		</div>
	<?php
}

//.............................................................................
// Homepage - Hours

function homepage_hours(){
	?>
		<div class="homepage-hours">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Hours') ){ ?>
				<ul><li class="widget">No Widgets Added</li></ul>
			<?php } ?>
		</div>
	<?php
}

//.............................................................................
// Homepage - Location

function homepage_location(){
	?>
		<div class="homepage-location">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Location') ){ ?>
				<ul><li class="widget">No Widgets Added</li></ul>
			<?php } ?>
		</div>
	<?php
}

//.............................................................................
// Homepage - Menus

function homepage_menus(){
	?>
		<ul class="homepage-menus">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Menus') ){ ?>
				<ul><li class="widget">No Widgets Added</li></ul>
			<?php } ?>
		</ul>
	<?php
}

//.............................................................................
// Homepage - Footer Location 01

function homepage_footer_01(){
	?>
		<div class="homepage-footer-01">
			<ul><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Footer Location 01') ){ ?>
				<li class="widget">No Widgets Added</li>
			<?php } ?>
                </ul></div>
	<?php
}

//.............................................................................
// Homepage - Footer Location 02

function homepage_footer_02(){
	?>
		<div class="homepage-footer-02">
			<ul><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Footer Location 02') ){ ?>
				<li class="widget">No Widgets Added</li>
			<?php } ?>
		</ul></div>
	<?php
}

//.............................................................................
// Homepage - Footer Location 03

function homepage_footer_03(){
	?>
		<div class="homepage-footer-03">
			<ul><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage - Footer Location 03') ){ ?>
				<li class="widget">No Widgets Added</li>
			<?php } ?>
		</ul></div>
	<?php
}
//	end of side bars 
//.............................................................................



/* CUSTOM Dennison+Wolfe FOOTER HOOK */

function add_custom_footer () { 
$pathToImageFolder = getImagePath(__FILE__);
?>
	<div class="footer level2 level3 level4">
		<div id="footer-custom">
			<?php if ( function_exists('custom_footer')) custom_footer(); ?>
		</div>		
	</div>
<?php }

add_action('thesis_hook_footer', 'add_custom_footer');




/* Custom 404 Hooks */
function custom_thesis_404_title() {	
	
?>
You have reached a page that does not exist.
<?php
}
add_action('thesis_hook_404_title', 'custom_thesis_404_title');

function custom_thesis_404_content() {
global $site_url;
?>


<?php
}
add_action('thesis_hook_404_content', 'custom_thesis_404_content');

?>
