Reveal requires markup to be a direct child of the body element for proper positioning

If modal content is contained within other elements, the layout and positioning of the modal has the potential to be affected by the containing content.  In order to avoid this, modals must be created as direct children of the body element.

However, if someone doesn't catch this issue, they could spin their wheels for a while trying to figure out what was going on.  Additionally, certain server-side techniques for code sharing (such as partials and master pages in ASP.NET MVC) make getting these placed within the body tag more difficult.

We can make this much simpler for the user by automatically detaching modal content that isn't a direct child of body and appending it to body during opening of the modal and then put it back in place when it's closed.