help with toggleClass

help with toggleClass

I'm having a small bit of an issue with my toggle class, here is the script:

  1. $('.thecourse .category').click(function () {
  2.        $(this).nextUntil('.category').slideToggle('normal');
  3.       return(false);
  4.       });
  5. $('.thecourse .categoryname').click(function () {
  6.     $('span',this).toggleClass('arrow-down', 'arrow-up');
The HTML looks like this:

  1. <div class="thecourse">
  2. <div class="category">
  3. <div class="categoryname">
  4. <span class="arrow-down"></span>
  5. </div>
  6. </div>
  7. </div>
Now i did try to write in a function to the slideToggle, but it kept locking up and I wasn't able to figure it out even with firebug. Basically when script #1 is run, i want to toggle the classes listed in script#2

Thanks in advance for any help