function sendVote(){
    var q = $('#question').val();
    var a = $('input[name=rating]:checked').val();
    var nid = q+'/'+a;
    $('#vote').hide();
    $.ajax({
        type: "GET",
        url: "/rating.php?q="+nid,
        dataType: 'text',
        beforeSend: function() {
            $('#ratingBox').hide();
        },
        success: function (data){
            $('#ratingBox').html(data).fadeIn(300);
        },
        error: function(request,error){alert(error);}
    });
}
