var imageShowHori = new Class({
			
			/* Variables section */
			containerIdName: null,
			container: null,
			elements: new Array(),
			active_elements: new Array(),
			max_active: 0,
			element_width: 160,
			speed: 4000,
			repeat: 1,
			currently_scrolling: 0,
			killed_early: 0,
			
			/* Methods section */
			/** Constructor.
			*	A class constructor
			*	@param id string show container
			* @param optional_argument string custom class name
			*/
			initialize: function ( id )
			{
				this.containerIdName = id;
				this.container = $(id);

				
				this.container.setStyles(
				{
					position: 'relative',
					'z-index': '0',
					overflow: 'hidden'
				});
				this.container.addEvent('mouseenter', this.scroll_stop.bindWithEvent(this));
				this.container.addEvent('mouseleave', this.scroll_start.bindWithEvent(this));
				
				this.elements = $ES( 'div', this.containerIdName );
				this.elements.setStyles({
					position: 'absolute',
					display: 'none'
				});
				this.elements.each(function(item,index)
				{
					item.fx_mover  = new Fx.Style(item,'left',{duration:this.speed, transition: Fx.Transitions.linear});
					item.fx_mover2  = new Fx.Style(item,'left',{duration:this.speed, transition: Fx.Transitions.linear,onComplete: function (obj) { this.currently_scrolling=0; this.scroll_start(); }.bind( this )});
					item.fx_opacity  = new Fx.Style(item,'opacity',{duration:this.speed, transition: Fx.Transitions.Expo.easeOut});
					item.fx_opacity2  = new Fx.Style(item,'opacity',{duration:this.speed, transition: Fx.Transitions.Expo.easeIn});
					item.fx_mover.options.fps=20;
					item.fx_mover2.options.fps=20;
					item.fx_opacity.options.fps=20;
					item.fx_opacity2.options.fps=20;
					item.setStyle('top', '0');
					item.element_id = index;
				},this
				);
				this.max_active = (this.container.getSize().size.x / this.element_width).toInt() ;
				var ct;
				for (ct=0;ct<=this.max_active;ct++)
				{
					this.active_elements[ct] = this.elements[ct];
					this.active_elements[ct].fx_mover.set(this.element_width*(ct-1));
					this.active_elements[ct].setStyle('display', 'block');
				}
			},
			
			

			scroll_start: function ( event )
			{
				if (this.currently_scrolling==0)
				{
					if (this.killed_early)
					{
						this.active_elements.getLast().fx_opacity2.stop();
						this.active_elements.getLast().fx_opacity2.start(1);
					}
					else
					{
						this.currently_scrolling=1;
						//Push off 0 element
						var old_element = this.active_elements.shift();
						old_element.setStyle('display', 'none');
						// Prep new element
						var next_element_id=this.active_elements.getLast().element_id+1;
						if (next_element_id >= this.elements.length)
						{
							next_element_id=0;
						}
						var new_element = this.elements[next_element_id];
						
						new_element.fx_mover.set(this.max_active * this.element_width);
						new_element.setStyle('display', 'block');
						this.active_elements.push(new_element);
						new_element.fx_opacity2.set(0);
						new_element.fx_opacity2.start(1);
					}
					
					this.active_elements.each(function(item,index)
					{
						if (!this.killed_early)
						{
							item.fx_mover.options.duration=this.speed;
							item.fx_mover2.options.duration=this.speed;
							item.fx_opacity.options.duration=this.speed;
							item.fx_opacity2.options.duration=this.speed;
						}
						if (index == 0)
						{
							item.fx_opacity.stop();
							item.fx_opacity.start(0);
							item.fx_mover2.stop();
							item.fx_mover2.start(-this.element_width);
						}
						else
						{
							item.fx_mover.stop();
							item.fx_mover.start(this.element_width*(index-1));
						}
					},this
					);
					this.killed_early=0;
				}
			},
			
			scroll_stop: function ( event )
			{
				this.killed_early=1;
				this.currently_scrolling=0;
				this.active_elements.each(function(item,index)
				{

					item.fx_opacity.stop();
					item.fx_opacity2.stop();
					item.fx_mover.stop();
					item.fx_mover2.stop();
					var speed_fraction = 10;
					item.fx_mover.options.duration=this.speed/speed_fraction;
					item.fx_mover2.options.duration=this.speed/speed_fraction;
					item.fx_opacity.options.duration=this.speed/speed_fraction;
					item.fx_opacity2.options.duration=this.speed/speed_fraction;
				},this
				);
			}
			
		});
