jQuery.fn.rollover = function(preload) {
    this.filter(':not([src*="ro."])').each(function() {
        var a = this.src, b = this.src.replace(/\.(\w+(\?[^$]*)?)$/, 'ro.$1');
        $(this).hover(function() { this.src = b; }, function() { this.src = a; });
        if (preload) {
            var i = new Image;
            i.src = b;
        }
    });
    return this;
};


$(document).ready(function() {
   $('.rollimg').rollover(true);
  
   
});
