$(window).load(function(){ $("") .each(function(i, o) { var TheImage = $(this).children("img"); $(this) .css({"display": "block", "position": "relative"}) .append('
') ; }) .mouseover(function(e) { $(this).children(".rolloverlayer").show(); }) .mouseout(function(e) { $(this).children(".rolloverlayer").hide(); }) ; });