Join a team of Ben’s Ranch Foundation volunteers to support our efforts. Watch your combined impact grow over time and see how your combined efforts make a difference.
Like
var insertForm404482 = function() {
var html404482 = ” +
‘.email-registration-form label{color: #404040;’ +
‘ display: block;}’ +
” +
‘.email-registration-form label.error{color:#900;’ +
‘ display: inline-block; ‘ +
‘ padding: 0 10px;}’ +
” +
‘.email-registration-form .field{padding: 4px 0;}’ +
” +
‘.email-registration-form .field .required-star{color: #aa0000; ‘ +
‘ display: inline-block; ‘ +
‘ margin-left: 5px;}’ +
” +
‘.email-registration-form .field .checkboxes{max-width:275px;’ +
‘ border: 1px solid #A9A9A9;’ +
‘ -webkit-transition: all .3s ease-out;’ +
‘ -moz-transition: all .3s ease-out;’ +
‘ transition: all .3s ease-out;}’ +
” +
‘.email-registration-form .field .checkbox{display:block;’ +
‘ position:relative;’ +
‘ -moz-box-sizing:border-box;’ +
‘ box-sizing:border-box;’ +
‘ height:30px;’ +
‘ line-height:26px;’ +
‘ padding:2px 28px 2px 8px;’ +
‘ border-bottom:1px solid rgba(0,0,0,0.1);’ +
‘ color:#404040; ‘ +
‘ overflow:hidden;’ +
‘ text-decoration:none; }’ +
” +
‘.email-registration-form .field .checkbox input{opacity:0.01;’ +
‘ position:absolute;’ +
‘ left:-50px; ‘ +
‘ z-index:-5;}’ +
” +
‘.email-registration-form .field .checkbox:last-child{border-bottom:none;}’ +
” +
‘.email-registration-form .field .checkbox.selected{background: rgb(50, 142, 253);’ +
‘ color:#fff; }’ +
” +
‘.email-registration-form .field .checkbox.selected:before{color:#fff;’ +
‘ text-shadow:1px 2px 1px rgba(0,0,0,0.25);’ +
‘ line-height:30px;’ +
‘ position:absolute;’ +
‘ right:10px; }’ +
” +
‘.email-registration-form .field input{padding: 4px; ‘ +
‘ width: 275px;}’ +
” +
‘.email-registration-form .errors{border: 1px solid #900;’ +
‘ color: #900; ‘ +
‘ padding: 10px;}’ +
” +
‘.email-registration-form .hidden{display: none;}’ +
” +
‘.btn-group .btn-submit-email{padding: 4px 10px;}’ +
” +
” +
” +
” +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘
‘ +
‘ ‘ +
‘First Name*’ +
” +
” +
” +
‘Last Name*’ +
” +
” +
” +
‘Email*’ +
” +
” +
” +
” +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
‘ ‘ +
” +
” +
” + ”;var successHtml404482 = ” +
‘
‘ +
‘
We will reach out to you shortly. We couldnu0026#39;t do this without you!
‘ +
‘u003cdiv class=”social-media-buttons” style=”margin-top:10px;”u003eu003cdiv class=”fb-like” data-href=”https://facebook.com/bensranchfoundation” data-layout=”button_count” data-show-faces=”true” style=”padding-right: 10px;” data-action=”like” u003eu003c/divu003eu003cdiv id=”facebookShareOnly” class=”fb-share-button” data-href=”https://facebook.com/bensranchfoundation” data-layout=”button_count”u003eu003c/divu003eu003cscript type=u0027text/javascriptu0027u003edocument.getElementById(u0027facebookShareOnlyu0027).setAttribute(u0027data-hrefu0027, window.location.href);u003c/scriptu003eu003c/divu003e u003cdiv id=”fb-root”u003eu003c/divu003e u003cscriptu003e(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1u0026version=v2.8″; fjs.parentNode.insertBefore(js, fjs); }(document, u0027scriptu0027, u0027facebook-jssdku0027));u003c/scriptu003e ‘ +
”;( function($) {if (!Bloomerang.useEmailId(‘404482’)) {
html404482 = ‘
Only one email sign-up form can be used on each page.
‘;
}if (jQuery(‘#bloomerangForm404482’).length) {
jQuery(‘#bloomerangForm404482’).after(html404482);
};
if (Bloomerang.emailSignupFormLoaded) {
return false;
}
Bloomerang.emailSignupFormLoaded = true;
Bloomerang.useKey(‘pub_c4cd59e5-49cf-11e6-9d49-0a1b37ae639f’);
// Register proper callbacks for various stages/outcomes of submission
Bloomerang.Widget.Email.OnSubmit = function (args) {
jQuery(“.btn-submit-email”).val(“Registering…”).prop(“disabled”, true).addClass(“disabled”);
var val = function (selector) { return jQuery(selector).val(); };
Bloomerang.Account
.individual()
.firstName(val(“.email-registration-form #first-name”))
.lastName(val(“.email-registration-form #last-name”))
.homeEmail(val(“.email-registration-form #email-address”))
.applyEmailSignupCustomFields();
Bloomerang.Interaction.applyEmailSignupCustomFields();
};
Bloomerang.ValidateEmailSignupFormCaptcha = function() {
if (typeof(grecaptcha) !== “undefined” && jQuery(“#captcha” + Bloomerang.Data.WidgetIds.EmailSignup).length) {
var captchaResponse = grecaptcha.getResponse(jQuery(“.email-registration-form”).data(“captcha-id”));
if (captchaResponse) {
jQuery(“.noCaptchaResponseError”).hide();
Bloomerang.captchaResponse(captchaResponse);
return true;
} else {
jQuery(“.noCaptchaResponseError”).show();
return false;
}
} else return true;
};
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Email.OnSuccess = function (response) {
jQuery(“#email-registration-form-container”).html(successHtml404482);
var distance = 100;
var offset = jQuery(“#email-registration-form-container”).offset().top;
var offsetTop = offset > distance ? offset – distance : offset;
jQuery(‘html, body’).animate({ scrollTop : offsetTop}, 500);
};
Bloomerang.Api.OnError = Bloomerang.Widget.Email.OnError = function (response) {
jQuery(“.btn-submit-email”).val(“Register”).prop(“disabled”, false).removeClass(“disabled”);
jQuery(“#email-registration-form-container .errors”).removeClass(“hidden”).html(response.Message);
var distance = 100;
var offset = jQuery(“#email-registration-form-container .errors”).offset().top;
var offsetTop = offset > distance ? offset – distance : offset;
jQuery(‘html, body’).animate({ scrollTop : offsetTop}, 500);
};
Bloomerang.Util.applyEmailSignupCustomFields = function (obj, type) {
// Clear any fields from a previous failed submission
obj.clearCustomFields();
// Apply all (not multiselect), and fields
jQuery(“.email-registration-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(“.email-registration-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(“.email-registration-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.applyEmailSignupCustomFields = function () {
Bloomerang.Util.applyEmailSignupCustomFields(this, “Account”);
return this;
};
Bloomerang.Interaction.applyEmailSignupCustomFields = function () {
Bloomerang.Util.applyEmailSignupCustomFields(this, “Interaction”);
return this;
};
String.prototype.toUntypedValue = function() {
return this.substring(this.indexOf(‘_’) + 1);
};
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 };
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]ddd$/)) ? true : false;
}
catch (e) {
return false;
}
}, function () { return “Must be a 4 digit year”; });
jQuery.validator.classRuleSettings.validYear = { validYear: true };
// Intercept form submission to validate then submit via API
jQuery(“#email-registration-form-container form”).validate({
submitHandler: function () {
if (!Bloomerang.ValidateEmailSignupFormCaptcha()) {
return false;
}
// Restore proper callbacks in case there are multiple widgets on the page
Bloomerang.Api.OnSubmit = Bloomerang.Widget.Email.OnSubmit;
Bloomerang.Api.OnSuccess = Bloomerang.Widget.Email.OnSuccess;
Bloomerang.Api.OnError = Bloomerang.Widget.Email.OnError;
Bloomerang.Api.joinMailingList();
}
});
})(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’;
document.getElementsByTagName(‘head’)[0].appendChild(script);
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm404482(); })});
}
else {
waitForBloomerangLoad(function() { Bloomerang.Util.requireJQueryValidation(function() { insertForm404482(); })});
}
};
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();