Two design patterns which allow you to swap out javascript confirm() in favor of $.jQuery.dialog()