// Constructor
extransit.LinearItemFactory = function(parent, items) {

    this.setupDone = false;
};

// Inherit
extransit.LinearItemFactory.prototype = new extransit.MenuItemFactory();

// Constants


// Public functions

extransit.LinearItemFactory.prototype.initItem = function(item) {

    if (!this.setupDone) {

        this.y = this.parentNode.offsetTop;
        this.dY = 30;

        this.setupDone = true;

        this.oX = 0;
    }

    this.y += this.dY;
    this.iX = 1100-this.y * 2;
    this.iY = 500-this.y;

    // Calculate target position
    var tX = this.parentNode.offsetLeft + this.oX;
    var tY = this.y;

//    this.oX += 5;

    item.x = this.iX;        // Item current X location
    item.y = this.iY;        // Item current Y location
    item.iX = this.iX;       // Item initial X location
    item.iY = this.iY;       // Item initial Y location
    item.tX = tX;       // Item target X location
    item.tY = tY;       // Item target Y location
};

