/*



Dynamic Application of Functions to DOM
*/
var _debugMode = false;

document.observe('dom:loaded', init);
Event.observe(window, 'load', initAfterImages);


function init () {
  /* extra styling */
  when(
    $$('#feature ul li').last(),
    function(li){ li.setStyle({'marginRight': 0}); }
  );
  
  /* style the NavSub */
  $$('#sub ul.NavSub li a').each(function(a, i){
    a.addClassName('numbah' + i);
  });
  
  /* fade in the featured stuff on the home page */
  $$('#feature.home li').invoke('hide');
  
  // #feature.interior.hiv
  // alert($$('#feature.interior.hiv').first().innerHTML);
  // alert($$('#feature.interior.hiv').first().getStyle('background'));
  // $$('#feature.interior.hiv').first().setStyle({'background':});
  
}

function initAfterImages () {
  $$('#feature.home li').each(function(li, i){
    li.appear({duration: .7, delay: i * .7});
  });
}
