<?php 
global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
} 
?>
<!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 profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php if (strlen($tutspress_misc_favicon) > 1 ) { ?><link rel="shortcut icon" href="<?php echo "$tutspress_misc_favicon";?>" type="image/x-icon" /><?php } ?>
<title><?php if ($tutspress_seo_enable == 'Enable') { tutspress_titles(); } else { wp_title('-'); echo ' | '; bloginfo('name'); } ?></title>
<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php if ($tutspress_seo_enable == 'Enable') { 
if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<meta name="description" content="<?php echo strip_tags(get_the_excerpt()); ?>" />
<?php meta_post_keywords(); ?>
<?php endwhile; endif; elseif(is_home()) : ?>
<meta name="description" content="<?php if (strlen($tutspress_meta_desc) < 1) { bloginfo('description');} else {echo"$tutspress_meta_desc";}?>" />
<?php meta_home_keywords(); ?>
<?php endif; ?>
<?php tutspress_index(); ?>
<?php tutspress_canonical(); } ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/custom.css" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php if (strlen($tutspress_misc_feedburner) < 10) { bloginfo('rss2_url');} else {echo"$tutspress_misc_feedburner";} ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_enqueue_script('jquery');  ?>
<?php wp_head(); ?>
<script type='text/javascript'>  
jQuery(document).ready(function() {   
jQuery("#menuhead ul").css({display: "none"}); // Opera Fix  
jQuery("#menuhead li").hover(function(){  
        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(268);  
        },function(){  
        jQuery(this).find('ul:first').css({visibility: "hidden"});  
        });  
});  
</script>
     
<?php if (is_home() && $tutspress_slideshow_show == 'Yes') { ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/nivo-slider.css" />
<script src="<?php bloginfo('template_directory'); ?>/js/nivo.core.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/nivo.slider.js" type="text/javascript"></script>
<?php } ?>
<style type="text/css">
body { background: #fff url(<?php bloginfo('template_directory'); ?>/images/backs/<?php echo $tutspress_background; ?>) repeat top left;  }
</style>
</head>

<body <?php body_class(); ?>>

<div id="wrap">
<div class="shadowTop">

</div><!-- end .shadowTop -->
  
<div class="shadowWide">

<div class="frameWide">

<div id="header">

<div id="tmenu">
<?php wp_nav_menu( array('container' => '', 'container_class' => '', 'menu_class' => '', 'depth' => '1', 'menu_id' => 'menufooter', 'sort_column' => 'menu_order', 'theme_location' => 'secondary' ) ); ?>
</div>

<div id="search-wrap">
<form id="searchbar" action="<?php echo home_url( '/' ); ?>" method="get">
<input id="search" type="text" onblur="if(this.value=='')this.value=this.defaultValue;" onfocus="if(this.value==this.defaultValue)this.value='';" value="Search..." name="s" size="16">
<input id="searchsubmit1" type="submit" value="">
</form>
</div>
	<div class="wrap">
		<div id="logo"><a href="<?php echo get_option('home'); ?>"><?php if ($tutspress_misc_logo_path) { ?><img src="<?php echo "$tutspress_misc_logo_path";?>" alt="<?php bloginfo('name'); ?>" /><?php } else { ?><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" /><?php } ?></a></div>  

    </div><!-- end .wrap -->

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

<div id="menuTop">
	<div class="wrap">
		<div id="nav">	        
			<?php wp_nav_menu( array('container' => '', 'container_class' => '', 'menu_class' => '', 'menu_id' => 'menuhead', 'sort_column' => 'menu_order', 'theme_location' => 'primary' ) ); ?>
		</div>
	</div><!-- end .wrap -->
</div><!-- end #menuTop -->
