// JavaScript Document

//animated scrolling for element, with a bounce
/*
$(document).ready(function() 
{
	$('#scrollit').click(function() 
	{
    	var divOffset = $('#scrollable').offset().top;
    	var pOffset = $('#scrollable p:eq(2)').offset().top;
    	var pScroll = pOffset - divOffset;
    	$('#scrollable').animate({scrollTop: '+=' + pScroll + 'px'}, 1000, 'easeOutBounce');
  	});
});
*/

$(document).ready(function(){
  $('a[href*=#]').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}, 1000);
    return false;
   }
 }
  });
});


