﻿$(function() {

    // dynamically preload over images
    jQuery(".Rollover").each(
        function() {
            jQuery("<img>").attr("src", AddOver(this.src));            
        }
    );

    // setup rollover actions
    jQuery(".Rollover").hover(
    function() {
        if (this.src.search("_Over") < 0) {
            this.src = AddOver(this.src);
        }
    },
    function() {
        this.src = this.src.replace("_Over", "");
    });
});

function AddOver(i) {
    return i.replace(".gif", "_Over.gif");
}