$("center i").first().parent().addClass("citation");
// find and markup judges
- var judgeExp = /([A-Zc]+)(\s[A-Zc,\s]+\sC?JJ?\.)/g;
+ // var judgeExp = /([A-Zc]+\s)([A-Zc,\s]+\sC?JJ?\.)/g;
+ var judgeExp = /([A-Z]{3})((?:[A-Z\s,]| )+C?J?J\.)/g
var replacementText = document.body.innerHTML.replace(judgeExp, '<a class="judge" name="$1">$1$2</a>');
document.body.innerHTML = replacementText;
});
});
- // update right menu on scroll
+ // update current judge on scroll
$(window).scroll(function() {
$("#menu ol li a").each(function(){
// if the relevant link appearsmore than half way down the page