<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	<link rel="shortcut icon" type="image/x-icon" href="<?php the_field('favicon', 'options');?>">
    <!--[if lt IE 9]>
	  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
	  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
	<?php wp_head(); ?>
</head>
<?php if(!is_front_page() ){ $classes = 'subpage'; } ?>
<body <?php body_class($classes); ?>>

<?php 
	$user_agent = $_SERVER['HTTP_USER_AGENT'];
	if (stripos($user_agent, 'MSIE 6.0') != false ||
	stripos($user_agent, 'MSIE 7.0') != false ||
	stripos($user_agent, 'MSIE 8.0') != false) {
	?>

		<div class="browsers">
			<div class="errortitle">Your browser is outdated. <br/> 
				Try ones or install another
			</div>
			<a class="chrome" href="https://www.google.com/chrome" target="_blank">Chrome</a> 
			<a class="firefox" href="http://www.mozilla.org/firefox/new/" target="_blank">Firefox</a> 
			<a class="safari" href="http://www.apple.com/safari/" target="_blank">Safari</a> 
			<a class="opera" href="http://www.opera.com/download/" target="_blank">Opera</a> 
			<a class="msie" href="http://ie.microsoft.com/" target="_blank">IE 11</a> 
		</div>
		<div class="mask"></div>

<?php } ?>

	
	<div class="main-nav<?php if( !is_front_page()){ echo ' always-sticky'; } ?>">
		<div class="container-fluid">
			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo"><img src="<?php the_field('logo', 'options');?>" alt="<?php bloginfo('name'); ?>"></a>
			<a class="main-menu-toggle panel-toggle slide visible-xs visible-sm" href="#main-menu">Menu <span class="bars" ><span></span> <span></span> <span></span> </span></a>
			<div class="main-menu-wrapper">
				<?php wp_nav_menu( array( 'theme_location' => 'main', 'menu_class' => 'main-menu', 'menu_id'=> 'main-menu', 'link_before'  => '',  'link_after' => '', 'container'=> '' ) ); ?>
			</div>
			<a href="<?php the_field('announcements_page', 'options');?>" class="announcements-link hidden-xs hidden-sm">
				<svg version="1.1" id="alert-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve" preserveAspectRatio="xMidYMid meet">
					<g>
						<path d="M306.023,593c-76.491,0-152.982-0.087-229.473,0.103 c-10.339,0.025-16.798-4.172-21.05-13.464c-11.782-25.748-7.757-46.894,13.16-66.421c2.557-2.387,5.021-4.919,7.817-6.994 c17.617-13.074,26.971-31.183,30.313-52.229c4.017-25.29,6.604-50.804,10.226-76.161c8.277-57.959,25.863-112.216,64.799-157.525 c21.005-24.443,46.897-41.748,78.102-50.548c3.823-1.078,5.132-2.592,5.361-6.654c1.122-19.867,16.729-36.156,35.955-38.06 c20.658-2.045,39.122,10.501,44.312,30.142c0.468,1.767,1.239,3.654,1.006,5.369c-0.944,6.949,3.217,8.494,8.831,10.228 c40.9,12.625,70.87,39.235,93.713,74.594c22.474,34.785,35.794,73.181,42.771,113.71c3.749,21.783,5.169,43.958,8.274,65.866 c1.864,13.148,4.566,26.215,7.587,39.155c3.787,16.229,12.541,29.413,25.422,40.202c7.353,6.158,14.342,13.049,20.239,20.591 c15.112,19.325,11.062,42.415-0.667,61.135c-3.348,5.344-9.025,6.998-15.228,6.979c-16.997-0.052-33.995-0.018-50.992-0.018 C426.342,593,366.183,593,306.023,593z"/>
						<path d="M355.841,610.553c1.562,22.07-21.928,44.658-47.655,45.939 c-26.807,1.337-51.692-20.353-52.275-45.939C289.227,610.553,322.537,610.553,355.841,610.553z"/>
					</g>
				</svg>
			</a>

			<?php 
			$args = array(
				'post_type'=> 'announcements',
				'showposts' => 4,
                'meta_key' => 'featured',
                'meta_value' => 1
				); 

			$anns = new WP_Query($args);
			//print_r($anns);
			if( $anns->have_posts() ):
			?>
			<div class="announcements-block visible-xs visible-sm">
				<a href="#announcements-mobile" class="panel-toggle slide"><span class="plus-ico"></span>Announcements</a>
				<div class="panel" id="announcements-mobile" style="display:none;">
					<?php announcements_header($anns);?>
					
				</div>
				
			</div>
			<?php endif; wp_reset_postdata();?>

		</div>
	</div>

	<?php global $wp_query; 
	echo '<pre style="display: none;">'; print_r($wp_query); echo '</pre>'; 
