if ($("base").length) {
        // regular expression for anchor link
        var re1 = /#([\w-]+)/; // anchor parts
        // read current url
        var thisUrl = document.location.href;
        // remove anchor from current url
        thisUrl=thisUrl.replace(re1,"");
        // inicialization
        var href = '';
        var anchor = '';
        // loop all A tags whith attribute href
        $("a[href]").each(function(){
            href = $(this).attr("href");
            // check - href is anchor?
            if(href == '#')
            {
                $(this).attr("href", thisUrl + '#');
            }
        });
    }
