Another solution is to use the title attribute to set the tooltip text if you can.
You could then use the title attribute to set your :after element content, something like this:
<a class="thumbnail" title="Click on thumbnails for larger images"><img src="thumbnail.jpg" /></a>
The best part of this is that you keep the information in the title attribute (which is actually a relevant place for such information), so it will be available to the user regardless of browser features.
Seems I was in too much of a hurry when reading your post, I think I got your problem wrong. Anyways, maybe this will help somehow.