function RotateText(id) {
	$(id).find(".show").each(function() {
		var e = $(this)
		if (e.next().text() != "") {
			e.fadeOut("slow", function() {
				e.next().fadeIn("slow", function() {
					e.removeClass("show");
					e.addClass("hide");
					e.next().removeClass("hide");
					e.next().addClass("show");
				});
			});
		}
		else {
			e.fadeOut("slow", function() {
				e.parent().find(".chunk").first().fadeIn("slow", function() {
					e.removeClass("show");
					e.addClass("hide");
					e.parent().find(".chunk").first().removeClass("hide");
					e.parent().find(".chunk").first().addClass("show");
				});
			});
		}
	});
}

function TimedEvents() {
	$(document).everyTime(7000, function() {
		RotateText(".sp_results");
	});
}

$(function() {
	$("#feeds").hover(function() {
		$(document).stopTime();
	},
	function() {
		TimedEvents();
	});
	$(document).ready(function() {
		$(".sp_results").each(function() {
			$(this).find(".chunk").first().removeClass("hide");
			$(this).find(".chunk").first().addClass("show");
		});
		TimedEvents();
	});
});

