(This is an offshoot of, to allow Fivestar to work in a Thickbox.)
1. The JS portion does $('...').rating() to kick in the pyrotechnics. However, no protection against multiple calls is in place. A 'guard class', e.g. 'jsrating-processed', should be used --as is done in any other place in Drupal.
2. Currently, the JS code uses "$(document).ready(...)". It should instead use "Drupal.behaviors".
(Preferably, we should use some simple logic to make the code run on D5 as well; We don't want to maintain two versions of 'jquery.rating.js'.)