пример кода:
function gl(el) {
var link=el.href;
link=link.replace(/.*#/,'');
el.href = "
http://site.com/" + link;
}
if (document['location']['href'].match(/#\//) != null)
document['location']['href'] = "
http://site.com/" + document['location']['href'].match(/#(\/.*)/)[1]