We have the following code which seems to work just fine in every browser except IE:
var d = $(\'\'); d.dialog({modal:true});
Perhaps performing the actions on a containment div (as opposed to the content itself) would do the trick. I've never had a problem displaying a a modal div with an animated gif.
var d = $(''); d.dialog({modal:true});