// Copyright (c) 20011 REDF (jhulbert AT redf DOT com || http://www.redf.com)
// Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
// and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
$(document).ready(function() {
	/*----------------------------
	Animate scroll when navigating to a specific item
	----------------------------*/
	$('.index-link').click(function() {
		if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({
					scrollTop: targetOffset
				}, 500, "easeOutExpo");
				return false;
			}
		}
	});
})
