		
function SlideEffect(o){
	var s = {
		div:null,
		size: 0,
		atual:0,
		width:0,
		jump:false,
		goLeft:function(){
			if(this.atual > 0 ){
				this.moveProcess(10);
				this.atual--;
			}else{
				if(this.jump){
					this.moveProcess(-10 * (this.size-1));
					this.atual = this.size - 1 ;
				}
			}
		},
		goRight:function(){
			if(this.atual < (this.size-1) ){
				this.moveProcess(-10);
				this.atual++;
			}else{
				if(this.jump){
					this.moveProcess(10 * (this.size-1));
					this.atual = 0 ;
				}
			}
		},
		moveProcess:function(qnt){
			var i;
			for( i = 0 ; i < (this.width/10) ; i++){
				setTimeout(function(){s.move(qnt)},100 + (i*4.8));
			}
		},
		move:function(m){
			this.div.style.left = ((parseInt(this.div.style.left) ) + (m) )  + "px" ;
		},
		recalculate:function(a){
			this.size = 0;
			for(var i = 0 ; i < this.div.childNodes.length ; i++){
				if(this.div.childNodes[i].nodeType == 1){
					this.size++;
					this.width = (this.div.childNodes[i].getBoundingClientRect().right - this.div.childNodes[i].getBoundingClientRect().left);
				}
				
			}
			this.div.style.width = (this.width * this.size ) + "px";
		},
		init:function(){
			var wincrement = typeof(o.widthIncrement)!="undefined" ? o.widthIncrement : 0;
			
			if(typeof(o.dom) != "undefined"){
				this.div = o.dom;
			}
			else if(typeof(o.id) != "undefined"){
				this.div = document.getElementById(o.id);
			}
			else{
				this.div = document.createElement("div");
			}
			if(typeof(o.jump) != "undefined")this.jump = o.jump;
			
			this.div.style.left = "0px";//this.div.offsetLeft+"px";
			this.width = 0;
			for(var i = 0 ; i < this.div.childNodes.length ; i++){
				if(this.div.childNodes[i].nodeType == 1){
					this.size++;
					this.width = wincrement + (this.div.childNodes[i].getBoundingClientRect().right - this.div.childNodes[i].getBoundingClientRect().left);
				}
				
			}
			
			this.div.style.width = (this.width * this.size ) + "px";
			
		}
	}
	s.init();
	return s;
}
		
		
