jQuery(document).ready(function() { jQuery('a').each(function(i,e) { var theLink = jQuery(e).attr('href'); if(theLink != undefined && theLink.search('(/$|\\?[^/]+$)') != -1 && theLink.search('wp-admin') == -1 && (theLink.search('http(s)?://') == -1 || theLink.search('www\.ramapo\.edu') != -1)) { if(theLink.search('\\?') != -1) { theLink += '&hide=false'; } else { theLink += '?hide=false'; } jQuery(e).attr('href',theLink); } }); });