This is tricky isn't it ?
Using CSS would seem to be out as you would need to alter the css for each post that you wanted the effect and keep the modification there for archive views. So your css file gets larger. Not good.
Using js would seem to be the way to go as you can include the main function in the <head> , but if you include the necessary code in a post, will it function ? And if it does, again, how will an archive view that involves multiple use of the function work ?
It would certainly need a different variable name in each case - though using the filename is a way to do this.
The only image rollover I've used is over at http://www.abody.co.uk/feature/index.html (View Source) but I'm not sure how - if at all - that could be split into a workable solution.
There has to be a PHP solution to this !