// TODO: the code to override the alert


$(document).ready(function () {

	/*
	 * Overriding the default alert function.
	 * In many cases in the code there is a need to give the user feedback
	 * in a form of little alert-like dialog. The problem is that the standard
	 * alert looks bad. We want something customizable. So I have change the 
	 * default alert function to the custom one.
	 */
	var nativeAlert = window.alert;
	window.alert = function ( text ) {
		var ui_short_feedback = $("#ui-short-feedback");
		ui_short_feedback.html(text);
		ui_short_feedback.dialog({
			title		: "Mobilegamelab says:",
			modal		: true,
			resizable 	: false,
			buttons		: {
				Ok		: function() {
					$( this ).dialog( "close" );
				}
			}
		});
	}

});

