﻿$(document).ready(function () {
    $('a[href*=#]').click(
            function () {
                goToByScroll($(this).attr('href').split('#')[1]);
            });
});

$(document).ready(function () {
    var myFile = document.location.toString();
    if (myFile.match('#')) { // the URL contains an anchor
        // click the navigation item corresponding to the anchor
        var myAnchor = myFile.split('#')[1];
        goToByScroll(myAnchor);
    }
});
