<commit_before>/*
File: site.js

About: Version
	1.0

Project: SITE

Description:
	Global namespace & shared utilities

Requires:
	- jQuery <http://jquery.com/>
	- Modernizr <http://modernizr.com/>

Requires:
	- <namespace.js>
	- <class.js>
	- <utils.js>

*/

/*global $: true, console: true, Class: true */

/*
Namespace: RED
	Scoped to the RED Global Namespace
*/
var RED = window.RED || {};

/*
Class: RED.SITE
	Under the RED.SITE Class
*/
RED.SITE = RED.SITE || {};

RED.SITE = $.extend(RED.SITE, function () {
	
	// Private variables/functions
	
	// Public
	return {
		models : {},
		
		init : function () {
			// Setup History Events
			RED.require("history", this);
			
<<<<<<< HEAD
			$(document).ready(this.onReady.call(this));
=======
			$(document).ready(this.onReady);
>>>>>>> a1e654b44d9dc6e2592f1df71c413a49def38ca5
		},
		
		onReady : function () {
			var body = $(document.body);
			
<<<<<<< HEAD
			this.load([{
				test : $,
				yep : {
					"Global" : "/media/js/site/common/global.js"
=======
			Modernizr.load([{
				test : $,
				yep : {
					"Global" : SYS.MEDIA_URL + "js/site/common/global.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Global = new RED.HBO.Global();
					}
>>>>>>> a1e654b44d9dc6e2592f1df71c413a49def38ca5
				}
			}, {
				test : body.hasClass("home"),
				yep : {
<<<<<<< HEAD
					"Home" : "/media/js/site/home.js"
=======
					"Home" : SYS.MEDIA_URL + "js/site/home.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Home = new RED.HBO.Home();
					}
>>>>>>> a1e654b44d9dc6e2592f1df71c413a49def38ca5
				}
			}, {
				test : body.hasClass("about"),
				yep : {
<<<<<<< HEAD
					"About" : "/media/js/site/about.js"
=======
					"About" : SYS.MEDIA_URL + "js/site/about.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.About = new RED.HBO.About();
					}
>>>>>>> a1e654b44d9dc6e2592f1df71c413a49def38ca5
				}
			}, {
				test : body.hasClass("contact"),
				yep : {
<<<<<<< HEAD
					"Contact" : "/media/js/site/contact.js"
				}
			}]);
		},
		
		load : function (stack) {
			for (var i = 0, j = stack.length; i < j; i++) {
				stack[i].callback = this.onScriptLoad;
			}
			
			return Modernizr.load(stack);
		},
		
		onScriptLoad : function (url, result, key) {
			if (result) {
				console.group("new RED.SITE.Page." + key);
					RED.SITE.models[key] = new RED.SITE[key]();
					console.log("RED.SITE." + key, RED.SITE.models[key]);
				console.groupEnd();
			}
=======
					"Contact" : SYS.MEDIA_URL + "js/site/contact.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Contact = new RED.HBO.Contact();
					}
				}
			}]);
			
>>>>>>> a1e654b44d9dc6e2592f1df71c413a49def38ca5
		},
		
		refresh : function (state) {
			console.group("History State: %s", state.data.state);<commit_msg>clearing conflicst from fork merge<commit_after>/*
File: site.js

About: Version
	1.0

Project: SITE

Description:
	Global namespace & shared utilities

Requires:
	- jQuery <http://jquery.com/>
	- Modernizr <http://modernizr.com/>

Requires:
	- <namespace.js>
	- <class.js>
	- <utils.js>

*/

/*global $: true, console: true, Class: true */

/*
Namespace: RED
	Scoped to the RED Global Namespace
*/
var RED = window.RED || {};

/*
Class: RED.SITE
	Under the RED.SITE Class
*/
RED.SITE = RED.SITE || {};

RED.SITE = $.extend(RED.SITE, function () {
	
	// Private variables/functions
	
	// Public
	return {
		models : {},
		
		init : function () {
			// Setup History Events
			RED.require("history", this);
			
			$(document).ready(this.onReady);
		},
		
		onReady : function () {
			var body = $(document.body);
			
			Modernizr.load([{
				test : $,
				yep : {
					"Global" : SYS.MEDIA_URL + "js/site/common/global.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Global = new RED.HBO.Global();
					}
				}
			}, {
				test : body.hasClass("home"),
				yep : {
					"Home" : SYS.MEDIA_URL + "js/site/home.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Home = new RED.HBO.Home();
					}
				}
			}, {
				test : body.hasClass("about"),
				yep : {
					"About" : SYS.MEDIA_URL + "js/site/about.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.About = new RED.HBO.About();
					}
				}
			}, {
				test : body.hasClass("contact"),
				yep : {
					"Contact" : SYS.MEDIA_URL + "js/site/contact.js"
				},
				callback : function (url, result, key) {
					if (result) {
						RED.HBO.models.Contact = new RED.HBO.Contact();
					}
				}
			}]);
			
		},
		
		refresh : function (state) {
			console.group("History State: %s", state.data.state);
{'fraction_non_alphanumeric': 0.18902058640049907, 'fraction_numerical': 0.024953212726138492, 'mean_word_length': 2.460431654676259, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 48, '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': '6932286', 'n_tokens_mistral': 2334, 'n_tokens_neox': 1820, 'n_words': 336}