/**
* Main javascript init file, performs most of the initialization for the site.
**/
document.onready = function() {
    
  var options = { min: -1, max: 1};
  //Initialize the font sizer for the site.
  $.FontSizer.Init(options);  

  //Fix png in ie6
  $('img[@src$=.png]').pngfix();                           
    
}

function trace(aMsg) { 
  setTimeout(function() { 
    throw new Error("[trace] " + aMsg);
  }, 0);
}


function hoverSwap(area) {  
  //INITIALISE VARIABLES    
  //image which is going to be referenced    
  var map = document.getElementById('map');       
  //images original src file   
  var origSrc = "map.jpg";      
  //directory for source images    
  var mapDir = "images/maps/";   
  //put together filename of new image from passed parameter.    
  var newMap = area;   
  //trace(newMap);  
  //CHANGE IMAGE SRC 
  map.src = mapDir + newMap;   
  //trace(document.getElementById('map').src);  
  
  //CHANGE IMG SRC BACK ON MOUSEOUT  

  map.onmouseout = function() {    
    map.src = mapDir + origSrc;  
  }
}