That's it! Now all Wowhead item links have tooltips.
If you want to jazz the links up a little by making them show up in the appropriate color, you can put "class=q#" in the <a> tag, where # is the number of the quality level of the item: 5 for legendary, 4 for epic, and so on down the scale. As an example, the code for the Arcanite Steam Pistol link above looks like this:
<a class="q4" href="http://www.wowhead.com/?item=29949">Arcanite Steam Pistol</a>
But your tooltips will still work if you don't want to bother with the class attribute; the links will just all be the same color. Now you too can be powered by Wowhead!