background
Using jQuery for Background Image Animations
Finally, the script to put this altogether is using jquery. The animation needs to run when the user moves their mouse over and out of the navigation.
jQuery maxImage plugin
This plugin will resize and scale targeted images to their max width according to the image ratio, the browser size and some simple options.