		$(document).ready(function(){
			/* Audio Controller
			---------------------------- */
		   $("#jquery_jplayer").jPlayer({
				ready: function () {
				
					//set the first audio file to play
					var audio_file = $(".item:nth-child(1) .audio_file").attr('href');
					$(this).setFile("http://www.catherinechhood.net/slides_audio/whysa-1.mp3").play();
				}
			})
			.jPlayerId("play", "play")
			.jPlayerId("pause", "pause")
			.jPlayerId("stop", "stop").onProgressChange( function(lp,ppr,ppa,pt,tt) {
		 		$("#pcent").text(parseInt(ppa)+"%");
			});
		
			
			 
		    //Scrollable Setup
			var scrollable_api = $("div.scrollable").scrollable({ 
	       		size: 1,
	       		api: true
			});
			
			$("#start_over").click(function () {
				scrollable_api.begin();
			});
			
			
			// register a callback function 
			scrollable_api.onSeek(function() { 
				var slideNum = this.getPageIndex() + 1; //add 1 so that 0 isn't first 
				
				// find the audio file set for the active slide and play it
				var audio_file = $(".item:nth-child(" + slideNum + ") .audio_file").attr('href');
				$("#jquery_jplayer").setFile(audio_file).play();
		    	
			}); 
			
			// This is a visual tweak that sets the width of the 
			// navigation box so that it always remains centered properly.
			$("div.navi").width($("div.navi a").siblings().length * 15);
		
		});
