This script no longer works due to changes in the XML used by YouTube. In addition YouTube has since added support for annotations in embedded videos, hopefully an API for accessing those will follow at some point.
YouTube recently added an annotation feature, but at the moment it's still beta and annotations only show up on youtube.com (and not on embedded videos).
This is a quick and dirty attempt at accessing and using the newly added YouTube annotations with Javascript and embedded videos.
It is still being worked on, so tread carefully.
An AppJet proxy application is used to get the annotation XML (which is available here) and turn it into JSON data.
A timer checks with a short interval if there are any annotations that need to be displayed or removed and fires an event accordingly. The interesting stuff all happens in here: annotation.js.
The script adds a hidden form field which is updated with the current annotation text every time an annotation is added or removed. This supposedly helps screen readers know that something changed, but I'm not sure how to handle multiple overlapping annotations, since you wouldn't want the same text read again just because a second annotation is shown. Maybe it needs a whole bunch of form fields?