
function ihsdSubmit() {
	var text = $('#ihsd_submit_text').val();
	var nickname = $('#ihsd_submit_nickname').val();
	var tags = $('#ihsd_submit_tags').val();
	var gender = $('input[name=ihsd_gender]:checked').val(); 
	
	if (text.length == 0) {
		$('#ihsd_error').html('You must provide text for your IHSD post!').css({display: 'block'});
		return false;
	}
	else if (nickname.length == 0) {
		$('#ihsd_error').html('You must provide a nickname for your IHSD post!').css({display: 'block'});
	}
	
	$.post("/ihsd/post", { "text": text, "nickname": nickname, "gender": gender, "tags": tags },
	function(data){
		$('#ihsd_form_area').html('<center><h1>Thanks for your post!</h1> <br> We will review and post it shortly!  Check back soon!</center>');
	});

	
	return true;	
}

function vote(direction, id){
	$('#' + id + '_' + direction).fadeOut("slow");
	$.post("/ihsd/vote", { "direction": direction, "id": id },
	  function(data){
		$('#' + id + '_' + direction).html(data);
		$('#' + id + '_' + direction).fadeIn("slow");
	  }		
	);	
}