js/components/carousel.js
function(index) {
        var sum = 0;

        $.each(this._sizes, function(i, value) {
            if (i < index) {
                sum += value.totalSize;
            }
        });

        return sum;
    }
function(index) {
        var sum = 0;

        $.each(this._sizes, function(i, value) {
            if (i < index) {
                sum += value.totalSize;
            }
        });

        return sum;
    }
function ( index ) { var sum = 0 ; $ . each ( this . _sizes , function ( i , value ) { if ( i < index ) { sum += value . totalSize ; } } ) ; return sum ; }
Calculate the size to cycle width based on the sum of all items up to but not including the defined index.

@param {Number} index    - Includes the clone index
@returns {Number}
@private
Calculate the size to cycle width based on the sum of all items up to but not including the defined index .