FixedColumns = function ( dt, init ) {
    var that = this;

    /* Sanity check - you just know it will happen */
    if ( ! ( this instanceof FixedColumns ) )
    {
        alert( "FixedColumns warning: FixedColumns must be initialised with the 'new' keyword." );
        return;
    }

    if ( typeof init == 'undefined' )
    {
        init = {};
    }

    // Use the DataTables Hungarian notation mapping method, if it exists to
    // provide forwards compatibility for camel case variables
    var camelToHungarian = $.fn.dataTable.camelToHungarian;
    if ( camelToHungarian ) {
        camelToHungarian( FixedColumns.defaults, FixedColumns.defaults, true );
        camelToHungarian( FixedColumns.defaults, init );
    }

    // v1.10 allows the settings object to be got form a number of sources
    var dtSettings = $.fn.dataTable.Api ?
        new $.fn.dataTable.Api( dt ).settings()[0] :
        dt.fnSettings();

    /**
     * Settings object which contains customisable information for FixedColumns instance
     * @namespace
     * @extends FixedColumns.defaults
     * @private
     */
    this.s = {
        /**
         * DataTables settings objects
         *  @type     object
         *  @default  Obtained from DataTables instance
         */
        "dt": dtSettings,

        /**
         * Number of columns in the DataTable - stored for quick access
         *  @type     int
         *  @default  Obtained from DataTables instance
         */
        "iTableColumns": dtSettings.aoColumns.length,

        /**
         * Original outer widths of the columns as rendered by DataTables - used to calculate
         * the FixedColumns grid bounding box
         *  @type     array.<int>
         *  @default  []
         */
        "aiOuterWidths": [],

        /**
         * Original inner widths of the columns as rendered by DataTables - used to apply widths
         * to the columns
         *  @type     array.<int>
         *  @default  []
         */
        "aiInnerWidths": []
    };


    /**
     * DOM elements used by the class instance
     * @namespace
     * @private
     *
     */
    this.dom = {
        /**
         * DataTables scrolling element
         *  @type     node
         *  @default  null
         */
        "scroller": null,

        /**
         * DataTables header table
         *  @type     node
         *  @default  null
         */
        "header": null,

        /**
         * DataTables body table
         *  @type     node
         *  @default  null
         */
        "body": null,

        /**
         * DataTables footer table
         *  @type     node
         *  @default  null
         */
        "footer": null,

        /**
         * Display grid elements
         * @namespace
         */
        "grid": {
            /**
             * Grid wrapper. This is the container element for the 3x3 grid
             *  @type     node
             *  @default  null
             */
            "wrapper": null,

            /**
             * DataTables scrolling element. This element is the DataTables
             * component in the display grid (making up the main table - i.e.
             * not the fixed columns).
             *  @type     node
             *  @default  null
             */
            "dt": null,

            /**
             * Left fixed column grid components
             * @namespace
             */
            "left": {
                "wrapper": null,
                "head": null,
                "body": null,
                "foot": null
            },

            /**
             * Right fixed column grid components
             * @namespace
             */
            "right": {
                "wrapper": null,
                "head": null,
                "body": null,
                "foot": null
            }
        },

        /**
         * Cloned table nodes
         * @namespace
         */
        "clone": {
            /**
             * Left column cloned table nodes
             * @namespace
             */
            "left": {
                /**
                 * Cloned header table
                 *  @type     node
                 *  @default  null
                 */
                "header": null,

                /**
                 * Cloned body table
                 *  @type     node
                 *  @default  null
                 */
                "body": null,

                /**
                 * Cloned footer table
                 *  @type     node
                 *  @default  null
                 */
                "footer": null
            },

            /**
             * Right column cloned table nodes
             * @namespace
             */
            "right": {
                /**
                 * Cloned header table
                 *  @type     node
                 *  @default  null
                 */
                "header": null,

                /**
                 * Cloned body table
                 *  @type     node
                 *  @default  null
                 */
                "body": null,

                /**
                 * Cloned footer table
                 *  @type     node
                 *  @default  null
                 */
                "footer": null
            }
        }
    };

    /* Attach the instance to the DataTables instance so it can be accessed easily */
    dtSettings._oFixedColumns = this;

    /* Let's do it */
    if ( ! dtSettings._bInitComplete )
    {
        dtSettings.oApi._fnCallbackReg( dtSettings, 'aoInitComplete', function () {
            that._fnConstruct( init );
        }, 'FixedColumns' );
    }
    else
    {
        this._fnConstruct( init );
    }
}
When making use of DataTables' x-axis scrolling feature, you may wish to
fix the left most column in place. This plug-in for DataTables provides
exactly this option (note for non-scrolling tables, please use the
FixedHeader plug-in, which can fix headers, footers and columns). Key
features include:

* Freezes the left or right most columns to the side of the table
* Option to freeze two or more columns
* Full integration with DataTables' scrolling options
* Speed - FixedColumns is fast in its operation

 @class
 @constructor
 @global
 @param {object} dt DataTables instance. With DataTables 1.10 this can also
   be a jQuery collection, a jQuery selector, DataTables API instance or
   settings object.
 @param {object} [init={}] Configuration object for FixedColumns. Options are
   defined by {@link FixedColumns.defaults}

 @requires jQuery 1.7+
 @requires DataTables 1.8.0+

 @example
     var table = $('#example').dataTable( {
       "scrollX": "100%"
     } );
     new $.fn.dataTable.fixedColumns( table );