
// pass in #contentSimilarColors et al
var sliderTest = function(sliderDiv) {
	this.totalPanels	= $(sliderDiv).find(".scrollContainer").children().size();
	if(this.totalPanels > 4){
	
	this.movingDistance	    = 109;
	$(sliderDiv).data("currentlyMoving", false);

	//direction true = right, false = left
	this.change = function(direction) {
		
	    //if not at the first or last panel
		if((direction && !(this.curPanel < this.totalPanels)) || (!direction && (this.curPanel-3 <= 1))) { return false; }	
        //if not currently moving


      if (($(sliderDiv).data("currentlyMoving") == false)) {
				$(sliderDiv).data("currentlyMoving", true);
			
				this.next  = direction ? this.curPanel + 1 : this.curPanel - 1;
				this.leftValue = $(".scrollContainer",sliderDiv).css("left");
				this.movement = direction ? parseFloat(this.leftValue, 10) - this.movingDistance : parseFloat(this.leftValue, 10) + this.movingDistance;
				$(".scrollContainer",sliderDiv)
					.stop()
					.animate({
						"left": this.movement
					}, function() {
						$(sliderDiv).data("currentlyMoving", false);
					});
			
			
			
				this.curPanel = this.next;
			
				//remove all previous bound functions
				$("#productMiniBrowse_"+(this.curPanel+1)).unbind();	
			
				//go forward
				$("#productMiniBrowse_"+(this.curPanel+1)).click(function(){ change(true); });
			
	            //remove all previous bound functions															
				$("#productMiniBrowse_"+(this.curPanel-1)).unbind();
			
				//go back
				$("#productMiniBrowse_"+(this.curPanel-1)).click(function(){ change(false); }); 
			
				//remove all previous bound functions
				$("#productMiniBrowse_"+this.curPanel).unbind();
		}
	}
	
	// Set up "Current" panel and next and prev
	this.curPanel =4;
	
	}
	return false;
};