amoralej / centos / centos.org

Forked from centos/centos.org 3 years ago
Clone

Blame static/assets/js/sass-bootstrap.js

e8ec7a
/**
e8ec7a
* Sass Bootstrap v3.0.16 by Aaron Lademann and Twitter Inc.
e8ec7a
* Copyright 2013 Aaron Lademann and Twitter Inc.
e8ec7a
* Licensed under http://www.apache.org/licenses/LICENSE-2.0.
e8ec7a
*
e8ec7a
* Designed and built with all the love in the world by @alademann, @mdo and @fat.
e8ec7a
*/
e8ec7a
if (!jQuery) { throw new Error("Sass Bootstrap requires jQuery") }
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: transition.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#transitions
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2013 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
e8ec7a
  // ============================================================
e8ec7a
e8ec7a
  function transitionEnd() {
e8ec7a
    var el = document.createElement('bootstrap')
e8ec7a
e8ec7a
    var transEndEventNames = {
e8ec7a
      'WebkitTransition' : 'webkitTransitionEnd'
e8ec7a
    , 'MozTransition'    : 'transitionend'
e8ec7a
    , 'OTransition'      : 'oTransitionEnd otransitionend'
e8ec7a
    , 'transition'       : 'transitionend'
e8ec7a
    }
e8ec7a
e8ec7a
    for (var name in transEndEventNames) {
e8ec7a
      if (el.style[name] !== undefined) {
e8ec7a
        return { end: transEndEventNames[name] }
e8ec7a
      }
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  // http://blog.alexmaccaw.com/css-transitions
e8ec7a
  $.fn.emulateTransitionEnd = function (duration) {
e8ec7a
    var called = false, $el = this
e8ec7a
    $(this).one($.support.transition.end, function () { called = true })
e8ec7a
    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
e8ec7a
    setTimeout(callback, duration)
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
  $(function () {
e8ec7a
    $.support.transition = transitionEnd()
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: alert.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#alerts
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2013 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // ALERT CLASS DEFINITION
e8ec7a
  // ======================
e8ec7a
e8ec7a
  var dismiss = '[data-dismiss="alert"]'
e8ec7a
  var Alert   = function (el) {
e8ec7a
    $(el).on('click', dismiss, this.close)
e8ec7a
  }
e8ec7a
e8ec7a
  Alert.prototype.close = function (e) {
e8ec7a
    var $this    = $(this)
e8ec7a
    var selector = $this.attr('data-target')
e8ec7a
e8ec7a
    if (!selector) {
e8ec7a
      selector = $this.attr('href')
e8ec7a
      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
e8ec7a
    }
e8ec7a
e8ec7a
    var $parent = $(selector)
e8ec7a
e8ec7a
    if (e) e.preventDefault()
e8ec7a
e8ec7a
    if (!$parent.length) {
e8ec7a
      $parent = $this.hasClass('alert') ? $this : $this.parent()
e8ec7a
    }
e8ec7a
e8ec7a
    $parent.trigger(e = $.Event('close.bs.alert'))
e8ec7a
e8ec7a
    if (e.isDefaultPrevented()) return
e8ec7a
e8ec7a
    $parent.removeClass('in')
e8ec7a
e8ec7a
    function removeElement() {
e8ec7a
      $parent.trigger('closed.bs.alert').remove()
e8ec7a
    }
e8ec7a
e8ec7a
    $.support.transition && $parent.hasClass('fade') ?
e8ec7a
      $parent
e8ec7a
        .one($.support.transition.end, removeElement)
e8ec7a
        .emulateTransitionEnd(150) :
e8ec7a
      removeElement()
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // ALERT PLUGIN DEFINITION
e8ec7a
  // =======================
e8ec7a
e8ec7a
  var old = $.fn.alert
e8ec7a
e8ec7a
  $.fn.alert = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this = $(this)
e8ec7a
      var data  = $this.data('bs.alert')
e8ec7a
e8ec7a
      if (!data) $this.data('bs.alert', (data = new Alert(this)))
e8ec7a
      if (typeof option == 'string') data[option].call($this)
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.alert.Constructor = Alert
e8ec7a
e8ec7a
e8ec7a
  // ALERT NO CONFLICT
e8ec7a
  // =================
e8ec7a
e8ec7a
  $.fn.alert.noConflict = function () {
e8ec7a
    $.fn.alert = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // ALERT DATA-API
e8ec7a
  // ==============
e8ec7a
e8ec7a
  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: button.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#buttons
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2013 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // BUTTON PUBLIC CLASS DEFINITION
e8ec7a
  // ==============================
e8ec7a
e8ec7a
  var Button = function (element, options) {
e8ec7a
    this.$element = $(element)
e8ec7a
    this.options  = $.extend({}, Button.DEFAULTS, options)
e8ec7a
  }
e8ec7a
e8ec7a
  Button.DEFAULTS = {
e8ec7a
    loadingText: 'loading...'
e8ec7a
  }
e8ec7a
e8ec7a
  Button.prototype.setState = function (state) {
e8ec7a
    var d    = 'disabled'
e8ec7a
    var $el  = this.$element
e8ec7a
    var val  = $el.is('input') ? 'val' : 'html'
e8ec7a
    var data = $el.data()
e8ec7a
e8ec7a
    state = state + 'Text'
e8ec7a
e8ec7a
    if (!data.resetText) $el.data('resetText', $el[val]())
e8ec7a
e8ec7a
    $el[val](data[state] || this.options[state])
e8ec7a
e8ec7a
    // push to event loop to allow forms to submit
e8ec7a
    setTimeout(function () {
e8ec7a
      state == 'loadingText' ?
e8ec7a
        $el.addClass(d).attr(d, d) :
e8ec7a
        $el.removeClass(d).removeAttr(d);
e8ec7a
    }, 0)
e8ec7a
  }
e8ec7a
e8ec7a
  Button.prototype.toggle = function () {
e8ec7a
    var $parent = this.$element.closest('[data-toggle="buttons"]')
e8ec7a
e8ec7a
    if ($parent.length) {
e8ec7a
      var $input = this.$element.find('input')
e8ec7a
        .prop('checked', !this.$element.hasClass('active'))
e8ec7a
        .trigger('change')
e8ec7a
      if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
e8ec7a
    }
e8ec7a
e8ec7a
    this.$element.toggleClass('active')
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // BUTTON PLUGIN DEFINITION
e8ec7a
  // ========================
e8ec7a
e8ec7a
  var old = $.fn.button
e8ec7a
e8ec7a
  $.fn.button = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.button')
e8ec7a
      var options = typeof option == 'object' && option
e8ec7a
e8ec7a
      if (!data) $this.data('bs.button', (data = new Button(this, options)))
e8ec7a
e8ec7a
      if (option == 'toggle') data.toggle()
e8ec7a
      else if (option) data.setState(option)
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.button.Constructor = Button
e8ec7a
e8ec7a
e8ec7a
  // BUTTON NO CONFLICT
e8ec7a
  // ==================
e8ec7a
e8ec7a
  $.fn.button.noConflict = function () {
e8ec7a
    $.fn.button = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // BUTTON DATA-API
e8ec7a
  // ===============
e8ec7a
e8ec7a
  $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
e8ec7a
    var $btn = $(e.target)
e8ec7a
    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
e8ec7a
    $btn.button('toggle')
e8ec7a
    e.preventDefault()
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: carousel.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#carousel
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // CAROUSEL CLASS DEFINITION
e8ec7a
  // =========================
e8ec7a
e8ec7a
  var Carousel = function (element, options) {
e8ec7a
    this.$element    = $(element)
e8ec7a
    this.$indicators = this.$element.find('.carousel-indicators')
e8ec7a
    this.options     = options
e8ec7a
    this.paused      =
e8ec7a
    this.sliding     =
e8ec7a
    this.interval    =
e8ec7a
    this.$active     =
e8ec7a
    this.$items      = null
e8ec7a
e8ec7a
    this.options.pause == 'hover' && this.$element
e8ec7a
      .on('mouseenter', $.proxy(this.pause, this))
e8ec7a
      .on('mouseleave', $.proxy(this.cycle, this))
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.DEFAULTS = {
e8ec7a
    interval: 5000
e8ec7a
  , pause: 'hover'
e8ec7a
  , wrap: true
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.cycle =  function (e) {
e8ec7a
    e || (this.paused = false)
e8ec7a
e8ec7a
    this.interval && clearInterval(this.interval)
e8ec7a
e8ec7a
    this.options.interval
e8ec7a
      && !this.paused
e8ec7a
      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
e8ec7a
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.getActiveIndex = function () {
e8ec7a
    this.$active = this.$element.find('.item.active')
e8ec7a
    this.$items  = this.$active.parent().children()
e8ec7a
e8ec7a
    return this.$items.index(this.$active)
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.to = function (pos) {
e8ec7a
    var that        = this
e8ec7a
    var activeIndex = this.getActiveIndex()
e8ec7a
e8ec7a
    if (pos > (this.$items.length - 1) || pos < 0) return
e8ec7a
e8ec7a
    if (this.sliding)       return this.$element.one('slid', function () { that.to(pos) })
e8ec7a
    if (activeIndex == pos) return this.pause().cycle()
e8ec7a
e8ec7a
    return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.pause = function (e) {
e8ec7a
    e || (this.paused = true)
e8ec7a
e8ec7a
    if (this.$element.find('.next, .prev').length && $.support.transition.end) {
e8ec7a
      this.$element.trigger($.support.transition.end)
e8ec7a
      this.cycle(true)
e8ec7a
    }
e8ec7a
e8ec7a
    this.interval = clearInterval(this.interval)
e8ec7a
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.next = function () {
e8ec7a
    if (this.sliding) return
e8ec7a
    return this.slide('next')
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.prev = function () {
e8ec7a
    if (this.sliding) return
e8ec7a
    return this.slide('prev')
e8ec7a
  }
e8ec7a
e8ec7a
  Carousel.prototype.slide = function (type, next) {
e8ec7a
    var $active   = this.$element.find('.item.active')
e8ec7a
    var $next     = next || $active[type]()
e8ec7a
    var isCycling = this.interval
e8ec7a
    var direction = type == 'next' ? 'left' : 'right'
e8ec7a
    var fallback  = type == 'next' ? 'first' : 'last'
e8ec7a
    var that      = this
e8ec7a
e8ec7a
    if (!$next.length) {
e8ec7a
      if (!this.options.wrap) return
e8ec7a
      $next = this.$element.find('.item')[fallback]()
e8ec7a
    }
e8ec7a
e8ec7a
    this.sliding = true
e8ec7a
e8ec7a
    isCycling && this.pause()
e8ec7a
e8ec7a
    var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
e8ec7a
e8ec7a
    if ($next.hasClass('active')) return
e8ec7a
e8ec7a
    if (this.$indicators.length) {
e8ec7a
      this.$indicators.find('.active').removeClass('active')
e8ec7a
      this.$element.one('slid', function () {
e8ec7a
        var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
e8ec7a
        $nextIndicator && $nextIndicator.addClass('active')
e8ec7a
      })
e8ec7a
    }
e8ec7a
e8ec7a
    if ($.support.transition && this.$element.hasClass('slide')) {
e8ec7a
      this.$element.trigger(e)
e8ec7a
      if (e.isDefaultPrevented()) return
e8ec7a
      $next.addClass(type)
e8ec7a
      $next[0].offsetWidth // force reflow
e8ec7a
      $active.addClass(direction)
e8ec7a
      $next.addClass(direction)
e8ec7a
      $active
e8ec7a
        .one($.support.transition.end, function () {
e8ec7a
          $next.removeClass([type, direction].join(' ')).addClass('active')
e8ec7a
          $active.removeClass(['active', direction].join(' '))
e8ec7a
          that.sliding = false
e8ec7a
          setTimeout(function () { that.$element.trigger('slid') }, 0)
e8ec7a
        })
e8ec7a
        .emulateTransitionEnd(600)
e8ec7a
    } else {
e8ec7a
      this.$element.trigger(e)
e8ec7a
      if (e.isDefaultPrevented()) return
e8ec7a
      $active.removeClass('active')
e8ec7a
      $next.addClass('active')
e8ec7a
      this.sliding = false
e8ec7a
      this.$element.trigger('slid')
e8ec7a
    }
e8ec7a
e8ec7a
    isCycling && this.cycle()
e8ec7a
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // CAROUSEL PLUGIN DEFINITION
e8ec7a
  // ==========================
e8ec7a
e8ec7a
  var old = $.fn.carousel
e8ec7a
e8ec7a
  $.fn.carousel = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.carousel')
e8ec7a
      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
e8ec7a
      var action  = typeof option == 'string' ? option : options.slide
e8ec7a
e8ec7a
      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
e8ec7a
      if (typeof option == 'number') data.to(option)
e8ec7a
      else if (action) data[action]()
e8ec7a
      else if (options.interval) data.pause().cycle()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.carousel.Constructor = Carousel
e8ec7a
e8ec7a
e8ec7a
  // CAROUSEL NO CONFLICT
e8ec7a
  // ====================
e8ec7a
e8ec7a
  $.fn.carousel.noConflict = function () {
e8ec7a
    $.fn.carousel = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // CAROUSEL DATA-API
e8ec7a
  // =================
e8ec7a
e8ec7a
  $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
e8ec7a
    var $this   = $(this), href
e8ec7a
    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
e8ec7a
    var options = $.extend({}, $target.data(), $this.data())
e8ec7a
    var slideIndex = $this.attr('data-slide-to')
e8ec7a
    if (slideIndex) options.interval = false
e8ec7a
e8ec7a
    $target.carousel(options)
e8ec7a
e8ec7a
    if (slideIndex = $this.attr('data-slide-to')) {
e8ec7a
      $target.data('bs.carousel').to(slideIndex)
e8ec7a
    }
e8ec7a
e8ec7a
    e.preventDefault()
e8ec7a
  })
e8ec7a
e8ec7a
  $(window).on('load', function () {
e8ec7a
    $('[data-ride="carousel"]').each(function () {
e8ec7a
      var $carousel = $(this)
e8ec7a
      $carousel.carousel($carousel.data())
e8ec7a
    })
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: collapse.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#collapse
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // COLLAPSE PUBLIC CLASS DEFINITION
e8ec7a
  // ================================
e8ec7a
e8ec7a
  var Collapse = function (element, options) {
e8ec7a
    this.$element      = $(element)
e8ec7a
    this.options       = $.extend({}, Collapse.DEFAULTS, options)
e8ec7a
    this.transitioning = null
e8ec7a
e8ec7a
    if (this.options.parent) this.$parent = $(this.options.parent)
e8ec7a
    if (this.options.toggle) this.toggle()
e8ec7a
  }
e8ec7a
e8ec7a
  Collapse.DEFAULTS = {
e8ec7a
    toggle: true
e8ec7a
  }
e8ec7a
e8ec7a
  Collapse.prototype.dimension = function () {
e8ec7a
    var hasWidth = this.$element.hasClass('width')
e8ec7a
    return hasWidth ? 'width' : 'height'
e8ec7a
  }
e8ec7a
e8ec7a
  Collapse.prototype.show = function () {
e8ec7a
    if (this.transitioning || this.$element.hasClass('in')) return
e8ec7a
e8ec7a
    var startEvent = $.Event('show.bs.collapse')
e8ec7a
    this.$element.trigger(startEvent)
e8ec7a
    if (startEvent.isDefaultPrevented()) return
e8ec7a
e8ec7a
    var actives = this.$parent && this.$parent.find('> .panel > .in')
e8ec7a
e8ec7a
    if (actives && actives.length) {
e8ec7a
      var hasData = actives.data('bs.collapse')
e8ec7a
      if (hasData && hasData.transitioning) return
e8ec7a
      actives.collapse('hide')
e8ec7a
      hasData || actives.data('bs.collapse', null)
e8ec7a
    }
e8ec7a
e8ec7a
    var dimension = this.dimension()
e8ec7a
e8ec7a
    this.$element
e8ec7a
      .removeClass('collapse')
e8ec7a
      .addClass('collapsing')
e8ec7a
      [dimension](0)
e8ec7a
e8ec7a
    this.transitioning = 1
e8ec7a
e8ec7a
    var complete = function () {
e8ec7a
      this.$element
e8ec7a
        .removeClass('collapsing')
e8ec7a
        .addClass('in')
e8ec7a
        [dimension]('auto')
e8ec7a
      this.transitioning = 0
e8ec7a
      this.$element.trigger('shown.bs.collapse')
e8ec7a
    }
e8ec7a
e8ec7a
    if (!$.support.transition) return complete.call(this)
e8ec7a
e8ec7a
    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
e8ec7a
e8ec7a
    this.$element
e8ec7a
      .one($.support.transition.end, $.proxy(complete, this))
e8ec7a
      .emulateTransitionEnd(350)
e8ec7a
      [dimension](this.$element[0][scrollSize])
e8ec7a
  }
e8ec7a
e8ec7a
  Collapse.prototype.hide = function () {
e8ec7a
    if (this.transitioning || !this.$element.hasClass('in')) return
e8ec7a
e8ec7a
    var startEvent = $.Event('hide.bs.collapse')
e8ec7a
    this.$element.trigger(startEvent)
e8ec7a
    if (startEvent.isDefaultPrevented()) return
e8ec7a
e8ec7a
    var dimension = this.dimension()
e8ec7a
e8ec7a
    this.$element
e8ec7a
      [dimension](this.$element[dimension]())
e8ec7a
      [0].offsetHeight
e8ec7a
e8ec7a
    this.$element
e8ec7a
      .addClass('collapsing')
e8ec7a
      .removeClass('collapse')
e8ec7a
      .removeClass('in')
e8ec7a
e8ec7a
    this.transitioning = 1
e8ec7a
e8ec7a
    var complete = function () {
e8ec7a
      this.transitioning = 0
e8ec7a
      this.$element
e8ec7a
        .trigger('hidden.bs.collapse')
e8ec7a
        .removeClass('collapsing')
e8ec7a
        .addClass('collapse')
e8ec7a
    }
e8ec7a
e8ec7a
    if (!$.support.transition) return complete.call(this)
e8ec7a
e8ec7a
    this.$element
e8ec7a
      [dimension](0)
e8ec7a
      .one($.support.transition.end, $.proxy(complete, this))
e8ec7a
      .emulateTransitionEnd(350)
e8ec7a
  }
e8ec7a
e8ec7a
  Collapse.prototype.toggle = function () {
e8ec7a
    this[this.$element.hasClass('in') ? 'hide' : 'show']()
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // COLLAPSE PLUGIN DEFINITION
e8ec7a
  // ==========================
e8ec7a
e8ec7a
  var old = $.fn.collapse
e8ec7a
e8ec7a
  $.fn.collapse = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.collapse')
e8ec7a
      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
e8ec7a
e8ec7a
      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.collapse.Constructor = Collapse
e8ec7a
e8ec7a
e8ec7a
  // COLLAPSE NO CONFLICT
e8ec7a
  // ====================
e8ec7a
e8ec7a
  $.fn.collapse.noConflict = function () {
e8ec7a
    $.fn.collapse = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // COLLAPSE DATA-API
e8ec7a
  // =================
e8ec7a
e8ec7a
  $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
e8ec7a
    var $this   = $(this), href
e8ec7a
    var target  = $this.attr('data-target')
e8ec7a
        || e.preventDefault()
e8ec7a
        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
e8ec7a
    var $target = $(target)
e8ec7a
    var data    = $target.data('bs.collapse')
e8ec7a
    var option  = data ? 'toggle' : $this.data()
e8ec7a
    var parent  = $this.attr('data-parent')
e8ec7a
    var $parent = parent && $(parent)
e8ec7a
e8ec7a
    if (!data || !data.transitioning) {
e8ec7a
      if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
e8ec7a
      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
e8ec7a
    }
e8ec7a
e8ec7a
    $target.collapse(option)
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: dropdown.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#dropdowns
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // DROPDOWN CLASS DEFINITION
e8ec7a
  // =========================
e8ec7a
e8ec7a
  var backdrop = '.dropdown-backdrop'
e8ec7a
  var toggle   = '[data-toggle=dropdown]'
e8ec7a
  var Dropdown = function (element) {
e8ec7a
    var $el = $(element).on('click.bs.dropdown', this.toggle)
e8ec7a
  }
e8ec7a
e8ec7a
  Dropdown.prototype.toggle = function (e) {
e8ec7a
    var $this = $(this)
e8ec7a
e8ec7a
    if ($this.is('.disabled, :disabled')) return
e8ec7a
e8ec7a
    var $parent  = getParent($this)
e8ec7a
    var isActive = $parent.hasClass('open')
e8ec7a
e8ec7a
    clearMenus()
e8ec7a
e8ec7a
    if (!isActive) {
e8ec7a
      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
e8ec7a
        // if mobile we we use a backdrop because click events don't delegate
e8ec7a
        $('
e8ec7a
      }
e8ec7a
e8ec7a
      $parent.trigger(e = $.Event('show.bs.dropdown'))
e8ec7a
e8ec7a
      if (e.isDefaultPrevented()) return
e8ec7a
e8ec7a
      $parent
e8ec7a
        .toggleClass('open')
e8ec7a
        .trigger('shown.bs.dropdown')
e8ec7a
e8ec7a
      $this.focus()
e8ec7a
    }
e8ec7a
e8ec7a
    return false
e8ec7a
  }
e8ec7a
e8ec7a
  Dropdown.prototype.keydown = function (e) {
e8ec7a
    if (!/(38|40|27)/.test(e.keyCode)) return
e8ec7a
e8ec7a
    var $this = $(this)
e8ec7a
e8ec7a
    e.preventDefault()
e8ec7a
    e.stopPropagation()
e8ec7a
e8ec7a
    if ($this.is('.disabled, :disabled')) return
e8ec7a
e8ec7a
    var $parent  = getParent($this)
e8ec7a
    var isActive = $parent.hasClass('open')
e8ec7a
e8ec7a
    if (!isActive || (isActive && e.keyCode == 27)) {
e8ec7a
      if (e.which == 27) $parent.find(toggle).focus()
e8ec7a
      return $this.click()
e8ec7a
    }
e8ec7a
e8ec7a
    var $items = $('[role=menu] li:not(.divider):visible a', $parent)
e8ec7a
e8ec7a
    if (!$items.length) return
e8ec7a
e8ec7a
    var index = $items.index($items.filter(':focus'))
e8ec7a
e8ec7a
    if (e.keyCode == 38 && index > 0)                 index--                        // up
e8ec7a
    if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
e8ec7a
    if (!~index)                                      index=0
e8ec7a
e8ec7a
    $items.eq(index).focus()
e8ec7a
  }
e8ec7a
e8ec7a
  function clearMenus() {
e8ec7a
    $(backdrop).remove()
e8ec7a
    $(toggle).each(function (e) {
e8ec7a
      var $parent = getParent($(this))
e8ec7a
      if (!$parent.hasClass('open')) return
e8ec7a
      $parent.trigger(e = $.Event('hide.bs.dropdown'))
e8ec7a
      if (e.isDefaultPrevented()) return
e8ec7a
      $parent.removeClass('open').trigger('hidden.bs.dropdown')
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  function getParent($this) {
e8ec7a
    var selector = $this.attr('data-target')
e8ec7a
e8ec7a
    if (!selector) {
e8ec7a
      selector = $this.attr('href')
e8ec7a
      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
e8ec7a
    }
e8ec7a
e8ec7a
    var $parent = selector && $(selector)
e8ec7a
e8ec7a
    return $parent && $parent.length ? $parent : $this.parent()
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // DROPDOWN PLUGIN DEFINITION
e8ec7a
  // ==========================
e8ec7a
e8ec7a
  var old = $.fn.dropdown
e8ec7a
e8ec7a
  $.fn.dropdown = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this = $(this)
e8ec7a
      var data  = $this.data('dropdown')
e8ec7a
e8ec7a
      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
e8ec7a
      if (typeof option == 'string') data[option].call($this)
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.dropdown.Constructor = Dropdown
e8ec7a
e8ec7a
e8ec7a
  // DROPDOWN NO CONFLICT
e8ec7a
  // ====================
e8ec7a
e8ec7a
  $.fn.dropdown.noConflict = function () {
e8ec7a
    $.fn.dropdown = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // APPLY TO STANDARD DROPDOWN ELEMENTS
e8ec7a
  // ===================================
e8ec7a
e8ec7a
  $(document)
e8ec7a
    .on('click.bs.dropdown.data-api', clearMenus)
e8ec7a
    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
e8ec7a
    .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
e8ec7a
    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: modal.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#modals
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // MODAL CLASS DEFINITION
e8ec7a
  // ======================
e8ec7a
e8ec7a
  var Modal = function (element, options) {
e8ec7a
    this.options   = options
e8ec7a
    this.$element  = $(element)
e8ec7a
    this.$backdrop =
e8ec7a
    this.isShown   = null
e8ec7a
e8ec7a
    if (this.options.remote) this.$element.load(this.options.remote)
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.DEFAULTS = {
e8ec7a
      backdrop: true
e8ec7a
    , keyboard: true
e8ec7a
    , show: true
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.toggle = function (_relatedTarget) {
e8ec7a
    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.show = function (_relatedTarget) {
e8ec7a
    var that = this
e8ec7a
    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
e8ec7a
e8ec7a
    this.$element.trigger(e)
e8ec7a
e8ec7a
    if (this.isShown || e.isDefaultPrevented()) return
e8ec7a
e8ec7a
    this.isShown = true
e8ec7a
e8ec7a
    this.escape()
e8ec7a
e8ec7a
    this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
e8ec7a
e8ec7a
    this.backdrop(function () {
e8ec7a
      var transition = $.support.transition && that.$element.hasClass('fade')
e8ec7a
e8ec7a
      if (!that.$element.parent().length) {
e8ec7a
        that.$element.appendTo(document.body) // don't move modals dom position
e8ec7a
      }
e8ec7a
e8ec7a
      that.$element.show()
e8ec7a
e8ec7a
      if (transition) {
e8ec7a
        that.$element[0].offsetWidth // force reflow
e8ec7a
      }
e8ec7a
e8ec7a
      that.$element
e8ec7a
        .addClass('in')
e8ec7a
        .attr('aria-hidden', false)
e8ec7a
e8ec7a
      that.enforceFocus()
e8ec7a
e8ec7a
      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
e8ec7a
e8ec7a
      transition ?
e8ec7a
        that.$element.find('.modal-dialog') // wait for modal to slide in
e8ec7a
          .one($.support.transition.end, function () {
e8ec7a
            that.$element.focus().trigger(e)
e8ec7a
          })
e8ec7a
          .emulateTransitionEnd(300) :
e8ec7a
        that.$element.focus().trigger(e)
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.hide = function (e) {
e8ec7a
    if (e) e.preventDefault()
e8ec7a
e8ec7a
    e = $.Event('hide.bs.modal')
e8ec7a
e8ec7a
    this.$element.trigger(e)
e8ec7a
e8ec7a
    if (!this.isShown || e.isDefaultPrevented()) return
e8ec7a
e8ec7a
    this.isShown = false
e8ec7a
e8ec7a
    this.escape()
e8ec7a
e8ec7a
    $(document).off('focusin.bs.modal')
e8ec7a
e8ec7a
    this.$element
e8ec7a
      .removeClass('in')
e8ec7a
      .attr('aria-hidden', true)
e8ec7a
      .off('click.dismiss.modal')
e8ec7a
e8ec7a
    $.support.transition && this.$element.hasClass('fade') ?
e8ec7a
      this.$element
e8ec7a
        .one($.support.transition.end, $.proxy(this.hideModal, this))
e8ec7a
        .emulateTransitionEnd(300) :
e8ec7a
      this.hideModal()
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.enforceFocus = function () {
e8ec7a
    $(document)
e8ec7a
      .off('focusin.bs.modal') // guard against infinite focus loop
e8ec7a
      .on('focusin.bs.modal', $.proxy(function (e) {
e8ec7a
        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
e8ec7a
          this.$element.focus()
e8ec7a
        }
e8ec7a
      }, this))
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.escape = function () {
e8ec7a
    if (this.isShown && this.options.keyboard) {
e8ec7a
      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
e8ec7a
        e.which == 27 && this.hide()
e8ec7a
      }, this))
e8ec7a
    } else if (!this.isShown) {
e8ec7a
      this.$element.off('keyup.dismiss.bs.modal')
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.hideModal = function () {
e8ec7a
    var that = this
e8ec7a
    this.$element.hide()
e8ec7a
    this.backdrop(function () {
e8ec7a
      that.removeBackdrop()
e8ec7a
      that.$element.trigger('hidden.bs.modal')
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.removeBackdrop = function () {
e8ec7a
    this.$backdrop && this.$backdrop.remove()
e8ec7a
    this.$backdrop = null
e8ec7a
  }
e8ec7a
e8ec7a
  Modal.prototype.backdrop = function (callback) {
e8ec7a
    var that    = this
e8ec7a
    var animate = this.$element.hasClass('fade') ? 'fade' : ''
e8ec7a
e8ec7a
    if (this.isShown && this.options.backdrop) {
e8ec7a
      var doAnimate = $.support.transition && animate
e8ec7a
e8ec7a
      this.$backdrop = $('
e8ec7a
        .appendTo(document.body)
e8ec7a
e8ec7a
      this.$element.on('click.dismiss.modal', $.proxy(function (e) {
e8ec7a
        if (e.target !== e.currentTarget) return
e8ec7a
        this.options.backdrop == 'static'
e8ec7a
          ? this.$element[0].focus.call(this.$element[0])
e8ec7a
          : this.hide.call(this)
e8ec7a
      }, this))
e8ec7a
e8ec7a
      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
e8ec7a
e8ec7a
      this.$backdrop.addClass('in')
e8ec7a
e8ec7a
      if (!callback) return
e8ec7a
e8ec7a
      doAnimate ?
e8ec7a
        this.$backdrop
e8ec7a
          .one($.support.transition.end, callback)
e8ec7a
          .emulateTransitionEnd(150) :
e8ec7a
        callback()
e8ec7a
e8ec7a
    } else if (!this.isShown && this.$backdrop) {
e8ec7a
      this.$backdrop.removeClass('in')
e8ec7a
e8ec7a
      $.support.transition && this.$element.hasClass('fade')?
e8ec7a
        this.$backdrop
e8ec7a
          .one($.support.transition.end, callback)
e8ec7a
          .emulateTransitionEnd(150) :
e8ec7a
        callback()
e8ec7a
e8ec7a
    } else if (callback) {
e8ec7a
      callback()
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // MODAL PLUGIN DEFINITION
e8ec7a
  // =======================
e8ec7a
e8ec7a
  var old = $.fn.modal
e8ec7a
e8ec7a
  $.fn.modal = function (option, _relatedTarget) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.modal')
e8ec7a
      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
e8ec7a
e8ec7a
      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
e8ec7a
      if (typeof option == 'string') data[option](_relatedTarget)
e8ec7a
      else if (options.show) data.show(_relatedTarget)
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.modal.Constructor = Modal
e8ec7a
e8ec7a
e8ec7a
  // MODAL NO CONFLICT
e8ec7a
  // =================
e8ec7a
e8ec7a
  $.fn.modal.noConflict = function () {
e8ec7a
    $.fn.modal = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // MODAL DATA-API
e8ec7a
  // ==============
e8ec7a
e8ec7a
  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
e8ec7a
    var $this   = $(this)
e8ec7a
    var href    = $this.attr('href')
e8ec7a
    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
e8ec7a
    var option  = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
e8ec7a
e8ec7a
    e.preventDefault()
e8ec7a
e8ec7a
    $target
e8ec7a
      .modal(option, this)
e8ec7a
      .one('hide', function () {
e8ec7a
        $this.is(':visible') && $this.focus()
e8ec7a
      })
e8ec7a
  })
e8ec7a
e8ec7a
  $(document)
e8ec7a
    .on('show.bs.modal',  '.modal', function () { $(document.body).addClass('modal-open') })
e8ec7a
    .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: tooltip.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#tooltip
e8ec7a
 * Inspired by the original jQuery.tipsy by Jason Frame
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // TOOLTIP PUBLIC CLASS DEFINITION
e8ec7a
  // ===============================
e8ec7a
e8ec7a
  var Tooltip = function (element, options) {
e8ec7a
    this.type       =
e8ec7a
    this.options    =
e8ec7a
    this.enabled    =
e8ec7a
    this.timeout    =
e8ec7a
    this.hoverState =
e8ec7a
    this.$element   = null
e8ec7a
e8ec7a
    this.init('tooltip', element, options)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.DEFAULTS = {
e8ec7a
    animation: true
e8ec7a
  , placement: 'top'
e8ec7a
  , selector: false
e8ec7a
  , template: '
'
e8ec7a
  , trigger: 'hover focus'
e8ec7a
  , title: ''
e8ec7a
  , delay: 0
e8ec7a
  , html: false
e8ec7a
  , container: false
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.init = function (type, element, options) {
e8ec7a
    this.enabled  = true
e8ec7a
    this.type     = type
e8ec7a
    this.$element = $(element)
e8ec7a
    this.options  = this.getOptions(options)
e8ec7a
e8ec7a
    var triggers = this.options.trigger.split(' ')
e8ec7a
e8ec7a
    for (var i = triggers.length; i--;) {
e8ec7a
      var trigger = triggers[i]
e8ec7a
e8ec7a
      if (trigger == 'click') {
e8ec7a
        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
e8ec7a
      } else if (trigger != 'manual') {
e8ec7a
        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'
e8ec7a
        var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
e8ec7a
e8ec7a
        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
e8ec7a
        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
e8ec7a
      }
e8ec7a
    }
e8ec7a
e8ec7a
    this.options.selector ?
e8ec7a
      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
e8ec7a
      this.fixTitle()
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getDefaults = function () {
e8ec7a
    return Tooltip.DEFAULTS
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getOptions = function (options) {
e8ec7a
    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
e8ec7a
e8ec7a
    if (options.delay && typeof options.delay == 'number') {
e8ec7a
      options.delay = {
e8ec7a
        show: options.delay
e8ec7a
      , hide: options.delay
e8ec7a
      }
e8ec7a
    }
e8ec7a
e8ec7a
    return options
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getDelegateOptions = function () {
e8ec7a
    var options  = {}
e8ec7a
    var defaults = this.getDefaults()
e8ec7a
e8ec7a
    this._options && $.each(this._options, function (key, value) {
e8ec7a
      if (defaults[key] != value) options[key] = value
e8ec7a
    })
e8ec7a
e8ec7a
    return options
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.enter = function (obj) {
e8ec7a
    var self = obj instanceof this.constructor ?
e8ec7a
      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
e8ec7a
e8ec7a
    clearTimeout(self.timeout)
e8ec7a
e8ec7a
    self.hoverState = 'in'
e8ec7a
e8ec7a
    if (!self.options.delay || !self.options.delay.show) return self.show()
e8ec7a
e8ec7a
    self.timeout = setTimeout(function () {
e8ec7a
      if (self.hoverState == 'in') self.show()
e8ec7a
    }, self.options.delay.show)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.leave = function (obj) {
e8ec7a
    var self = obj instanceof this.constructor ?
e8ec7a
      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
e8ec7a
e8ec7a
    clearTimeout(self.timeout)
e8ec7a
e8ec7a
    self.hoverState = 'out'
e8ec7a
e8ec7a
    if (!self.options.delay || !self.options.delay.hide) return self.hide()
e8ec7a
e8ec7a
    self.timeout = setTimeout(function () {
e8ec7a
      if (self.hoverState == 'out') self.hide()
e8ec7a
    }, self.options.delay.hide)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.show = function () {
e8ec7a
    var e = $.Event('show.bs.'+ this.type)
e8ec7a
e8ec7a
    if (this.hasContent() && this.enabled) {
e8ec7a
      this.$element.trigger(e)
e8ec7a
e8ec7a
      if (e.isDefaultPrevented()) return
e8ec7a
e8ec7a
      var $tip = this.tip()
e8ec7a
e8ec7a
      this.setContent()
e8ec7a
e8ec7a
      if (this.options.animation) $tip.addClass('fade')
e8ec7a
e8ec7a
      var placement = typeof this.options.placement == 'function' ?
e8ec7a
        this.options.placement.call(this, $tip[0], this.$element[0]) :
e8ec7a
        this.options.placement
e8ec7a
e8ec7a
      var autoToken = /\s?auto?\s?/i
e8ec7a
      var autoPlace = autoToken.test(placement)
e8ec7a
      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
e8ec7a
e8ec7a
      $tip
e8ec7a
        .detach()
e8ec7a
        .css({ top: 0, left: 0, display: 'block' })
e8ec7a
        .addClass(placement)
e8ec7a
e8ec7a
      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
e8ec7a
e8ec7a
      var pos          = this.getPosition()
e8ec7a
      var actualWidth  = $tip[0].offsetWidth
e8ec7a
      var actualHeight = $tip[0].offsetHeight
e8ec7a
e8ec7a
      if (autoPlace) {
e8ec7a
        var $parent = this.$element.parent()
e8ec7a
e8ec7a
        var orgPlacement = placement
e8ec7a
        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
e8ec7a
        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()
e8ec7a
        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
e8ec7a
        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left
e8ec7a
e8ec7a
        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :
e8ec7a
                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :
e8ec7a
                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :
e8ec7a
                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :
e8ec7a
                    placement
e8ec7a
e8ec7a
        $tip
e8ec7a
          .removeClass(orgPlacement)
e8ec7a
          .addClass(placement)
e8ec7a
      }
e8ec7a
e8ec7a
      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
e8ec7a
e8ec7a
      this.applyPlacement(calculatedOffset, placement)
e8ec7a
      this.$element.trigger('shown.bs.' + this.type)
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.applyPlacement = function(offset, placement) {
e8ec7a
    var replace
e8ec7a
    var $tip   = this.tip()
e8ec7a
    var width  = $tip[0].offsetWidth
e8ec7a
    var height = $tip[0].offsetHeight
e8ec7a
e8ec7a
    // manually read margins because getBoundingClientRect includes difference
e8ec7a
    var marginTop = parseInt($tip.css('margin-top'), 10)
e8ec7a
    var marginLeft = parseInt($tip.css('margin-left'), 10)
e8ec7a
e8ec7a
    // we must check for NaN for ie 8/9
e8ec7a
    if (isNaN(marginTop))  marginTop  = 0
e8ec7a
    if (isNaN(marginLeft)) marginLeft = 0
e8ec7a
e8ec7a
    offset.top  = offset.top  + marginTop
e8ec7a
    offset.left = offset.left + marginLeft
e8ec7a
e8ec7a
    $tip
e8ec7a
      .offset(offset)
e8ec7a
      .addClass('in')
e8ec7a
e8ec7a
    // check to see if placing tip in new offset caused the tip to resize itself
e8ec7a
    var actualWidth  = $tip[0].offsetWidth
e8ec7a
    var actualHeight = $tip[0].offsetHeight
e8ec7a
e8ec7a
    if (placement == 'top' && actualHeight != height) {
e8ec7a
      replace = true
e8ec7a
      offset.top = offset.top + height - actualHeight
e8ec7a
    }
e8ec7a
e8ec7a
    if (/bottom|top/.test(placement)) {
e8ec7a
      var delta = 0
e8ec7a
e8ec7a
      if (offset.left < 0) {
e8ec7a
        delta       = offset.left * -2
e8ec7a
        offset.left = 0
e8ec7a
e8ec7a
        $tip.offset(offset)
e8ec7a
e8ec7a
        actualWidth  = $tip[0].offsetWidth
e8ec7a
        actualHeight = $tip[0].offsetHeight
e8ec7a
      }
e8ec7a
e8ec7a
      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
e8ec7a
    } else {
e8ec7a
      this.replaceArrow(actualHeight - height, actualHeight, 'top')
e8ec7a
    }
e8ec7a
e8ec7a
    if (replace) $tip.offset(offset)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
e8ec7a
    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.setContent = function () {
e8ec7a
    var $tip  = this.tip()
e8ec7a
    var title = this.getTitle()
e8ec7a
e8ec7a
    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
e8ec7a
    $tip.removeClass('fade in top bottom left right')
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.hide = function () {
e8ec7a
    var that = this
e8ec7a
    var $tip = this.tip()
e8ec7a
    var e    = $.Event('hide.bs.' + this.type)
e8ec7a
e8ec7a
    function complete() {
e8ec7a
      if (that.hoverState != 'in') $tip.detach()
e8ec7a
    }
e8ec7a
e8ec7a
    this.$element.trigger(e)
e8ec7a
e8ec7a
    if (e.isDefaultPrevented()) return
e8ec7a
e8ec7a
    $tip.removeClass('in')
e8ec7a
e8ec7a
    $.support.transition && this.$tip.hasClass('fade') ?
e8ec7a
      $tip
e8ec7a
        .one($.support.transition.end, complete)
e8ec7a
        .emulateTransitionEnd(150) :
e8ec7a
      complete()
e8ec7a
e8ec7a
    this.$element.trigger('hidden.bs.' + this.type)
e8ec7a
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.fixTitle = function () {
e8ec7a
    var $e = this.$element
e8ec7a
    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
e8ec7a
      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.hasContent = function () {
e8ec7a
    return this.getTitle()
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getPosition = function () {
e8ec7a
    var el = this.$element[0]
e8ec7a
    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
e8ec7a
      width: el.offsetWidth
e8ec7a
    , height: el.offsetHeight
e8ec7a
    }, this.$element.offset())
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
e8ec7a
    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
e8ec7a
           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
e8ec7a
           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
e8ec7a
        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.getTitle = function () {
e8ec7a
    var title
e8ec7a
    var $e = this.$element
e8ec7a
    var o  = this.options
e8ec7a
e8ec7a
    title = $e.attr('data-original-title')
e8ec7a
      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
e8ec7a
e8ec7a
    return title
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.tip = function () {
e8ec7a
    return this.$tip = this.$tip || $(this.options.template)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.arrow = function () {
e8ec7a
    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.validate = function () {
e8ec7a
    if (!this.$element[0].parentNode) {
e8ec7a
      this.hide()
e8ec7a
      this.$element = null
e8ec7a
      this.options  = null
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.enable = function () {
e8ec7a
    this.enabled = true
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.disable = function () {
e8ec7a
    this.enabled = false
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.toggleEnabled = function () {
e8ec7a
    this.enabled = !this.enabled
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.toggle = function (e) {
e8ec7a
    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
e8ec7a
    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
e8ec7a
  }
e8ec7a
e8ec7a
  Tooltip.prototype.destroy = function () {
e8ec7a
    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // TOOLTIP PLUGIN DEFINITION
e8ec7a
  // =========================
e8ec7a
e8ec7a
  var old = $.fn.tooltip
e8ec7a
e8ec7a
  $.fn.tooltip = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.tooltip')
e8ec7a
      var options = typeof option == 'object' && option
e8ec7a
e8ec7a
      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.tooltip.Constructor = Tooltip
e8ec7a
e8ec7a
e8ec7a
  // TOOLTIP NO CONFLICT
e8ec7a
  // ===================
e8ec7a
e8ec7a
  $.fn.tooltip.noConflict = function () {
e8ec7a
    $.fn.tooltip = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: popover.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#popovers
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // POPOVER PUBLIC CLASS DEFINITION
e8ec7a
  // ===============================
e8ec7a
e8ec7a
  var Popover = function (element, options) {
e8ec7a
    this.init('popover', element, options)
e8ec7a
  }
e8ec7a
e8ec7a
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
e8ec7a
e8ec7a
  Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
e8ec7a
    placement: 'right'
e8ec7a
  , trigger: 'click'
e8ec7a
  , content: ''
e8ec7a
  , template: '

'
e8ec7a
  })
e8ec7a
e8ec7a
e8ec7a
  // NOTE: POPOVER EXTENDS tooltip.js
e8ec7a
  // ================================
e8ec7a
e8ec7a
  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
e8ec7a
e8ec7a
  Popover.prototype.constructor = Popover
e8ec7a
e8ec7a
  Popover.prototype.getDefaults = function () {
e8ec7a
    return Popover.DEFAULTS
e8ec7a
  }
e8ec7a
e8ec7a
  Popover.prototype.setContent = function () {
e8ec7a
    var $tip    = this.tip()
e8ec7a
    var title   = this.getTitle()
e8ec7a
    var content = this.getContent()
e8ec7a
e8ec7a
    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
e8ec7a
    $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
e8ec7a
e8ec7a
    $tip.removeClass('fade top bottom left right in')
e8ec7a
e8ec7a
    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
e8ec7a
    // this manually by checking the contents.
e8ec7a
    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
e8ec7a
  }
e8ec7a
e8ec7a
  Popover.prototype.hasContent = function () {
e8ec7a
    return this.getTitle() || this.getContent()
e8ec7a
  }
e8ec7a
e8ec7a
  Popover.prototype.getContent = function () {
e8ec7a
    var $e = this.$element
e8ec7a
    var o  = this.options
e8ec7a
e8ec7a
    return $e.attr('data-content')
e8ec7a
      || (typeof o.content == 'function' ?
e8ec7a
            o.content.call($e[0]) :
e8ec7a
            o.content)
e8ec7a
  }
e8ec7a
e8ec7a
  Popover.prototype.arrow = function () {
e8ec7a
    return this.$arrow = this.$arrow || this.tip().find('.arrow')
e8ec7a
  }
e8ec7a
e8ec7a
  Popover.prototype.tip = function () {
e8ec7a
    if (!this.$tip) this.$tip = $(this.options.template)
e8ec7a
    return this.$tip
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // POPOVER PLUGIN DEFINITION
e8ec7a
  // =========================
e8ec7a
e8ec7a
  var old = $.fn.popover
e8ec7a
e8ec7a
  $.fn.popover = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.popover')
e8ec7a
      var options = typeof option == 'object' && option
e8ec7a
e8ec7a
      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.popover.Constructor = Popover
e8ec7a
e8ec7a
e8ec7a
  // POPOVER NO CONFLICT
e8ec7a
  // ===================
e8ec7a
e8ec7a
  $.fn.popover.noConflict = function () {
e8ec7a
    $.fn.popover = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: scrollspy.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#scrollspy
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // SCROLLSPY CLASS DEFINITION
e8ec7a
  // ==========================
e8ec7a
e8ec7a
  function ScrollSpy(element, options) {
e8ec7a
    var href
e8ec7a
    var process  = $.proxy(this.process, this)
e8ec7a
e8ec7a
    this.$element       = $(element).is('body') ? $(window) : $(element)
e8ec7a
    this.$body          = $('body')
e8ec7a
    this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
e8ec7a
    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
e8ec7a
    this.selector       = (this.options.target
e8ec7a
      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
e8ec7a
      || '') + ' .nav li > a'
e8ec7a
    this.offsets        = $([])
e8ec7a
    this.targets        = $([])
e8ec7a
    this.activeTarget   = null
e8ec7a
e8ec7a
    this.refresh()
e8ec7a
    this.process()
e8ec7a
  }
e8ec7a
e8ec7a
  ScrollSpy.DEFAULTS = {
e8ec7a
    offset: 10
e8ec7a
  }
e8ec7a
e8ec7a
  ScrollSpy.prototype.refresh = function () {
e8ec7a
    var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
e8ec7a
e8ec7a
    this.offsets = $([])
e8ec7a
    this.targets = $([])
e8ec7a
e8ec7a
    var self     = this
e8ec7a
    var $targets = this.$body
e8ec7a
      .find(this.selector)
e8ec7a
      .map(function () {
e8ec7a
        var $el   = $(this)
e8ec7a
        var href  = $el.data('target') || $el.attr('href')
e8ec7a
        var $href = /^#\w/.test(href) && $(href)
e8ec7a
e8ec7a
        return ($href
e8ec7a
          && $href.length
e8ec7a
          && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
e8ec7a
      })
e8ec7a
      .sort(function (a, b) { return a[0] - b[0] })
e8ec7a
      .each(function () {
e8ec7a
        self.offsets.push(this[0])
e8ec7a
        self.targets.push(this[1])
e8ec7a
      })
e8ec7a
  }
e8ec7a
e8ec7a
  ScrollSpy.prototype.process = function () {
e8ec7a
    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
e8ec7a
    var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
e8ec7a
    var maxScroll    = scrollHeight - this.$scrollElement.height()
e8ec7a
    var offsets      = this.offsets
e8ec7a
    var targets      = this.targets
e8ec7a
    var activeTarget = this.activeTarget
e8ec7a
    var i
e8ec7a
e8ec7a
    if (scrollTop >= maxScroll) {
e8ec7a
      return activeTarget != (i = targets.last()[0]) && this.activate(i)
e8ec7a
    }
e8ec7a
e8ec7a
    for (i = offsets.length; i--;) {
e8ec7a
      activeTarget != targets[i]
e8ec7a
        && scrollTop >= offsets[i]
e8ec7a
        && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
e8ec7a
        && this.activate( targets[i] )
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
  ScrollSpy.prototype.activate = function (target) {
e8ec7a
    this.activeTarget = target
e8ec7a
e8ec7a
    $(this.selector)
e8ec7a
      .parents('.active')
e8ec7a
      .removeClass('active')
e8ec7a
e8ec7a
    var selector = this.selector
e8ec7a
      + '[data-target="' + target + '"],'
e8ec7a
      + this.selector + '[href="' + target + '"]'
e8ec7a
e8ec7a
    var active = $(selector)
e8ec7a
      .parents('li')
e8ec7a
      .addClass('active')
e8ec7a
e8ec7a
    if (active.parent('.dropdown-menu').length)  {
e8ec7a
      active = active
e8ec7a
        .closest('li.dropdown')
e8ec7a
        .addClass('active')
e8ec7a
    }
e8ec7a
e8ec7a
    active.trigger('activate')
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // SCROLLSPY PLUGIN DEFINITION
e8ec7a
  // ===========================
e8ec7a
e8ec7a
  var old = $.fn.scrollspy
e8ec7a
e8ec7a
  $.fn.scrollspy = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.scrollspy')
e8ec7a
      var options = typeof option == 'object' && option
e8ec7a
e8ec7a
      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.scrollspy.Constructor = ScrollSpy
e8ec7a
e8ec7a
e8ec7a
  // SCROLLSPY NO CONFLICT
e8ec7a
  // =====================
e8ec7a
e8ec7a
  $.fn.scrollspy.noConflict = function () {
e8ec7a
    $.fn.scrollspy = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // SCROLLSPY DATA-API
e8ec7a
  // ==================
e8ec7a
e8ec7a
  $(window).on('load', function () {
e8ec7a
    $('[data-spy="scroll"]').each(function () {
e8ec7a
      var $spy = $(this)
e8ec7a
      $spy.scrollspy($spy.data())
e8ec7a
    })
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: tab.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#tabs
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // TAB CLASS DEFINITION
e8ec7a
  // ====================
e8ec7a
e8ec7a
  var Tab = function (element) {
e8ec7a
    this.element = $(element)
e8ec7a
  }
e8ec7a
e8ec7a
  Tab.prototype.show = function () {
e8ec7a
    var $this    = this.element
e8ec7a
    var $ul      = $this.closest('ul:not(.dropdown-menu)')
e8ec7a
    var selector = $this.attr('data-target')
e8ec7a
e8ec7a
    if (!selector) {
e8ec7a
      selector = $this.attr('href')
e8ec7a
      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
e8ec7a
    }
e8ec7a
e8ec7a
    if ($this.parent('li').hasClass('active')) return
e8ec7a
e8ec7a
    var previous = $ul.find('.active:last a')[0]
e8ec7a
    var e        = $.Event('show.bs.tab', {
e8ec7a
      relatedTarget: previous
e8ec7a
    })
e8ec7a
e8ec7a
    $this.trigger(e)
e8ec7a
e8ec7a
    if (e.isDefaultPrevented()) return
e8ec7a
e8ec7a
    var $target = $(selector)
e8ec7a
e8ec7a
    this.activate($this.parent('li'), $ul)
e8ec7a
    this.activate($target, $target.parent(), function () {
e8ec7a
      $this.trigger({
e8ec7a
        type: 'shown.bs.tab'
e8ec7a
      , relatedTarget: previous
e8ec7a
      })
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  Tab.prototype.activate = function (element, container, callback) {
e8ec7a
    var $active    = container.find('> .active')
e8ec7a
    var transition = callback
e8ec7a
      && $.support.transition
e8ec7a
      && $active.hasClass('fade')
e8ec7a
e8ec7a
    function next() {
e8ec7a
      $active
e8ec7a
        .removeClass('active')
e8ec7a
        .find('> .dropdown-menu > .active')
e8ec7a
        .removeClass('active')
e8ec7a
e8ec7a
      element.addClass('active')
e8ec7a
e8ec7a
      if (transition) {
e8ec7a
        element[0].offsetWidth // reflow for transition
e8ec7a
        element.addClass('in')
e8ec7a
      } else {
e8ec7a
        element.removeClass('fade')
e8ec7a
      }
e8ec7a
e8ec7a
      if (element.parent('.dropdown-menu')) {
e8ec7a
        element.closest('li.dropdown').addClass('active')
e8ec7a
      }
e8ec7a
e8ec7a
      callback && callback()
e8ec7a
    }
e8ec7a
e8ec7a
    transition ?
e8ec7a
      $active
e8ec7a
        .one($.support.transition.end, next)
e8ec7a
        .emulateTransitionEnd(150) :
e8ec7a
      next()
e8ec7a
e8ec7a
    $active.removeClass('in')
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // TAB PLUGIN DEFINITION
e8ec7a
  // =====================
e8ec7a
e8ec7a
  var old = $.fn.tab
e8ec7a
e8ec7a
  $.fn.tab = function ( option ) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this = $(this)
e8ec7a
      var data  = $this.data('bs.tab')
e8ec7a
e8ec7a
      if (!data) $this.data('bs.tab', (data = new Tab(this)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.tab.Constructor = Tab
e8ec7a
e8ec7a
e8ec7a
  // TAB NO CONFLICT
e8ec7a
  // ===============
e8ec7a
e8ec7a
  $.fn.tab.noConflict = function () {
e8ec7a
    $.fn.tab = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // TAB DATA-API
e8ec7a
  // ============
e8ec7a
e8ec7a
  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e8ec7a
    e.preventDefault()
e8ec7a
    $(this).tab('show')
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);
e8ec7a
e8ec7a
/* ========================================================================
e8ec7a
 * Bootstrap: affix.js v3.0.0
e8ec7a
 * http://twbs.github.com/bootstrap/javascript.html#affix
e8ec7a
 * ========================================================================
e8ec7a
 * Copyright 2012 Twitter, Inc.
e8ec7a
 *
e8ec7a
 * Licensed under the Apache License, Version 2.0 (the "License");
e8ec7a
 * you may not use this file except in compliance with the License.
e8ec7a
 * You may obtain a copy of the License at
e8ec7a
 *
e8ec7a
 * http://www.apache.org/licenses/LICENSE-2.0
e8ec7a
 *
e8ec7a
 * Unless required by applicable law or agreed to in writing, software
e8ec7a
 * distributed under the License is distributed on an "AS IS" BASIS,
e8ec7a
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e8ec7a
 * See the License for the specific language governing permissions and
e8ec7a
 * limitations under the License.
e8ec7a
 * ======================================================================== */
e8ec7a
e8ec7a
e8ec7a
+function ($) { "use strict";
e8ec7a
e8ec7a
  // AFFIX CLASS DEFINITION
e8ec7a
  // ======================
e8ec7a
e8ec7a
  var Affix = function (element, options) {
e8ec7a
    this.options = $.extend({}, Affix.DEFAULTS, options)
e8ec7a
    this.$window = $(window)
e8ec7a
      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
e8ec7a
      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
e8ec7a
e8ec7a
    this.$element = $(element)
e8ec7a
    this.affixed  =
e8ec7a
    this.unpin    = null
e8ec7a
e8ec7a
    this.checkPosition()
e8ec7a
  }
e8ec7a
e8ec7a
  Affix.RESET = 'affix affix-top affix-bottom'
e8ec7a
e8ec7a
  Affix.DEFAULTS = {
e8ec7a
    offset: 0
e8ec7a
  }
e8ec7a
e8ec7a
  Affix.prototype.checkPositionWithEventLoop = function () {
e8ec7a
    setTimeout($.proxy(this.checkPosition, this), 1)
e8ec7a
  }
e8ec7a
e8ec7a
  Affix.prototype.checkPosition = function () {
e8ec7a
    if (!this.$element.is(':visible')) return
e8ec7a
e8ec7a
    var scrollHeight = $(document).height()
e8ec7a
    var scrollTop    = this.$window.scrollTop()
e8ec7a
    var position     = this.$element.offset()
e8ec7a
    var offset       = this.options.offset
e8ec7a
    var offsetTop    = offset.top
e8ec7a
    var offsetBottom = offset.bottom
e8ec7a
e8ec7a
    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
e8ec7a
    if (typeof offsetTop == 'function')    offsetTop    = offset.top()
e8ec7a
    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
e8ec7a
e8ec7a
    var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
e8ec7a
                offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
e8ec7a
                offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
e8ec7a
e8ec7a
    if (this.affixed === affix) return
e8ec7a
    if (this.unpin) this.$element.css('top', '')
e8ec7a
e8ec7a
    this.affixed = affix
e8ec7a
    this.unpin   = affix == 'bottom' ? position.top - scrollTop : null
e8ec7a
e8ec7a
    this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
e8ec7a
e8ec7a
    if (affix == 'bottom') {
e8ec7a
      this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
e8ec7a
    }
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // AFFIX PLUGIN DEFINITION
e8ec7a
  // =======================
e8ec7a
e8ec7a
  var old = $.fn.affix
e8ec7a
e8ec7a
  $.fn.affix = function (option) {
e8ec7a
    return this.each(function () {
e8ec7a
      var $this   = $(this)
e8ec7a
      var data    = $this.data('bs.affix')
e8ec7a
      var options = typeof option == 'object' && option
e8ec7a
e8ec7a
      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
e8ec7a
      if (typeof option == 'string') data[option]()
e8ec7a
    })
e8ec7a
  }
e8ec7a
e8ec7a
  $.fn.affix.Constructor = Affix
e8ec7a
e8ec7a
e8ec7a
  // AFFIX NO CONFLICT
e8ec7a
  // =================
e8ec7a
e8ec7a
  $.fn.affix.noConflict = function () {
e8ec7a
    $.fn.affix = old
e8ec7a
    return this
e8ec7a
  }
e8ec7a
e8ec7a
e8ec7a
  // AFFIX DATA-API
e8ec7a
  // ==============
e8ec7a
e8ec7a
  $(window).on('load', function () {
e8ec7a
    $('[data-spy="affix"]').each(function () {
e8ec7a
      var $spy = $(this)
e8ec7a
      var data = $spy.data()
e8ec7a
e8ec7a
      data.offset = data.offset || {}
e8ec7a
e8ec7a
      if (data.offsetBottom) data.offset.bottom = data.offsetBottom
e8ec7a
      if (data.offsetTop)    data.offset.top    = data.offsetTop
e8ec7a
e8ec7a
      $spy.affix(data)
e8ec7a
    })
e8ec7a
  })
e8ec7a
e8ec7a
}(window.jQuery);