function action_dialog(action, module) {
    var msg = "{msg_install}";
    if (action != "install") {
        msg = "{msg_uninstall}"
    }
    $("#action_dialog").html(msg + module + "?").dialog({
        resizable: false,
        modal: true,
        buttons: {
            "Ok": function() {
                window.location = '/{admin_page}/mconfig/installer/' + module + '/' + action;
            },
            Cancel: function() {
                $(this).dialog("close");
            }
        }
    });
}
$(function() {
    $("div.wrapper").addClass("modules-install");
    $("button.install").click(function() {
        action_dialog("install", $(this).attr("rel"))
    });
    $("button.remove").click(function() {
        action_dialog("uninstall", $(this).attr("rel"))
    });
});