there are actually a few companies that do that. that one is vibrant obviously.
its just javascript that phones home to a central server, like adsense for example, that analyzes the content of the page, and then modifies the DOM via JS. no ajax really. Actually perks, XRPC thread is a starting point for getting around the cross domain security policies that make it a little more complicated than just whipping up a JS that phones home.
http://www.perkiset.org/forum/ajax/it%E2%80%99s_time_to_dump_xmlhttprequest-t336.0.htmlother than that, the details are for you

but really its not that big a deal i think. never done it, but easy enough i would assume. can even do the whole thing client side, in JS, and then just phone home with the top 5 most common words, depending on how your ad system would work.
devil is in the details, but the general idea is, JS on page which phones home with the content of the page (or derived info), via XRPC, and then you write back, via JS, wrappers for the words you want to advertise on. <div onmouseover="magicadpopupfunction()">someawesomeword</div>
might be an interesting exercise actually... hmmm maybe I will tinker with this when I get a chance, which might be a while... lol