var nisClass = Class.create({
	vars: {
		product_width : 90, // width+margin
		transition: Effect.Transitions.spring,
		speed: 800,
		in_strip:8
	},
	initialize: function(){
		this.wrapper = $('nis');
		this.products = this.wrapper.down('ul');
		this.vars.product_count = this.products.select('li').length;
		this.vars.current = 1;
	},
	next: function(){
		var next = this.vars.current == (this.vars.product_count - this.vars.in_strip) ? 0: this.vars.current+1;
		
		this.products.morph({
			left: '-'+(this.vars.product_width*this.vars.current)+'px'
		},{
			duration:this.vars.speed/1000,
			transition:this.vars.transition
		})
		this.vars.current = next;
		
	}
});

Event.observe(window,"load", function(){
	window.newInStock = new nisClass();
});
