function rollover() {  
if(document.getElementsByTagName) {
var images = document.getElementsByTagName("img");
for(var i=0; i < images.length; i++) {
if("ro"==images[i].getAttribute("classname") || "ro"==images[i].getAttribute("class")){
images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1$2"));
}
}
}
}
}
if(window.addEventListener){
window.addEventListener("load", rollover, false);
}
else if(window.attachEvent) {
window.attachEvent("onload", rollover);
}
function rolloverInput() {
if(document.getElementsByTagName) {
var images = document.getElementsByTagName("input");
for(var i=0; i < images.length; i++) {
if("ro"==images[i].getAttribute("classname") || "ro"==images[i].getAttribute("class")){
images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1$2"));
}
}
}
}
}
if(window.addEventListener) {
window.addEventListener("load", rolloverInput, false);
}
else if(window.attachEvent) {
window.attachEvent("onload", rolloverInput);
}
$(function(){
    $("img.ro").each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"))
    })
});
$(function(){
    $("input.ro").each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"))
    })
});


