				var slideshow = function(otps){
					var cur = this;
					var mainContainer = $('.jquery-slideshow');
					var innerContainer = mainContainer.find('.container');
					var list = innerContainer.find('.thumb-list');
					var items = list.find('li');
					var size = list.find('li').length;
					var buttonsWidth = 33;
					var buttonsHeight = 33;
					var buttonLeft = base+'images/buttons/slide-arrow-left.png';
					var buttonSpacingLeft = 5;
					var buttonRight = base+'images/buttons/slide-arrow-right.png';
					var buttonSpacingRight = 5;
					var totWidth = 0;
					this.stop = false;
					
					var x;
					var maxX;
					var wpi;
					
					tlcounter = 0;
					
					this.init = function(){
						var width = items.eq(0).innerWidth();
							width += parseInt(items.eq(0).css('padding-left').replace('px', ''));
							width += parseInt(items.eq(0).css('padding-right').replace('px', ''));
							width += parseInt(items.eq(0).css('margin-left').replace('px', ''));
							width += parseInt(items.eq(0).css('margin-right').replace('px', ''));
							
							var blw = items.eq(0).css('border-left-width').replace('px', ''); if(blw.match(/^[0-9]*$/)){ blw = parseInt(blw); } else{ blw = 0; }
							var brw = items.eq(0).css('border-right-width').replace('px', ''); if(brw.match(/^[0-9]*$/)){ brw = parseInt(brw); } else{ brw = 0; }

							width += blw;
							width += brw;
							
							
						wpi = width;
						totWidth = size*wpi;
						list.width(totWidth);
						list.css('left', '0px');
						maxX = list.width()-innerContainer.width();
						if(totWidth >= $(innerContainer).width()){
						
							var height = items.eq(0).innerHeight();
								height += parseInt(items.eq(0).css('padding-top').replace('px', ''));
								height += parseInt(items.eq(0).css('padding-bottom').replace('px', ''));
								height += parseInt(items.eq(0).css('margin-top').replace('px', ''));
								height += parseInt(items.eq(0).css('margin-bottom').replace('px', ''));
								
								var blh = items.eq(0).css('border-top-width').replace('px', ''); if(blh.match(/^[0-9]*$/)){ blh = parseInt(blh); } else{ blh = 0; }
								var brh = items.eq(0).css('border-bottom-width').replace('px', ''); if(brh.match(/^[0-9]*$/)){ brh = parseInt(brh); } else{ brh = 0; }

								height += blh;
								height += brh;

							var lb = $('<div style="height:'+height+'px;line-height:'+height+'px;" class="anim-button anim-left"><img width="'+buttonsWidth+'px" height="'+buttonsHeight+'px" src="'+buttonLeft+'" /></div>');
							lb.insertBefore(innerContainer);
							var rb = $('<div style="height:'+height+'px;line-height:'+height+'px;" class="anim-button anim-right"><img width="'+buttonsWidth+'px" height="'+buttonsHeight+'px" src="'+buttonRight+'" /></div>');
							rb.insertAfter(innerContainer);
						
							lb.click(function(){ list.stop(); cur.stepRight(); });
							lb.mouseenter(function(){ cur.stop=false; cur.animateRight(); });
							lb.mouseleave(function(){ cur.stop=true;  });
							rb.click(function(){ list.stop(); cur.stepLeft(); });
							rb.mouseenter(function(){ cur.stop=false; cur.animateLeft(); });
							rb.mouseleave(function(){ cur.stop=true;  });
						
						}
					}
					
					this.animateLeft = function(){
						if(parseInt(list.css('left').replace('px', '')) != -(maxX)){
							$(list).css('left', (parseInt(list.css('left').replace('px', ''))-3)+'px');
							if(cur.stop == false && (parseInt(list.css('left').replace('px', ''))-3) > -(maxX)){
								setTimeout(function(){ cur.animateLeft(); }, 10);
							}
							else if(cur.stop == false){
								setTimeout(function(){ $(list).css('left', -(maxX)+'px'); }, 10);
							}
						}
					}
					this.animateRight = function(){
						if(parseInt(list.css('left').replace('px', '')) != 0){
							$(list).css('left', (parseInt(list.css('left').replace('px', ''))+3)+'px');
							if(cur.stop == false && (parseInt(list.css('left').replace('px', ''))+3) < 0){
								setTimeout(function(){ cur.animateRight(); }, 10);
							}
							else if(cur.stop == false ){
								setTimeout(function(){ $(list).css('left',0+'px'); }, 10);
							}				
						}				
					}
					
					
					this.stepLeft = function(){	
						var ntm = this.getNtm();
						if((parseInt(list.css('left').replace('px', '')) - (ntm*wpi)) > -(maxX)){
							list.animate({
								left: parseInt(list.css('left').replace('px', '')) - (ntm*wpi)
							}, 500);
						}
						else{
							setTimeout(function(){ $(list).css('left', -(maxX)+'px'); }, 10);
						}
					}
					
					
					this.stepRight = function(){
						var ntm = this.getNtm();
						if((parseInt(list.css('left').replace('px', '')) + (ntm*wpi)) < 0){
							list.animate({
								left: parseInt(list.css('left').replace('px', '')) + (ntm*wpi)
							}, 500);
						}
						else{
							setTimeout(function(){ $(list).css('left', '0px'); }, 10);
						}
					}
			
					this.getNtm = function(){
						var ntm;
						if(size >= Math.round(innerContainer.width()/wpi)){
							ntm = Math.round((innerContainer.width()/wpi)/2);
						}
						else{
							ntm = size;
						}					
						var curmod = Math.abs((parseInt(list.css('left').replace('px', ''))%wpi));
						if(curmod > wpi/2){
							ntm++;
						}
						return ntm;
					}
					
					
					
					
					
					this.init();
					
				
				
		
				}
