<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php truethemes_meta_hook();// action hook, see truethemes_framework/global/hooks.php ?>
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>" href="<?php bloginfo('rss2_url'); ?>" />
<?php wp_head(); ?>
<?php $logo = get_option('ka_sitelogo'); $toolbar = get_option('ka_toolbar'); ?>
<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/lt8.css" media="screen"/><![endif]-->
<?php 
if (is_page_template('template-homepage-3D.php')) {
echo '<!--[if IE 9]><style stype="text/css">.big-banner #main .flash-main-area .content_full_width {margin-top:105px;clear:both;}</style><![endif]-->';
}
?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" <?php if (is_page_template('template-homepage-3D.php') || is_page_template('template-homepage-jquery-2.php')) {echo 'class="big-banner"';} ?>>
<div id="header" <?php if (is_page_template('template-homepage-3D.php')){echo "style='height: 560px;'";} ?>>

<?php 
// show the following if user selected show toolbar
if ($toolbar == "true"): 
?>
<div class="top-block">
<div class="top-holder">

<?php truethemes_before_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?>

	<?php 
	/**
	* we show top toolbar menu if it is set.
	* @since version 2.6 development
	*/
	if(has_nav_menu('Top Toolbar Navigation')):  
	?>
    <div class="sub-nav">  
    <ul>
    <?php
    wp_nav_menu( array(
 					'container' =>false,
 					'theme_location' => 'Top Toolbar Navigation',
 					'sort_column' => 'menu_order',
 					'menu_class' => '',
 					'echo' => true,
 					'before' => '',
 					'after' => '',
 					'link_before' => '',
 					'link_after' => '',
 					'depth' => 0,
 					'walker' => '',)
 					);     
     ?>
     </ul>
    </div><!-- end sub-nav -->

	<?php
	//if top toolbar menu not set, we show dynamic sidebar  
	elseif(is_active_sidebar(1)): 
	?>
    <div class="sub-nav">  
    <ul><?php dynamic_sidebar("Toolbar - Left Side"); ?></ul>
    </div><!-- end sub-nav -->
	<?php endif; ?>

	<?php if(is_active_sidebar(2)): ?>
    <div class="sub-nav2">
    <?php dynamic_sidebar("Toolbar - Right Side"); ?>
    </div><!-- end sub-nav2 -->
	<?php endif; ?>

<?php truethemes_after_top_toolbar_menu_hook();// action hook, see truethemes_framework/global/hooks.php ?>

</div><!-- end top-holder -->
</div><!-- end top-block -->
<?php endif; //end if($toolbar == 'true') ?>

<?php truethemes_before_header_holder_hook();// action hook, see truethemes_framework/global/hooks.php ?>

<div class="header-holder">
<div class="rays">
<div class="header-area<?php if (is_search()) {echo ' search-header';} ?><?php if (is_404()) {echo ' error-header';} ?><?php if (is_page_template('template_sitemap.php')) {echo ' search-header';} ?>">
<?php
$logo = get_option('ka_sitelogo');
$custom_logo = get_option('ka_logo_icon');
$custom_logo_text = get_option('ka_logo_text');
if ($custom_logo_text == ''){
?>
<a href="<?php echo home_url(); ?>" class="logo"><img src="<?php echo $logo; ?>" alt="<?php bloginfo('name'); ?>" /></a>
<?php }else{?>
<a href="<?php echo home_url(); ?>" class="custom-logo"><img src="<?php echo get_template_directory_uri(); ?>/images/_global/<?php echo $custom_logo; ?>" alt="<?php bloginfo('name'); ?>" /><span class="logo-text"><?php echo $custom_logo_text; echo '</span></a>';}?>


<?php truethemes_before_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?>


<?php if(has_nav_menu('Primary Navigation')):
echo '<ul id="menu-main-nav">';
if (function_exists('wp_nav_menu')) {	
wp_nav_menu( array(
 'container' =>false,
 'theme_location' => 'Primary Navigation',
 'sort_column' => 'menu_order',
 'menu_class' => '',
 'echo' => true,
 'before' => '',
 'after' => '',
 'link_before' => '',
 'link_after' => '',
 'depth' => 0,
 'walker' => new description_walker())
 );
}
echo '</ul>';
endif;
?>

<?php truethemes_after_primary_navigation_hook();// action hook, see truethemes_framework/global/hooks.php ?>