example with jQueryUI dialogbeforeclose trigger