$(function () { $('#guide-nav').tabs(); });

var myTextExtraction = function(node) {
  var the_node = $(node);
  var image = the_node.find('img');
  if (image.length > 0) {
    return image.attr('alt');
  } else {
    return the_node.text();
  }
}

$(document).ready(function() {
  $(".formats").tablesorter({
    textExtraction: myTextExtraction,
    headers: {
      // disable sorting for last three columns
      4: { sorter: false },
      5: { sorter: false },
      6: { sorter: false }
     }
   });

  var tabbable = $('#guide-nav'),
    tab_links = tabbable.find('ul.ui-tabs-nav a');
  
  if ('pushState' in window.history) {
    // Define our own click handler for the tabs, overriding the default.
    tabbable.tabs({ event: 'change' }); 
    
    tab_links.click(function() {
      var the_element = $(this),
        state = {},
        // Get the id of this tab widget.
        id = the_element.closest( '.tabs' ).attr('id'),
        title = the_element.text(),
        anchor = the_element.attr('href'),
        // Get the index of this tab.
        idx = $(this).parent().prevAll().length;

      // Set the state!
      state[id] = idx;
      window.history.pushState(state, title, document.location.pathname + anchor);
      $(window).trigger('hashchange');
    });

    // Bind an event to window.onhashchange that, when the history state changes, 
    // change the current tab as necessary.
    $(window).bind('hashchange', function(e) {
      correct = tabbable.find('ul.ui-tabs-nav a[href=' + document.location.hash + ']');
      correct.triggerHandler('change');
    })

    // Since the event is only triggered when the hash changes, we need to trigger
    // the event now, to handle the hash the page may have loaded with.
    $(window).trigger('hashchange');
  } else {
    tabbable.tabs(); 
  }
});

@@ -279,20 +279,375 @@
 %7B%0A  
-$(%22.formats%22
+var published_tab = $('#published .formats');%0A  published_tab.tablesorter(%7B%0A    textExtraction: myTextExtraction,%0A    headers: %7B%0A      // disable sorting for last three columns%0A      5: %7B sorter: false %7D,%0A      6: %7B sorter: false %7D,%0A      7: %7B sorter: false %7D,%0A      8: %7B sorter: false %7D,%0A      9: %7B sorter: false %7D%0A     %7D%0A   %7D);%0A   %0A  $(%22.formats%22).not(published_tab
 ).ta

Make sorting work in 'published' tab within publisher