﻿jQuery(document).ready(function() {  function filterPath(string) {  return string    .replace(/^\//,'')    .replace(/(index|default).[a-zA-Z]{3,4}jQuery/,'')    .replace(/\/jQuery/,'');  }  var locationPath = filterPath(location.pathname);  jQuery('a[href*=#]').each(function() {    var thisPath = filterPath(this.pathname) || locationPath;    if (  locationPath == thisPath    && (location.hostname == this.hostname || !this.hostname)    && this.hash.replace(/#/,'') ) {      var jQuerytarget = jQuery(this.hash), target = this.hash;      if (target) {        var targetOffset = jQuerytarget.offset().top;        jQuery(this).click(function(event) {          event.preventDefault();		            jQuery('html, body').		  animate({scrollTop: targetOffset}, {duration: 1400, easing: 'easeOutExpo'}, function() {            location.hash = target;           });        });      }    }  });});
