This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Text nodes are special in the DOM -- the wrap functions can only work with element nodes. I'd recommend fetching the text contents, creating a new span with those contents, and then replacing the old contents with the new span element.