I've never used wrap, but I find it implausible that your code would work, even if it didn't contain invalid HTML code.
Here
<div class="block4"</div>
You have garbage html code. Fixing that is step one.
While I've never used jQuery, I'm guessing that the $() function lets you selects elements using CSS selector style, so that #id selects an element with a matching id, i.e. similar to document.getElementById('id'). And while CSS does let you construct selectors like '#id el', since an id attribute value has to be unique across the entire document, using the same id in several places and then trying to select those different elements with a combintion of id and element may or may not work. First off it would depend on what the browser does with multiple ids with the same value. Do they allow them, let the first encountered element keep its id attribute and strip it from the others, or strip it from all offending elements?
But, assuming the browser lets one or all elements retain these invalid id attributes, and moreover also returns an element when you try to retrieve an element by id, how does jquery try to lookup these elements? If they try by document.getElementById('id') first and then checks for matching element type, it might get the first element and when it checks if that element is also of a certain type, it may very well be of another type.
But the reason I doubt this would work even if you fixed these two problem is that you have two sibling elements: span and div. Which one should be wrapped around $(this)? Once again, since I don't know jQuery, it might be that $(this) will be cloned and inserted in each of the siblings, but since functions are supposed to do what the function name implies and the function isn't called cloneWrap(), I doubt this would happen.