Refactored version of Cabel Sasser's "FancyZoom" script.