<?php
/**
 * @package WordPress
 * @subpackage Classic_Theme
 */
?>
<!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(); ?>>
<?php wp_headers();?>

<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('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/blueprint/screen.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/blueprint/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/blueprint/ie.css" type="text/css" media="screen, projection" />
<script src="<?php bloginfo('template_url'); ?>/js/DD_belatedPNG.js" type="text/javascript"></script>
<script type="text/javascript">DD_belatedPNG.fix('.logo, #navigation, #container-wrap, .post-date, #search-wrap, #gallery');</script>
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/ie.css" type="text/css" media="screen, projection" />
<![endif]-->

<script src="<?php bloginfo('template_directory'); ?>/menu/mootools-1.2.5-core-yc.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/menu/MenuMatic.css" type="text/css" media="screen" charset="utf-8" />
<!--[if lt IE 7]>
	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/menu/MenuMatic-ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
<!-- Load the MenuMatic Class -->


<script src="<?php bloginfo('template_directory'); ?>/menu/MenuMatic_0.68.3.js" type="text/javascript" charset="utf-8"></script>
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
	<?php wp_get_archives('type=monthly&format=link'); ?>
	<?php //comments_popup_script(); // off by default ?>
	<?php wp_head(); ?>
    <?php get_heads();?>
<script type="text/javascript">
window.addEvent('domready', function() {
		var myMenu = new MenuMatic();
		$$('#sidebar ul li ul li:nth-child(last)').addClass('last');
		$$('#subMenusContainer ul li:nth-child(last)').addClass('last');
});	
</script>
</head>

<body>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.min.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/js/custom.js" type="text/javascript"></script>
<div id="top-frame">
	<div id="header">
		<div id="navigation">
				<?php if(function_exists('wp_nav_menu')) {
							wp_nav_menu('theme_location=menu_2&menu_id=nav&container=&fallback_cb=menu_custom_2');
						} else {
							if(wpthemes_options('show_dropdown') != '') {
								menu_custom_2();
							}
						}
						function menu_custom_2() { ?>
			<ul id="nav">
				<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
				<?php custom_cat_menu('exclude_hor_cat'); ?>
				<?php custom_page_menu('exclude_hor_pages'); ?>
				<?php custom_link_menu('exclude_hor_links'); ?>
			</ul>
						<?php } ?>
		</div>
		<?php 
		if(wpthemes_options('header_code') != '') {
		echo wpthemes_options("header_code")  . "\n"; 
		}
		?>
		<div class="logo">
			<?php if(wpthemes_options('logo') != '') {?>
			<div class="blog-name">
			<a href="<?php bloginfo('url'); ?>"><img src="<?php echo wpthemes_options('logo'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" /></a>
			</div>
			<?php
			} else { ?>
			  <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
			  <<?php echo $heading_tag; ?> class="blog-name"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></<?php echo $heading_tag; ?>>
			  <?php } ?>
		</div>

		<div class="ad-wrap">
			<?php if(wpthemes_options('ad468_googleads') != '') {
				echo wpthemes_options('ad468_googleads');
			} elseif ( wpthemes_options('ad468_location') != '') { ?>
				<a href="<?php echo wpthemes_options('ad468_url'); ?>"><img src="<?php echo wpthemes_options('ad468_location'); ?>" /></a>
			<?php } ?>
		</div>

	</div>
	<div class="clear"></div>

