$(document).ready(function() {
	$('.voteLink a').click(function() {
		if($(this).attr('href') != '/userLogin.php') {
				var num = parseInt($('#votes'+this.id).text()) + 1 + "";
			$('#votes'+this.id).fadeOut('slow', function() {
				   $(this).text(num);
			}).fadeIn('slow');
			$(this).parents('span').remove();
			$.post('/ajaxRequests/eventVote.php', {'eventId' : this.id, 'userId': 	parseInt($(this).parent('span').attr('id')) });
			return false;
		}
	 });
});