call dialog() with default option.

call dialog() with default option.

Hi.
First, I apology I'm not sure this question is only for jquery-ui or
Javascript matter.
I'd like to use dialog() function in many pages. The code of
Javascript will be following.
----------------------
$('<div title="ERROR"></div>')
.text('Error message')
.dialog({
modal: true,
buttons: {
"Close": function() {
$(this).dialog("close");
}
}
});
----------------------
I want to override default parameter of the function to avoid writing
similar codes.
After overriding the parameter, I think I can call the function with
following code.
----------------------
$('<div title="ERROR"></div>')
.text('Error message')
.dialog();
----------------------
Best regards.
--