/*
Attempts to retrieve and display more recommended content if the user 
decides to ignore any recommended content currently being displayed.
*/
function updateRecommendations(el) {
	var element = el;
	jQuery.getJSON("/cross-linking/update-recommendations/"+element.attr("id").split("_")[1]+"/"+jQuery("#rec_ids").attr("class").split("_")[1]+"/", function(data) {
		if (data["content_found"]) {
			element.parent().children(".rec-link").text(data["title"]);
			element.parent().children(".rec-link").attr("title", data["title"]);
			element.parent().children(".rec-link").attr("href", data["href"]);
			element.attr("id", "rec_"+data["rec_id"]);
			jQuery("#rec_ids").attr("class", "recs_"+data["rec_ids"]);
		} else {
			jQuery("#rec_ids").attr("class", "recs_"+data["rec_ids"]);
			element.parent().remove();
		}
	})
}
