function cfFeedback(type)
{
    $('#cfTool').html('<b>Dank u.</b><br/>Hoe kunnen we dit nog nuttiger maken voor u?<br/><textarea id="cfFeedback" rows="2" cols="35"></textarea><br/><button id="cfToolSkip">Annuleren</button> <button id="cfToolSend">Verzenden</button>');

    $('#cfToolSend').click(function(){
        _gaq.push(['_trackEvent', 'Feedback', document.location.pathname, type + ': ' + $('#cfFeedback').val().substring(0, 100)]);
        $('#cfTool').html('<b>Dank u.</b>');
    });

    $('#cfToolSkip').click(function(){
        $('#cfTool').remove();
    });
}

window.onload = function ()
{
    if (typeof jQuery != 'undefined') {

        if($('#cfTool')) {
            $('#cfTool').html('<p>Was dit nuttig?</p><button id="cfToolJa">Ja</button><button id="cfToolNee">Nee</button><button id="cfToolBeetje">Een beetje</button>');

            $('#cfToolJa').click(function(){
                _gaq.push(['_trackEvent', 'Beoordeling', document.location.pathname, 'Ja']);
                //cfFeedback('Ja');
                $('#cfTool').html('<b>Dank u.</b>');
            });

            $('#cfToolNee').click(function(){
                _gaq.push(['_trackEvent', 'Beoordeling', document.location.pathname, 'Nee']);
                cfFeedback('Nee');
            });

            $('#cfToolBeetje').click(function(){
                _gaq.push(['_trackEvent', 'Beoordeling', document.location.pathname, 'Een beetje']);
                cfFeedback('Een beetje');
            });
        }
    }
}
