jQuery(window).ready(function(){
	
	var sortableTables = jQuery('TABLE.sortable');
	
	sortableTables.each(function(i){
		var head = jQuery(this).find('tr').get(0);
		//jQuery(head).wrap('<thead></thead>');
		jQuery(this).prepend('<thead></thead>');
		jQuery(this).find('thead').html(head);
		
		jQuery(this).find('tr').each(function(i){
			jQuery(this).find('td:first').addClass('first');
			jQuery(this).find('td:last').addClass('last');
		});
		//console.log( this );
	});
	
});