jQuery(function( $ ){
	//borrowed from jQuery easing plugin
	//http://gsgd.co.uk/sandbox/jquery.easing.php

	
	// This one is important, many browsers don't reset scroll on refreshes
	// Reset all scrollable panes to (0,0)
	$('div.pane').scrollTo( 0 );
	// Reset the screen to (0,0)
	$.scrollTo( 0 );
	
	// Scroll the whole window
	$('.toc a').click(function(){
		$.scrollTo( this.hash, 800 );
		$(this.hash).find('span.message').text( this.title );
		return false;
	});
	
	$(document).ready(function() {
	    
	    $('a[href=#top]').click(function(){
	        $('html, body').animate({scrollTop:0}, 'slow');
	        return false;
	    });
	});



	//Horizontal Sliding
	$('.boxgrid.slideright').hover(function(){
		$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:380});
	}, function() {
		$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:200});
	});
	

});
