$(document).ready(function(){
 $("#voting_form").submit(function(){
  var answerId;
  var questionId;
  var ajaxtype;
  answerId = jQuery('#voting_form input:radio:checked').val();
  questionId=$("#QuestionId").val();
  ajaxtype="vote";
  $.ajax({
       type: "POST",
       data: "formType="+ajaxtype+"&questionId="+questionId+"&answerId="+answerId,
       url: "Includes/ajax.php",
       success: function(msg)
       {
		  // $("#vote").html("");
		  // $("#vote").html("<h2>"+msg+"</h2>");
		  $("#vote").slideUp();
		  $("#vote-view2").slideDown();
		  $("#vote-view2").html(msg);
       }
      });
  //alert(answerId);
  return false;
								   })
						  
})
