Open menu + Close menu

Open menu + Close menu

Hi everyone!
I have a menu and i need it to open and close on a click + the on a left side of menu (plus and minus) must change as well.
We can make a close/open menu with a method toggle(), but have can i make to change a picture with every click?
Here's my code(i was trying to make it with "var i" but it was useless): 

  1. $(document).ready(function(){
  2. var i = 0;
  3. $(".go").click(function(){
  4. if(i == 1) {
  5. $(this).next().children().children().children().children().hide();
  6. $(this).css('background-image','url(<?php echo $siteurl?>/css/img/plus.png)');
  7. $(this).css('background-repeat','no-repeat');
  8. }
  9. if(i == 0) {
  10. $(this).next().children().children().children().children().show();
  11. $(this).css('background-image','url(<?php echo $siteurl?>/css/img/minus.png)');
  12. $(this).css('background-repeat','no-repeat');
  13. }
  14. });
  15. });