example with jQueryUI dialogbeforeclose trigger (up)