- var rating = package.rating;
- if (rating == null)
- $(".rating").remove();
- else {
- $.xhr(rating, 'GET', {}, null, {
- success: function (value) {
- document.getElementById("rating").contentWindow.document.write(value);
+ $.xhr(cache(api + 'package/' + idc), 'GET', {}, null, {
+ success: function (value) {
+ value = eval(value);
+
+ if (typeof value.rating == "undefined")
+ $(".rating").addClass("deleted");
+ else {
+ $("#rating-load").addClass("deleted");
+ $("#rating-href").href(value.reviews);
+
+ var none = $("#rating-none");
+ var done = $("#rating-done");
+
+ if (value.rating == null) {
+ none.css("display", "block");
+ } else {
+ done.css("display", "block");
+
+ $("#rating-value").css('width', 16 * value.rating);
+ }