var podcast_streaming_keyboard_navigation_loop = function (elem) {
  var podcast_streaming_tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
  var podcast_streaming_firstTabbable = podcast_streaming_tabbable.first();
  var podcast_streaming_lastTabbable = podcast_streaming_tabbable.last();
  podcast_streaming_firstTabbable.focus();

  podcast_streaming_lastTabbable.on('keydown', function (e) {
    if ((e.which === 9 && !e.shiftKey)) {
      e.preventDefault();
      podcast_streaming_firstTabbable.focus();
    }
  });

  podcast_streaming_firstTabbable.on('keydown', function (e) {
    if ((e.which === 9 && e.shiftKey)) {
      e.preventDefault();
      podcast_streaming_lastTabbable.focus();
    }
  });

  elem.on('keyup', function (e) {
    if (e.keyCode === 27) {
      elem.hide();
    };
  });
};