$(function() {
	$('a[href^="#"]').click(function() {
		var href = $(this).attr("href");
		if (href == "#") return false;
		var target = $(href.replace(/\./g,'\\.'));
		var position = target.offset().top;
		var speed = 400;
		$("html, body").animate({scrollTop: position}, speed, "swing");
		return false;
	});
});