/**
* Rollover effect, changes element's src attribute on hover, e.g.:
*
* image.png?foo=bar => image_over.png?foo=bar
*
* Pass true to preload images.
*/
jQuery.fn.rollover = function(preload) {
    this.filter(':not([src*="_over."])').each(function() {
        var a = this.src, b = this.src.replace(/\.(\w+(\?[^$]*)?)$/, '_over.$1');
        $(this).hover(function() { this.src = b; }, function() { this.src = a; });
        if (preload) {
            var i = new Image;
            i.src = b;
        }
    });
    return this;
};