Solved.
I used a slightly different script but it now works. I added Transition and Animation lines to the CSS of the rotating element,
transition:2s;
animation:ease-in-out;
Those seemed to have fixed the issue for the jagged spinning, and let me add some easing. Then I used a wrapping function to pass different elements through the function.
<Script>
function rotate (elementID) {
var $rota = $(elementID),
degree = 0,
timer;
function spin() {
$rota.css({ transform: 'rotate(' + degree + 'deg)'}); // rotate element
plusOrMinus = Math.random() < 0.5 ? -1 : 1; // random spin direction
randAngle = Math.floor(Math.random()*70+50) * plusOrMinus; // random degrees
randDelay = Math.floor(Math.random()*1000+2000); //random delay
timer = setTimeout(function() { // set delay
degree += randAngle; // add random degree to current variable
spin(); // loop it
},randDelay);
}
spin(); // start first spin for element
};
rotate ('#square'); // run it
rotate ('#square2'); // run it again
</script>
Here it is at work http://jsfiddle.net/NWLVY/2/