// JavaScript Document

	programImages=null;		//array of images
	programListItems=null;	//list items to cycle
	image=null;		//new image to place in image-container
	imageContainer=null;
	
	currentSelection=0;

	cycleInterval=null;
	
	constantInterval=4000;	//intercal to move at a constant


		//METHOD:	INITIALIZE PROGRAM LIST ITEMS & IMAGES TO CYCLE
	function initProgramListItems(){
		
		image=new Image();		//new image instance on load
		imageContainer=$("#index-image-container");

			//images to cycle
		programImages=new Array('index00.jpg','index01.jpg','index02.jpg','index03.jpg','index04.jpg','index05.jpg');
		programListItems=$("#index-program-list > *");		//list items <LI>
	}


		//METHOD:	LOAD INITIAL ITEMS ON LOAD
	function cycleImageAndSelection(){
		
			//load image as function
		$(image).load(function(){
				//append loaded image to image container
			$(imageContainer).append(image);		
		}).attr('src',"images/programImages/"+programImages[currentSelection]);	//append image w/ attributes of new image

		$(programListItems[currentSelection]).addClass("selected");
	
			//update current and previous index
		previousSelection=(currentSelection==0)?5:(currentSelection-1);
		currentSelection= (currentSelection==5)?0:(currentSelection+1);

		$(programListItems[previousSelection]).removeClass("selected");	

	}