<?php wp_footer(); ?>
+function($){
$(document).ready(function(){
$('.external-reference').replaceWith (function (){return'<a href="'+$(this).data('link')+'" title="'+$(this).text()+'">'+$(this).html()+'</a>';});
});
}(jQuery);
if (data.loggedin == true){
document.location.href = ajax_login_object.redirecturl;
}