position dialog when it's shown, not when it's initialized

This way you can attach it to $(this) ! and apply to multiple
elements.