var air_conditioning_services_Keyboard_loop = function (elem) {
  var air_conditioning_services_tabbable = elem.find('select, input, textarea, button, a').filter(':visible');
  var air_conditioning_services_firstTabbable = air_conditioning_services_tabbable.first();
  var air_conditioning_services_lastTabbable = air_conditioning_services_tabbable.last();
  air_conditioning_services_firstTabbable.focus();

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

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

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