/**
 * scroll.js
 * @require		jQuery
 * @version		1.0.0.0 - 20:11 2009/02/09
 */

(function() {
	jQuery(document).ready(function() {
		jQuery('a[href*="#"]' ).click(function() {
			var wH = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
				var target = jQuery(this.hash);
				target = target.length && target;
				if (target.length) {
					var targetOffset = (this.hash != '#footer')? target.offset().top : jQuery('body').height() - wH;
					jQuery('html,body').animate({scrollTop: targetOffset}, 1000, 'easeOutExpo');
					return false;
				}
			}
		});
	});
})();

