Does anyone know where I can find a tutorial or the math to create this effect.
You have a small image and a large zoomed in image. The large Image is masked out only showing a small part. I want when the user moves their mouse over the small image it moves the large image around in the mask matching the mouses position on the small image. So it looks like the small image is showing a magnified version when the mouse is moving around on it.

Its used in plenty of clothing shots to show a larger version.

Thanks