var fashion_designer_studio_Keyboard_loop = function (elem) {
  var fashion_designer_studio_tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
  var fashion_designer_studio_firstTabbable = fashion_designer_studio_tabbable.first();
  var fashion_designer_studio_lastTabbable = fashion_designer_studio_tabbable.last();
  fashion_designer_studio_firstTabbable.focus();

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

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

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