You can now have as many images as you like:
Code:
<script type="text/javascript">
jQuery(function($){
var wtimer, wstate = 0, wisdown,
venusim = ['venusfback.png',
'venusfbackmoving1.png',
'venusfbackmoving2.png'],
$venus = $('#venusimage');
$.each(venusim, function(i, im){
i && $(new Image()).attr('src', im);
});
function changevenusimage(){
$venus.attr('src', venusim[(++wstate) % venusim.length]);
wtimer = setTimeout(function(){changevenusimage();}, 500);
}
$(document).on('keydown keyup', function(e){
if(String.fromCharCode(e.keyCode).toUpperCase() !== 'W'){return;}
if(e.type === 'keyup'){clearTimeout(wtimer); wisdown = wstate = 0; $venus.attr('src', venusim[0]); return;}
if(!wisdown){changevenusimage(); wisdown = true;}
});
});
</script>
Bookmarks