var faq = {
  init: function() {
    var dt = YAHOO.util.Dom.getElementsBy( function( el ) {
      return ( YAHOO.util.Dom.hasClass( el.parentNode, 'fancy-faq' ) ); 
    }, 'dt' ); 
    for(var i = 0; dt.length > i; i++) {
      new FancyFaq( dt[i] );
    }
  }
}
function FancyFaq( el ) {
  YAHOO.util.Dom.setStyle( YAHOO.util.Dom.getNextSibling( el ), 'display', 'none' );   
  YAHOO.util.Event.on( el, 'click', this.toggle );
}
FancyFaq.prototype = { 
  toggle: function() {
    var nextSibiling = YAHOO.util.Dom.getNextSibling( this );
    nextSibiling.style.display = ( nextSibiling.style.display == 'block' ) ? 'none' : 'block';
  }
}
YAHOO.util.Event.on( window, 'load', faq.init );
