Hi, I'm sorry but am a bit lost at understanding how this works here. Pasting a snippet of what I'm seeing in the bootstrap.js file.

  Carousel.prototype.slide = function (type, next) {
    var $active   = this.$element.find('.item.active')
    var $next     = next || $active[type]()
    var isCycling = this.interval
    var direction = type == 'next' ? 'left' : 'right'
    var fallback  = type == 'next' ? 'first' : 'last'
    var that      = this

    if (!$next.length) {
      if (!this.options.wrap) return
      $next = this.$element.find('.item')[fallback]()

    if ($next.hasClass('active')) return this.sliding = false

    var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
    if (e.isDefaultPrevented()) return
What I don't understand are the following. Can someone please give me some clues?
1) Is this going to be called as Carousel.prototype.slide(type, next) somewhere? I can't seem to find this being called.
2) What is the line "var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })" doing?