Smart Images

These are Smart Images. They know when the mouse gets near them, and they enlarge the closer the mouse gets! The distance is determined by the current center of the image and where the mouse is. Then the distance formula is used to calculate how far apart they are in pixels. You are able to set how far away you want the image to begin enlarging, how big it should enlarge to, and also how small it should shrink back to!

To use this on your images, just set the images "class" attribute to "smart". The script will do the rest! I think it looks better if you set startEnlarge, the variable that holds when the enlarging should begin, to at least 250. Right now it is set to 250. This is great for image links! Check out my JavaScript site at Nick's