$(document).ready(function() {
    
    // Preload all rollovers
    $("#ppsp img").each(function() {
        // Set the original src
        rollsrc = $(this).attr("src");
        rollON = rollsrc.replace(/.png$/ig,"_over.png");
        $("<img>").attr("src", rollON);
    });
    
    // Navigation rollovers
    $("#ppsp a").mouseover(function(){
        imgsrc = $(this).children("img").attr("src");
        matches = imgsrc.match(/_over/);
        
        // don't do the rollover if state is already ON
        if (!matches) {
        imgsrcON = imgsrc.replace(/.png$/ig,"_over.png"); // strip off extension
        $(this).children("img").attr("src", imgsrcON);
        }
        
    });
    $("#ppsp a").mouseout(function(){
        $(this).children("img").attr("src", imgsrc);
    });
    

});
