Replacing alert and confirm dialog to JQueryUI