$(document).ready(function() {
    $('form').each(function() {
        this.reset();
    });
	
	//homepage sign the petition form
	$("#frmSignPetition #txtFirstName").focus(function() {
        if($(this).val() == 'YOUR FIRST NAME') {
            $(this).val('');
        }
    }).blur(function() {
        if($(this).val() == '') {
            $(this).val('YOUR FIRST NAME');
        }
    });
	
	$("#frmSignPetition #txtLastName").focus(function() {
        if($(this).val() == 'YOUR LAST NAME') {
            $(this).val('');
        }
    }).blur(function() {
        if($(this).val() == '') {
            $(this).val('YOUR LAST NAME');
        }
    });

	//some other form...
    $('form#getemail input#getemail_email').click(function() {
        if($(this).val() == 'YOUR EMAIL ADDRESS') {
            $(this).val('');
        }
    }).focus(function() {
        if($(this).val() == 'YOUR EMAIL ADDRESS') {
            $(this).val('');
        }
    }).blur(function() {
        if($(this).val() == '') {
            $(this).val('YOUR EMAIL ADDRESS');
        }
    });
    $('form#getemail input#getemail_confirm').click(function() {
        if($(this).val() == 'CONFIRM EMAIL ADDRESS') {
            $(this).val('');
        }
    }).focus(function() {
        if($(this).val() == 'CONFIRM EMAIL ADDRESS') {
            $(this).val('');
        }
    }).blur(function() {
        if($(this).val() == '') {
            $(this).val('CONFIRM EMAIL ADDRESS');
        }
    });

    $('a#shownowplease').click(function() {
        $(this).parent().hide();
        $('div#nowplease').show();
        return false;
    });

    $('#partnerorg').click(function() {
        $('#orgrow').toggle();
        $('#orgrow input').toggleClass('validate[required] wide');
        if($('#orgrow').css('display') == 'none') {
            $.validationEngine.closePrompt('#getinvolved_organization');
        }
    });

    $('div.signmeup').click(function() {
        var id = $(this).attr('id');
        $(this).toggleClass('checked');
        $('#' + id + 'sml').toggleClass('checked');
        if($('#' + id + 'chk').is(':checked')) {
            $('#' + id + 'chk').removeAttr('checked');
        }
        else {
            $('#' + id + 'chk').attr('checked', 'checked');
        }
    });

});