initMapTooltip = function() {
  if (typeof(jQuery) != 'undefined') { 
    jQuery(document).ready(function() {
      if (jQuery.browser.msie && jQuery.browser.version.substr(0,1)<7) {
        jQuery('#map a').tooltip({ 
          track: true, 
          delay: 0, 
          showURL: false, 
          showBody: " - ", 
          extraClass: "pretty", 
          fixPNG: true, 
          left: 0,
          bodyHandler: function() { return jQuery("#d-" + jQuery(this).attr("district") + "-tooltip").html(); }
        });     
      } 
      else {
        jQuery('#map a.tooltiplarge').tooltip({ 
          track: true, 
          delay: 0, 
          showURL: false, 
          showBody: " - ", 
          extraClass: "pretty", 
          fixPNG: true, 
          left: 0,
          bodyHandler: function() { return jQuery("#d-" + jQuery(this).attr("district") + "-tooltip").html(); }
        });
        
        jQuery('#map a.tooltipsmall').tooltip({ 
          track: true, 
          delay: 0, 
          showURL: false, 
          showBody: " - ", 
          extraClass: "prettysmall", 
          fixPNG: true, 
          left: 0,
          bodyHandler: function() { return jQuery("#d-" + jQuery(this).attr("district") + "-tooltip").html(); }
        }); 
      }
    });
  } else {
    window.setTimeout(initMapTooltip, 100);
  }
};

initMapTooltip();
