Hey all i need some help with finding out how i can SET the star rating in this code:
Code:
//hook up the click event
      star.click(function() {
        //When clicked, fire the 'ratingchanged' event handler.  Pass the rating through as the data argument.
        elements.triggerHandler("ratingchanged", {rating: this.rating});
        containerElement.rating = this.rating;
      });
The code works fine if i move my mouse over the stars and click. After doing that it sets the stars number. What i want to do is set it automatically when the page loads.

How can i call those two functions from my page to set the stars?

I've tried:
Code:
$(document).ready(function() {
     $('#raing-1').ratings(7).bind('ratingchanged', function(event, data) {
     //alert(data.rating);
     elements.triggerHandler("ratingchanged", {rating: 2});
     containerElement.rating = 2;
});
});
But it doesnt set anything.

Any help would be great!

David