How can I pass a parameter to the open event of a dialog?
<p>I have the following function:</p>

<pre><code>(function ($) {
    $.fn.createCommonDialog = function () {
        this.dialog({
            autoOpen: false,
            modal: true,
            resizable: false,
            draggable: true,
            height: 'auto',
            width: 875,
            buttons: {
                "Submit": function () {
                    tinyMCE.triggerSave();
                    $("#update-message").html('');
                    $("#menuForm").submit();
                },
                "Cancel": function () {
                    $(this).dialog("close");
                }
            },
            open: function (event, ui) {
                tinyMCE.init(window.tinyMCEOptions);
                $('.ui-dialog-buttonpane').
                    find('button:contains("Submit")').button({ icons: { primary: 'ui-icon-plus'} });
                $('.ui-dialog-buttonpane').
                    find('button:contains("Cancel")').button({ icons: { primary: 'ui-icon-cancel'} });
                $("#dialog_type").wijdropdown();
                $("#dialog_select").wijdropdown();
                $(":input[type='text'],:input[type='password'],textarea").wijtextbox();
            }
        });
    };
})(jQuery);
</code></pre>

<p>I create the dialog in one part of the code:</p>

<pre><code>    $('#commonDialog').createCommonDialog();
</code></pre>

<p>later I call the open event:</p>

<pre><code>    var dialogDiv = $('#commonDialog');
    dialogDiv.dialog('option', 'title', 'Editing: ' + viewID);
    dialogDiv.dialog('open');
</code></pre>

<p>Is there some way I can pass a parameter as part of the open call?</p>

<p>Alternatively could I check the value of the 'title' option from within the open event?</p>
