var debugCreator = function() {
	if (debugging && console !== undefined) {
		console.log("JS DEBUGGING ENABLED!")
	} 
	return {
		"log" : function(what) {
			if (debugging && console !== undefined) {
				console.log(what);
			}
		}
	};
};

var debug = debugCreator();

