jQuery(document).ready(function() { if(window.location.href.match(/-f6\/((\?|#).+)?/)) { jQuery(".i_post, #i_post").parent().attr('href', '/-h2.htm'); } });