function log(s) {
	if (typeof console != "undefined" && typeof console.debug != "undefined") {
		console.log(s);
	} else {
		$('body').prepend($('<div>').text(s));
	}
}
