Wrap Element

I've used this on several occasions and thought it might be useful.
Given an HTMLElement or CSS selector and an HTML element type, it will wrap the given element in the newly created element and put it back in the correct place the HTML.