/*
-------------------------------------------------------------------
Carter Halliday Associates - Site 2010 -- JavaScript functions
author:   web@spacewalk.com
version:  2009.12.23
-------------------------------------------------------------------
*/

/* START JQUERY-DEPENDENT CODE */

$(document).ready(function(){


	$(window).load(function() {
		/*dynamically create varied start and scroll values for the jCarouselLite jQuery plug-in*/
		var startMin = 1;
		var startMax = 12;
		var scrollMin = 7;
		var scrollMax = 16;
		var startNum = Math.floor(Math.random() * (startMax - startMin + 1) + startMin);
		var scrollNum = Math.floor(Math.random() * (scrollMax - scrollMin + 1) + scrollMin);
/* 		self.status = "start = " + startNum + ", scroll = " + scrollNum; */

		$("#page").fadeIn(1500);

		$(".carousel").jCarouselLite({
		    btnNext: ".next",
		    btnPrev: ".prev",
		    vertical: true,
		    visible: 1,
		    start: startNum,
		    scroll: scrollNum,
		    auto: 0,
		    easing: "easeOutCirc",
		    speed: 2000
		    
		});
		
		$("a.next").click();
		
	}); // end window.load()


}); //end document.ready

/* END JQUERY-DEPENDENT CODE */