Hi,
You can get this functionality with core javascript or you can use Jquery with proper jquery plugin.
There are lots of plugins to generate this type of functionality.
However, you need to very conscious of cross browser compatibility. Because may time misuse of jquery hangs/slow down the site.
The way I would like to use this:
When users hover the thumnail, it will be bigger and when the user click, it will be shown with 100% size.
If you need in another way, it is also possible.
Regards
Ahsan Habib.