function photoFadeAutomated(){
	var object = this;
	//Core HTML Elements
	object.eleUl = null;
	object.arrLi = null;
	object.intLiCount = null;
	
	//Image Indexing Variables
	object.intActiveIndex = 0;
	object.intNextIndex = 1;
	
	//Caption Variables
	object.arrCaption = new Array();
	
	
	//Animation Core Variables
	object.intTransitionTime = 750;
	object.intDisplayTime = 7000;
		
	//Object Methods
	object.Rotate = function(){
		setTimeout(function(){
			//$('#focal-txt').fadeOut(object.intTransitionTime);
			$(object.arrLi[object.intActiveIndex]).animate(
				{'opacity':'0'},
				object.intTransitionTime,
				function(){
					$(this).css({'z-index':0});
					
					$(object.arrLi[object.intNextIndex]).css({'z-index':1});
					
					object.intActiveIndex++;
					if(object.intActiveIndex>=object.intLiCount){
						object.intActiveIndex = 0;
					}
					
					object.intNextIndex = (object.intActiveIndex*1)+1;
					if(object.intActiveIndex==(object.intLiCount*1)-1){
						object.intNextIndex = 0;
					}
					
					$(object.arrLi[object.intNextIndex]).css({'opacity':100});
					
					//$('#focal-txt').delay(500).text(object.arrCaption[object.intNextIndex]).fadeIn(object.intTransitionTime);
					
					object.Rotate();
				}
			);
		},object.intDisplayTime);
	}

	object.Initialize = function(eleUl){
		object.eleUl = $(eleUl);
		if(object.eleUl){			
			//Get HTML Element Data
			object.arrLi = object.eleUl.find('li').each(function(index){
					$(this).css('opacity',0);
					//object.arrCaption.push($(this).find('img').attr('title'));
			});
			object.intLiCount = object.arrLi.length;
				
			$(object.arrLi[object.intActiveIndex]).css({'z-index':1,'opacity':100});
			$(object.arrLi[object.intNextIndex]).css({'z-index':0,'opacity':100});
			
			//Run Rotate Method
			object.Rotate();
		}
	}
}

//Initializer
$(document).ready(function(){
	$('ul.crossfade').each(function(){
		var objCrossfade = new photoFadeAutomated();
		objCrossfade.Initialize(this);
	});
	
});

