﻿$(function() {
    $("span.helpful a").click(function() {
        $.ajax({
            type: "POST",
            url: "/faqs.ashx?id=" + $(this).parent().parent().attr('id') + "&answer=" + $('input:radio[name=helpful]:checked').val() + "&feedback=" + $(this).parent().find('input[name$="why"]').val(),
            data: {},
            success: function(msg) {
                $(this).parent().html("<strong>Thank you for your input!</strong>");
            }
        });

        $(this).parent().html("<strong>Thank you for your input!</strong>");
    });
});

