var newHot = {}; var showHotFlag = false;
function getHot(dir) {
	newHot = {}; showHotFlag = false;
	$.browser.msie ? $(".features-text").slideUp("normal", showHot) : $(".features-text").fadeOut("normal", showHot);
	$.getJSON("/json" + topicURL + "?hot=" + $(".features-text").attr("id").substring(4) + "&dir=" + dir, function(data) { newHot = data.hot; showHot(); });
	return false;
}

function showHot() {
	if (showHotFlag) {
		if (!newHot.error) {
			$(".features-text").attr({ "id": "hot_" + newHot.id });
			$(".features-text *").remove();
			
			$("<h2 />").html(newHot.title).appendTo($(".features-text"));
			if (newHot.annotation) { $("<p />").attr({ "class": "b-feature-text" }).html(newHot.annotation).appendTo($(".features-text")); }
			$("<a />").attr({ "href": newHot.url }).appendTo($("<p />").attr({ "class": "learn-more" }).appendTo($(".features-text")));
		}
		$.browser.msie ? $(".features-text").slideDown("normal") : $(".features-text").fadeIn("normal");
	}
	else {
		showHotFlag = true;
	}
}