<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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');?>" />
		<title><?php
			global $page, $paged;
			?>
			<?php if ( is_home() || is_front_page() ) { ?><?php bloginfo('name');?>  <?php bloginfo('description');?>
			<?php } elseif ( is_search() ) {?><?php the_search_query();?>| <?php _e('Search Results', 'mt-dark');?>
			<?php } elseif  ( is_singular()  ) {?><?php wp_title('|', true, 'right');?>  <?php
				if($paged >= 2 || $page >= 2) {
					echo sprintf(__('Page %s |', 'mt-dark'), max($paged, $page));
				}
			?> <?php  bloginfo('name');?>
			<?php } elseif  ( is_category() ) {?><?php single_cat_title();?>| <?php _e('Category Archives', 'mt-dark');?>| <?php bloginfo('name');?>
			<?php } elseif  ( is_month() ) {?><?php the_time( get_option('date_format'))
			?>| <?php _e('Archives', 'mt-dark');?>| <?php bloginfo('name');?>
			<?php } elseif  ( is_tag() ) {?><?php  single_tag_title('', true);?>| <?php _e('Tag Archives', 'mt-dark');?>&nbsp;|&nbsp;<?php bloginfo('name');?>
			<?php } elseif  ( is_404() ) {?> <?php _e('HTTP 404: Not Found', 'mt-dark');?>&nbsp;|&nbsp;<?php bloginfo('name');?>
			<?php } elseif  ( is_author() ) {?> <?php
				if(have_posts())
					the_post();
 ?><?php printf(__('About %s', 'mt-dark'), get_the_author());?>
			<?php } else {?> <?php wp_title('|', true, 'right');
				bloginfo('name');
				}
			?></title>
		<link href="<?php bloginfo('stylesheet_url');?>" type="text/css" media="screen" charset="utf-8" rel="stylesheet" />
		<link rel="pingback" href="<?php bloginfo('pingback_url');?>" />
		<?php
			if(is_singular() && get_option('thread_comments')) { wp_enqueue_script('comment-reply');
			}
		?>
		<?php wp_head();?>
	</head>
	<body <?php body_class();?> >
		<div id="header" class="container_12 nav">
			<?php  if (is_home() || is_front_page()) {
			?>
			<h1 class="grid_12"><a href="<?php echo home_url();?>"><?php bloginfo('name');?></a></h1>
			<?php } else {?>
			<h2 class="grid_12"><a href="<?php echo home_url();?>"><?php bloginfo('name');?></a></h2>
			<?php }?>
			<?php  wp_nav_menu(array('sort_column' => 'menu_order', 'Primary Navigation', 'theme_location' => 'primary', 'container' => '', 'menu_class' => 'menu'));?>
		</div>
		<div class="clear"></div>