Just a reminder: My Facebook page is at facebook.com/EdWhelanEPPC, and my Twitter account is @EdWhelanNRO.
Youโre also welcome to join my e-mail distribution list for selected posts of mine from Bench Memos and The Corner as well as my occasional essays on NRO or elsewhere. Just fill out the form below. If you do sign up, youโll receive an e-mail asking you to confirm. Please note that your e-mail address will not be visible to other folks on the list and that I will make no other use of your e-mail address. Also, it should be a simple matter for you to remove yourself from the list any time you want.
#mc_embed_signup{background:#fff; clear:left; font:11px Helvetica,Arial,sans-serif; width:300px;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
var fnames = new Array();var ftypes = new Array();fnames[0]=โEMAILโ;ftypes[0]=โemailโ;fnames[1]=โFNAMEโ;ftypes[1]=โtextโ;fnames[2]=โLNAMEโ;ftypes[2]=โtextโ;
try {
var jqueryLoaded=jQuery;
jqueryLoaded=true;
} catch(err) {
var jqueryLoaded=false;
}
var head= document.getElementsByTagName(โheadโ)[0];
if (!jqueryLoaded) {
var script = document.createElement(โscriptโ);
script.type = โtext/javascriptโ;
script.src = โhttp://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.jsโ;
head.appendChild(script);
if (script.readyState && script.onload!==null){
script.onreadystatechange= function () {
if (this.readyState == โcompleteโ) mce_preload_check();
}
}
}
var script = document.createElement(โscriptโ);
script.type = โtext/javascriptโ;
script.src = โhttp://downloads.mailchimp.com/js/jquery.form-n-validate.jsโ;
head.appendChild(script);
var err_style = โ;
try{
err_style = mc_custom_error_style;
} catch(e){
err_style = โ#mc_embed_signup input.mce_inline_error{border-color:#6B0505;} #mc_embed_signup div.mce_inline_error{margin: 0 0 1em 0; padding: 5px 10px; background-color:#6B0505; font-weight: bold; z-index: 1; color:#fff;}โ;
}
var head= document.getElementsByTagName(โheadโ)[0];
var style= document.createElement(โstyleโ);
style.type= โtext/cssโ;
if (style.styleSheet) {
style.styleSheet.cssText = err_style;
} else {
style.appendChild(document.createTextNode(err_style));
}
head.appendChild(style);
setTimeout(โmce_preload_check();โ, 250);
var mce_preload_checks = 0;
function mce_preload_check(){
if (mce_preload_checks>40) return;
mce_preload_checks++;
try {
var jqueryLoaded=jQuery;
} catch(err) {
setTimeout(โmce_preload_check();โ, 250);
return;
}
try {
var validatorLoaded=jQuery(โ#fake-formโ).validate({});
} catch(err) {
setTimeout(โmce_preload_check();โ, 250);
return;
}
mce_init_form();
}
function mce_init_form(){
jQuery(document).ready( function($) {
var options = { errorClass: โmce_inline_errorโ, errorElement: โdivโ, onkeyup: function(){}, onfocusout:function(){}, onblur:function(){} };
var mce_validator = $(โ#mc-embedded-subscribe-formโ).validate(options);
$(โ#mc-embedded-subscribe-formโ).unbind(โsubmitโ);//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator
options = { url: โhttp://eppc.us4.list-manage.com/subscribe/post-json?u=be333e74ea841be93db60da61&id=bf7cd6fa95&c=?โ, type: โGETโ, dataType: โjsonโ, contentType: โapplication/json; charset=utf-8โ,
beforeSubmit: function(){
$(โ#mce_tmp_error_msgโ).remove();
$(โ.datefieldโ,โ#mc_embed_signupโ).each(
function(){
var txt = โfilledโ;
var fields = new Array();
var i = 0;
$(โ:textโ, this).each(
function(){
fields[i] = this;
i++;
});
$(โ:hiddenโ, this).each(
function(){
var bday = false;
if (fields.length == 2){
bday = true;
fields[2] = {โvalueโ:1970};//trick birthdays into having years
}
if ( fields[0].value==โMMโ && fields[1].value==โDDโ && (fields[2].value==โYYYYโ || (bday && fields[2].value==1970) ) ){
this.value = โ;
} else if ( fields[0].value==โ && fields[1].value==โ && (fields[2].value==โ || (bday && fields[2].value==1970) ) ){
this.value = โ;
} else {
if (/[day]/.test(fields[0].name)){
this.value = fields[1].value+โ/โ+fields[0].value+โ/โ+fields[2].value;
} else {
this.value = fields[0].value+โ/โ+fields[1].value+โ/โ+fields[2].value;
}
}
});
});
return mce_validator.form();
},
success: mce_success_cb
};
$(โ#mc-embedded-subscribe-formโ).ajaxForm(options);
});
}
function mce_success_cb(resp){
$(โ#mce-success-responseโ).hide();
$(โ#mce-error-responseโ).hide();
if (resp.result==โsuccessโ){
$(โ#mce-โ+resp.result+โ-responseโ).show();
$(โ#mce-โ+resp.result+โ-responseโ).html(resp.msg);
$(โ#mc-embedded-subscribe-formโ).each(function(){
this.reset();
});
} else {
var index = -1;
var msg;
try {
var parts = resp.msg.split(โ โ โ,2);
if (parts[1]==undefined){
msg = resp.msg;
} else {
i = parseInt(parts[0]);
if (i.toString() == parts[0]){
index = parts[0];
msg = parts[1];
} else {
index = -1;
msg = resp.msg;
}
}
} catch(e){
index = -1;
msg = resp.msg;
}
try{
if (index== -1){
$(โ#mce-โ+resp.result+โ-responseโ).show();
$(โ#mce-โ+resp.result+โ-responseโ).html(msg);
} else {
err_id = โmce_tmp_error_msgโ;
html = โ
โ+msg+โ
โ;
var input_id = โ#mc_embed_signupโ;
var f = $(input_id);
if (ftypes[index]==โaddressโ){
input_id = โ#mce-โ+fnames[index]+โ-addr1โฒ;
f = $(input_id).parent().parent().get(0);
} else if (ftypes[index]==โdateโ){
input_id = โ#mce-โ+fnames[index]+โ-monthโ;
f = $(input_id).parent().parent().get(0);
} else {
input_id = โ#mce-โ+fnames[index];
f = $().parent(input_id).get(0);
}
if (f){
$(f).append(html);
$(input_id).focus();
} else {
$(โ#mce-โ+resp.result+โ-responseโ).show();
$(โ#mce-โ+resp.result+โ-responseโ).html(msg);
}
}
} catch(e){
$(โ#mce-โ+resp.result+โ-responseโ).show();
$(โ#mce-โ+resp.result+โ-responseโ).html(msg);
}
}
}






Comments