I'm toying with jQuery UI, and I like how this demo works: http://jqueryui.com/demos/dialog/#modal-message
However, when a dialog comes up, the only way to close it is to click one of the interface buttons inside the dialog - how could I extend this to close any/a given dialog when the user clicks on the background layer covering up the page?
I saw where users can hit "escape", but frankly I don't think most users will think to do this (I didn't until I saw it as an option), however it might occur to them to click away from the message.
Is there an event/option I'm missing that I can tap into?