
function likeBlogPost(item) {
	if(!$(item).hasClass("blogPostLikesOn")) {
	
		currentScore = $(item).html();
		$(item).html("GOT IT&nbsp;&nbsp;" + (parseInt(currentScore)+1));
		$(item).removeClass("blogPostLikes").addClass("blogPostLikesOn");
		
		itemId = $(item).attr("alt");
		$(item).attr("title","GOT IT");
		$(item).attr("score",(parseInt(currentScore)+1));
		
		$.ajax({
			type: "POST",  
			url: "actions.php?action=likeBlogPost&id="+itemId,
			success: function(msg) {
				
			}
		});
		
	} else {
		currentText = $(item).attr("title");
		currentValue = $(item).attr("score");
		
		if(currentText == "GOT IT") {
			newText = "YUP";
		} else if(currentText == "YUP") {
			newText = "THANKS";
		} else if(currentText == "THANKS") {
			newText = "GOT IT";
		}
		
		$(item).html(newText + "&nbsp;&nbsp;" + currentValue);
		
		$(item).attr("title",newText);
	}
}