  var btnSound;

  if (typeof SoundManager == 'function') {
    soundManager.debugMode = false;
    soundManager.consoleOnly = true;
    soundManager.url = '/wp-content/themes/dropstop/';
    soundManager.onload = function() {
      btnSound = soundManager.createSound({
          id: 'btnsound',
          url: '/wp-content/themes/dropstop/menu.mp3',
          autoLoad: true,
          autoPlay: false,
          volume: 100
      });
    }

    soundManager.onerror = function() {
      // SM2 could not start, no sound support, something broke etc. Handle gracefully.
    }
  }

$(function() {
  $('.sidebar1, .sidebar2, .sidebar3').hover(function() {
    playSound();
    var bg=$(this).css('background-image');
    $(this).css('background-image', bg.replace(/_off/g, '_on'));
  }, function() {
    stopSound();
    var bg=$(this).css('background-image');
    $(this).css('background-image', bg.replace(/_on/g, '_off'));
  });
  $('#slideshow').dynamicSlideshow();
  $('.btn_top, #header ul li').hover(function() {
    playSound();
  }, function() {
    stopSound();
  });
  $("#pikame_gallery").PikaChoose({user_thumbs:true, show_prev_next:false,thumb_width:65,thumb_height:65 });

});

function playSound() {
  soundManager.play('btnsound');
}

function stopSound() {
  soundManager.stop('btnsound');
}
