// A shortcut to add a 'javascriptable' classname to the body, so standard selectors kick in fast and clean
// This should come first in the JS load, but after the inclusion of stylesheets


//create onDomReady Event
window.onDomReady = DomReady;

//Setup the event
function DomReady(fn) {
	if(document.addEventListener)	{ //W3C
		document.addEventListener("DOMContentLoaded", fn, false);
	}	else	{ //IE 
		document.onreadystatechange = function(){readyState(fn)}
	}
}

//IE execute function
function readyState(fn) {
	if(document.readyState == "interactive") {
		fn();
	}
}

window.onDomReady(enableJavascriptFlag);

function enableJavascriptFlag() {
	document.getElementsByTagName('body')[0].className += ' javascriptable';
}

(function(){
	/* Protect clients without firebug from console.log messages */
	if (typeof(console) == 'undefined') {
		window.console = {
			log: function(message){
			 //Not doing anything useful - just routing the message to the void.
			 //alert(message); - if you really want to know:
			 }
		}
	}
})();