/*
 * Requires JQuery (Written using ver 1.2.3)
 */


$(document).ready(function() {
 // forceRollovers();
  //removeDuplicateHighlight();
  initializeTables();
  //insertGMap();
});

/* 
function forceRollovers() {
  // Find items
  $('div#nav li a').hover(
  	function() {
  		$(this).addClass('hovered');
  	},
  	function () {
  		$(this).removeClass('hovered');
	});
}
*/
/* A side effect of the PHP highlighting of the selected nav item 
 * is that the homepage link is also highlighted.
 * This function will remove this unless the homepage itself is selected.
 *
 * It's dirty but it'll do until I can figure out the PHP fix.
 */
/*function removeDuplicateHighlight() {
  var navdivs = ['div#nav', 'div#sub-nav'];
  
  for(var i = 0; i < (navdivs.length) + 1; i++) {
  
    var selector = navdivs[i]+' li.active';
    var items = $(selector);
    
    if(items.length > 1) {
      items.filter(function (index) {
          return index != 1;
      })
      .removeClass('active');
    }

  }
  
}*/

/*function insertGMap() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
  }
}*/

function initializeTables() {
  $(".data").tablesorter();
}