$(document).ready(function() {
    $(".rollover a").mouseover(function(){        
        imageSource = $(this).children("img").attr("src");
        matches = imageSource.match(/-over/);
        
        if (!matches) {
            imageSourceOver = imageSource.replace(/.png$/ig, "-over.png");
            $(this).children("img").attr("src", imageSourceOver);
        }
    });

    $(".rollover a").mouseout(function(){
        $(this).children("img").attr("src", imageSource);
    })
});