function simpleHorizontalSlider(leftClick, rightClick, elementClassName, howManyDivsWidth, optionsArray) {
    this.randInt = Math.floor(Math.random() * 500 + 1);
    this.sliderName = eval("'slider" + this.randInt + "'");
    eval("" + this.sliderName + " = this; ");
    eval("$(\"#\" + leftClick).click(function() {" + this.sliderName + ".clickRight();});");
    eval("$(\"#\" + rightClick).click(function() {" + this.sliderName + ".clickLeft();});");
    this.leftClick = leftClick;
    this.rightClick = rightClick;
    this.elementClassName = elementClassName;
    this.howManyDivsWidth = howManyDivsWidth;
    this.options = optionsArray || {};
    if (!this.options.moveThisManyOnClick) { this.options.moveThisManyOnClick = '1'; }
    this.lLocation = 1;
    this.rLocation = howManyDivsWidth;
    this.divBucket = new Array();
    this.totalDivs = 0;
    this.showWidth = 0;
    this.divs = $("." + this.elementClassName);
    this.divBucket = new Array();
    this.divCount = 1;
    this.i = 0;
    for (this.i in this.divs) {
        this.newdiv = this.divs[this.i];
        if (this.newdiv.innerHTML != undefined) {
            if (!this.newdiv.id) {
                this.randomDivID = Math.floor(Math.random() * 9999 + 1);
                this.newdiv.id = 'sliderdiv' + this.randInt + this.randomDivID + this.divCount;
            }
            this.divBucket[this.divCount] = this.newdiv.id;
            if (this.divCount > this.howManyDivsWidth) {
                this.hideBucketDiv(this.newdiv.id);
            }
            this.divCount++;
        }
    }
    this.totalDivs = (this.divCount--);
    this.initialized = true;
}

simpleHorizontalSlider.prototype.clickLeft = function() {
    howManyClicks = this.options.moveThisManyOnClick;
    var i=0;
    for (i=0;i<howManyClicks;i++)
    {
        maxlLocation = this.totalDivs - this.howManyDivsWidth;
        newlLocation = this.lLocation + 1;
    
        if (newlLocation <= maxlLocation) {
            this.hideBucketDiv(this.divBucket[this.lLocation]);
            this.lLocation++;
            this.rLocation++;
            this.showBucketDiv(this.divBucket[this.rLocation]);
        }
    }
}
simpleHorizontalSlider.prototype.clickRight = function() {
    howManyClicks = this.options.moveThisManyOnClick;
    var i=0;
    for (i=0;i<howManyClicks;i++)
    {

        maxlLocation = this.totalDivs - this.howManyDivsWidth;
        newrLocation = this.rLocation - 1;
        if (newrLocation >= this.howManyDivsWidth) {
            this.hideBucketDiv(this.divBucket[this.rLocation]);
            this.lLocation--;
            this.rLocation--;
            this.showBucketDiv(this.divBucket[this.lLocation]);
        }
    }
}
simpleHorizontalSlider.prototype.showBucketDiv = function(elementID) {
    $("#" + elementID).animate({
        width: this.options.elementWidth,
        opacity: 1,
        marginLeft: "0"
    },
    500);
}
simpleHorizontalSlider.prototype.hideBucketDiv = function(elementID) {

    $("#" + elementID).animate({
        width: "0%",
        opacity: 0,
        marginLeft: "0"
    },
    500,null,function() { $("#" + elementID).hide();  });
}