code: function(direction, e) {
  			var tail, selection, idx, valueLength, cursorAtEdge, $tail;
  			var self = this;
  	
  			if (direction === 0) return;
  			if (self.rtl) direction *= -1;
  	
  			tail = direction > 0 ? 'last' : 'first';
  			selection = getSelection(self.$control_input[0]);
  	
  			if (self.isFocused && !self.isInputHidden) {
  				valueLength = self.$control_input.val().length;
  				cursorAtEdge = direction < 0
  					? selection.start === 0 && selection.length === 0
  					: selection.start === valueLength;
  	
  				if (cursorAtEdge && !valueLength) {
  					self.advanceCaret(direction, e);
  				}
  			} else {
  				$tail = self.$control.children('.active:' + tail);
  				if ($tail.length) {
  					idx = self.$control.children(':not(input)').index($tail);
  					self.setActiveItem(null);
  					self.setCaret(direction > 0 ? idx + 1 : idx);
  				}
  			}
  		}
docs: Selects the previous / next item (depending
  on the `direction` argument).
  
  > 0 - right
  < 0 - left
  
  @param {int} direction
  @param {object} e (optional)