$(function() {
/*	$('a[href^=#').click(function() {  
		smoothScroll(this);
		return false;
	});*/
	$('#contentsContainer a[href^=#]').each (function(){
		var hash = this.hash;
		if(hash.length > 1 && !this['rel']){
			$(this).click(function() {
				smoothScroll(hash);
				return false;
			})
		}
	});
});

function smoothScroll(hash) {
	var target = $(hash).offset().top;
	$($.browser.safari ? 'body' : 'html')
		.animate({scrollTop: target >= 15 ? target - 15 : target}, 500, 'swing');
}
