IMG = {};
 
IMG.ImageRollover =
{
     init: function()
     {
        this.preload();
 
        $(".rOver").hover(
           function() 
           { 
                $(this).attr( 'src', IMG.ImageRollover.HoverImg($(this).attr('src'))); 
           },
           function() 
           { 
                $(this).attr( 'src', IMG.ImageRollover.NormalImg($(this).attr('src'))); 
           }
        );
     },
 
     preload: function()
     {
        $(window).bind('load', function() 
        {
           $('.rOver').each( function(key, elm) 
           { 
                $('<img>').attr('src', IMG.ImageRollover.HoverImg( $(this).attr('src'))); 
           });
        });
     },
 
     HoverImg: function(src) 
     { 
        return src.substring(0, src.search(/(\.[a-z]+)/)) + '_over' + src.match(/(\.[a-z]+)/)[0]; 
     },
     NormalImg: function(src)
     { 
        return src.replace(/_over/, ''); 
     }
};

