This was discussed and dismissed previously because no official API was provided, but an API does exist for automatic hover over images and links. The Wizards published API service called AutoCard Window would be a great start. Here is a quote that would seem to answer any questions about legality. (My emphasis)
Keep in mind that moving these images anywhere off of our servers is still a violation however, by having us host the images and using our function to access them, you are in the clear.
This functionality should not auto-link the terms but rather be used by specific syntax or markup. With so many Magic cards in existence, a lot of common terms would get linked accidentally if it were automatic.
Btw, ghoppe pointed this out