(function () {
	var consoleProperties = ['log', 'debug', 'info', 'warn', 'error', 'group', 'count'];
	var i;
	var console;
	var Console;
	if ('undefined' == typeof window.debug) {
		window.debug = 0;
	}
	if ('undefined' == typeof window.console) {
		window.console = {};
	}
	if ('undefined' == typeof window.Console) {
		window.Console = {};
	}
	console = window.console;
	Console = window.Console;
	var prop;
	var emptyFn = function () {};
	for (i = 0; i < consoleProperties.length; i++) {
		prop = consoleProperties[i];
		if ('function' != typeof console[prop]) {
			console[prop] = emptyFn;
		}
		Console[prop] = emptyFn;
		if (window.debug) {
			Console[prop] = console[prop];
		}	
	}
})();

