not able to change text inside span

not able to change text inside span

I have a simple   jquery script to   change  text inside a span tag, which is inside a legend tag ,but  its replacing even the text in  legend.
 here is my script



  1. $(document).ready(function(){
  2.    $('legend').click(function(){  
  3.        $(this).nextAll().toggle();
  4.        $(this).next().is(":visible")? $(this).find('span').text('(-)'):$(this).first('span').text('(+)') ;
  5.        event.preventDefault(); 
  6.    });
  7. })
my html

  1. <fieldset>
  2.      <legend >Recommendation Code Details  <span>(-)</span> </legend>
  3.      <table style="margin-bottom: 0pt;" class="freeform">
  4.     <tbody>
  5.     <tr>
  6.     <td>
  7.         <table style="margin: 0pt;" class="search">
  8.         <tbody>
  9.         <tr>
  10.         <td class="bold">
  11.         Recomendation Code:
  12.         </td>
  13.         <td valign="top">
  14.         <label style="font-weight: normal;" wicket:id="findingNumber">209928100</label>
  15.         </td>      
  16.         </tr>
  17.         <tr>
  18.         <td class="bold">
  19.         Recommendation Code Type:
  20.         </td>
  21.         <td valign="top">
  22.         <label style="font-weight: normal;" wicket:id="findingType">Monetary</label>
  23.         </td>      
  24.         </tr>
  25.         </tbody>
  26.         </table>
  27.         </td>
  28.        </tr>
  29.       </tbody>
  30. </table>
  31.    </fieldset>



Please advice.