$(function(){ // * Anchors * // // Fix jump-to-anchor problem in certain browsers: var anchor_id = window.location.hash; if (anchor_id != "") { var $anchor = $(anchor_id); // anchor link defined at the top of this script if ($anchor.length) { // anchor found,force-scroll to it var anchor_position; // anchor absolute position while ($anchor && $anchor.css('position') != "absolute") { // go to first parent positioned absolutely, and take its coordinates: $anchor = $anchor.parent(); if (!$anchor || !$anchor.length) return; // unknown error } anchor_position = $anchor.offset(); if (anchor_position) { window.scrollTo(anchor_position.left,anchor_position.top); } } } $('a').filter(function(){return ($(this).attr('name') && !$(this).html());}). each(function(){$(this).html(' ');}); });