$(document).ready(
  function() {

    jQuery('ul.sf-menu').superfish();

   // Array variable to hold a list of all player IDs on the page
   var mediaPlayer = ['shen', 'wayfaring'];

   // Add a listener to trigger function stopOtherPlayers whenever an item is played
   function playerReady(obj) {
     document.getElementById(obj.id).addControllerListener('ITEM', 'stopOtherPlayers');
   }

   // Loop through all player IDs and, unless the player ID is the currently selected player ID, tell them to stop
   function stopOtherPlayers(obj) {
     for ( var id in mediaPlayer ) {
       if ( obj.id != mediaPlayer[id] ) document.getElementById(mediaPlayer[id]).sendEvent('STOP');
    }
   }

});
