var ListFlicker = new Class({ 
        Implements: Options, 
        options: { 
                speed: 2000, 
                delay: 4000,
                numRand: 6
        }, 
        initialize: function(el,options){ 
                this.setOptions(options); 
                this.el = $(el); 
                for(i = 0; i < this.options.numRand; i++)
                	this.el.getElements('li').getRandom().inject(this.el, 'top');
                this.items = this.el.getElements('li'); 
                this.current = 0; 
                this.next.bind(this).delay(this.options.delay); 
        }, 
        next: function() { 
                this.previous = this.current
                this.current++; 
                if (this.current >= this.items.length) this.current = 0; 
                var self = this;
                this.items[this.previous].dissolve({
                	onHide: function(){
                		self.items[self.previous].inject(self.el);
	                	self.items[self.previous].setStyles({
		                	display: 'block'
		                });
                	}
                });
                this.next.bind(this).delay(this.options.delay + this.options.speed);
         } 
}); 

window.addEvent('domready', function() {
   new ListFlicker('service-area-towns');   
});
