jQuery(document).ready(function(){jQuery("a[href*=#]").each(function(){pos=this.href.split("#");if(pos.length==2&&pos[1]!=""){var a=pos[1];jQuery(this).click(function(b){b.preventDefault();var c=jQuery("#"+a).offset().top;jQuery("html").animate({scrollTop:c},500,function(){location.hash=a})})}})});

