function _fnSortAdd(settings, colIdx, addIndex, shift) {
		var col = settings.aoColumns[colIdx];
		var sorting = settings.aaSorting;
		var asSorting = col.asSorting;
		var nextSortIdx;
		var next = function (a, overflow) {
			var idx = a._idx;
			if (idx === undefined) {
				idx = asSorting.indexOf(a[1]);
			}

			return idx + 1 < asSorting.length ?
				idx + 1 :
				overflow ?
					null :
					0;
		};

		if (!col.bSortable) {
			return;
		}

		// Convert to 2D array if needed
		if (typeof sorting[0] === 'number') {
			sorting = settings.aaSorting = [sorting];
		}

		// If appending the sort then we are multi-column sorting
		if ((shift || addIndex) && settings.oFeatures.bSortMulti) {
			// Are we already doing some kind of sort on this column?
			var sortIdx = _pluck(sorting, '0').indexOf(colIdx);

			if (sortIdx !== -1) {
				// Yes, modify the sort
				nextSortIdx = next(sorting[sortIdx], true);

				if (nextSortIdx === null && sorting.length === 1) {
					nextSortIdx = 0; // can't remove sorting completely
				}

				if (nextSortIdx === null) {
					sorting.splice(sortIdx, 1);
				}
				else {
					sorting[sortIdx][1] = asSorting[nextSortIdx];
					sorting[sortIdx]._idx = nextSortIdx;
				}
			}
			else if (shift) {
				// No sort on this column yet, being added by shift click
				// add it as itself
				sorting.push([colIdx, asSorting[0], 0]);
				sorting[sorting.length - 1]._idx = 0;
			}
			else {
				// No sort on this column yet, being added from a colspan
				// so add with same direction as first column
				sorting.push([colIdx, sorting[0][1], 0]);
				sorting[sorting.length - 1]._idx = 0;
			}
		}
		else if (sorting.length && sorting[0][0] == colIdx) {
			// Single column - already sorting on this column, modify the sort
			nextSortIdx = next(sorting[0]);

			sorting.length = 1;
			sorting[0][1] = asSorting[nextSortIdx];
			sorting[0]._idx = nextSortIdx;
		}
		else {
			// Single column - sort only on this column
			sorting.length = 0;
			sorting.push([colIdx, asSorting[0]]);
			sorting[0]._idx = 0;
		}
	}
Function to run on user sort request
 @param {object} settings dataTables settings object
 @param {node} attachTo node to attach the handler to
 @param {int} colIdx column sorting index
 @param {int} addIndex Counter
 @param {boolean} [shift=false] Shift click add
 @param {function} [callback] callback function
 @memberof DataTable#oApi