/*
 * Namespace: ox.debug
 *
 * Output debug logging to the browsers console (such as in Firebug)
 *
 */
 
if (typeof ox == "undefined") {
  ox = new Object();
}
ox.debug = function() {
	return { 
		log: function(msg) {
			if (window.console && window.console.log) {
				window.console.log(msg);
			}
		},

		logObj: function (data) {
			for(var obj in data) {
				if(data.hasOwnProperty(obj)) {
					ox.debug.log(obj + ":" + data[obj]);
				}
			}
		},

		profileStart: function (name) {
			if (window.console && window.console.time) {
				window.console.time(name);
			}
		},

		profileEnd: function (name) {
			if (window.console && window.console.timeEnd) {
				window.console.timeEnd(name);
			}
		}
	};
}();

