0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
} else {
Bloomerang.Donation
.amount(amount)
.fundId(val(«.donation-form #fund»))
.note(val(«.donation-form #comment»))
.applyDonationCustomFields();

// Need to do a null-check here because they might have a cached version of Bloomerang-v2.js
if (Bloomerang.Donation.trueImpactEnabled && Bloomerang.Donation.trueImpactUsed) {
Bloomerang.Donation
.trueImpactEnabled(jQuery(«.donation-form .true-impact .fee-amount»).length > 0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
}

if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked»)) {
Bloomerang.Eft
.accountNumber(val(«.donation-form #accountNumber»))
.routingNumber(val(«.donation-form #routingNumber»))
.type(jQuery(«#donation-form .section.payment input[type=’radio’]:checked»).attr(«id»));
}
};
Bloomerang.ValidateDonationFormCaptcha = function() {
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
var captchaResponse = grecaptcha.getResponse(jQuery(«.donation-form»).data(«captcha-id»));
if (captchaResponse) {
jQuery(«.donation-form .noCaptchaResponseError»).hide();
Bloomerang.captchaResponse(captchaResponse);
return true;
} else {
jQuery(«.donation-form .noCaptchaResponseError»).show();
return false;
}
} else return true;
};
Bloomerang.scrollToElement = function(element) {
var distance = 100;
var offset = element.offset().top;
var offsetTop = offset > distance ? offset – distance : offset;
jQuery(‘html, body’).animate({ scrollTop : offsetTop}, 500);
};
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess = function (response) {
jQuery(«#donation-processing-container»).hide();
var formContainer = jQuery(«#donation-form-container»);
formContainer.show();
formContainer.html(successHtml3574784);
Bloomerang.scrollToElement(formContainer);
};
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError = function (response) {
jQuery(«.btn-submit-donation»).prop(«disabled», false).removeClass(«disabled»);
if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked») ||
Bloomerang.Api.ProcessorType === «StripeConnect») {
jQuery(«.btn-submit-donation»).val(«Donate»);
} else {
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
jQuery(«#donation-form-container .errors»).removeClass(«hidden»).html(response.Message);
jQuery(«#donation-processing-container»).hide();
jQuery(«#donation-form-container»).show();
Bloomerang.scrollToElement(jQuery(«#donation-form-container .errors»));
Bloomerang.cancelFinancialSubmission(jQuery(«#donation-form»));
SpreedlyExpress.unload();
Bloomerang.initSpreedly();
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
grecaptcha.reset(jQuery(«.donation-form»).data(«captcha-id»));
}
};

Bloomerang.Util.applyDonationCustomFields = function (obj, type) {

// Clear any fields from a previous failed submission
obj.clearCustomFields();

// Apply all (not multiselect), and fields
jQuery(«.donation-form .section.custom-fields :input:not(a > input, select)[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customFreeformField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all fields
jQuery(«.donation-form .section.custom-fields select[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all multiselect fields
jQuery(«.donation-form .section.custom-fields .checkboxes[id*=» + type + «]»).each(function() {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(),
jQuery.map(jQuery(this).children(«.checkbox.selected»), function(v) { return jQuery(v).attr(«data-id»); }));
});
};

String.prototype.hasValue = function() {
return (this && jQuery.trim(this)); //IE8 doesn’t have a native trim function
};

Bloomerang.Account.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Account»);
return this;
};

Bloomerang.Donation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

Bloomerang.RecurringDonation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

String.prototype.toUntypedValue = function() {
return this.substring(this.indexOf(‘_’) + 1);
};

Date.prototype.toDateInputValue = function() {
var local = new Date(this);
local.setMinutes(this.getMinutes() – this.getTimezoneOffset());
return (local.getMonth() + 1) + // Add one to the month because it starts at 0
«/» + local.getDate() + «/» + local.getFullYear();
};

jQuery(document).ready(function() {
jQuery(«.donation-form .field.start-date input»).val(new Date().toDateInputValue());
});

// Hide recurring donation options if recurring donation box is unchecked
jQuery(«.donation-form .field.recurring»).change(function() {
jQuery(«.donation-form .field.recurring»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
})

// The other-amount field is only equired when the «Other» donation-level is selected
toggleOtherAmountRequired = function () {
jQuery(«.donation-form #other-amount»).toggleClass(«required»,
jQuery(«.donation-form #other-option»).prop(«checked»));
Bloomerang.Util.calculateDonationTrueImpact();
};
jQuery(«.donation-form .section.donation input[name=’donation-level’]»).change(toggleOtherAmountRequired);

if (jQuery(«.donation-form .true-impact label»).length) {
jQuery(«.donation-form .true-impact label»)[0].innerHTML = jQuery(«.donation-form .true-impact label»)[0].innerHTML.replace(«[amount]», «$0»);
}
Bloomerang.Util.calculateDonationTrueImpact = function() {
if (!jQuery(«.donation-form .true-impact .fee-amount»).length) { return; }
// Note that we don’t really care about JS floating point math. It’s OK if the numbers are a couple cents off.
var amount = Bloomerang.Util.getDonationAmount();
var isEft = (jQuery(«#donation-form #Checking»).is(«:checked») || jQuery(«#donation-form #Savings»).is(«:checked»));
var feeRate = isEft ? 0 : Bloomerang.transactionFeeRate;
var newTotal = (amount + (isEft ? Bloomerang.transactionFeeEft : Bloomerang.transactionFee)) / (1 – feeRate);
var impactAmount = Number((newTotal – amount).toFixed(2));
jQuery(«.donation-form .true-impact .fee-amount»).text(accounting.formatMoney(impactAmount));
return impactAmount;
};
Bloomerang.Util.getDonationTrueImpactAmount = function() {
if (jQuery(«.donation-form .true-impact input:checked»).length) {
return Bloomerang.Util.calculateDonationTrueImpact();
}
return 0;
};

// Changing the value of other-amount should change the value of other-option
jQuery(«.donation-form #other-amount»).change(function () {
jQuery(«.donation-form #other-option»).val(jQuery(this).val());
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery(«.donation-form #donation-amount»).change(function() {
Bloomerang.Util.calculateDonationTrueImpact();
});

// Clicking into the other-amount field should select the other-option
jQuery(«.donation-form #other-amount»).click(function() {
jQuery(«.donation-form #other-option»).prop(‘checked’,true);
toggleOtherAmountRequired();
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery.validator.addMethod(«phoneUS», function(phone_number, element) {
var digits = phone_number.replace(/\D/g, «»);
return this.optional(element) || digits.length == 7 || digits.length == 10 || digits.length == 11;
}, «Please specify a valid phone number or use ‘+’ for international.»);

jQuery.validator.addMethod(«phoneInternational», function (phone_number, element) {
return this.optional(element) || /^\+[0-9\-\(\)\s.]+$/i.test(phone_number);
}, «Please specify a valid phone number.»);
jQuery.validator.classRuleSettings.phoneInternational = { phoneInternational: true };

jQuery.validator.addMethod(«zipcodeUS», function (value, element) {
return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
}, «The specified US ZIP Code is invalid»);

jQuery.validator.addMethod(«currency», function (value, element, options) {
return !value ||
value
.replace(«$», «»)
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid currency»);

jQuery.validator.classRuleSettings.currency = { currency: true };

// Validate the other amount, but only if they selected it
jQuery.validator.addMethod(«otherAmount», function(value, element, param) {
if (jQuery(«.donation-form #other-option»).prop(«checked»)) {
return jQuery.validator.methods.min.bind(this)(value, element, 1) &&
jQuery.validator.methods.currency(value, element);
}
return true;
}, «Invalid amount»);

jQuery.validator.classRuleSettings.otherAmount = { otherAmount: true };

jQuery.validator.addMethod(«number», function (value, element, options) {
return !value ||
value
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid number»);

jQuery.validator.classRuleSettings.number = { number: true };

jQuery.validator.addMethod(«validYear», function (value, element, options) {
try {
return (!value || value.match(/^[1-9]\d\d\d$/)) ? true : false;
}
catch (e) {
return false;
}
}, function () { return «Must be a 4 digit year»; });

jQuery.validator.classRuleSettings.validYear = { validYear: true };

// Validate that the donation amount is at least $1
jQuery.validator.methods.min = function( value, element, param ) {
if (typeof (accounting) === «undefined») { // rip out $ and ,
value = ((value + «») || «»).replace(/[\$,]/g, «»);
}
else { // Use accounting.parse, to handle $ and ,
value = accounting.parse(value);
}
return this.optional( element ) || value >= param;
};
jQuery.validator.classRuleSettings.minimum1 = { min: 1 };
jQuery.validator.messages.min = ‘Please enter a value of at least {0}.’

jQuery(«.donation-form #country»).change(function(event) {
var element = jQuery(event.target || event.srcElement); // cross-browser event target selection
var isInternational = (element.val() != «US» && element.val() != «CA» && element.val() != «BM»);
jQuery(«.donation-form #state, .donation-form #province»).val(«»); // clear the state when the country changes
jQuery(«.donation-form .field.city, .donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code, .donation-form .field.postal-code»).toggle(!isInternational);
jQuery(«.donation-form #street-address»).toggleClass(«international», isInternational);
if (element.val() == «BM») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«bm-label»));
} else if (element.val() == «US» || element.val() == «CA») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«us-label»));
}
if (element.val() == «US») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).show();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).hide();
} else if (element.val() == «CA») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).show();
} else if (element.val() == «BM») {
jQuery(«.donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.postal-code»).show();
} else {
jQuery(«.donation-form #city, .donation-form #postal-code, .donation-form #zip-code»).val(«»);
}
jQuery(«.donation-form .section.consent»).toggleClass(«hidden», !Bloomerang.Util.isCountryInEurope(element.val()));
});

jQuery(«.donation-form #phone-number»).change(function () {
var phoneField = jQuery(«.donation-form #phone-number»);
var internationalNumber = phoneField.val().substring(0,1) === ‘+’;
phoneField.toggleClass(«phoneUS», !internationalNumber);
phoneField.toggleClass(«phoneInternational», internationalNumber);
})

collectPayment = function () {
var form = jQuery(«#donation-form»);

if (!Bloomerang.ValidateDonationFormCaptcha()) {
return false;
}

if (!form.valid()) {
return false;
}

if (Bloomerang.Api.ProcessorType === «StripeConnect» && !Bloomerang.Util.StripeCardIsValid) {
document.getElementById(‘card-errors’).textContent = «Valid card info is required»;
return false;
}

if (jQuery(«#donation-form #CreditCard»).length > 0 && !jQuery(«#donation-form #CreditCard»).prop(«checked»)) {
submitDonation();
}
else {
var val = function (selector) { return jQuery(selector).val(); };
var amount = Bloomerang.Util.getDonationAmount() + Bloomerang.Util.getDonationTrueImpactAmount();
var selectedDonationLevel = jQuery(«.donation-form .section.donation input[name=’donation-level’]:checked»).parent().text();
selectedDonationLevel = (selectedDonationLevel.indexOf(«-«) == -1 ? «» : selectedDonationLevel.substr(selectedDonationLevel.indexOf(«-«) + 2) );

var oldMeta = »;
if (jQuery(‘meta[name=»viewport»]’).length) {
oldMeta = jQuery(‘meta[name=»viewport»]’).attr(‘content’);
} else {
jQuery(‘head’).append(»);
}
jQuery(‘meta[name=»viewport»]’).attr(‘content’, ‘width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1’);
jQuery(‘meta[name=»viewport»]’).attr(‘content’, oldMeta);

if (Bloomerang.Api.ProcessorType !== «StripeConnect») {
SpreedlyExpress.setDisplayOptions({
«amount»: accounting.formatMoney(amount),
«full_name»: val(«.donation-form #first-name») + » » + val(«.donation-form #last-name»),
«sidebar_bottom_description»: selectedDonationLevel,
«submit_label»: «Donate»});
SpreedlyExpress.setPaymentMethodParams({
«email»: val(«.donation-form #email-address»),
«phone_number»: val(«.donation-form #phone-number»),
«address1»: val(«.donation-form #street-address»),
«city»: val(«.donation-form #city»),
«state»: val(«.donation-form #state») || val(«.donation-form #province»),
«zip»: val(«.donation-form #zip-code») || val(«.donation-form #postal-code»),
«country»: val(«.donation-form #country»)});

SpreedlyExpress.onPaymentMethod(function(token, paymentMethod) {
Bloomerang.CreditCard.spreedlyToken(token);
submitDonation();
});

SpreedlyExpress.openView();
} else {
submitDonation();
}
}
};

submitDonation = function() {
if (!Bloomerang.continueFinancialSubmission(jQuery(«#donation-form»))) { return false; }

Bloomerang.Api.OnSubmit = Bloomerang.Widget.Donation.OnSubmit;
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess;
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError;

var processingMessage = jQuery(«#donation-processing-container»);
processingMessage.show();
jQuery(«#donation-form-container»).hide();
Bloomerang.scrollToElement(processingMessage);

var tmp = jQuery(«.donation-form #recurring»).prop(«checked»)
? Bloomerang.Api.recurringDonate()
: Bloomerang.Api.donate();
};

jQuery(«#donation-form #CreditCard»).prop(«checked», true);
jQuery(«#donation-form .section.payment input[type=’radio’]»).click(function() {
Bloomerang.Util.calculateDonationTrueImpact();
if (jQuery(this).attr(«id») == «CreditCard») {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).hide();
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
else {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).show();
if (jQuery(«#donation-form .sample-check»).length == 0) {
var checkImage = new Image();
checkImage.src = ‘https://s3-us-west-2.amazonaws.com/bloomerang-public-cdn/public-gallery/SampleCheck.png’;
jQuery(checkImage).addClass(«sample-check»);
jQuery(«#donation-form .accountNumber»).after(checkImage);
}
jQuery(«.btn-submit-donation»).val(«Donate»);
}
});

// Show opt-in options based on the setting of the global opt-in
jQuery(«.donation-form .field.consent-all»).change(function() {
jQuery(«.donation-form .field.consent-all»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
});

})(jQuery);
};

var startBloomerangLoad = function() {
if (window.bloomerangLoadStarted == undefined) {
window.bloomerangLoadStarted = true;
var script = document.createElement(‘script’);
script.type = ‘text/javascript’;
script.src = ‘https://crm.bloomerang.co/Content/Scripts/Api/Bloomerang-v2.js?nocache=2019-10-02’;
document.getElementsByTagName(‘head’)[0].appendChild(script);
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
else {
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
};

var waitForBloomerangLoad = function(callback) {
if (typeof(Bloomerang) === ‘undefined’ || !Bloomerang._isReady) {
setTimeout(function () { waitForBloomerangLoad(callback) }, 500);
}
else {
if (true) {
callback();
} else {
window.bloomerangLoadStarted = undefined;
Bloomerang = undefined; // The version of Blomerang.js is not what we want. So blow it away and reload.
startBloomerangLoad();
}
}
};

startBloomerangLoad();[/cs_content_seo]]]>visibility: hidden;{display: none;}’ +
» +
‘input, select, textarea, button{font-family: inherit;}’ +
» +
‘#spreedly-modal-overlay[style=»visibility:hidden»]{display: none;}’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ Donation’ +
‘ ‘ +
‘Amount*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘Show my support by making this a recurring donation’ +
» +
» +
‘Frequency*’ +
» +
‘Weekly’ +
‘Monthly’ +
‘Quarterly’ +
‘Yearly’ +
» +
» +
» +
‘Start Date*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘My donation is for*’ +
» +
‘Unrestricted’ +
‘Restricted’ +
» +
» +
» +
» +
‘ ‘ +
‘ Contact Information’ +
‘ ‘ +
‘First Name*’ +
» +
» +
» +
‘Last Name*’ +
» +
» +
» +
‘Email*’ +
» +
» +
» +
‘Phone’ +
» +
» +
» +
» +
‘ ‘ +
‘ Billing Address’ +
‘ ‘ +
‘Country*’ +
» +
‘Afghanistan’ +
‘Aland Islands’ +
‘Albania’ +
‘Algeria’ +
‘American Samoa’ +
‘Andorra’ +
‘Angola’ +
‘Anguilla’ +
‘Antarctica’ +
‘Antigua and Barbuda’ +
‘Argentina’ +
‘Armenia’ +
‘Aruba’ +
‘Australia’ +
‘Austria’ +
‘Azerbaijan’ +
‘Bahamas’ +
‘Bahrain’ +
‘Bangladesh’ +
‘Barbados’ +
‘Belarus’ +
‘Belgium’ +
‘Belize’ +
‘Benin’ +
‘Bermuda’ +
‘Bhutan’ +
‘Bolivia’ +
‘Bosnia and Herzegovina’ +
‘Botswana’ +
‘Bouvet Island’ +
‘Brazil’ +
‘British Indian Ocean Territory’ +
‘Brunei Darussalam’ +
‘Bulgaria’ +
‘Burkina Faso’ +
‘Burundi’ +
‘Cambodia’ +
‘Cameroon’ +
‘Canada’ +
‘Cape Verde’ +
‘Cayman Islands’ +
‘Central African Republic’ +
‘Chad’ +
‘Chile’ +
‘China’ +
‘Christmas Island’ +
‘Cocos (Keeling) Islands’ +
‘Colombia’ +
‘Comoros’ +
‘Congo’ +
‘Democratic Republic of the Congo’ +
‘Cook Islands’ +
‘Costa Rica’ +
‘Cote d’Ivoire’ +
‘Croatia’ +
‘Cuba’ +
‘Curacao’ +
‘Cyprus’ +
‘Czech Republic’ +
‘Denmark’ +
‘Djibouti’ +
‘Dominica’ +
‘Dominican Republic’ +
‘Ecuador’ +
‘Egypt’ +
‘El Salvador’ +
‘Equatorial Guinea’ +
‘Eritrea’ +
‘Estonia’ +
‘Eswatini’ +
‘Ethiopia’ +
‘Falkland Islands (Malvinas)’ +
‘Faroe Islands’ +
‘Fiji’ +
‘Finland’ +
‘France’ +
‘French Guiana’ +
‘French Polynesia’ +
‘French Southern Territories’ +
‘Gabon’ +
‘Gambia’ +
‘Georgia’ +
‘Germany’ +
‘Ghana’ +
‘Gibraltar’ +
‘Greece’ +
‘Greenland’ +
‘Grenada’ +
‘Guadeloupe’ +
‘Guam’ +
‘Guatemala’ +
‘Guernsey’ +
‘Guinea’ +
‘Guinea-Bissau’ +
‘Guyana’ +
‘Haiti’ +
‘Heard Island’ +
‘Honduras’ +
‘Hong Kong’ +
‘Hungary’ +
‘Iceland’ +
‘India’ +
‘Indonesia’ +
‘Islamic Republic of Iran’ +
‘Iraq’ +
‘Ireland’ +
‘Isle of Man’ +
‘Israel’ +
‘Italy’ +
‘Jamaica’ +
‘Japan’ +
‘Jersey’ +
‘Jordan’ +
‘Kazakhstan’ +
‘Kenya’ +
‘Kiribati’ +
‘Democratic People’s Republic of Korea’ +
‘Republic of Korea’ +
‘Kuwait’ +
‘Kyrgyzstan’ +
‘Lao People’s Democratic Republic’ +
‘Latvia’ +
‘Lebanon’ +
‘Lesotho’ +
‘Liberia’ +
‘Libya’ +
‘Liechtenstein’ +
‘Lithuania’ +
‘Luxembourg’ +
‘Macao’ +
‘Macedonia’ +
‘Madagascar’ +
‘Malawi’ +
‘Malaysia’ +
‘Maldives’ +
‘Mali’ +
‘Malta’ +
‘Marshall Islands’ +
‘Martinique’ +
‘Mauritania’ +
‘Mauritius’ +
‘Mayotte’ +
‘Mexico’ +
‘Federated States of Micronesia’ +
‘Republic of Moldova’ +
‘Monaco’ +
‘Mongolia’ +
‘Montenegro’ +
‘Montserrat’ +
‘Morocco’ +
‘Mozambique’ +
‘Myanmar’ +
‘Namibia’ +
‘Nauru’ +
‘Nepal’ +
‘Netherlands’ +
‘New Caledonia’ +
‘New Zealand’ +
‘Nicaragua’ +
‘Niger’ +
‘Nigeria’ +
‘Niue’ +
‘Norfolk Island’ +
‘Northern Mariana Islands’ +
‘Norway’ +
‘Oman’ +
‘Pakistan’ +
‘Palau’ +
‘State of Palestine’ +
‘Panama’ +
‘Papua New Guinea’ +
‘Paraguay’ +
‘Peru’ +
‘Philippines’ +
‘Pitcairn’ +
‘Poland’ +
‘Portugal’ +
‘Puerto Rico’ +
‘Qatar’ +
‘Reunion’ +
‘Romania’ +
‘Russian Federation’ +
‘Rwanda’ +
‘Saint Barthelemy’ +
‘Ascension and Tristan da Cunha Saint Helena’ +
‘Saint Kitts and Nevis’ +
‘Saint Lucia’ +
‘Saint Martin (French part)’ +
‘Saint Pierre and Miquelon’ +
‘Saint Vincent and the Grenadines’ +
‘Samoa’ +
‘San Marino’ +
‘Sao Tome and Principe’ +
‘Saudi Arabia’ +
‘Senegal’ +
‘Serbia’ +
‘Seychelles’ +
‘Sierra Leone’ +
‘Singapore’ +
‘Sint Maarten (Dutch part)’ +
‘Slovakia’ +
‘Slovenia’ +
‘Solomon Islands’ +
‘Somalia’ +
‘South Africa’ +
‘South Georgia’ +
‘South Sudan’ +
‘Spain’ +
‘Sri Lanka’ +
‘Sudan’ +
‘Suriname’ +
‘Svalbard and Jan Mayen’ +
‘Sweden’ +
‘Switzerland’ +
‘Syrian Arab Republic’ +
‘Taiwan’ +
‘Tajikistan’ +
‘United Republic of Tanzania’ +
‘Thailand’ +
‘Timor-Leste’ +
‘Togo’ +
‘Tokelau’ +
‘Tonga’ +
‘Trinidad and Tobago’ +
‘Tunisia’ +
‘Turkey’ +
‘Turkmenistan’ +
‘Turks and Caicos Islands’ +
‘Tuvalu’ +
‘Uganda’ +
‘Ukraine’ +
‘United Arab Emirates’ +
‘United Kingdom’ +
‘United States’ +
‘United States Minor Outlying Islands’ +
‘Uruguay’ +
‘Uzbekistan’ +
‘Vanuatu’ +
‘Vatican City’ +
‘Venezuela’ +
‘Viet Nam’ +
‘British Virgin Islands’ +
‘U.S. Virgin Islands’ +
‘Wallis and Futuna’ +
‘Western Sahara’ +
‘Yemen’ +
‘Zambia’ +
‘Zimbabwe’ +
» +
» +
» +
‘Address*’ +
» +
» +
» +
‘City*’ +
» +
» +
» +
‘State*’ +
» +
‘Alabama’ +
‘Alaska’ +
‘American Samoa’ +
‘Arizona’ +
‘Arkansas’ +
‘Armed Forces Africa, Canada, Europe, Middle East’ +
‘Armed Forces Americas (except Canada)’ +
‘Armed Forces Pacific’ +
‘California’ +
‘Colorado’ +
‘Connecticut’ +
‘Delaware’ +
‘District of Columbia’ +
‘Florida’ +
‘Georgia’ +
‘Guam’ +
‘Hawaii’ +
‘Idaho’ +
‘Illinois’ +
‘Indiana’ +
‘Iowa’ +
‘Kansas’ +
‘Kentucky’ +
‘Louisiana’ +
‘Maine’ +
‘Maryland’ +
‘Massachusetts’ +
‘Michigan’ +
‘Minnesota’ +
‘Mississippi’ +
‘Missouri’ +
‘Montana’ +
‘Nebraska’ +
‘Nevada’ +
‘New Hampshire’ +
‘New Jersey’ +
‘New Mexico’ +
‘New York’ +
‘North Carolina’ +
‘North Dakota’ +
‘Ohio’ +
‘Oklahoma’ +
‘Oregon’ +
‘Pennsylvania’ +
‘Puerto Rico’ +
‘Rhode Island’ +
‘South Carolina’ +
‘South Dakota’ +
‘Tennessee’ +
‘Texas’ +
‘US Virgin Islands’ +
‘Utah’ +
‘Vermont’ +
‘Virginia’ +
‘Washington’ +
‘West Virginia’ +
‘Wisconsin’ +
‘Wyoming’ +
» +
» +
» +
‘Province*’ +
» +
‘Alberta’ +
‘British Columbia’ +
‘Manitoba’ +
‘New Brunswick’ +
‘Newfoundland and Labrador’ +
‘Northwest Territories’ +
‘Nova Scotia’ +
‘Nunavut’ +
‘Ontario’ +
‘Prince Edward Island’ +
‘Quebec’ +
‘Saskatchewan’ +
‘Yukon Territory’ +
» +
» +
» +
‘ZIP Code*’ +
» +
» +
» +
‘Postal Code*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘Comments’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘I would like to receive or continue receiving updates from Mental Health America Wabash Valley Region, Inc’ +
» +
» +
‘by email’ +
» +
» +
‘by postal mail’ +
» +
» +
‘by phone’ +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ You must fill out the CAPTCHA’ +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
» +
» +
‘ Processing…Your transaction is being processed. Please do not close your browser or leave this page.’ +
» +
» +
» + »;var successHtml3574784 = » +
‘ Thank You for Your Donation!’ +
‘ Your generous gift has been processed. We truly appreciate your continued support.’ +
‘ ‘ +
»;( function($) {if (!Bloomerang.useDonationId(‘3574784’)) {
html3574784 = ‘Only one donation or event registration form can be used on each page.’;
}if (jQuery(‘#bloomerangForm3574784’).length) {

if (window.ActiveXObject) { // they are using IE <11, which doesn't support TLS 1.1 html3574784 = '​Your browser does not support the minimum security requirements for keeping your Credit Card information safe when processing payments. Please upgrade ​your browser or download the latest version of' + ' Chrome or Firefox.'; } jQuery('#bloomerangForm3574784').after(html3574784); if (!Bloomerang.SpreedlyScriptLoaded) { Bloomerang.Util.load('https://core.spreedly.com/iframe/express-2.min.js', function() { return SpreedlyExpress != undefined; }, function() { SpreedlyExpress.onInit(function() { jQuery('#express-submit').attr('disabled', false); }); Bloomerang.initSpreedly = function() { SpreedlyExpress.init('OqOMv1ksjPtXEYHtCYsVXzEpCbR', { 'company_name': 'Mental Health America Wabash Valley Region, Inc' }); }; Bloomerang.initSpreedly(); }); } Bloomerang.SpreedlyScriptLoaded = true; }; if (Bloomerang.paymentFormLoaded) { return false; } Bloomerang.paymentFormLoaded = true; window.captchaLoadCallback = function() { Bloomerang.gRecaptchaLoaded = true; }; Bloomerang.Util.load('https://www.google.com/recaptcha/api.js?onload=captchaLoadCallback&render=explicit', function() { return Bloomerang.gRecaptchaLoaded; }, function() { jQuery('.section.captcha').removeAttr('style'); jQuery('form.donation-form').data('captcha-id', grecaptcha.render('captcha3574784', { 'sitekey' : '6LdIprIUAAAAAH300juWvXYi3HkyOcjisIOsG491' })); }, true, true); Bloomerang.transactionFee = 0.3; Bloomerang.transactionFeeRate = 0.022; Bloomerang.transactionFeeEft = Bloomerang.useKey('pub_691e6448-433b-11e2-8527-02854a1eb3c6'); Bloomerang.Util.getDonationAmount = function() { return Number(accounting.unformat(jQuery(".donation-form .section.donation inputinvalid_tags_codes_14:checked").val() || jQuery(".donation-form #donation-amount").val())); }; // Register proper callbacks for various stages/outcomes of submission Bloomerang.Widget.Donation.OnSubmit = function (args) { jQuery(".btn-submit-donation").val("Donating...").prop("disabled", true).addClass("disabled"); var val = function (selector) { return jQuery(selector).val(); }; Bloomerang.Account .individual() .firstName(val(".donation-form #first-name")) .middleName(val(".donation-form #middle-name")) .lastName(val(".donation-form #last-name")) .homeAddress(val(".donation-form #street-address"), val(".donation-form #city"), val(".donation-form #state") || val(".donation-form #province"), val(".donation-form #zip-code") || val(".donation-form #postal-code"), val(".donation-form #country")) .homeEmail(val(".donation-form #email-address")) .homePhone(val(".donation-form #phone-number")) .applyDonationCustomFields(); if (jQuery(".donation-form #consent-all").prop("checked")) { Bloomerang.Account.optedInStatus(jQuery(".donation-form #consent-email").prop("checked"), jQuery(".donation-form #consent-mail").prop("checked"), jQuery(".donation-form #consent-phone").prop("checked")); } var amount = Bloomerang.Util.getDonationAmount() + Bloomerang.Util.getDonationTrueImpactAmount(); if (jQuery(".donation-form #recurring").prop("checked")) { Bloomerang.RecurringDonation .amount(amount) .fundId(val(".donation-form #fund")) .note(val(".donation-form #comment")) .frequency(val(".donation-form #frequency") || "Monthly") .startDate(val(".donation-form #start-date")) .applyDonationCustomFields(); // Need to do a null-check here because they might have a cached version of Bloomerang-v2.js if (Bloomerang.RecurringDonation.trueImpactEnabled && Bloomerang.RecurringDonation.trueImpactUsed) { Bloomerang.RecurringDonation .trueImpactEnabled(jQuery(".donation-form .true-impact .fee-amount").length> 0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
} else {
Bloomerang.Donation
.amount(amount)
.fundId(val(«.donation-form #fund»))
.note(val(«.donation-form #comment»))
.applyDonationCustomFields();

// Need to do a null-check here because they might have a cached version of Bloomerang-v2.js
if (Bloomerang.Donation.trueImpactEnabled && Bloomerang.Donation.trueImpactUsed) {
Bloomerang.Donation
.trueImpactEnabled(jQuery(«.donation-form .true-impact .fee-amount»).length > 0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
}

if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked»)) {
Bloomerang.Eft
.accountNumber(val(«.donation-form #accountNumber»))
.routingNumber(val(«.donation-form #routingNumber»))
.type(jQuery(«#donation-form .section.payment input[type=’radio’]:checked»).attr(«id»));
}
};
Bloomerang.ValidateDonationFormCaptcha = function() {
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
var captchaResponse = grecaptcha.getResponse(jQuery(«.donation-form»).data(«captcha-id»));
if (captchaResponse) {
jQuery(«.donation-form .noCaptchaResponseError»).hide();
Bloomerang.captchaResponse(captchaResponse);
return true;
} else {
jQuery(«.donation-form .noCaptchaResponseError»).show();
return false;
}
} else return true;
};
Bloomerang.scrollToElement = function(element) {
var distance = 100;
var offset = element.offset().top;
var offsetTop = offset > distance ? offset – distance : offset;
jQuery(‘html, body’).animate({ scrollTop : offsetTop}, 500);
};
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess = function (response) {
jQuery(«#donation-processing-container»).hide();
var formContainer = jQuery(«#donation-form-container»);
formContainer.show();
formContainer.html(successHtml3574784);
Bloomerang.scrollToElement(formContainer);
};
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError = function (response) {
jQuery(«.btn-submit-donation»).prop(«disabled», false).removeClass(«disabled»);
if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked») ||
Bloomerang.Api.ProcessorType === «StripeConnect») {
jQuery(«.btn-submit-donation»).val(«Donate»);
} else {
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
jQuery(«#donation-form-container .errors»).removeClass(«hidden»).html(response.Message);
jQuery(«#donation-processing-container»).hide();
jQuery(«#donation-form-container»).show();
Bloomerang.scrollToElement(jQuery(«#donation-form-container .errors»));
Bloomerang.cancelFinancialSubmission(jQuery(«#donation-form»));
SpreedlyExpress.unload();
Bloomerang.initSpreedly();
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
grecaptcha.reset(jQuery(«.donation-form»).data(«captcha-id»));
}
};

Bloomerang.Util.applyDonationCustomFields = function (obj, type) {

// Clear any fields from a previous failed submission
obj.clearCustomFields();

// Apply all (not multiselect), and fields
jQuery(«.donation-form .section.custom-fields :input:not(a > input, select)[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customFreeformField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all fields
jQuery(«.donation-form .section.custom-fields select[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all multiselect fields
jQuery(«.donation-form .section.custom-fields .checkboxes[id*=» + type + «]»).each(function() {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(),
jQuery.map(jQuery(this).children(«.checkbox.selected»), function(v) { return jQuery(v).attr(«data-id»); }));
});
};

String.prototype.hasValue = function() {
return (this && jQuery.trim(this)); //IE8 doesn’t have a native trim function
};

Bloomerang.Account.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Account»);
return this;
};

Bloomerang.Donation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

Bloomerang.RecurringDonation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

String.prototype.toUntypedValue = function() {
return this.substring(this.indexOf(‘_’) + 1);
};

Date.prototype.toDateInputValue = function() {
var local = new Date(this);
local.setMinutes(this.getMinutes() – this.getTimezoneOffset());
return (local.getMonth() + 1) + // Add one to the month because it starts at 0
«/» + local.getDate() + «/» + local.getFullYear();
};

jQuery(document).ready(function() {
jQuery(«.donation-form .field.start-date input»).val(new Date().toDateInputValue());
});

// Hide recurring donation options if recurring donation box is unchecked
jQuery(«.donation-form .field.recurring»).change(function() {
jQuery(«.donation-form .field.recurring»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
})

// The other-amount field is only equired when the «Other» donation-level is selected
toggleOtherAmountRequired = function () {
jQuery(«.donation-form #other-amount»).toggleClass(«required»,
jQuery(«.donation-form #other-option»).prop(«checked»));
Bloomerang.Util.calculateDonationTrueImpact();
};
jQuery(«.donation-form .section.donation input[name=’donation-level’]»).change(toggleOtherAmountRequired);

if (jQuery(«.donation-form .true-impact label»).length) {
jQuery(«.donation-form .true-impact label»)[0].innerHTML = jQuery(«.donation-form .true-impact label»)[0].innerHTML.replace(«[amount]», «$0»);
}
Bloomerang.Util.calculateDonationTrueImpact = function() {
if (!jQuery(«.donation-form .true-impact .fee-amount»).length) { return; }
// Note that we don’t really care about JS floating point math. It’s OK if the numbers are a couple cents off.
var amount = Bloomerang.Util.getDonationAmount();
var isEft = (jQuery(«#donation-form #Checking»).is(«:checked») || jQuery(«#donation-form #Savings»).is(«:checked»));
var feeRate = isEft ? 0 : Bloomerang.transactionFeeRate;
var newTotal = (amount + (isEft ? Bloomerang.transactionFeeEft : Bloomerang.transactionFee)) / (1 – feeRate);
var impactAmount = Number((newTotal – amount).toFixed(2));
jQuery(«.donation-form .true-impact .fee-amount»).text(accounting.formatMoney(impactAmount));
return impactAmount;
};
Bloomerang.Util.getDonationTrueImpactAmount = function() {
if (jQuery(«.donation-form .true-impact input:checked»).length) {
return Bloomerang.Util.calculateDonationTrueImpact();
}
return 0;
};

// Changing the value of other-amount should change the value of other-option
jQuery(«.donation-form #other-amount»).change(function () {
jQuery(«.donation-form #other-option»).val(jQuery(this).val());
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery(«.donation-form #donation-amount»).change(function() {
Bloomerang.Util.calculateDonationTrueImpact();
});

// Clicking into the other-amount field should select the other-option
jQuery(«.donation-form #other-amount»).click(function() {
jQuery(«.donation-form #other-option»).prop(‘checked’,true);
toggleOtherAmountRequired();
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery.validator.addMethod(«phoneUS», function(phone_number, element) {
var digits = phone_number.replace(/\D/g, «»);
return this.optional(element) || digits.length == 7 || digits.length == 10 || digits.length == 11;
}, «Please specify a valid phone number or use ‘+’ for international.»);

jQuery.validator.addMethod(«phoneInternational», function (phone_number, element) {
return this.optional(element) || /^\+[0-9\-\(\)\s.]+$/i.test(phone_number);
}, «Please specify a valid phone number.»);
jQuery.validator.classRuleSettings.phoneInternational = { phoneInternational: true };

jQuery.validator.addMethod(«zipcodeUS», function (value, element) {
return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
}, «The specified US ZIP Code is invalid»);

jQuery.validator.addMethod(«currency», function (value, element, options) {
return !value ||
value
.replace(«$», «»)
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid currency»);

jQuery.validator.classRuleSettings.currency = { currency: true };

// Validate the other amount, but only if they selected it
jQuery.validator.addMethod(«otherAmount», function(value, element, param) {
if (jQuery(«.donation-form #other-option»).prop(«checked»)) {
return jQuery.validator.methods.min.bind(this)(value, element, 1) &&
jQuery.validator.methods.currency(value, element);
}
return true;
}, «Invalid amount»);

jQuery.validator.classRuleSettings.otherAmount = { otherAmount: true };

jQuery.validator.addMethod(«number», function (value, element, options) {
return !value ||
value
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid number»);

jQuery.validator.classRuleSettings.number = { number: true };

jQuery.validator.addMethod(«validYear», function (value, element, options) {
try {
return (!value || value.match(/^[1-9]\d\d\d$/)) ? true : false;
}
catch (e) {
return false;
}
}, function () { return «Must be a 4 digit year»; });

jQuery.validator.classRuleSettings.validYear = { validYear: true };

// Validate that the donation amount is at least $1
jQuery.validator.methods.min = function( value, element, param ) {
if (typeof (accounting) === «undefined») { // rip out $ and ,
value = ((value + «») || «»).replace(/[\$,]/g, «»);
}
else { // Use accounting.parse, to handle $ and ,
value = accounting.parse(value);
}
return this.optional( element ) || value >= param;
};
jQuery.validator.classRuleSettings.minimum1 = { min: 1 };
jQuery.validator.messages.min = ‘Please enter a value of at least {0}.’

jQuery(«.donation-form #country»).change(function(event) {
var element = jQuery(event.target || event.srcElement); // cross-browser event target selection
var isInternational = (element.val() != «US» && element.val() != «CA» && element.val() != «BM»);
jQuery(«.donation-form #state, .donation-form #province»).val(«»); // clear the state when the country changes
jQuery(«.donation-form .field.city, .donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code, .donation-form .field.postal-code»).toggle(!isInternational);
jQuery(«.donation-form #street-address»).toggleClass(«international», isInternational);
if (element.val() == «BM») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«bm-label»));
} else if (element.val() == «US» || element.val() == «CA») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«us-label»));
}
if (element.val() == «US») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).show();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).hide();
} else if (element.val() == «CA») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).show();
} else if (element.val() == «BM») {
jQuery(«.donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.postal-code»).show();
} else {
jQuery(«.donation-form #city, .donation-form #postal-code, .donation-form #zip-code»).val(«»);
}
jQuery(«.donation-form .section.consent»).toggleClass(«hidden», !Bloomerang.Util.isCountryInEurope(element.val()));
});

jQuery(«.donation-form #phone-number»).change(function () {
var phoneField = jQuery(«.donation-form #phone-number»);
var internationalNumber = phoneField.val().substring(0,1) === ‘+’;
phoneField.toggleClass(«phoneUS», !internationalNumber);
phoneField.toggleClass(«phoneInternational», internationalNumber);
})

collectPayment = function () {
var form = jQuery(«#donation-form»);

if (!Bloomerang.ValidateDonationFormCaptcha()) {
return false;
}

if (!form.valid()) {
return false;
}

if (Bloomerang.Api.ProcessorType === «StripeConnect» && !Bloomerang.Util.StripeCardIsValid) {
document.getElementById(‘card-errors’).textContent = «Valid card info is required»;
return false;
}

if (jQuery(«#donation-form #CreditCard»).length > 0 && !jQuery(«#donation-form #CreditCard»).prop(«checked»)) {
submitDonation();
}
else {
var val = function (selector) { return jQuery(selector).val(); };
var amount = Bloomerang.Util.getDonationAmount() + Bloomerang.Util.getDonationTrueImpactAmount();
var selectedDonationLevel = jQuery(«.donation-form .section.donation input[name=’donation-level’]:checked»).parent().text();
selectedDonationLevel = (selectedDonationLevel.indexOf(«-«) == -1 ? «» : selectedDonationLevel.substr(selectedDonationLevel.indexOf(«-«) + 2) );

var oldMeta = »;
if (jQuery(‘meta[name=»viewport»]’).length) {
oldMeta = jQuery(‘meta[name=»viewport»]’).attr(‘content’);
} else {
jQuery(‘head’).append(»);
}
jQuery(‘meta[name=»viewport»]’).attr(‘content’, ‘width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1’);
jQuery(‘meta[name=»viewport»]’).attr(‘content’, oldMeta);

if (Bloomerang.Api.ProcessorType !== «StripeConnect») {
SpreedlyExpress.setDisplayOptions({
«amount»: accounting.formatMoney(amount),
«full_name»: val(«.donation-form #first-name») + » » + val(«.donation-form #last-name»),
«sidebar_bottom_description»: selectedDonationLevel,
«submit_label»: «Donate»});
SpreedlyExpress.setPaymentMethodParams({
«email»: val(«.donation-form #email-address»),
«phone_number»: val(«.donation-form #phone-number»),
«address1»: val(«.donation-form #street-address»),
«city»: val(«.donation-form #city»),
«state»: val(«.donation-form #state») || val(«.donation-form #province»),
«zip»: val(«.donation-form #zip-code») || val(«.donation-form #postal-code»),
«country»: val(«.donation-form #country»)});

SpreedlyExpress.onPaymentMethod(function(token, paymentMethod) {
Bloomerang.CreditCard.spreedlyToken(token);
submitDonation();
});

SpreedlyExpress.openView();
} else {
submitDonation();
}
}
};

submitDonation = function() {
if (!Bloomerang.continueFinancialSubmission(jQuery(«#donation-form»))) { return false; }

Bloomerang.Api.OnSubmit = Bloomerang.Widget.Donation.OnSubmit;
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess;
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError;

var processingMessage = jQuery(«#donation-processing-container»);
processingMessage.show();
jQuery(«#donation-form-container»).hide();
Bloomerang.scrollToElement(processingMessage);

var tmp = jQuery(«.donation-form #recurring»).prop(«checked»)
? Bloomerang.Api.recurringDonate()
: Bloomerang.Api.donate();
};

jQuery(«#donation-form #CreditCard»).prop(«checked», true);
jQuery(«#donation-form .section.payment input[type=’radio’]»).click(function() {
Bloomerang.Util.calculateDonationTrueImpact();
if (jQuery(this).attr(«id») == «CreditCard») {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).hide();
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
else {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).show();
if (jQuery(«#donation-form .sample-check»).length == 0) {
var checkImage = new Image();
checkImage.src = ‘https://s3-us-west-2.amazonaws.com/bloomerang-public-cdn/public-gallery/SampleCheck.png’;
jQuery(checkImage).addClass(«sample-check»);
jQuery(«#donation-form .accountNumber»).after(checkImage);
}
jQuery(«.btn-submit-donation»).val(«Donate»);
}
});

// Show opt-in options based on the setting of the global opt-in
jQuery(«.donation-form .field.consent-all»).change(function() {
jQuery(«.donation-form .field.consent-all»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
});

})(jQuery);
};

var startBloomerangLoad = function() {
if (window.bloomerangLoadStarted == undefined) {
window.bloomerangLoadStarted = true;
var script = document.createElement(‘script’);
script.type = ‘text/javascript’;
script.src = ‘https://crm.bloomerang.co/Content/Scripts/Api/Bloomerang-v2.js?nocache=2019-10-02’;
document.getElementsByTagName(‘head’)[0].appendChild(script);
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
else {
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
};

var waitForBloomerangLoad = function(callback) {
if (typeof(Bloomerang) === ‘undefined’ || !Bloomerang._isReady) {
setTimeout(function () { waitForBloomerangLoad(callback) }, 500);
}
else {
if (true) {
callback();
} else {
window.bloomerangLoadStarted = undefined;
Bloomerang = undefined; // The version of Blomerang.js is not what we want. So blow it away and reload.
startBloomerangLoad();
}
}
};

startBloomerangLoad();[/cs_content_seo]]]>]{display: none;}’ +
» +
‘input, select, textarea, button{font-family: inherit;}’ +
» +
‘#spreedly-modal-overlay[style=»visibility:hidden»]{display: none;}’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ Donation’ +
‘ ‘ +
‘Amount*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘Show my support by making this a recurring donation’ +
» +
» +
‘Frequency*’ +
» +
‘Weekly’ +
‘Monthly’ +
‘Quarterly’ +
‘Yearly’ +
» +
» +
» +
‘Start Date*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘My donation is for*’ +
» +
‘Unrestricted’ +
‘Restricted’ +
» +
» +
» +
» +
‘ ‘ +
‘ Contact Information’ +
‘ ‘ +
‘First Name*’ +
» +
» +
» +
‘Last Name*’ +
» +
» +
» +
‘Email*’ +
» +
» +
» +
‘Phone’ +
» +
» +
» +
» +
‘ ‘ +
‘ Billing Address’ +
‘ ‘ +
‘Country*’ +
» +
‘Afghanistan’ +
‘Aland Islands’ +
‘Albania’ +
‘Algeria’ +
‘American Samoa’ +
‘Andorra’ +
‘Angola’ +
‘Anguilla’ +
‘Antarctica’ +
‘Antigua and Barbuda’ +
‘Argentina’ +
‘Armenia’ +
‘Aruba’ +
‘Australia’ +
‘Austria’ +
‘Azerbaijan’ +
‘Bahamas’ +
‘Bahrain’ +
‘Bangladesh’ +
‘Barbados’ +
‘Belarus’ +
‘Belgium’ +
‘Belize’ +
‘Benin’ +
‘Bermuda’ +
‘Bhutan’ +
‘Bolivia’ +
‘Bosnia and Herzegovina’ +
‘Botswana’ +
‘Bouvet Island’ +
‘Brazil’ +
‘British Indian Ocean Territory’ +
‘Brunei Darussalam’ +
‘Bulgaria’ +
‘Burkina Faso’ +
‘Burundi’ +
‘Cambodia’ +
‘Cameroon’ +
‘Canada’ +
‘Cape Verde’ +
‘Cayman Islands’ +
‘Central African Republic’ +
‘Chad’ +
‘Chile’ +
‘China’ +
‘Christmas Island’ +
‘Cocos (Keeling) Islands’ +
‘Colombia’ +
‘Comoros’ +
‘Congo’ +
‘Democratic Republic of the Congo’ +
‘Cook Islands’ +
‘Costa Rica’ +
‘Cote d’Ivoire’ +
‘Croatia’ +
‘Cuba’ +
‘Curacao’ +
‘Cyprus’ +
‘Czech Republic’ +
‘Denmark’ +
‘Djibouti’ +
‘Dominica’ +
‘Dominican Republic’ +
‘Ecuador’ +
‘Egypt’ +
‘El Salvador’ +
‘Equatorial Guinea’ +
‘Eritrea’ +
‘Estonia’ +
‘Eswatini’ +
‘Ethiopia’ +
‘Falkland Islands (Malvinas)’ +
‘Faroe Islands’ +
‘Fiji’ +
‘Finland’ +
‘France’ +
‘French Guiana’ +
‘French Polynesia’ +
‘French Southern Territories’ +
‘Gabon’ +
‘Gambia’ +
‘Georgia’ +
‘Germany’ +
‘Ghana’ +
‘Gibraltar’ +
‘Greece’ +
‘Greenland’ +
‘Grenada’ +
‘Guadeloupe’ +
‘Guam’ +
‘Guatemala’ +
‘Guernsey’ +
‘Guinea’ +
‘Guinea-Bissau’ +
‘Guyana’ +
‘Haiti’ +
‘Heard Island’ +
‘Honduras’ +
‘Hong Kong’ +
‘Hungary’ +
‘Iceland’ +
‘India’ +
‘Indonesia’ +
‘Islamic Republic of Iran’ +
‘Iraq’ +
‘Ireland’ +
‘Isle of Man’ +
‘Israel’ +
‘Italy’ +
‘Jamaica’ +
‘Japan’ +
‘Jersey’ +
‘Jordan’ +
‘Kazakhstan’ +
‘Kenya’ +
‘Kiribati’ +
‘Democratic People’s Republic of Korea’ +
‘Republic of Korea’ +
‘Kuwait’ +
‘Kyrgyzstan’ +
‘Lao People’s Democratic Republic’ +
‘Latvia’ +
‘Lebanon’ +
‘Lesotho’ +
‘Liberia’ +
‘Libya’ +
‘Liechtenstein’ +
‘Lithuania’ +
‘Luxembourg’ +
‘Macao’ +
‘Macedonia’ +
‘Madagascar’ +
‘Malawi’ +
‘Malaysia’ +
‘Maldives’ +
‘Mali’ +
‘Malta’ +
‘Marshall Islands’ +
‘Martinique’ +
‘Mauritania’ +
‘Mauritius’ +
‘Mayotte’ +
‘Mexico’ +
‘Federated States of Micronesia’ +
‘Republic of Moldova’ +
‘Monaco’ +
‘Mongolia’ +
‘Montenegro’ +
‘Montserrat’ +
‘Morocco’ +
‘Mozambique’ +
‘Myanmar’ +
‘Namibia’ +
‘Nauru’ +
‘Nepal’ +
‘Netherlands’ +
‘New Caledonia’ +
‘New Zealand’ +
‘Nicaragua’ +
‘Niger’ +
‘Nigeria’ +
‘Niue’ +
‘Norfolk Island’ +
‘Northern Mariana Islands’ +
‘Norway’ +
‘Oman’ +
‘Pakistan’ +
‘Palau’ +
‘State of Palestine’ +
‘Panama’ +
‘Papua New Guinea’ +
‘Paraguay’ +
‘Peru’ +
‘Philippines’ +
‘Pitcairn’ +
‘Poland’ +
‘Portugal’ +
‘Puerto Rico’ +
‘Qatar’ +
‘Reunion’ +
‘Romania’ +
‘Russian Federation’ +
‘Rwanda’ +
‘Saint Barthelemy’ +
‘Ascension and Tristan da Cunha Saint Helena’ +
‘Saint Kitts and Nevis’ +
‘Saint Lucia’ +
‘Saint Martin (French part)’ +
‘Saint Pierre and Miquelon’ +
‘Saint Vincent and the Grenadines’ +
‘Samoa’ +
‘San Marino’ +
‘Sao Tome and Principe’ +
‘Saudi Arabia’ +
‘Senegal’ +
‘Serbia’ +
‘Seychelles’ +
‘Sierra Leone’ +
‘Singapore’ +
‘Sint Maarten (Dutch part)’ +
‘Slovakia’ +
‘Slovenia’ +
‘Solomon Islands’ +
‘Somalia’ +
‘South Africa’ +
‘South Georgia’ +
‘South Sudan’ +
‘Spain’ +
‘Sri Lanka’ +
‘Sudan’ +
‘Suriname’ +
‘Svalbard and Jan Mayen’ +
‘Sweden’ +
‘Switzerland’ +
‘Syrian Arab Republic’ +
‘Taiwan’ +
‘Tajikistan’ +
‘United Republic of Tanzania’ +
‘Thailand’ +
‘Timor-Leste’ +
‘Togo’ +
‘Tokelau’ +
‘Tonga’ +
‘Trinidad and Tobago’ +
‘Tunisia’ +
‘Turkey’ +
‘Turkmenistan’ +
‘Turks and Caicos Islands’ +
‘Tuvalu’ +
‘Uganda’ +
‘Ukraine’ +
‘United Arab Emirates’ +
‘United Kingdom’ +
‘United States’ +
‘United States Minor Outlying Islands’ +
‘Uruguay’ +
‘Uzbekistan’ +
‘Vanuatu’ +
‘Vatican City’ +
‘Venezuela’ +
‘Viet Nam’ +
‘British Virgin Islands’ +
‘U.S. Virgin Islands’ +
‘Wallis and Futuna’ +
‘Western Sahara’ +
‘Yemen’ +
‘Zambia’ +
‘Zimbabwe’ +
» +
» +
» +
‘Address*’ +
» +
» +
» +
‘City*’ +
» +
» +
» +
‘State*’ +
» +
‘Alabama’ +
‘Alaska’ +
‘American Samoa’ +
‘Arizona’ +
‘Arkansas’ +
‘Armed Forces Africa, Canada, Europe, Middle East’ +
‘Armed Forces Americas (except Canada)’ +
‘Armed Forces Pacific’ +
‘California’ +
‘Colorado’ +
‘Connecticut’ +
‘Delaware’ +
‘District of Columbia’ +
‘Florida’ +
‘Georgia’ +
‘Guam’ +
‘Hawaii’ +
‘Idaho’ +
‘Illinois’ +
‘Indiana’ +
‘Iowa’ +
‘Kansas’ +
‘Kentucky’ +
‘Louisiana’ +
‘Maine’ +
‘Maryland’ +
‘Massachusetts’ +
‘Michigan’ +
‘Minnesota’ +
‘Mississippi’ +
‘Missouri’ +
‘Montana’ +
‘Nebraska’ +
‘Nevada’ +
‘New Hampshire’ +
‘New Jersey’ +
‘New Mexico’ +
‘New York’ +
‘North Carolina’ +
‘North Dakota’ +
‘Ohio’ +
‘Oklahoma’ +
‘Oregon’ +
‘Pennsylvania’ +
‘Puerto Rico’ +
‘Rhode Island’ +
‘South Carolina’ +
‘South Dakota’ +
‘Tennessee’ +
‘Texas’ +
‘US Virgin Islands’ +
‘Utah’ +
‘Vermont’ +
‘Virginia’ +
‘Washington’ +
‘West Virginia’ +
‘Wisconsin’ +
‘Wyoming’ +
» +
» +
» +
‘Province*’ +
» +
‘Alberta’ +
‘British Columbia’ +
‘Manitoba’ +
‘New Brunswick’ +
‘Newfoundland and Labrador’ +
‘Northwest Territories’ +
‘Nova Scotia’ +
‘Nunavut’ +
‘Ontario’ +
‘Prince Edward Island’ +
‘Quebec’ +
‘Saskatchewan’ +
‘Yukon Territory’ +
» +
» +
» +
‘ZIP Code*’ +
» +
» +
» +
‘Postal Code*’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘Comments’ +
» +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘I would like to receive or continue receiving updates from Mental Health America Wabash Valley Region, Inc’ +
» +
» +
‘by email’ +
» +
» +
‘by postal mail’ +
» +
» +
‘by phone’ +
» +
» +
» +
‘ ‘ +
‘ ‘ +
‘ You must fill out the CAPTCHA’ +
» +
» +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
» +
» +
‘ Processing…Your transaction is being processed. Please do not close your browser or leave this page.’ +
» +
» +
» + »;var successHtml3574784 = » +
‘ Thank You for Your Donation!’ +
‘ Your generous gift has been processed. We truly appreciate your continued support.’ +
‘ ‘ +
»;( function($) {if (!Bloomerang.useDonationId(‘3574784’)) {
html3574784 = ‘Only one donation or event registration form can be used on each page.’;
}if (jQuery(‘#bloomerangForm3574784’).length) {

if (window.ActiveXObject) { // they are using IE <11, which doesn't support TLS 1.1 html3574784 = '​Your browser does not support the minimum security requirements for keeping your Credit Card information safe when processing payments. Please upgrade ​your browser or download the latest version of' + ' Chrome or Firefox.'; } jQuery('#bloomerangForm3574784').after(html3574784); if (!Bloomerang.SpreedlyScriptLoaded) { Bloomerang.Util.load('https://core.spreedly.com/iframe/express-2.min.js', function() { return SpreedlyExpress != undefined; }, function() { SpreedlyExpress.onInit(function() { jQuery('#express-submit').attr('disabled', false); }); Bloomerang.initSpreedly = function() { SpreedlyExpress.init('OqOMv1ksjPtXEYHtCYsVXzEpCbR', { 'company_name': 'Mental Health America Wabash Valley Region, Inc' }); }; Bloomerang.initSpreedly(); }); } Bloomerang.SpreedlyScriptLoaded = true; }; if (Bloomerang.paymentFormLoaded) { return false; } Bloomerang.paymentFormLoaded = true; window.captchaLoadCallback = function() { Bloomerang.gRecaptchaLoaded = true; }; Bloomerang.Util.load('https://www.google.com/recaptcha/api.js?onload=captchaLoadCallback&render=explicit', function() { return Bloomerang.gRecaptchaLoaded; }, function() { jQuery('.section.captcha').removeAttr('style'); jQuery('form.donation-form').data('captcha-id', grecaptcha.render('captcha3574784', { 'sitekey' : '6LdIprIUAAAAAH300juWvXYi3HkyOcjisIOsG491' })); }, true, true); Bloomerang.transactionFee = 0.3; Bloomerang.transactionFeeRate = 0.022; Bloomerang.transactionFeeEft = Bloomerang.useKey('pub_691e6448-433b-11e2-8527-02854a1eb3c6'); Bloomerang.Util.getDonationAmount = function() { return Number(accounting.unformat(jQuery(".donation-form .section.donation inputinvalid_tags_codes_14:checked").val() || jQuery(".donation-form #donation-amount").val())); }; // Register proper callbacks for various stages/outcomes of submission Bloomerang.Widget.Donation.OnSubmit = function (args) { jQuery(".btn-submit-donation").val("Donating...").prop("disabled", true).addClass("disabled"); var val = function (selector) { return jQuery(selector).val(); }; Bloomerang.Account .individual() .firstName(val(".donation-form #first-name")) .middleName(val(".donation-form #middle-name")) .lastName(val(".donation-form #last-name")) .homeAddress(val(".donation-form #street-address"), val(".donation-form #city"), val(".donation-form #state") || val(".donation-form #province"), val(".donation-form #zip-code") || val(".donation-form #postal-code"), val(".donation-form #country")) .homeEmail(val(".donation-form #email-address")) .homePhone(val(".donation-form #phone-number")) .applyDonationCustomFields(); if (jQuery(".donation-form #consent-all").prop("checked")) { Bloomerang.Account.optedInStatus(jQuery(".donation-form #consent-email").prop("checked"), jQuery(".donation-form #consent-mail").prop("checked"), jQuery(".donation-form #consent-phone").prop("checked")); } var amount = Bloomerang.Util.getDonationAmount() + Bloomerang.Util.getDonationTrueImpactAmount(); if (jQuery(".donation-form #recurring").prop("checked")) { Bloomerang.RecurringDonation .amount(amount) .fundId(val(".donation-form #fund")) .note(val(".donation-form #comment")) .frequency(val(".donation-form #frequency") || "Monthly") .startDate(val(".donation-form #start-date")) .applyDonationCustomFields(); // Need to do a null-check here because they might have a cached version of Bloomerang-v2.js if (Bloomerang.RecurringDonation.trueImpactEnabled && Bloomerang.RecurringDonation.trueImpactUsed) { Bloomerang.RecurringDonation .trueImpactEnabled(jQuery(".donation-form .true-impact .fee-amount").length> 0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
} else {
Bloomerang.Donation
.amount(amount)
.fundId(val(«.donation-form #fund»))
.note(val(«.donation-form #comment»))
.applyDonationCustomFields();

// Need to do a null-check here because they might have a cached version of Bloomerang-v2.js
if (Bloomerang.Donation.trueImpactEnabled && Bloomerang.Donation.trueImpactUsed) {
Bloomerang.Donation
.trueImpactEnabled(jQuery(«.donation-form .true-impact .fee-amount»).length > 0)
.trueImpactUsed(jQuery(«.donation-form .true-impact input:checked»).length > 0);
}
}

if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked»)) {
Bloomerang.Eft
.accountNumber(val(«.donation-form #accountNumber»))
.routingNumber(val(«.donation-form #routingNumber»))
.type(jQuery(«#donation-form .section.payment input[type=’radio’]:checked»).attr(«id»));
}
};
Bloomerang.ValidateDonationFormCaptcha = function() {
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
var captchaResponse = grecaptcha.getResponse(jQuery(«.donation-form»).data(«captcha-id»));
if (captchaResponse) {
jQuery(«.donation-form .noCaptchaResponseError»).hide();
Bloomerang.captchaResponse(captchaResponse);
return true;
} else {
jQuery(«.donation-form .noCaptchaResponseError»).show();
return false;
}
} else return true;
};
Bloomerang.scrollToElement = function(element) {
var distance = 100;
var offset = element.offset().top;
var offsetTop = offset > distance ? offset – distance : offset;
jQuery(‘html, body’).animate({ scrollTop : offsetTop}, 500);
};
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess = function (response) {
jQuery(«#donation-processing-container»).hide();
var formContainer = jQuery(«#donation-form-container»);
formContainer.show();
formContainer.html(successHtml3574784);
Bloomerang.scrollToElement(formContainer);
};
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError = function (response) {
jQuery(«.btn-submit-donation»).prop(«disabled», false).removeClass(«disabled»);
if (jQuery(«#donation-form #Checking»).is(«:checked») ||
jQuery(«#donation-form #Savings»).is(«:checked») ||
Bloomerang.Api.ProcessorType === «StripeConnect») {
jQuery(«.btn-submit-donation»).val(«Donate»);
} else {
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
jQuery(«#donation-form-container .errors»).removeClass(«hidden»).html(response.Message);
jQuery(«#donation-processing-container»).hide();
jQuery(«#donation-form-container»).show();
Bloomerang.scrollToElement(jQuery(«#donation-form-container .errors»));
Bloomerang.cancelFinancialSubmission(jQuery(«#donation-form»));
SpreedlyExpress.unload();
Bloomerang.initSpreedly();
if (typeof(grecaptcha) !== «undefined» && jQuery(«#captcha» + Bloomerang.Data.WidgetIds.Donation).children().length) {
grecaptcha.reset(jQuery(«.donation-form»).data(«captcha-id»));
}
};

Bloomerang.Util.applyDonationCustomFields = function (obj, type) {

// Clear any fields from a previous failed submission
obj.clearCustomFields();

// Apply all (not multiselect), and fields
jQuery(«.donation-form .section.custom-fields :input:not(a > input, select)[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customFreeformField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all fields
jQuery(«.donation-form .section.custom-fields select[id*=» + type + «]»).each(function() {
if (jQuery(this).val().hasValue()) {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(), jQuery(this).val());
}
});

// Apply all multiselect fields
jQuery(«.donation-form .section.custom-fields .checkboxes[id*=» + type + «]»).each(function() {
obj.customPickField(jQuery(this).attr(«id»).toUntypedValue(),
jQuery.map(jQuery(this).children(«.checkbox.selected»), function(v) { return jQuery(v).attr(«data-id»); }));
});
};

String.prototype.hasValue = function() {
return (this && jQuery.trim(this)); //IE8 doesn’t have a native trim function
};

Bloomerang.Account.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Account»);
return this;
};

Bloomerang.Donation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

Bloomerang.RecurringDonation.applyDonationCustomFields = function () {
Bloomerang.Util.applyDonationCustomFields(this, «Transaction»);
return this;
};

String.prototype.toUntypedValue = function() {
return this.substring(this.indexOf(‘_’) + 1);
};

Date.prototype.toDateInputValue = function() {
var local = new Date(this);
local.setMinutes(this.getMinutes() – this.getTimezoneOffset());
return (local.getMonth() + 1) + // Add one to the month because it starts at 0
«/» + local.getDate() + «/» + local.getFullYear();
};

jQuery(document).ready(function() {
jQuery(«.donation-form .field.start-date input»).val(new Date().toDateInputValue());
});

// Hide recurring donation options if recurring donation box is unchecked
jQuery(«.donation-form .field.recurring»).change(function() {
jQuery(«.donation-form .field.recurring»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
})

// The other-amount field is only equired when the «Other» donation-level is selected
toggleOtherAmountRequired = function () {
jQuery(«.donation-form #other-amount»).toggleClass(«required»,
jQuery(«.donation-form #other-option»).prop(«checked»));
Bloomerang.Util.calculateDonationTrueImpact();
};
jQuery(«.donation-form .section.donation input[name=’donation-level’]»).change(toggleOtherAmountRequired);

if (jQuery(«.donation-form .true-impact label»).length) {
jQuery(«.donation-form .true-impact label»)[0].innerHTML = jQuery(«.donation-form .true-impact label»)[0].innerHTML.replace(«[amount]», «$0»);
}
Bloomerang.Util.calculateDonationTrueImpact = function() {
if (!jQuery(«.donation-form .true-impact .fee-amount»).length) { return; }
// Note that we don’t really care about JS floating point math. It’s OK if the numbers are a couple cents off.
var amount = Bloomerang.Util.getDonationAmount();
var isEft = (jQuery(«#donation-form #Checking»).is(«:checked») || jQuery(«#donation-form #Savings»).is(«:checked»));
var feeRate = isEft ? 0 : Bloomerang.transactionFeeRate;
var newTotal = (amount + (isEft ? Bloomerang.transactionFeeEft : Bloomerang.transactionFee)) / (1 – feeRate);
var impactAmount = Number((newTotal – amount).toFixed(2));
jQuery(«.donation-form .true-impact .fee-amount»).text(accounting.formatMoney(impactAmount));
return impactAmount;
};
Bloomerang.Util.getDonationTrueImpactAmount = function() {
if (jQuery(«.donation-form .true-impact input:checked»).length) {
return Bloomerang.Util.calculateDonationTrueImpact();
}
return 0;
};

// Changing the value of other-amount should change the value of other-option
jQuery(«.donation-form #other-amount»).change(function () {
jQuery(«.donation-form #other-option»).val(jQuery(this).val());
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery(«.donation-form #donation-amount»).change(function() {
Bloomerang.Util.calculateDonationTrueImpact();
});

// Clicking into the other-amount field should select the other-option
jQuery(«.donation-form #other-amount»).click(function() {
jQuery(«.donation-form #other-option»).prop(‘checked’,true);
toggleOtherAmountRequired();
Bloomerang.Util.calculateDonationTrueImpact();
});

jQuery.validator.addMethod(«phoneUS», function(phone_number, element) {
var digits = phone_number.replace(/\D/g, «»);
return this.optional(element) || digits.length == 7 || digits.length == 10 || digits.length == 11;
}, «Please specify a valid phone number or use ‘+’ for international.»);

jQuery.validator.addMethod(«phoneInternational», function (phone_number, element) {
return this.optional(element) || /^\+[0-9\-\(\)\s.]+$/i.test(phone_number);
}, «Please specify a valid phone number.»);
jQuery.validator.classRuleSettings.phoneInternational = { phoneInternational: true };

jQuery.validator.addMethod(«zipcodeUS», function (value, element) {
return this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
}, «The specified US ZIP Code is invalid»);

jQuery.validator.addMethod(«currency», function (value, element, options) {
return !value ||
value
.replace(«$», «»)
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid currency»);

jQuery.validator.classRuleSettings.currency = { currency: true };

// Validate the other amount, but only if they selected it
jQuery.validator.addMethod(«otherAmount», function(value, element, param) {
if (jQuery(«.donation-form #other-option»).prop(«checked»)) {
return jQuery.validator.methods.min.bind(this)(value, element, 1) &&
jQuery.validator.methods.currency(value, element);
}
return true;
}, «Invalid amount»);

jQuery.validator.classRuleSettings.otherAmount = { otherAmount: true };

jQuery.validator.addMethod(«number», function (value, element, options) {
return !value ||
value
.replace(«.», «»)
.split(«,»).join(«»)
.match(/^\d+$/g);
}, «Not a valid number»);

jQuery.validator.classRuleSettings.number = { number: true };

jQuery.validator.addMethod(«validYear», function (value, element, options) {
try {
return (!value || value.match(/^[1-9]\d\d\d$/)) ? true : false;
}
catch (e) {
return false;
}
}, function () { return «Must be a 4 digit year»; });

jQuery.validator.classRuleSettings.validYear = { validYear: true };

// Validate that the donation amount is at least $1
jQuery.validator.methods.min = function( value, element, param ) {
if (typeof (accounting) === «undefined») { // rip out $ and ,
value = ((value + «») || «»).replace(/[\$,]/g, «»);
}
else { // Use accounting.parse, to handle $ and ,
value = accounting.parse(value);
}
return this.optional( element ) || value >= param;
};
jQuery.validator.classRuleSettings.minimum1 = { min: 1 };
jQuery.validator.messages.min = ‘Please enter a value of at least {0}.’

jQuery(«.donation-form #country»).change(function(event) {
var element = jQuery(event.target || event.srcElement); // cross-browser event target selection
var isInternational = (element.val() != «US» && element.val() != «CA» && element.val() != «BM»);
jQuery(«.donation-form #state, .donation-form #province»).val(«»); // clear the state when the country changes
jQuery(«.donation-form .field.city, .donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code, .donation-form .field.postal-code»).toggle(!isInternational);
jQuery(«.donation-form #street-address»).toggleClass(«international», isInternational);
if (element.val() == «BM») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«bm-label»));
} else if (element.val() == «US» || element.val() == «CA») {
jQuery(«.donation-form .field.city .label»).text(jQuery(«.donation-form .field.city input»).data(«us-label»));
}
if (element.val() == «US») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).show();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).hide();
} else if (element.val() == «CA») {
jQuery(«.donation-form .field.state, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.province, .donation-form .field.postal-code»).show();
} else if (element.val() == «BM») {
jQuery(«.donation-form .field.state, .donation-form .field.province, .donation-form .field.zip-code»).hide();
jQuery(«.donation-form .field.postal-code»).show();
} else {
jQuery(«.donation-form #city, .donation-form #postal-code, .donation-form #zip-code»).val(«»);
}
jQuery(«.donation-form .section.consent»).toggleClass(«hidden», !Bloomerang.Util.isCountryInEurope(element.val()));
});

jQuery(«.donation-form #phone-number»).change(function () {
var phoneField = jQuery(«.donation-form #phone-number»);
var internationalNumber = phoneField.val().substring(0,1) === ‘+’;
phoneField.toggleClass(«phoneUS», !internationalNumber);
phoneField.toggleClass(«phoneInternational», internationalNumber);
})

collectPayment = function () {
var form = jQuery(«#donation-form»);

if (!Bloomerang.ValidateDonationFormCaptcha()) {
return false;
}

if (!form.valid()) {
return false;
}

if (Bloomerang.Api.ProcessorType === «StripeConnect» && !Bloomerang.Util.StripeCardIsValid) {
document.getElementById(‘card-errors’).textContent = «Valid card info is required»;
return false;
}

if (jQuery(«#donation-form #CreditCard»).length > 0 && !jQuery(«#donation-form #CreditCard»).prop(«checked»)) {
submitDonation();
}
else {
var val = function (selector) { return jQuery(selector).val(); };
var amount = Bloomerang.Util.getDonationAmount() + Bloomerang.Util.getDonationTrueImpactAmount();
var selectedDonationLevel = jQuery(«.donation-form .section.donation input[name=’donation-level’]:checked»).parent().text();
selectedDonationLevel = (selectedDonationLevel.indexOf(«-«) == -1 ? «» : selectedDonationLevel.substr(selectedDonationLevel.indexOf(«-«) + 2) );

var oldMeta = »;
if (jQuery(‘meta[name=»viewport»]’).length) {
oldMeta = jQuery(‘meta[name=»viewport»]’).attr(‘content’);
} else {
jQuery(‘head’).append(»);
}
jQuery(‘meta[name=»viewport»]’).attr(‘content’, ‘width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1’);
jQuery(‘meta[name=»viewport»]’).attr(‘content’, oldMeta);

if (Bloomerang.Api.ProcessorType !== «StripeConnect») {
SpreedlyExpress.setDisplayOptions({
«amount»: accounting.formatMoney(amount),
«full_name»: val(«.donation-form #first-name») + » » + val(«.donation-form #last-name»),
«sidebar_bottom_description»: selectedDonationLevel,
«submit_label»: «Donate»});
SpreedlyExpress.setPaymentMethodParams({
«email»: val(«.donation-form #email-address»),
«phone_number»: val(«.donation-form #phone-number»),
«address1»: val(«.donation-form #street-address»),
«city»: val(«.donation-form #city»),
«state»: val(«.donation-form #state») || val(«.donation-form #province»),
«zip»: val(«.donation-form #zip-code») || val(«.donation-form #postal-code»),
«country»: val(«.donation-form #country»)});

SpreedlyExpress.onPaymentMethod(function(token, paymentMethod) {
Bloomerang.CreditCard.spreedlyToken(token);
submitDonation();
});

SpreedlyExpress.openView();
} else {
submitDonation();
}
}
};

submitDonation = function() {
if (!Bloomerang.continueFinancialSubmission(jQuery(«#donation-form»))) { return false; }

Bloomerang.Api.OnSubmit = Bloomerang.Widget.Donation.OnSubmit;
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Donation.OnSuccess;
Bloomerang.Api.OnError = Bloomerang.Widget.Donation.OnError;

var processingMessage = jQuery(«#donation-processing-container»);
processingMessage.show();
jQuery(«#donation-form-container»).hide();
Bloomerang.scrollToElement(processingMessage);

var tmp = jQuery(«.donation-form #recurring»).prop(«checked»)
? Bloomerang.Api.recurringDonate()
: Bloomerang.Api.donate();
};

jQuery(«#donation-form #CreditCard»).prop(«checked», true);
jQuery(«#donation-form .section.payment input[type=’radio’]»).click(function() {
Bloomerang.Util.calculateDonationTrueImpact();
if (jQuery(this).attr(«id») == «CreditCard») {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).hide();
jQuery(«.btn-submit-donation»).val(«Enter Payment»);
}
else {
jQuery(«#donation-form .accountNumber, \
#donation-form .routingNumber, \
#donation-form .sample-check»).show();
if (jQuery(«#donation-form .sample-check»).length == 0) {
var checkImage = new Image();
checkImage.src = ‘https://s3-us-west-2.amazonaws.com/bloomerang-public-cdn/public-gallery/SampleCheck.png’;
jQuery(checkImage).addClass(«sample-check»);
jQuery(«#donation-form .accountNumber»).after(checkImage);
}
jQuery(«.btn-submit-donation»).val(«Donate»);
}
});

// Show opt-in options based on the setting of the global opt-in
jQuery(«.donation-form .field.consent-all»).change(function() {
jQuery(«.donation-form .field.consent-all»).siblings().each(function(i, e) {
jQuery(e).toggle();
});
});

})(jQuery);
};

var startBloomerangLoad = function() {
if (window.bloomerangLoadStarted == undefined) {
window.bloomerangLoadStarted = true;
var script = document.createElement(‘script’);
script.type = ‘text/javascript’;
script.src = ‘https://crm.bloomerang.co/Content/Scripts/Api/Bloomerang-v2.js?nocache=2019-10-02’;
document.getElementsByTagName(‘head’)[0].appendChild(script);
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
else {
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm3574784(); })});
}
};

var waitForBloomerangLoad = function(callback) {
if (typeof(Bloomerang) === ‘undefined’ || !Bloomerang._isReady) {
setTimeout(function () { waitForBloomerangLoad(callback) }, 500);
}
else {
if (true) {
callback();
} else {
window.bloomerangLoadStarted = undefined;
Bloomerang = undefined; // The version of Blomerang.js is not what we want. So blow it away and reload.
startBloomerangLoad();
}
}
};

startBloomerangLoad();[/cs_content_seo]]]>