﻿$(function () {
    $('.pledgeSupportButton').livequery('click', function () {
        loadPageToClipboard('/Partials/SignPetition');
    });

    $('.miniPledgeSupportButton').livequery('click', function () {
        loadPageToClipboard('/Partials/SignPetition');
    });

    /* The issue */
    $('#readMoreTheIssue').click(function () {
        loadPageToClipboard('/Partials/TheIssueArea');
        return false;
    });

    $('.takeActionButton').livequery('click', function () {
        $('.cb_close').click();
        slideTo(4);
    });
});

function successfulApplication(ajaxContext) {
    alert(ajaxContext.responseText);
    //alert('An error has occurred. Please refresh the page and try again.');
}

function updateSignatures() {
    $.ajax({
        type: 'GET',
        url: '/Signatures/GetCount',
        success: function (data) {
            $('#counter').html(data);
        },
        error: function (x, y, z) {
            alert(x.responseText);
        }
    });
}
