    }
            },
            move: {
                value: function (dX, dY) {
                    this.left += dX;
                    this.top += dY;
                    return this;
                }
            },
            resize: {
                value: function (dX, dY) {
                    this.width += dX;
                    this.height += dY;
                    return this;
                }
            },
            clone: {
                value: function () {
                    return getInstance(this.left, this.top, this.width, this.height);
                }
            }
        });

        ['left', 'top', 'width', 'height', 'right', 'bottom'].forEach(function (propertyName) {

            Object.defineProperty(rect, propertyName + 'PX', {
                get: function () {
                    return this[propertyName] + 'px';
                }
            });
        });

        Object.freeze(rect);

        // rect(element)
        // rect(left, top, width, height)
        // rect(left, top)
        // rect()
        //

        function getInstance() {

            var obj = arguments[0],
                instance = Object.create(rect),
                values;

            if (typeof obj === 'object') {
                values = [obj.offsetLeft, obj.offsetTop, obj.offsetWidth, obj.offsetHeight];
            } else {
                values = arguments;
            }

            ['left', 'top', 'width', 'height'].forEach(function (propertyName, i) {

                var value = parseFloat(values[i]);
                if (!isNaN(value)) {
                    instance[propertyName] = value;
                }
            });

            return instance;
        }

        return getInstance;
    });