$(document).ready(function() {

    var overlays = $("div.overlay"); // selects all divs with class "overlay"
    var fadeTime = 125; // the time it takes to run the fade in milliseconds
    var fadeOpacity = 0.75; // the desired opacity of the overlay images

    overlays.fadeTo(0, 0); // This sets the opacity to be initially totally transparent
    overlays.hover(function(){
	$(this).fadeTo(fadeTime, fadeOpacity); // This should set the opacity to desired on mouseover
    },function(){
	$(this).fadeTo(fadeTime, 0.0); // This should set the opacity back to 0 on mouseout
    });

});

$(window).unload(function() {
   $("div.overlay").fadeTo(50,0);
});