(function () {
    
    this.sparks.ui = {};
    
    sparks.ui.alert = function (title, msg) {
        var e = $('<div>' + msg + '</div>').attr('title', title);
        e.dialog({ dialogClass: 'alert', modal: true });
    };
    
})();

(function () {
    
    this.sparks.ui = {};
    
    sparks.ui.alert = function (title, msg) {
        var div = $('<div>' + msg + '</div>').attr('title', title);
        var okButton = $('<button>OK</button>)').button().addClass('dialog_button');
        okButton.click(function (event) {
            div.dialog('close');
        });
        div.append($('<p />')).append(okButton);
        div.dialog({ dialogClass: 'alert', modal: true });
    };
    
})();

Add OK button to the "invalid answer" dialog
Add OK button to the "invalid answer" dialog
