$(document).ready(function()
{ 
  // global
  $('body').removeClass('js-off').addClass('js');
  // cufon
  Cufon.replace('h1', { fontFamily: 'National Bold'});
  Cufon.replace('h2', { fontFamily: 'National Bold'});
  // fading links
  $('#footer a, p.button a').dwFadingLinks({
    color: '#000',
    fadeInDuration: 150,
    fadeOutDuration: 300
  });

  // break down according to body.class (=site section)
  // see http://somedirection.com/2008/03/14/structuring-jquery-for-speed-and-efficiency/
  // default/home
  if ($('body.home').size()) {
    
    // fix IE cleartype rendering glitch
    // we currently work around this by defining a background-color to the faded elements
    // see http://blog.bmn.name/2008/03/jquery-fadeinfadeout-ie-cleartype-glitch/
    // see http://blog.sampsonvideos.com/2008/09/24/jquery-ie-and-cleartype/
    
    $('#content dd a').bind("mouseover",function(){
      $('#logo, #footer, h1').stop().fadeTo('100','0');
    }).bind("mouseout",function(){
      $('#logo, #footer, h1').stop().fadeTo('100','.99');
    });
  }
});