var active_sound = new Array("","");
var img_sound_on  = 'lautsprecher_on.png';
var img_sound_off = 'lautsprecher_off.png';

      // toggleSound
      function toggleSound(element, url) {
      //alert("the element is "+element.src);
         pic_name = (element.src.split('/').reverse())[0]
         //alert("the element is "+pic_name);
         if (pic_name == img_sound_off) {
           //alert("it is off!");
           // if there is another sound playing, switch it off
           if (active_sound[0].length > 0) {
             document.getElementById(active_sound[1]).src="images/"+img_sound_off;
           }
           $(element).src = "images/"+img_sound_on;
           $(element).title = "Wiedergabe stoppen"
           active_sound = [url, $(element).id];
           Sound.play(url, {replace:true});
         } else {
           //alert("it is on!");
           $(element).src = "images/"+img_sound_off;
           $(element).title = "Song abspielen"
           Sound.play('sound/zero.mp3', {replace:true});
           active_sound = ["",""]
         }
      }


