$(document).ready(function(){
	var imageCache = [];
    
    $('.rollover').each(function() {
    
        var imageExt = '';
        
        if ($(this).attr('src').indexOf('.jpg') != -1)
            imageExt = '.jpg';
        else if ($(this).attr('src').indexOf('.gif') != -1)
            imageExt = '.gif';
        else if ($(this).attr('src').indexOf('.png') != -1)
            imageExt = '.png';
            
        imageCache.push($('<img />').attr('src', $(this).attr('src').replace(imageExt, '_rollover' + imageExt)));
        
        $(this).data('rImg', $(this).attr('src').replace(imageExt, '_rollover' + imageExt));
        $(this).data('oImg', $(this).attr('src'));
        
    }).bind('mouseover mouseout', function(e) {
    
        if (e.type == "mouseover")
            $(this).attr('src', $(this).data('rImg'));
        else
            $(this).attr('src', $(this).data('oImg'));
    });
    
    $('.rollover.active').mouseover().unbind();	
});
