$(document).ready(function(){

	var bouncespeed = 400;
	
	// SELECT ALL A'S EXCEPT... RESET BG-POSITION TO AVOID INITIAL POSITION BUG AND CALL BOUNCER
	$('.rimbalzo').each(
		function () {
			$(this).css({backgroundPosition: '3px 3px'});
			bounce(this);
		}
	);
	
	// ACTUAL BOUNCER. CALLBACK OF ANIMATION IS THE BOUNCER ITSELF, TO LOOP ALL NIGHT LONG
	function bounce(currentA) {
		newx = Math.floor(5*Math.random());
		newy = Math.floor(5*Math.random());
		newspeed = bouncespeed + Math.floor(100*Math.random());
		$(currentA).animate({backgroundPosition: newx + 'px ' + newy + 'px'}, newspeed, 'linear', function() { bounce(currentA);});
	}
	
});
