/*
-------------------------------------------------------------------
Rebecca Nemser -- JavaScript functions
author:   web@spacewalk.com
version:  2010.05.25
-------------------------------------------------------------------
*/

/* START JQUERY-DEPENDENT CODE */

$(document).ready(function(){

/* SCROLL HOME PAGE POST EXCERPTS */

// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

$('#home-slider-holder').serialScroll({
	items:'div.post',
	prev:'a#home-prev',
	next:'a#home-next',
	offset:0, //when scrolling to photo, stop 230 before reaching it (from the left)
	start:0, //as we are centering it, start at the 2nd
	duration:1000,
	force:true,
	stop:true,
	lock:false,
	cycle:true, //don't pull back once you reach the end
	easing:'easeOutQuart', //easing equation above
	jump: false //click on the images to scroll to them
});
	
});//end document.ready

/* END JQUERY-DEPENDENT CODE */
