﻿$(document).ready(function() {


    $(":button").click(function() {
        var id = $(this).attr("id");
        trackEvent(id, 'clicked');
    });

    $(":submit").click(function() {
        var id = $(this).attr("id");
        trackEvent(id, 'clicked');
    });


    $('#time').blink({ delay: 1000 });

    /*$('#time').animate({
    opacity: 0.1
        
    }, 1000, function() {
    // Animation complete.
    });*/

});


function trackEvent(id, event) {

    _gaq.push(['_trackEvent', id, event]);
}

function verifyRecaptha() {
    challengeField = $("#recaptcha_challenge_field").attr("value");

    responseField = $("#recaptcha_response_field").attr("value");

    /*alert("challengeField: " + challengeField + "\nresponseField" + responseField);*/



    $.post("recapthca.ashx", { remoteip: $('hidRemoteHidden').attr("value"), challenge: challengeField, response: responseField },
   function(data) {
    if (data == "true") {
        //$.sha256($('#ex1_source'));
        $("#aspnetForm").submit();
       }
       else {
           var fields = data.toString().split(",");

           alert(fields);
           showRecaptcha('captchadiv');

           return false;
       }

   });


}
