<!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'); ?>" />

<title><?php wp_title(' &raquo; ',true,'right'); ?><?php bloginfo('name'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="<?php echo ts_get_option('ts_rss'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php wp_head(); ?>

</head>

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

<div id="header-wrap">
	<div id="header-wrap-inner">

		<div id="header">
			
			<div id="logo">
				<a href="<?php bloginfo('url'); ?>">
					<img src="<?php echo ts_get_option('ts_logo'); ?>" alt="<?php bloginfo('name'); ?>" />
				</a>
			</div>
			
			<h1 id="description"><?php bloginfo('description'); ?></h1>
		
		</div><!-- end header -->
		
		<?php if(is_front_page() && !ts_get_option('ts_display_dsp') && basename($_SERVER['SCRIPT_FILENAME'])!='wp-signup.php') include(TEMPLATEPATH . '/lib/inc/display.php'); ?>
		
		<?php if(function_exists('wp_nav_menu')) :
		    wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'ts-menu', 'menu_class' => 'sf-menu', 'fallback_cb' => 'ts_menu', 'theme_location' => 'main' ) );
		else : ?>

		<div class="ts-menu">
		    <ul class="sf-menu clearfix">
		    	<?php if(!ts_get_option('ts_ex_home')) : ?>
		    	<li<?php if(is_front_page()) echo ' class="current"'; ?>><a href="<?php bloginfo('url'); ?>" title="<?php _e('Home',TS_DOMAIN); ?>"><?php _e('Home',TS_DOMAIN); ?></a></li>
		    	<?php endif; ?>
		    	<?php if(is_single()) : $category = get_the_category(); $current_cat = $category[0]->cat_ID; else : $current_cat = ''; endif;
		    	$ex_cats = ts_get_option('ts_ex_cats'); wp_list_categories('title_li=&current_category='.$current_cat.'&exclude='.$ex_cats); ?>
		    	<?php $ex_pages = ts_get_option('ts_ex_pages'); wp_list_pages('title_li=&sort_column=menu_order&exclude='.$ex_pages); ?>
		    </ul>
		</div>
	
		<?php endif; ?>
	
	</div><!-- end header-wrap-inner -->
	</div><!-- end header-wrap -->

	<div id="main">
	<div id="<?php if (!is_page_template('page-full.php')) : ?>main-inner<?php else : ?>main-inner-full<?php endif; ?>" class="clearfix">
	
		<?php if (!is_page_template('page-full.php') && basename($_SERVER['SCRIPT_FILENAME'])!='wp-signup.php') : ?><div id="content" class="clearfix"><?php endif; ?>