How to implement Netflix like rating using CStarRating

CStarRating is quit useful, but I would like to implement a Netflix like star rating widget. Specifically, I would like to have following features:

  1. if the user has rated the movie, then show his rating with one color (say yellow)

  2. if the user has not rated the movie, then show the average rating of others with another color (say red)

  3. in the above two cases, use can submit his rating (create/update)

  4. user’s rating can only be integer between 1 and 5, while all user’s average rating can be non-integer from 1 to 5 with step 0.1

The key idea is to use different colors of the stars to indicate a user if he has rated the movie or not. Can anyone give me some hints?