/* jQuery domroll Modifies all image elements with a "domroll" class. Appends "_f2" to the source filename to create a roll-over image. Idea based on http://www.dynamicdrive.com/dynamicindex15/domroll.htm Requires jQuery and jQuery.Preload http://flesler.blogspot.com/2008/01/jquerypreload.html */ $(function(){ $.preload('.domroll', {find:/\.([^\.]+)$/, replace:'_f2.$1'}); $('.domroll').hover(function(){this.src = this.src.replace(/\.([^\.]+)$/,'_f2.$1');},function(){this.src = this.src.replace('_f2','');}); });