actually you can have a single class and assign it to either, the text
link or image thumbnail (or both)
$("a.launch_fancybox").fancybox();
your html:
<a class="launch_fancybox">Open the image in modal box</a>
and/or
<a class="launch_fancybox"><img src="my_image_thumbnail.jpg" /></a>