// JavaScript Document
this.jSlideToggle = function()
{
  try
  {
  	$( '.jSlideToggle .head' ).each(
  	  function()
  	  {
        if ( $( this ).children( 'h2' ).hasClass( 'closed' ))
        {
          $( this ).parent().children( '.content,.list' ).hide();
        }

        if ( !$( this ).children( 'h2' ).hasClass( 'open' ) &&
             !$( this ).children( 'h2' ).hasClass( 'closed' ))
        {
  	      $( this ).children( 'h2' ).addClass( 'open' );
        }
      }
    );

  	$( '.jSlideToggle .head' ).click(

  	  function( e )
  	  {
  	    $( this ).parent().children( '.content,.list' ).slideToggle();

        if ( $( this ).children( 'h2' ).hasClass( 'open' ) )
        {
  	      $( this ).children( 'h2' ).removeClass( 'open' );
  	      $( this ).children( 'h2' ).addClass( 'closed' );
        }
        else
        {
  	      $( this ).children( 'h2' ).removeClass( 'closed' );
  	      $( this ).children( 'h2' ).addClass( 'open' );
        }

        return false;
      }
    );

  }
  catch (e) {alert(e); }
};

// starting the script on page load
$( document ).ready( function() {
  jSlideToggle();
} );

