Take an image
<img src="image.jpg" alt="" />
We want to wrap a link around it using jQuery
$('img').wrap('<a href="http://www.google.co.uk"/>')
Which will result in
<a href="http://www.google.co.uk"/> <img src='image.jpg' alt=''/> </a>