$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('
});;
});
Here is the var you add to the img

Here is the original link
http://www.selfcontained.us/2008/03/08/simple-jquery-image-rollover-script/