+ space("#latest", package.latest, 96);
+
+ $.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);
+ }
+ }
+
+ if (typeof value.icon != "undefined" && value.icon != null) {
+ var icon = $("#icon");
+ var thumb = $("#thumb");
+
+ icon[0].className = 'flip-180';
+ thumb[0].className = 'flip-360';
+
+ thumb.css("background-image", 'url("' + value.icon + '")');
+
+ setTimeout(function () {
+ icon.addClass("deleted");
+ thumb[0].className = 'flip-0';
+ }, 2000);
+ }
+ },
+
+ failure: function (status) {
+ $(".rating").addClass("deleted");
+ }
+ });