add the stuff below to the IMG tag of any image class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)"