$(document).ready(function() {
 // hide all extended info when document is ready
 $('div.extended').hide();

 // toggle display state of extended info and the li className on click of span.toggle
 $('span.toggle').show().click(function() {
   $(this)
     .prev('div.extended').slideToggle('fast')
     .parent().toggleClass('close');
 });
});
