The easiest way would be to use JavaScript to detect the hover, and on hover in/out add/remove a "hover" or "active" class. CSS can then use .rating-star.hover
or similar instead of :hover
. This way you can use JavaScript to just apply the class of your choice to the apt number of stars when none of them are being hovered over.
Clear as mud?