var Controller1;
	
function onSlideshowEnd() {
	Controller1.JSONRequestSlideshow( 0 );
}

function HomeInit() {
	BrowserCheck(); 
	
	Controller1 = new SlideshowController( document.getElementById('slide-a'), document.getElementById('slide-b'), document.getElementById('slide-a-text'), document.getElementById('slide-b-text') );
	Controller1.SetSpinner( document.getElementById('slide-spinner') );
	Controller1.JSONRequestSlideshow( 0, null, 5 );
	Controller1.SetCallbackOnEnd( 0, onSlideshowEnd );
	Controller1.SetNextSlideshow( 0 );
	Controller1.Play();
	
	if( document.getElementById( 'CalNav' ) )
		NavigateCalendar( null, 0 );

	Controller1.JSONRequestSlideshow( 1, 'college' );
	Controller1.JSONRequestSlideshow( 2, 'lifestyle' );
	Controller1.JSONRequestSlideshow( 3, 'farm' );
	Controller1.JSONRequestSlideshow( 4, 'publications' );
}

InitCallbacks.push( HomeInit );

function FeatNone() {
	Controller1.SetNextSlideshow( 0 );
	Controller1.Next();
}

function FeatCollege() {
	Controller1.SetNextSlideshow( 1 );
	Controller1.Next();
}

function FeatLifestyle() {
	Controller1.SetNextSlideshow( 2 );
	Controller1.Next();
}

function FeatFarm() {
	Controller1.SetNextSlideshow( 3 );
	Controller1.Next();
}

function FeatPublications() {
	Controller1.SetNextSlideshow( 4 );
}

function FeatSlidePrev() {
	Controller1.Previous();
}

function FeatSlideNext() {
	Controller1.Next();
}

function FeatSlidePause() {
	Controller1.Pause();
}
