<commit_before><?php
//Siren Framework v3.5
//File Name: Global Header
//File Purpose: Starts page, include <head> element, includes styled header of page
//File Notes: 
?>

<!DOCTYPE html manifest="manifest.appcache" >
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<title><?php echo $meta_title; ?> | Suits &amp; Sandals Sample Framework</title>
	<meta name="description" content="<?php echo $meta_desc; ?>"/>
	<meta name="keywords" content="<?php echo $meta_keywords; ?>">

	<link rel="shortcut icon" type="image/x-icon" href="icons/favicon.ico">

	<!--[if lt IE 9]>
	    <script>
	        <?php require_once( 'js/polyfills/html5.js'); ?>
			document.createElement( "picture" );
	    </script>
    <![endif]-->

<?php if(isset($_COOKIE['fullCSS'])) { //If cookie is set load stylesheet normally ?>
	
	<link rel="stylesheet" href="css/style.css" type="text/css" data-test />

<?php } else{

	//Critical CSS is Served based on major template groupings
	echo '<style>';

		require_once(  'css/critical/critical-generic.css');

	echo '</style>';

	echo '<script>';
		//Asyncronous Load CSS
		require_once('js/loadcss.js');
	echo '</script>';

?>

	<script>
		//Async CSS
	    loadCSS( "css/style.css" );
	    //Set Cookie
	    cookie( 'fullCSS', "true", 7 );
	</script>
	
<?php } ?>

	<script>
		// JS Enhancment and Async Loading
		<?php require_once('js/loadjs.js'); ?>
		//Test only supports browsers that are IE8 and newer


		if(typeof(document.querySelectorAll) != 'undefined'){
<?php 
				if($pagename == 'contact'){
?>					
				   	loadJS( "js/contact.min.js" );
<?php			
				}
				else{ 
?>					
				    loadJS( "js/global.min.js" );
<?php
				} 
?>
	    }

	    //Fix for Windows 8
	    if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
		    var msViewportStyle = document.createElement("style");
		    msViewportStyle.appendChild(
		        document.createTextNode(
		            "@-ms-viewport{width:auto!important}"
		        )
		    );
		    document.getElementsByTagName("head")[0].
		        appendChild(msViewportStyle);
		}
<commit_msg>JS loading fix<commit_after><?php
//Siren Framework v3.5
//File Name: Global Header
//File Purpose: Starts page, include <head> element, includes styled header of page
//File Notes: 
?>

<!DOCTYPE html manifest="manifest.appcache" >
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<title><?php echo $meta_title; ?> | Suits &amp; Sandals Sample Framework</title>
	<meta name="description" content="<?php echo $meta_desc; ?>"/>
	<meta name="keywords" content="<?php echo $meta_keywords; ?>">

	<link rel="shortcut icon" type="image/x-icon" href="icons/favicon.ico">

	<!--[if lt IE 9]>
	    <script>
	        <?php require_once( 'js/polyfills/html5.js'); ?>
			document.createElement( "picture" );
	    </script>
    <![endif]-->

<?php if(isset($_COOKIE['fullCSS'])) { //If cookie is set load stylesheet normally ?>
	
	<link rel="stylesheet" href="css/style.css" type="text/css" data-test />

<?php } else{

	//Critical CSS is Served based on major template groupings
	echo '<style>';

		require_once(  'css/critical/critical-generic.css');

	echo '</style>';

	echo '<script>';
		//Asyncronous Load CSS
		require_once('js/loadcss.js');
	echo '</script>';

?>

	<script>
		//Async CSS
	    loadCSS( "css/style.css" );
	    //Set Cookie
	    cookie( 'fullCSS', "true", 7 );
	</script>
	
<?php } ?>

	<script>
		// JS Enhancment and Async Loading
		<?php require_once('js/loadjs.js'); ?>
		//Test only supports browsers that are IE8 and newer


		if(typeof(document.querySelectorAll) != 'undefined'){
			window.onload = function(){
<?php 
				if($pagename == 'contact'){
?>					
				   	loadJS( "js/contact.min.js" );
<?php			
				}
				else{ 
?>					
				    loadJS( "js/global.min.js" );
<?php
				} 
			};
?>
	    }

	    //Fix for Windows 8
	    if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
		    var msViewportStyle = document.createElement("style");
		    msViewportStyle.appendChild(
		        document.createTextNode(
		            "@-ms-viewport{width:auto!important}"
		        )
		    );
		    document.getElementsByTagName("head")[0].
		        appendChild(msViewportStyle);
		}

{'fraction_non_alphanumeric': 0.1972940226171244, 'fraction_numerical': 0.010096930533117932, 'mean_word_length': 3.0531914893617023, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5961034', 'n_tokens_mistral': 1925, 'n_tokens_neox': 1688, 'n_words': 398}