/* JQuery accordion menu
Adapted from code by Karl Swedberg (http://www.learningjquery.com/2007/03/accordion-madness)
Markup strucutre required:
 <div id="#menu">
	 <h2>Section Heading Link 1</h2>
	 <div>Toggling section content (hidden by default)</div>
	 <h2>Section Heading Link 2</h2>
	 <div>Toggling section content</div>
	 ...
 </div>
*/

$(document).ready( function() {
  $('#menu> div').hide();				// collapse menu
  if($('#content').hasClass('cv')){
  // expand cv section of menu when #content div has 'cv' class
	  $('#menu> #cv').show();
  } 

  $('#menu> h2').click( function() {	// expand clicked section of menu
	$(this).next().slideToggle(200);
  });
});
