$(function(){
    //rollover
    var aArr   = $("a");
    var imgArr = $("img");
    for (var i = 0; i < imgArr.length; i++) {
        if (imgArr[i].getAttribute("src").match("_off.")) {
            imgArr[i].onmouseover = function() {
                $(this).stop().animate(
                                    {opacity:0.8}, 
                                    {queue : true, duration : "fast", easing : "swing", 
                                        complete : function () {
                                            $(this).attr("src", this.getAttribute("src").replace("_off.", "_on."))
                                        }
                                    });
                //$(this).stop().animate({opacity:1}, "normal");
            }
            imgArr[i].onmouseout = function() {
                $(this).stop().animate(
                                    {opacity:1}, 
                                    {queue : true, duration : "fast", easing : "swing", 
                                        complete : function () {
                                            $(this).attr("src", this.getAttribute("src").replace("_on.", "_off."))
                                        }
                                    });
                //$(this).stop().animate({opacity:1}, "fast");
            } 
        }
    }
});
