﻿/**
 * scroll.js
 * @require		jQuery
 * @version		1.0.0.0 - 20:11 2009/02/09
 * @return		{Void}
 */

(function() {
	
	jQuery(document).ready(function() {
		
		
		jQuery('#col-a 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)? target.offset().top : jQuery('body').height() - wH;
					jQuery('html,body').animate({scrollTop: targetOffset}, 1000, 'easeOutExpo');
					
					return false;
					
				}
				
			}
			
		});
	});
	
})();
