docs: function _fnBuildHead( oSettings )
  		{
  			var i, nTh, iLen, j, jLen;
  			var iThs = oSettings.nTHead.getElementsByTagName('th').length;
  			var iCorrector = 0;
  			var jqChildren;
  			
  			/* If there is a header in place - then use it - otherwise it's going to get nuked... */
  			if ( iThs !== 0 )
  			{
  				/* We've got a thead from the DOM, so remove hidden columns and apply width to vis cols */
  				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
  				{
  					nTh = oSettings.aoColumns[i].nTh;
  					nTh.setAttribute('role', 'columnheader');
  					if ( oSettings.aoColumns[i].bSortable )
  					{
  						nTh.setAttribute('tabindex', oSettings.iTabIndex);
  						nTh.setAttribute('aria-controls', oSettings.sTableId);
  					}
  		
  					if ( oSettings.aoColumns[i].sClass !== null )
  					{
  						$(nTh).addClass( oSettings.aoColumns[i].sClass );
  					}
  					
  					/* Set the title of the column if it is user defined (not what was auto detected) */
  					if ( oSettings.aoColumns[i].sTitle != nTh.innerHTML )
  					{
  						nTh.innerHTML = oSettings.aoColumns[i].sTitle;
  					}
  				}
  			}
  			else
  			{
  				/* We don't have a header in the DOM - so we are going to have to create one */
  				var nTr = document.createElement( "tr" );
  				
  				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
  				{
  					nTh = oSettings.aoColumns[i].nTh;
  					nTh.innerHTML = oSettings.aoColumns[i].sTitle;
  					nTh.setAttribute('tabindex', '0');
  					
  					if ( oSettings.aoColumns[i].sClass !== null )
  					{
  						$(nTh).addClass( oSettings.aoColumns[i].sClass );
  					}
  					
  					nTr.appendChild( nTh );
  				}
  				$(oSettings.nTHead).html( '' )[0].appendChild( nTr );
  				_fnDetectHeader( oSettings.aoHeader, oSettings.nTHead );
  			}
  			
  			/* ARIA role for the rows */	
  			$(oSettings.nTHead).children('tr').attr('role', 'row');
  			
  			/* Add the extra markup needed by jQuery UI's themes */
  			if ( oSettings.bJUI )
  			{
  				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
  				{
  					nTh = oSettings.aoColumns[i].nTh;
  					
  					var nDiv = document.createElement('div');
  					nDiv.className = oSettings.oClasses.sSortJUIWrapper;
  					$(nTh).contents().appendTo(nDiv);
  					
  					var nSpan = document.createElement('span');
  					nSpan.className = oSettings.oClasses.sSortIcon;
  					nDiv.appendChild( nSpan );
  					nTh.appendChild( nDiv );
  				}
  			}
  			
  			if ( oSettings.oFeatures.bSort )
  			{
  				for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
  				{
  					if ( oSettings.aoColumns[i].bSortable !== false )
  					{
  						_fnSortAttachListener( oSettings, oSettings.aoColumns[i].nTh, i );
  					}
  					else
  					{
  						$(oSettings.aoColumns[i].nTh).addClass( oSettings.oClasses.sSortableNone );
  					}
  				}
  			}
  			
  			/* Deal with the footer - add classes if required */
  			if ( oSettings.oClasses.sFooterTH !== "" )
  			{
  				$(oSettings.nTFoot).children('tr').children('th').addClass( oSettings.oClasses.sFooterTH );
  			}
  			
  			/* Cache the footer elements */
  			if ( oSettings.nTFoot !== null )
  			{
  				var anCells = _fnGetUniqueThs( oSettings, null, oSettings.aoFooter );
  				for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
  				{
  					if ( anCells[i] )
  					{
  						oSettings.aoColumns[i].nTf = anCells[i];
  						if ( oSettings.aoColumns[i].sClass )
  						{
  							$(anCells[i]).addClass( oSettings.aoColumns[i].sClass );
  						}
  					}
  				}
  			}
  		}