<?php
/**
 * Edition Theme Header
 *
 * @package WordPress
 * @subpackage Edition
 * @since Edition 1.0
 */
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
	<?php
		// Disable indexing section preview pages
		global $post;
		if( $post && $post->post_type == 'section' ) {
			echo '<meta name="robots" content="noindex, nofollow" />';
		}

		// Set the favicon from Theme Options
		global $tw_options;
		if ( isset( $tw_options['favicon']['url'] ) && $tw_options['favicon']['url'] != '' ) {
			echo  '<link rel="shortcut icon" href="' . $tw_options['favicon']['url'] . '"/>';
		}
	?>

	<meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
	<?php wp_head(); ?>
</head>

<?php
	$body_classes = array(
		'edition',
		wp_is_mobile() ? 'mobile-device' : 'desktop-device',
		$tw_options['header_layout']
	);
?>

<body <?php body_class($body_classes); ?>>
	<div class="mm-page">

		<div id="preloaded-images">
			<?php $td = get_template_directory_uri(); ?>
			<img src="<?php echo esc_url( $td . '/images/loading-spin.svg' );?>" width="1" height="1" alt="Image" />
		</div>
		<!-- .preloaded-images -->

		<?php
			get_template_part(TW_TEMPLATES_DIR . '/top-ad-area');
			get_template_part(TW_TEMPLATES_DIR . '/template-top-bar');
			get_template_part(TW_TEMPLATES_DIR . '/navigation');
		?>

		<div id="sitecontainer">