window.addEvent('domready', function(){

/*LOGO slide show for HOME pg*/
	var changeTimer = 6000;
	
	var logos = $$('.rotate_logo');

if(logos.length > 2) {

	logos.each(function(element, index) {
		
		//since the viewer obviously has javascript on, we can remove the 'first_item' class
		if(index == 0){
			element.setStyle('opacity', "1");
		}
		else{
			//element.setStyle('left', "500");
			element.setStyle('opacity', "0");
		}
	
	});




// slideHomePGLogo


	//Slider Stuff
	var slideLogoFunction = new function() {
		
		var numItems = logos.length;  //get number of slider logos
		var itemNum = 0;  //initialize a variable to hold the current slide index
		
		var slideItLogo = function(){ 
		
			//get item to slide out
			var curItem = logos[itemNum];  

			//change index
			if(itemNum < (numItems - 1)){
				itemNum++; 
			}
			else{
				itemNum = 0;
			}
			
			//now get item to slide in using new index
			var newItem = logos[itemNum];

			// delete start
			$(newItem).setStyle('opacity','0');
			// alert ('clr s :'+clr);
			// delete end
			
			
			//set up our animation stylings for out and in motions (note:  Fx.Styles does NOT exist in moo 1.2, so we must use Fx.Morph or Fx.Tween)
			var item_in = new Fx.Morph(newItem, {
				     transition: Fx.Transitions.Quad.easeInOut, 
				     wait:false
			});
			
			var item_out = new Fx.Morph(curItem, {
				     transition: Fx.Transitions.Quad.easeInOut, 
				     wait:false
			});

			//we will set a beginning value here
			//this is so that it gives the illusion of continuous motion from one direction, even after the first cycle of logos

			item_out.start({
			'opacity':[1,0]
			});
			item_in.start({
			'opacity':[0,1]
			});
			
		};
		
		//call the function, periodically  (note: the interval period is defined at the top of this file)
		slideItLogo.periodical(changeTimer, this); 
	}

} // if there s any images


});