+ space("#latest", package.latest, 96);
+
+ $.xhr(capi + 'package/' + idc, 'GET', {}, null, {
+ success: function (value) {
+ value = eval(value);
+
+ if (typeof value.notice == "undefined")
+ $(".notice").addClass("deleted");
+ else
+ $("#notice-src").src(value.notice);
+
+ 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");
+ }
+ });
+
+ $("#settings").href("cydia://package-settings/" + idc);
+
+ var mode = package.mode;
+ if (mode == null)
+ $(".mode").addClass("deleted");
+ else {
+ $("#mode").html(cydia.localize(mode));
+ $("#mode-src").src("Modes/" + mode + ".png");
+ }
+
+ var warnings = package.warnings;
+ var length = warnings == null ? 0 : warnings.length;
+ if (length == 0)
+ $(".warnings").addClass("deleted");
+ else {
+ var parent = $("#warnings");
+ var child = $("#warning");
+
+ for (var i = 0; i != length; ++i) {
+ var clone = child.clone(true);
+ clone.addClass("inserted");
+ parent.append(clone);
+ clone.xpath("./div/label").html($.xml(warnings[i]));
+ }
+
+ child.addClass("deleted");
+ }
+
+ var applications = package.applications;
+ var length = applications == null ? 0 : applications.length;
+
+ var child = $("#application");
+
+ /*if (length != 0) {
+ var parent = $("#actions");
+
+ for (var i = 0; i != length; ++i) {
+ var application = applications[i];
+ var clone = child.clone(true);
+ parent.append(clone);
+ clone.href("cydia://launch/" + application[0]);
+ clone.xpath("label").html("Run " + $.xml(application[1]));
+ clone.xpath("img").src(application[2]);
+ }
+ }*/
+
+ child.addClass("deleted");
+
+ var commercial = package.hasTag('cydia::commercial');
+ if (!commercial)
+ $(".commercial").addClass("deleted");
+
+ var _console = package.hasTag('purpose::console');
+ if (!_console)
+ $(".console").addClass("deleted");