/** clase para sliders. por @canguroconhipo para facemama.com 12.09.2011 */
var FSlider = new Class({
	initialize:function(container,leftarr,rightarr,inc,total_elements)
	{
		var totIncrement = 0;
		var increment = inc;
		var maxRightIncrement = increment*(- total_elements);
		
		// FX var
		var fx = new Fx.Style(container, 'left', {
			duration: 500,
			wait: true
		});

		// Previous Button
		$(leftarr).addEvents({
			'click' : function(event){
			if(totIncrement<0){
				totIncrement = totIncrement + increment;
				fx.stop()
				fx.start(totIncrement);
				}
			}
		});

		// Next Button
		$(rightarr).addEvents({
			'click' : function(event){
			if(totIncrement>maxRightIncrement){
				totIncrement = totIncrement - increment;
				fx.stop()
				fx.start(totIncrement);
				}
			}
		});
	}
});
