﻿function castVote()
{
	
	var val = $("input:radio[name='voting']:checked ").val();
	if(!isNaN(val))
	{
		$(".ballotBox").slideUp();
		JackLinks.Voting.CastVote(val, castVote_callback);
	}
}

function castVote_callback(res)
{
	if (res.error && res.error.Message != 'Unknown')
	{
		alert($(res.error).attr("Message"));
	}
	else
	{
		$(".votingResults").html(res.value);
	}
}
