Can we switch to angular-ui's $modal? (If we stick with this, please have a nicely-named function that hides the implementation detail of $.extend(true, {}, definition)