User:Najzere/spoilerimage.js

$(document).ready(function { $('div.spoilerimage').each( function { var spImage=$(this).find('img').first; $(this).css({     width: spImage.css('width'),      height: spImage.css('height'),      background: "url('http://cdn.wikimg.net/strategywiki/images/6/60/NajzereTestSpoilerImage.png') repeat"    }); spImage.css('display','none'); $(this).attr({     onMouseOver: '$(this).find("img").first.css("display","")',      onMouseOut: '$(this).find("img").first.css("display","none")'    }); }); });