Tempo fa mi costruii uno scriptino che sostituiva l'alert normale di javascript con una modal di jQuery UI, in modo automatico e senza richiedere nessun cambio nel codice html... magari può tornarti utile

Demo: http://jsbin.com/jazuxubaqo/3/edit?html,js,output

codice:
jQuery.altAlert = function(options) {
    var defaults = {
        title: "Attenzione",
        modal: true,
        resizable: false,
        buttons: {
            "Ok": function() {
                jQuery(this).dialog("close");
            }
        }
    };
    
    jQuery.extend(defaults, options);
    
    delete defaults.autoOpen;
    
    window.alert = function () {
        jQuery("<div />", { html: arguments[0].replace(/\n/, "<br />") }).dialog(defaults);
    };
};


$(function () {
    $.altAlert();
});