var myInterval = 0;
var zaehler = 0;
var Eyecatcher = {

	init : function() {
		/* EYECATCHER UNORDERED LIST */
		Eyecatcher.initText();
		
	},	

	initText : function() {
		var obj = jQuery(".action-items");
		var optionTexts = [];
		
		setTimeout("Eyecatcher.empty()", 1200);
	},
	
	empty : function() {		
		var count = 0;
		var arrLength = jQuery(".action-items li").length;
		var time = 100;
		var zaehler = 0;
		var item = jQuery(".action-items li");
		
		myInterval = window.setInterval("Eyecatcher.listEffect(" + arrLength + ")", 1000);
	},
	
	listEffect : function(arrLength) {
		//console.log(zaehler);
		//console.log(arrLength);
		//console.log(myInterval);
		var item = jQuery(".action-items li");
		
		jQuery(item[zaehler]).animate( { fontSize:"17px", backgroundPosition:'0 12px' }, {queue:true, duration: 400})
	 	 				 	 .animate( { fontSize:"16px", backgroundPosition:'0 12px' }, {queue:true, duration: 280});	
		if (zaehler == arrLength) {
			//console.log('worked');
			clearInterval(myInterval);
			jQuery("#eyecatcher-button").fadeIn(600);
			return;
		}
		
		zaehler ++;
	}
	
	
}

$(document).ready(function() {	
	//jQuery(".action-items li").css('display','none');
	jQuery("#eyecatcher-button").css('display','none');
	Eyecatcher.init();
});