PageSourceSearch

https://uueugene.org/wp-content/themes/uua-congregation/assets/js/scripts.js?ver=1.4.0

js uueugene.org collected 2026-10-02 19:10:26 UTC 82,900 bytes, 2,494 lines download raw bytes

vendor: 64,829 bytes, lines 1-2216
1/* ========================================================================
2 * Bootstrap: transition.js v3.3.1
3 * http://getbootstrap.com/javascript/#transitions
4 * ========================================================================
5 * Copyright 2011-2014 Twitter, Inc.
6 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 * ======================================================================== */
8
9
10+function ($) {
11  'use strict';
12
13  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
14  // ============================================================
15
16  function transitionEnd() {
17    var el = document.createElement('bootstrap')
18
19    var transEndEventNames = {
20      WebkitTransition : 'webkitTransitionEnd',
21      MozTransition    : 'transitionend',
22      OTransition      : 'oTransitionEnd otransitionend',
23      transition       : 'transitionend'
24    }
25
26    for (var name in transEndEventNames) {
27      if (el.style[name] !== undefined) {
28        return { end: transEndEventNames[name] }
29      }
30    }
31
32    return false // explicit for ie8 (  ._.)
33  }
34
35  // http://blog.alexmaccaw.com/css-transitions
36  $.fn.emulateTransitionEnd = function (duration) {
37    var called = false
38    var $el = this
39    $(this).one('bsTransitionEnd', function () { called = true })
40    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
41    setTimeout(callback, duration)
42    return this
43  }
44
45  $(function () {
46    $.support.transition = transitionEnd()
47
48    if (!$.support.transition) return
49
50    $.event.special.bsTransitionEnd = {
51      bindType: $.support.transition.end,
52      delegateType: $.support.transition.end,
53      handle: function (e) {
54        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
55      }
56    }
57  })
58
59}(jQuery);
60;/* ========================================================================
61 * Bootstrap: alert.js v3.3.1
62 * http://getbootstrap.com/javascript/#alerts
63 * ========================================================================
64 * Copyright 2011-2014 Twitter, Inc.
65 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
66 * ======================================================================== */
67
68
69+function ($) {
70  'use strict';
71
72  // ALERT CLASS DEFINITION
73  // ======================
74
75  var dismiss = '[data-dismiss="alert"]'
76  var Alert   = function (el) {
77    $(el).on('click', dismiss, this.close)
78  }
79
80  Alert.VERSION = '3.3.1'
81
82  Alert.TRANSITION_DURATION = 150
83
84  Alert.prototype.close = function (e) {
85    var $this    = $(this)
86    var selector = $this.attr('data-target')
87
88    if (!selector) {
89      selector = $this.attr('href')
90      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
91    }
92
93    var $parent = $(selector)
94
95    if (e) e.preventDefault()
96
97    if (!$parent.length) {
98      $parent = $this.closest('.alert')
99    }
100
101    $parent.trigger(e = $.Event('close.bs.alert'))
102
103    if (e.isDefaultPrevented()) return
104
105    $parent.removeClass('in')
106
107    function removeElement() {
108      // detach from parent, fire event then clean up data
109      $parent.detach().trigger('closed.bs.alert').remove()
110    }
111
112    $.support.transition && $parent.hasClass('fade') ?
113      $parent
114        .one('bsTransitionEnd', removeElement)
115        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
116      removeElement()
117  }
118
119
120  // ALERT PLUGIN DEFINITION
121  // =======================
122
123  function Plugin(option) {
124    return this.each(function () {
125      var $this = $(this)
126      var data  = $this.data('bs.alert')
127
128      if (!data) $this.data('bs.alert', (data = new Alert(this)))
129      if (typeof option == 'string') data[option].call($this)
130    })
131  }
132
133  var old = $.fn.alert
134
135  $.fn.alert             = Plugin
136  $.fn.alert.Constructor = Alert
137
138
139  // ALERT NO CONFLICT
140  // =================
141
142  $.fn.alert.noConflict = function () {
143    $.fn.alert = old
144    return this
145  }
146
147
148  // ALERT DATA-API
149  // ==============
150
151  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
152
153}(jQuery);
154;/* ========================================================================
155 * Bootstrap: button.js v3.3.1
156 * http://getbootstrap.com/javascript/#buttons
157 * ========================================================================
158 * Copyright 2011-2014 Twitter, Inc.
159 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
160 * ======================================================================== */
161
162
163+function ($) {
164  'use strict';
165
166  // BUTTON PUBLIC CLASS DEFINITION
167  // ==============================
168
169  var Button = function (element, options) {
170    this.$element  = $(element)
171    this.options   = $.extend({}, Button.DEFAULTS, options)
172    this.isLoading = false
173  }
174
175  Button.VERSION  = '3.3.1'
176
177  Button.DEFAULTS = {
178    loadingText: 'loading...'
179  }
180
181  Button.prototype.setState = function (state) {
182    var d    = 'disabled'
183    var $el  = this.$element
184    var val  = $el.is('input') ? 'val' : 'html'
185    var data = $el.data()
186
187    state = state + 'Text'
188
189    if (data.resetText == null) $el.data('resetText', $el[val]())
190
191    // push to event loop to allow forms to submit
192    setTimeout($.proxy(function () {
193      $el[val](data[state] == null ? this.options[state] : data[state])
194
195      if (state == 'loadingText') {
196        this.isLoading = true
197        $el.addClass(d).attr(d, d)
198      } else if (this.isLoading) {
199        this.isLoading = false
200        $el.removeClass(d).removeAttr(d)
201      }
202    }, this), 0)
203  }
204
205  Button.prototype.toggle = function () {
206    var changed = true
207    var $parent = this.$element.closest('[data-toggle="buttons"]')
208
209    if ($parent.length) {
210      var $input = this.$element.find('input')
211      if ($input.prop('type') == 'radio') {
212        if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
213        else $parent.find('.active').removeClass('active')
214      }
215      if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
216    } else {
217      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
218    }
219
220    if (changed) this.$element.toggleClass('active')
221  }
222
223
224  // BUTTON PLUGIN DEFINITION
225  // ========================
226
227  function Plugin(option) {
228    return this.each(function () {
229      var $this   = $(this)
230      var data    = $this.data('bs.button')
231      var options = typeof option == 'object' && option
232
233      if (!data) $this.data('bs.button', (data = new Button(this, options)))
234
235      if (option == 'toggle') data.toggle()
236      else if (option) data.setState(option)
237    })
238  }
239
240  var old = $.fn.button
241
242  $.fn.button             = Plugin
243  $.fn.button.Constructor = Button
244
245
246  // BUTTON NO CONFLICT
247  // ==================
248
249  $.fn.button.noConflict = function () {
250    $.fn.button = old
251    return this
252  }
253
254
255  // BUTTON DATA-API
256  // ===============
257
258  $(document)
259    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
260      var $btn = $(e.target)
261      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
262      Plugin.call($btn, 'toggle')
263      e.preventDefault()
264    })
265    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
266      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
267    })
268
269}(jQuery);
270;/* ========================================================================
271 * Bootstrap: carousel.js v3.3.1
272 * http://getbootstrap.com/javascript/#carousel
273 * ========================================================================
274 * Copyright 2011-2014 Twitter, Inc.
275 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
276 * ======================================================================== */
277
278
279+function ($) {
280  'use strict';
281
282  // CAROUSEL CLASS DEFINITION
283  // =========================
284
285  var Carousel = function (element, options) {
286    this.$element    = $(element)
287    this.$indicators = this.$element.find('.carousel-indicators')
288    this.options     = options
289    this.paused      =
290    this.sliding     =
291    this.interval    =
292    this.$active     =
293    this.$items      = null
294
295    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
296
297    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
298      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
299      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
300  }
301
302  Carousel.VERSION  = '3.3.1'
303
304  Carousel.TRANSITION_DURATION = 600
305
306  Carousel.DEFAULTS = {
307    interval: 5000,
308    pause: 'hover',
309    wrap: true,
310    keyboard: true
311  }
312
313  Carousel.prototype.keydown = function (e) {
314    if (/input|textarea/i.test(e.target.tagName)) return
315    switch (e.which) {
316      case 37: this.prev(); break
317      case 39: this.next(); break
318      default: return
319    }
320
321    e.preventDefault()
322  }
323
324  Carousel.prototype.cycle = function (e) {
325    e || (this.paused = false)
326
327    this.interval && clearInterval(this.interval)
328
329    this.options.interval
330      && !this.paused
331      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
332
333    return this
334  }
335
336  Carousel.prototype.getItemIndex = function (item) {
337    this.$items = item.parent().children('.item')
338    return this.$items.index(item || this.$active)
339  }
340
341  Carousel.prototype.getItemForDirection = function (direction, active) {
342    var delta = direction == 'prev' ? -1 : 1
343    var activeIndex = this.getItemIndex(active)
344    var itemIndex = (activeIndex + delta) % this.$items.length
345    return this.$items.eq(itemIndex)
346  }
347
348  Carousel.prototype.to = function (pos) {
349    var that        = this
350    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
351
352    if (pos > (this.$items.length - 1) || pos < 0) return
353
354    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
355    if (activeIndex == pos) return this.pause().cycle()
356
357    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
358  }
359
360  Carousel.prototype.pause = function (e) {
361    e || (this.paused = true)
362
363    if (this.$element.find('.next, .prev').length && $.support.transition) {
364      this.$element.trigger($.support.transition.end)
365      this.cycle(true)
366    }
367
368    this.interval = clearInterval(this.interval)
369
370    return this
371  }
372
373  Carousel.prototype.next = function () {
374    if (this.sliding) return
375    return this.slide('next')
376  }
377
378  Carousel.prototype.prev = function () {
379    if (this.sliding) return
380    return this.slide('prev')
381  }
382
383  Carousel.prototype.slide = function (type, next) {
384    var $active   = this.$element.find('.item.active')
385    var $next     = next || this.getItemForDirection(type, $active)
386    var isCycling = this.interval
387    var direction = type == 'next' ? 'left' : 'right'
388    var fallback  = type == 'next' ? 'first' : 'last'
389    var that      = this
390
391    if (!$next.length) {
392      if (!this.options.wrap) return
393      $next = this.$element.find('.item')[fallback]()
394    }
395
396    if ($next.hasClass('active')) return (this.sliding = false)
397
398    var relatedTarget = $next[0]
399    var slideEvent = $.Event('slide.bs.carousel', {
400      relatedTarget: relatedTarget,
401      direction: direction
402    })
403    this.$element.trigger(slideEvent)
404    if (slideEvent.isDefaultPrevented()) return
405
406    this.sliding = true
407
408    isCycling && this.pause()
409
410    if (this.$indicators.length) {
411      this.$indicators.find('.active').removeClass('active')
412      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
413      $nextIndicator && $nextIndicator.addClass('active')
414    }
415
416    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
417    if ($.support.transition && this.$element.hasClass('slide')) {
418      $next.addClass(type)
419      $next[0].offsetWidth // force reflow
420      $active.addClass(direction)
421      $next.addClass(direction)
422      $active
423        .one('bsTransitionEnd', function () {
424          $next.removeClass([type, direction].join(' ')).addClass('active')
425          $active.removeClass(['active', direction].join(' '))
426          that.sliding = false
427          setTimeout(function () {
428            that.$element.trigger(slidEvent)
429          }, 0)
430        })
431        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
432    } else {
433      $active.removeClass('active')
434      $next.addClass('active')
435      this.sliding = false
436      this.$element.trigger(slidEvent)
437    }
438
439    isCycling && this.cycle()
440
441    return this
442  }
443
444
445  // CAROUSEL PLUGIN DEFINITION
446  // ==========================
447
448  function Plugin(option) {
449    return this.each(function () {
450      var $this   = $(this)
451      var data    = $this.data('bs.carousel')
452      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
453      var action  = typeof option == 'string' ? option : options.slide
454
455      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
456      if (typeof option == 'number') data.to(option)
457      else if (action) data[action]()
458      else if (options.interval) data.pause().cycle()
459    })
460  }
461
462  var old = $.fn.carousel
463
464  $.fn.carousel             = Plugin
465  $.fn.carousel.Constructor = Carousel
466
467
468  // CAROUSEL NO CONFLICT
469  // ====================
470
471  $.fn.carousel.noConflict = function () {
472    $.fn.carousel = old
473    return this
474  }
475
476
477  // CAROUSEL DATA-API
478  // =================
479
480  var clickHandler = function (e) {
481    var href
482    var $this   = $(this)
483    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
484    if (!$target.hasClass('carousel')) return
485    var options = $.extend({}, $target.data(), $this.data())
486    var slideIndex = $this.attr('data-slide-to')
487    if (slideIndex) options.interval = false
488
489    Plugin.call($target, options)
490
491    if (slideIndex) {
492      $target.data('bs.carousel').to(slideIndex)
493    }
494
495    e.preventDefault()
496  }
497
498  $(document)
499    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
500    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
501
502  $(window).on('load', function () {
503    $('[data-ride="carousel"]').each(function () {
504      var $carousel = $(this)
505      Plugin.call($carousel, $carousel.data())
506    })
507  })
508
509}(jQuery);
510;/* ========================================================================
511 * Bootstrap: collapse.js v3.3.1
512 * http://getbootstrap.com/javascript/#collapse
513 * ========================================================================
514 * Copyright 2011-2014 Twitter, Inc.
515 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
516 * ======================================================================== */
517
518
519+function ($) {
520  'use strict';
521
522  // COLLAPSE PUBLIC CLASS DEFINITION
523  // ================================
524
525  var Collapse = function (element, options) {
526    this.$element      = $(element)
527    this.options       = $.extend({}, Collapse.DEFAULTS, options)
528    this.$trigger      = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
529    this.transitioning = null
530
531    if (this.options.parent) {
532      this.$parent = this.getParent()
533    } else {
534      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
535    }
536
537    if (this.options.toggle) this.toggle()
538  }
539
540  Collapse.VERSION  = '3.3.1'
541
542  Collapse.TRANSITION_DURATION = 350
543
544  Collapse.DEFAULTS = {
545    toggle: true,
546    trigger: '[data-toggle="collapse"]'
547  }
548
549  Collapse.prototype.dimension = function () {
550    var hasWidth = this.$element.hasClass('width')
551    return hasWidth ? 'width' : 'height'
552  }
553
554  Collapse.prototype.show = function () {
555    if (this.transitioning || this.$element.hasClass('in')) return
556
557    var activesData
558    var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
559
560    if (actives && actives.length) {
561      activesData = actives.data('bs.collapse')
562      if (activesData && activesData.transitioning) return
563    }
564
565    var startEvent = $.Event('show.bs.collapse')
566    this.$element.trigger(startEvent)
567    if (startEvent.isDefaultPrevented()) return
568
569    if (actives && actives.length) {
570      Plugin.call(actives, 'hide')
571      activesData || actives.data('bs.collapse', null)
572    }
573
574    var dimension = this.dimension()
575
576    this.$element
577      .removeClass('collapse')
578      .addClass('collapsing')[dimension](0)
579      .attr('aria-expanded', true)
580
581    this.$trigger
582      .removeClass('collapsed')
583      .attr('aria-expanded', true)
584
585    this.transitioning = 1
586
587    var complete = function () {
588      this.$element
589        .removeClass('collapsing')
590        .addClass('collapse in')[dimension]('')
591      this.transitioning = 0
592      this.$element
593        .trigger('shown.bs.collapse')
594    }
595
596    if (!$.support.transition) return complete.call(this)
597
598    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
599
600    this.$element
601      .one('bsTransitionEnd', $.proxy(complete, this))
602      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
603  }
604
605  Collapse.prototype.hide = function () {
606    if (this.transitioning || !this.$element.hasClass('in')) return
607
608    var startEvent = $.Event('hide.bs.collapse')
609    this.$element.trigger(startEvent)
610    if (startEvent.isDefaultPrevented()) return
611
612    var dimension = this.dimension()
613
614    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
615
616    this.$element
617      .addClass('collapsing')
618      .removeClass('collapse in')
619      .attr('aria-expanded', false)
620
621    this.$trigger
622      .addClass('collapsed')
623      .attr('aria-expanded', false)
624
625    this.transitioning = 1
626
627    var complete = function () {
628      this.transitioning = 0
629      this.$element
630        .removeClass('collapsing')
631        .addClass('collapse')
632        .trigger('hidden.bs.collapse')
633    }
634
635    if (!$.support.transition) return complete.call(this)
636
637    this.$element
638      [dimension](0)
639      .one('bsTransitionEnd', $.proxy(complete, this))
640      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
641  }
642
643  Collapse.prototype.toggle = function () {
644    this[this.$element.hasClass('in') ? 'hide' : 'show']()
645  }
646
647  Collapse.prototype.getParent = function () {
648    return $(this.options.parent)
649      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
650      .each($.proxy(function (i, element) {
651        var $element = $(element)
652        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
653      }, this))
654      .end()
655  }
656
657  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
658    var isOpen = $element.hasClass('in')
659
660    $element.attr('aria-expanded', isOpen)
661    $trigger
662      .toggleClass('collapsed', !isOpen)
663      .attr('aria-expanded', isOpen)
664  }
665
666  function getTargetFromTrigger($trigger) {
667    var href
668    var target = $trigger.attr('data-target')
669      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
670
671    return $(target)
672  }
673
674
675  // COLLAPSE PLUGIN DEFINITION
676  // ==========================
677
678  function Plugin(option) {
679    return this.each(function () {
680      var $this   = $(this)
681      var data    = $this.data('bs.collapse')
682      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
683
684      if (!data && options.toggle && option == 'show') options.toggle = false
685      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
686      if (typeof option == 'string') data[option]()
687    })
688  }
689
690  var old = $.fn.collapse
691
692  $.fn.collapse             = Plugin
693  $.fn.collapse.Constructor = Collapse
694
695
696  // COLLAPSE NO CONFLICT
697  // ====================
698
699  $.fn.collapse.noConflict = function () {
700    $.fn.collapse = old
701    return this
702  }
703
704
705  // COLLAPSE DATA-API
706  // =================
707
708  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
709    var $this   = $(this)
710
711    if (!$this.attr('data-target')) e.preventDefault()
712
713    var $target = getTargetFromTrigger($this)
714    var data    = $target.data('bs.collapse')
715    var option  = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
716
717    Plugin.call($target, option)
718  })
719
720}(jQuery);
721;/* ========================================================================
722 * Bootstrap: dropdown.js v3.3.1
723 * http://getbootstrap.com/javascript/#dropdowns
724 * ========================================================================
725 * Copyright 2011-2014 Twitter, Inc.
726 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
727 * ======================================================================== */
728
729
730+function ($) {
731  'use strict';
732
733  // DROPDOWN CLASS DEFINITION
734  // =========================
735
736  var backdrop = '.dropdown-backdrop'
737  var toggle   = '[data-toggle="dropdown"]'
738  var Dropdown = function (element) {
739    $(element).on('click.bs.dropdown', this.toggle)
740  }
741
742  Dropdown.VERSION = '3.3.1'
743
744  Dropdown.prototype.toggle = function (e) {
745    var $this = $(this)
746
747    if ($this.is('.disabled, :disabled')) return
748
749    var $parent  = getParent($this)
750    var isActive = $parent.hasClass('open')
751
752    clearMenus()
753
754    if (!isActive) {
755      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
756        // if mobile we use a backdrop because click events don't delegate
757        $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
758      }
759
760      var relatedTarget = { relatedTarget: this }
761      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
762
763      if (e.isDefaultPrevented()) return
764
765      $this
766        .trigger('focus')
767        .attr('aria-expanded', 'true')
768
769      $parent
770        .toggleClass('open')
771        .trigger('shown.bs.dropdown', relatedTarget)
772    }
773
774    return false
775  }
776
777  Dropdown.prototype.keydown = function (e) {
778    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
779
780    var $this = $(this)
781
782    e.preventDefault()
783    e.stopPropagation()
784
785    if ($this.is('.disabled, :disabled')) return
786
787    var $parent  = getParent($this)
788    var isActive = $parent.hasClass('open')
789
790    if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
791      if (e.which == 27) $parent.find(toggle).trigger('focus')
792      return $this.trigger('click')
793    }
794
795    var desc = ' li:not(.divider):visible a'
796    var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
797
798    if (!$items.length) return
799
800    var index = $items.index(e.target)
801
802    if (e.which == 38 && index > 0)                 index--                        // up
803    if (e.which == 40 && index < $items.length - 1) index++                        // down
804    if (!~index)                                      index = 0
805
806    $items.eq(index).trigger('focus')
807  }
808
809  function clearMenus(e) {
810    if (e && e.which === 3) return
811    $(backdrop).remove()
812    $(toggle).each(function () {
813      var $this         = $(this)
814      var $parent       = getParent($this)
815      var relatedTarget = { relatedTarget: this }
816
817      if (!$parent.hasClass('open')) return
818
819      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
820
821      if (e.isDefaultPrevented()) return
822
823      $this.attr('aria-expanded', 'false')
824      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
825    })
826  }
827
828  function getParent($this) {
829    var selector = $this.attr('data-target')
830
831    if (!selector) {
832      selector = $this.attr('href')
833      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
834    }
835
836    var $parent = selector && $(selector)
837
838    return $parent && $parent.length ? $parent : $this.parent()
839  }
840
841
842  // DROPDOWN PLUGIN DEFINITION
843  // ==========================
844
845  function Plugin(option) {
846    return this.each(function () {
847      var $this = $(this)
848      var data  = $this.data('bs.dropdown')
849
850      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
851      if (typeof option == 'string') data[option].call($this)
852    })
853  }
854
855  var old = $.fn.dropdown
856
857  $.fn.dropdown             = Plugin
858  $.fn.dropdown.Constructor = Dropdown
859
860
861  // DROPDOWN NO CONFLICT
862  // ====================
863
864  $.fn.dropdown.noConflict = function () {
865    $.fn.dropdown = old
866    return this
867  }
868
869
870  // APPLY TO STANDARD DROPDOWN ELEMENTS
871  // ===================================
872
873  $(document)
874    .on('click.bs.dropdown.data-api', clearMenus)
875    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
876    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
877    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
878    .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
879    .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
880
881}(jQuery);
882;/* ========================================================================
883 * Bootstrap: modal.js v3.3.1
884 * http://getbootstrap.com/javascript/#modals
885 * ========================================================================
886 * Copyright 2011-2014 Twitter, Inc.
887 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
888 * ======================================================================== */
889
890
891+function ($) {
892  'use strict';
893
894  // MODAL CLASS DEFINITION
895  // ======================
896
897  var Modal = function (element, options) {
898    this.options        = options
899    this.$body          = $(document.body)
900    this.$element       = $(element)
901    this.$backdrop      =
902    this.isShown        = null
903    this.scrollbarWidth = 0
904
905    if (this.options.remote) {
906      this.$element
907        .find('.modal-content')
908        .load(this.options.remote, $.proxy(function () {
909          this.$element.trigger('loaded.bs.modal')
910        }, this))
911    }
912  }
913
914  Modal.VERSION  = '3.3.1'
915
916  Modal.TRANSITION_DURATION = 300
917  Modal.BACKDROP_TRANSITION_DURATION = 150
918
919  Modal.DEFAULTS = {
920    backdrop: true,
921    keyboard: true,
922    show: true
923  }
924
925  Modal.prototype.toggle = function (_relatedTarget) {
926    return this.isShown ? this.hide() : this.show(_relatedTarget)
927  }
928
929  Modal.prototype.show = function (_relatedTarget) {
930    var that = this
931    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
932
933    this.$element.trigger(e)
934
935    if (this.isShown || e.isDefaultPrevented()) return
936
937    this.isShown = true
938
939    this.checkScrollbar()
940    this.setScrollbar()
941    this.$body.addClass('modal-open')
942
943    this.escape()
944    this.resize()
945
946    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
947
948    this.backdrop(function () {
949      var transition = $.support.transition && that.$element.hasClass('fade')
950
951      if (!that.$element.parent().length) {
952        that.$element.appendTo(that.$body) // don't move modals dom position
953      }
954
955      that.$element
956        .show()
957        .scrollTop(0)
958
959      if (that.options.backdrop) that.adjustBackdrop()
960      that.adjustDialog()
961
962      if (transition) {
963        that.$element[0].offsetWidth // force reflow
964      }
965
966      that.$element
967        .addClass('in')
968        .attr('aria-hidden', false)
969
970      that.enforceFocus()
971
972      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
973
974      transition ?
975        that.$element.find('.modal-dialog') // wait for modal to slide in
976          .one('bsTransitionEnd', function () {
977            that.$element.trigger('focus').trigger(e)
978          })
979          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
980        that.$element.trigger('focus').trigger(e)
981    })
982  }
983
984  Modal.prototype.hide = function (e) {
985    if (e) e.preventDefault()
986
987    e = $.Event('hide.bs.modal')
988
989    this.$element.trigger(e)
990
991    if (!this.isShown || e.isDefaultPrevented()) return
992
993    this.isShown = false
994
995    this.escape()
996    this.resize()
997
998    $(document).off('focusin.bs.modal')
999
1000    this.$element
1001      .removeClass('in')
1002      .attr('aria-hidden', true)
1003      .off('click.dismiss.bs.modal')
1004
1005    $.support.transition && this.$element.hasClass('fade') ?
1006      this.$element
1007        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1008        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1009      this.hideModal()
1010  }
1011
1012  Modal.prototype.enforceFocus = function () {
1013    $(document)
1014      .off('focusin.bs.modal') // guard against infinite focus loop
1015      .on('focusin.bs.modal', $.proxy(function (e) {
1016        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1017          this.$element.trigger('focus')
1018        }
1019      }, this))
1020  }
1021
1022  Modal.prototype.escape = function () {
1023    if (this.isShown && this.options.keyboard) {
1024      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1025        e.which == 27 && this.hide()
1026      }, this))
1027    } else if (!this.isShown) {
1028      this.$element.off('keydown.dismiss.bs.modal')
1029    }
1030  }
1031
1032  Modal.prototype.resize = function () {
1033    if (this.isShown) {
1034      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1035    } else {
1036      $(window).off('resize.bs.modal')
1037    }
1038  }
1039
1040  Modal.prototype.hideModal = function () {
1041    var that = this
1042    this.$element.hide()
1043    this.backdrop(function () {
1044      that.$body.removeClass('modal-open')
1045      that.resetAdjustments()
1046      that.resetScrollbar()
1047      that.$element.trigger('hidden.bs.modal')
1048    })
1049  }
1050
1051  Modal.prototype.removeBackdrop = function () {
1052    this.$backdrop && this.$backdrop.remove()
1053    this.$backdrop = null
1054  }
1055
1056  Modal.prototype.backdrop = function (callback) {
1057    var that = this
1058    var animate = this.$element.hasClass('fade') ? 'fade' : ''
1059
1060    if (this.isShown && this.options.backdrop) {
1061      var doAnimate = $.support.transition && animate
1062
1063      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1064        .prependTo(this.$element)
1065        .on('click.dismiss.bs.modal', $.proxy(function (e) {
1066          if (e.target !== e.currentTarget) return
1067          this.options.backdrop == 'static'
1068            ? this.$element[0].focus.call(this.$element[0])
1069            : this.hide.call(this)
1070        }, this))
1071
1072      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1073
1074      this.$backdrop.addClass('in')
1075
1076      if (!callback) return
1077
1078      doAnimate ?
1079        this.$backdrop
1080          .one('bsTransitionEnd', callback)
1081          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1082        callback()
1083
1084    } else if (!this.isShown && this.$backdrop) {
1085      this.$backdrop.removeClass('in')
1086
1087      var callbackRemove = function () {
1088        that.removeBackdrop()
1089        callback && callback()
1090      }
1091      $.support.transition && this.$element.hasClass('fade') ?
1092        this.$backdrop
1093          .one('bsTransitionEnd', callbackRemove)
1094          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1095        callbackRemove()
1096
1097    } else if (callback) {
1098      callback()
1099    }
1100  }
1101
1102  // these following methods are used to handle overflowing modals
1103
1104  Modal.prototype.handleUpdate = function () {
1105    if (this.options.backdrop) this.adjustBackdrop()
1106    this.adjustDialog()
1107  }
1108
1109  Modal.prototype.adjustBackdrop = function () {
1110    this.$backdrop
1111      .css('height', 0)
1112      .css('height', this.$element[0].scrollHeight)
1113  }
1114
1115  Modal.prototype.adjustDialog = function () {
1116    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1117
1118    this.$element.css({
1119      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1120      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1121    })
1122  }
1123
1124  Modal.prototype.resetAdjustments = function () {
1125    this.$element.css({
1126      paddingLeft: '',
1127      paddingRight: ''
1128    })
1129  }
1130
1131  Modal.prototype.checkScrollbar = function () {
1132    this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
1133    this.scrollbarWidth = this.measureScrollbar()
1134  }
1135
1136  Modal.prototype.setScrollbar = function () {
1137    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1138    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1139  }
1140
1141  Modal.prototype.resetScrollbar = function () {
1142    this.$body.css('padding-right', '')
1143  }
1144
1145  Modal.prototype.measureScrollbar = function () { // thx walsh
1146    var scrollDiv = document.createElement('div')
1147    scrollDiv.className = 'modal-scrollbar-measure'
1148    this.$body.append(scrollDiv)
1149    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1150    this.$body[0].removeChild(scrollDiv)
1151    return scrollbarWidth
1152  }
1153
1154
1155  // MODAL PLUGIN DEFINITION
1156  // =======================
1157
1158  function Plugin(option, _relatedTarget) {
1159    return this.each(function () {
1160      var $this   = $(this)
1161      var data    = $this.data('bs.modal')
1162      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1163
1164      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1165      if (typeof option == 'string') data[option](_relatedTarget)
1166      else if (options.show) data.show(_relatedTarget)
1167    })
1168  }
1169
1170  var old = $.fn.modal
1171
1172  $.fn.modal             = Plugin
1173  $.fn.modal.Constructor = Modal
1174
1175
1176  // MODAL NO CONFLICT
1177  // =================
1178
1179  $.fn.modal.noConflict = function () {
1180    $.fn.modal = old
1181    return this
1182  }
1183
1184
1185  // MODAL DATA-API
1186  // ==============
1187
1188  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1189    var $this   = $(this)
1190    var href    = $this.attr('href')
1191    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1192    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1193
1194    if ($this.is('a')) e.preventDefault()
1195
1196    $target.one('show.bs.modal', function (showEvent) {
1197      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1198      $target.one('hidden.bs.modal', function () {
1199        $this.is(':visible') && $this.trigger('focus')
1200      })
1201    })
1202    Plugin.call($target, option, this)
1203  })
1204
1205}(jQuery);
1206;/* ========================================================================
1207 * Bootstrap: tooltip.js v3.3.1
1208 * http://getbootstrap.com/javascript/#tooltip
1209 * Inspired by the original jQuery.tipsy by Jason Frame
1210 * ========================================================================
1211 * Copyright 2011-2014 Twitter, Inc.
1212 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1213 * ======================================================================== */
1214
1215
1216+function ($) {
1217  'use strict';
1218
1219  // TOOLTIP PUBLIC CLASS DEFINITION
1220  // ===============================
1221
1222  var Tooltip = function (element, options) {
1223    this.type       =
1224    this.options    =
1225    this.enabled    =
1226    this.timeout    =
1227    this.hoverState =
1228    this.$element   = null
1229
1230    this.init('tooltip', element, options)
1231  }
1232
1233  Tooltip.VERSION  = '3.3.1'
1234
1235  Tooltip.TRANSITION_DURATION = 150
1236
1237  Tooltip.DEFAULTS = {
1238    animation: true,
1239    placement: 'top',
1240    selector: false,
1241    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1242    trigger: 'hover focus',
1243    title: '',
1244    delay: 0,
1245    html: false,
1246    container: false,
1247    viewport: {
1248      selector: 'body',
1249      padding: 0
1250    }
1251  }
1252
1253  Tooltip.prototype.init = function (type, element, options) {
1254    this.enabled   = true
1255    this.type      = type
1256    this.$element  = $(element)
1257    this.options   = this.getOptions(options)
1258    this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1259
1260    var triggers = this.options.trigger.split(' ')
1261
1262    for (var i = triggers.length; i--;) {
1263      var trigger = triggers[i]
1264
1265      if (trigger == 'click') {
1266        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1267      } else if (trigger != 'manual') {
1268        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
1269        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1270
1271        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1272        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1273      }
1274    }
1275
1276    this.options.selector ?
1277      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1278      this.fixTitle()
1279  }
1280
1281  Tooltip.prototype.getDefaults = function () {
1282    return Tooltip.DEFAULTS
1283  }
1284
1285  Tooltip.prototype.getOptions = function (options) {
1286    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1287
1288    if (options.delay && typeof options.delay == 'number') {
1289      options.delay = {
1290        show: options.delay,
1291        hide: options.delay
1292      }
1293    }
1294
1295    return options
1296  }
1297
1298  Tooltip.prototype.getDelegateOptions = function () {
1299    var options  = {}
1300    var defaults = this.getDefaults()
1301
1302    this._options && $.each(this._options, function (key, value) {
1303      if (defaults[key] != value) options[key] = value
1304    })
1305
1306    return options
1307  }
1308
1309  Tooltip.prototype.enter = function (obj) {
1310    var self = obj instanceof this.constructor ?
1311      obj : $(obj.currentTarget).data('bs.' + this.type)
1312
1313    if (self && self.$tip && self.$tip.is(':visible')) {
1314      self.hoverState = 'in'
1315      return
1316    }
1317
1318    if (!self) {
1319      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1320      $(obj.currentTarget).data('bs.' + this.type, self)
1321    }
1322
1323    clearTimeout(self.timeout)
1324
1325    self.hoverState = 'in'
1326
1327    if (!self.options.delay || !self.options.delay.show) return self.show()
1328
1329    self.timeout = setTimeout(function () {
1330      if (self.hoverState == 'in') self.show()
1331    }, self.options.delay.show)
1332  }
1333
1334  Tooltip.prototype.leave = function (obj) {
1335    var self = obj instanceof this.constructor ?
1336      obj : $(obj.currentTarget).data('bs.' + this.type)
1337
1338    if (!self) {
1339      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1340      $(obj.currentTarget).data('bs.' + this.type, self)
1341    }
1342
1343    clearTimeout(self.timeout)
1344
1345    self.hoverState = 'out'
1346
1347    if (!self.options.delay || !self.options.delay.hide) return self.hide()
1348
1349    self.timeout = setTimeout(function () {
1350      if (self.hoverState == 'out') self.hide()
1351    }, self.options.delay.hide)
1352  }
1353
1354  Tooltip.prototype.show = function () {
1355    var e = $.Event('show.bs.' + this.type)
1356
1357    if (this.hasContent() && this.enabled) {
1358      this.$element.trigger(e)
1359
1360      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1361      if (e.isDefaultPrevented() || !inDom) return
1362      var that = this
1363
1364      var $tip = this.tip()
1365
1366      var tipId = this.getUID(this.type)
1367
1368      this.setContent()
1369      $tip.attr('id', tipId)
1370      this.$element.attr('aria-describedby', tipId)
1371
1372      if (this.options.animation) $tip.addClass('fade')
1373
1374      var placement = typeof this.options.placement == 'function' ?
1375        this.options.placement.call(this, $tip[0], this.$element[0]) :
1376        this.options.placement
1377
1378      var autoToken = /\s?auto?\s?/i
1379      var autoPlace = autoToken.test(placement)
1380      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1381
1382      $tip
1383        .detach()
1384        .css({ top: 0, left: 0, display: 'block' })
1385        .addClass(placement)
1386        .data('bs.' + this.type, this)
1387
1388      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1389
1390      var pos          = this.getPosition()
1391      var actualWidth  = $tip[0].offsetWidth
1392      var actualHeight = $tip[0].offsetHeight
1393
1394      if (autoPlace) {
1395        var orgPlacement = placement
1396        var $container   = this.options.container ? $(this.options.container) : this.$element.parent()
1397        var containerDim = this.getPosition($container)
1398
1399        placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top'    :
1400                    placement == 'top'    && pos.top    - actualHeight < containerDim.top    ? 'bottom' :
1401                    placement == 'right'  && pos.right  + actualWidth  > containerDim.width  ? 'left'   :
1402                    placement == 'left'   && pos.left   - actualWidth  < containerDim.left   ? 'right'  :
1403                    placement
1404
1405        $tip
1406          .removeClass(orgPlacement)
1407          .addClass(placement)
1408      }
1409
1410      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1411
1412      this.applyPlacement(calculatedOffset, placement)
1413
1414      var complete = function () {
1415        var prevHoverState = that.hoverState
1416        that.$element.trigger('shown.bs.' + that.type)
1417        that.hoverState = null
1418
1419        if (prevHoverState == 'out') that.leave(that)
1420      }
1421
1422      $.support.transition && this.$tip.hasClass('fade') ?
1423        $tip
1424          .one('bsTransitionEnd', complete)
1425          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1426        complete()
1427    }
1428  }
1429
1430  Tooltip.prototype.applyPlacement = function (offset, placement) {
1431    var $tip   = this.tip()
1432    var width  = $tip[0].offsetWidth
1433    var height = $tip[0].offsetHeight
1434
1435    // manually read margins because getBoundingClientRect includes difference
1436    var marginTop = parseInt($tip.css('margin-top'), 10)
1437    var marginLeft = parseInt($tip.css('margin-left'), 10)
1438
1439    // we must check for NaN for ie 8/9
1440    if (isNaN(marginTop))  marginTop  = 0
1441    if (isNaN(marginLeft)) marginLeft = 0
1442
1443    offset.top  = offset.top  + marginTop
1444    offset.left = offset.left + marginLeft
1445
1446    // $.fn.offset doesn't round pixel values
1447    // so we use setOffset directly with our own function B-0
1448    $.offset.setOffset($tip[0], $.extend({
1449      using: function (props) {
1450        $tip.css({
1451          top: Math.round(props.top),
1452          left: Math.round(props.left)
1453        })
1454      }
1455    }, offset), 0)
1456
1457    $tip.addClass('in')
1458
1459    // check to see if placing tip in new offset caused the tip to resize itself
1460    var actualWidth  = $tip[0].offsetWidth
1461    var actualHeight = $tip[0].offsetHeight
1462
1463    if (placement == 'top' && actualHeight != height) {
1464      offset.top = offset.top + height - actualHeight
1465    }
1466
1467    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1468
1469    if (delta.left) offset.left += delta.left
1470    else offset.top += delta.top
1471
1472    var isVertical          = /top|bottom/.test(placement)
1473    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1474    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1475
1476    $tip.offset(offset)
1477    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1478  }
1479
1480  Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
1481    this.arrow()
1482      .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1483      .css(isHorizontal ? 'top' : 'left', '')
1484  }
1485
1486  Tooltip.prototype.setContent = function () {
1487    var $tip  = this.tip()
1488    var title = this.getTitle()
1489
1490    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1491    $tip.removeClass('fade in top bottom left right')
1492  }
1493
1494  Tooltip.prototype.hide = function (callback) {
1495    var that = this
1496    var $tip = this.tip()
1497    var e    = $.Event('hide.bs.' + this.type)
1498
1499    function complete() {
1500      if (that.hoverState != 'in') $tip.detach()
1501      that.$element
1502        .removeAttr('aria-describedby')
1503        .trigger('hidden.bs.' + that.type)
1504      callback && callback()
1505    }
1506
1507    this.$element.trigger(e)
1508
1509    if (e.isDefaultPrevented()) return
1510
1511    $tip.removeClass('in')
1512
1513    $.support.transition && this.$tip.hasClass('fade') ?
1514      $tip
1515        .one('bsTransitionEnd', complete)
1516        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1517      complete()
1518
1519    this.hoverState = null
1520
1521    return this
1522  }
1523
1524  Tooltip.prototype.fixTitle = function () {
1525    var $e = this.$element
1526    if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1527      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1528    }
1529  }
1530
1531  Tooltip.prototype.hasContent = function () {
1532    return this.getTitle()
1533  }
1534
1535  Tooltip.prototype.getPosition = function ($element) {
1536    $element   = $element || this.$element
1537
1538    var el     = $element[0]
1539    var isBody = el.tagName == 'BODY'
1540
1541    var elRect    = el.getBoundingClientRect()
1542    if (elRect.width == null) {
1543      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1544      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1545    }
1546    var elOffset  = isBody ? { top: 0, left: 0 } : $element.offset()
1547    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1548    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1549
1550    return $.extend({}, elRect, scroll, outerDims, elOffset)
1551  }
1552
1553  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1554    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
1555           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
1556           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1557        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
1558
1559  }
1560
1561  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1562    var delta = { top: 0, left: 0 }
1563    if (!this.$viewport) return delta
1564
1565    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1566    var viewportDimensions = this.getPosition(this.$viewport)
1567
1568    if (/right|left/.test(placement)) {
1569      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
1570      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1571      if (topEdgeOffset < viewportDimensions.top) { // top overflow
1572        delta.top = viewportDimensions.top - topEdgeOffset
1573      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1574        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1575      }
1576    } else {
1577      var leftEdgeOffset  = pos.left - viewportPadding
1578      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1579      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1580        delta.left = viewportDimensions.left - leftEdgeOffset
1581      } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1582        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1583      }
1584    }
1585
1586    return delta
1587  }
1588
1589  Tooltip.prototype.getTitle = function () {
1590    var title
1591    var $e = this.$element
1592    var o  = this.options
1593
1594    title = $e.attr('data-original-title')
1595      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
1596
1597    return title
1598  }
1599
1600  Tooltip.prototype.getUID = function (prefix) {
1601    do prefix += ~~(Math.random() * 1000000)
1602    while (document.getElementById(prefix))
1603    return prefix
1604  }
1605
1606  Tooltip.prototype.tip = function () {
1607    return (this.$tip = this.$tip || $(this.options.template))
1608  }
1609
1610  Tooltip.prototype.arrow = function () {
1611    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1612  }
1613
1614  Tooltip.prototype.enable = function () {
1615    this.enabled = true
1616  }
1617
1618  Tooltip.prototype.disable = function () {
1619    this.enabled = false
1620  }
1621
1622  Tooltip.prototype.toggleEnabled = function () {
1623    this.enabled = !this.enabled
1624  }
1625
1626  Tooltip.prototype.toggle = function (e) {
1627    var self = this
1628    if (e) {
1629      self = $(e.currentTarget).data('bs.' + this.type)
1630      if (!self) {
1631        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1632        $(e.currentTarget).data('bs.' + this.type, self)
1633      }
1634    }
1635
1636    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1637  }
1638
1639  Tooltip.prototype.destroy = function () {
1640    var that = this
1641    clearTimeout(this.timeout)
1642    this.hide(function () {
1643      that.$element.off('.' + that.type).removeData('bs.' + that.type)
1644    })
1645  }
1646
1647
1648  // TOOLTIP PLUGIN DEFINITION
1649  // =========================
1650
1651  function Plugin(option) {
1652    return this.each(function () {
1653      var $this    = $(this)
1654      var data     = $this.data('bs.tooltip')
1655      var options  = typeof option == 'object' && option
1656      var selector = options && options.selector
1657
1658      if (!data && option == 'destroy') return
1659      if (selector) {
1660        if (!data) $this.data('bs.tooltip', (data = {}))
1661        if (!data[selector]) data[selector] = new Tooltip(this, options)
1662      } else {
1663        if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1664      }
1665      if (typeof option == 'string') data[option]()
1666    })
1667  }
1668
1669  var old = $.fn.tooltip
1670
1671  $.fn.tooltip             = Plugin
1672  $.fn.tooltip.Constructor = Tooltip
1673
1674
1675  // TOOLTIP NO CONFLICT
1676  // ===================
1677
1678  $.fn.tooltip.noConflict = function () {
1679    $.fn.tooltip = old
1680    return this
1681  }
1682
1683}(jQuery);
1684;/* ========================================================================
1685 * Bootstrap: popover.js v3.3.1
1686 * http://getbootstrap.com/javascript/#popovers
1687 * ========================================================================
1688 * Copyright 2011-2014 Twitter, Inc.
1689 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1690 * ======================================================================== */
1691
1692
1693+function ($) {
1694  'use strict';
1695
1696  // POPOVER PUBLIC CLASS DEFINITION
1697  // ===============================
1698
1699  var Popover = function (element, options) {
1700    this.init('popover', element, options)
1701  }
1702
1703  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1704
1705  Popover.VERSION  = '3.3.1'
1706
1707  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1708    placement: 'right',
1709    trigger: 'click',
1710    content: '',
1711    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1712  })
1713
1714
1715  // NOTE: POPOVER EXTENDS tooltip.js
1716  // ================================
1717
1718  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1719
1720  Popover.prototype.constructor = Popover
1721
1722  Popover.prototype.getDefaults = function () {
1723    return Popover.DEFAULTS
1724  }
1725
1726  Popover.prototype.setContent = function () {
1727    var $tip    = this.tip()
1728    var title   = this.getTitle()
1729    var content = this.getContent()
1730
1731    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1732    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1733      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1734    ](content)
1735
1736    $tip.removeClass('fade top bottom left right in')
1737
1738    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1739    // this manually by checking the contents.
1740    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1741  }
1742
1743  Popover.prototype.hasContent = function () {
1744    return this.getTitle() || this.getContent()
1745  }
1746
1747  Popover.prototype.getContent = function () {
1748    var $e = this.$element
1749    var o  = this.options
1750
1751    return $e.attr('data-content')
1752      || (typeof o.content == 'function' ?
1753            o.content.call($e[0]) :
1754            o.content)
1755  }
1756
1757  Popover.prototype.arrow = function () {
1758    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1759  }
1760
1761  Popover.prototype.tip = function () {
1762    if (!this.$tip) this.$tip = $(this.options.template)
1763    return this.$tip
1764  }
1765
1766
1767  // POPOVER PLUGIN DEFINITION
1768  // =========================
1769
1770  function Plugin(option) {
1771    return this.each(function () {
1772      var $this    = $(this)
1773      var data     = $this.data('bs.popover')
1774      var options  = typeof option == 'object' && option
1775      var selector = options && options.selector
1776
1777      if (!data && option == 'destroy') return
1778      if (selector) {
1779        if (!data) $this.data('bs.popover', (data = {}))
1780        if (!data[selector]) data[selector] = new Popover(this, options)
1781      } else {
1782        if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1783      }
1784      if (typeof option == 'string') data[option]()
1785    })
1786  }
1787
1788  var old = $.fn.popover
1789
1790  $.fn.popover             = Plugin
1791  $.fn.popover.Constructor = Popover
1792
1793
1794  // POPOVER NO CONFLICT
1795  // ===================
1796
1797  $.fn.popover.noConflict = function () {
1798    $.fn.popover = old
1799    return this
1800  }
1801
1802}(jQuery);
1803;/* ========================================================================
1804 * Bootstrap: scrollspy.js v3.3.1
1805 * http://getbootstrap.com/javascript/#scrollspy
1806 * ========================================================================
1807 * Copyright 2011-2014 Twitter, Inc.
1808 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1809 * ======================================================================== */
1810
1811
1812+function ($) {
1813  'use strict';
1814
1815  // SCROLLSPY CLASS DEFINITION
1816  // ==========================
1817
1818  function ScrollSpy(element, options) {
1819    var process  = $.proxy(this.process, this)
1820
1821    this.$body          = $('body')
1822    this.$scrollElement = $(element).is('body') ? $(window) : $(element)
1823    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
1824    this.selector       = (this.options.target || '') + ' .nav li > a'
1825    this.offsets        = []
1826    this.targets        = []
1827    this.activeTarget   = null
1828    this.scrollHeight   = 0
1829
1830    this.$scrollElement.on('scroll.bs.scrollspy', process)
1831    this.refresh()
1832    this.process()
1833  }
1834
1835  ScrollSpy.VERSION  = '3.3.1'
1836
1837  ScrollSpy.DEFAULTS = {
1838    offset: 10
1839  }
1840
1841  ScrollSpy.prototype.getScrollHeight = function () {
1842    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1843  }
1844
1845  ScrollSpy.prototype.refresh = function () {
1846    var offsetMethod = 'offset'
1847    var offsetBase   = 0
1848
1849    if (!$.isWindow(this.$scrollElement[0])) {
1850      offsetMethod = 'position'
1851      offsetBase   = this.$scrollElement.scrollTop()
1852    }
1853
1854    this.offsets = []
1855    this.targets = []
1856    this.scrollHeight = this.getScrollHeight()
1857
1858    var self     = this
1859
1860    this.$body
1861      .find(this.selector)
1862      .map(function () {
1863        var $el   = $(this)
1864        var href  = $el.data('target') || $el.attr('href')
1865        var $href = /^#./.test(href) && $(href)
1866
1867        return ($href
1868          && $href.length
1869          && $href.is(':visible')
1870          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1871      })
1872      .sort(function (a, b) { return a[0] - b[0] })
1873      .each(function () {
1874        self.offsets.push(this[0])
1875        self.targets.push(this[1])
1876      })
1877  }
1878
1879  ScrollSpy.prototype.process = function () {
1880    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
1881    var scrollHeight = this.getScrollHeight()
1882    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
1883    var offsets      = this.offsets
1884    var targets      = this.targets
1885    var activeTarget = this.activeTarget
1886    var i
1887
1888    if (this.scrollHeight != scrollHeight) {
1889      this.refresh()
1890    }
1891
1892    if (scrollTop >= maxScroll) {
1893      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1894    }
1895
1896    if (activeTarget && scrollTop < offsets[0]) {
1897      this.activeTarget = null
1898      return this.clear()
1899    }
1900
1901    for (i = offsets.length; i--;) {
1902      activeTarget != targets[i]
1903        && scrollTop >= offsets[i]
1904        && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1905        && this.activate(targets[i])
1906    }
1907  }
1908
1909  ScrollSpy.prototype.activate = function (target) {
1910    this.activeTarget = target
1911
1912    this.clear()
1913
1914    var selector = this.selector +
1915        '[data-target="' + target + '"],' +
1916        this.selector + '[href="' + target + '"]'
1917
1918    var active = $(selector)
1919      .parents('li')
1920      .addClass('active')
1921
1922    if (active.parent('.dropdown-menu').length) {
1923      active = active
1924        .closest('li.dropdown')
1925        .addClass('active')
1926    }
1927
1928    active.trigger('activate.bs.scrollspy')
1929  }
1930
1931  ScrollSpy.prototype.clear = function () {
1932    $(this.selector)
1933      .parentsUntil(this.options.target, '.active')
1934      .removeClass('active')
1935  }
1936
1937
1938  // SCROLLSPY PLUGIN DEFINITION
1939  // ===========================
1940
1941  function Plugin(option) {
1942    return this.each(function () {
1943      var $this   = $(this)
1944      var data    = $this.data('bs.scrollspy')
1945      var options = typeof option == 'object' && option
1946
1947      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1948      if (typeof option == 'string') data[option]()
1949    })
1950  }
1951
1952  var old = $.fn.scrollspy
1953
1954  $.fn.scrollspy             = Plugin
1955  $.fn.scrollspy.Constructor = ScrollSpy
1956
1957
1958  // SCROLLSPY NO CONFLICT
1959  // =====================
1960
1961  $.fn.scrollspy.noConflict = function () {
1962    $.fn.scrollspy = old
1963    return this
1964  }
1965
1966
1967  // SCROLLSPY DATA-API
1968  // ==================
1969
1970  $(window).on('load.bs.scrollspy.data-api', function () {
1971    $('[data-spy="scroll"]').each(function () {
1972      var $spy = $(this)
1973      Plugin.call($spy, $spy.data())
1974    })
1975  })
1976
1977}(jQuery);
1978;/* ========================================================================
1979 * Bootstrap: tab.js v3.3.1
1980 * http://getbootstrap.com/javascript/#tabs
1981 * ========================================================================
1982 * Copyright 2011-2014 Twitter, Inc.
1983 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1984 * ======================================================================== */
1985
1986
1987+function ($) {
1988  'use strict';
1989
1990  // TAB CLASS DEFINITION
1991  // ====================
1992
1993  var Tab = function (element) {
1994    this.element = $(element)
1995  }
1996
1997  Tab.VERSION = '3.3.1'
1998
1999  Tab.TRANSITION_DURATION = 150
2000
2001  Tab.prototype.show = function () {
2002    var $this    = this.element
2003    var $ul      = $this.closest('ul:not(.dropdown-menu)')
2004    var selector = $this.data('target')
2005
2006    if (!selector) {
2007      selector = $this.attr('href')
2008      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2009    }
2010
2011    if ($this.parent('li').hasClass('active')) return
2012
2013    var $previous = $ul.find('.active:last a')
2014    var hideEvent = $.Event('hide.bs.tab', {
2015      relatedTarget: $this[0]
2016    })
2017    var showEvent = $.Event('show.bs.tab', {
2018      relatedTarget: $previous[0]
2019    })
2020
2021    $previous.trigger(hideEvent)
2022    $this.trigger(showEvent)
2023
2024    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2025
2026    var $target = $(selector)
2027
2028    this.activate($this.closest('li'), $ul)
2029    this.activate($target, $target.parent(), function () {
2030      $previous.trigger({
2031        type: 'hidden.bs.tab',
2032        relatedTarget: $this[0]
2033      })
2034      $this.trigger({
2035        type: 'shown.bs.tab',
2036        relatedTarget: $previous[0]
2037      })
2038    })
2039  }
2040
2041  Tab.prototype.activate = function (element, container, callback) {
2042    var $active    = container.find('> .active')
2043    var transition = callback
2044      && $.support.transition
2045      && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
2046
2047    function next() {
2048      $active
2049        .removeClass('active')
2050        .find('> .dropdown-menu > .active')
2051          .removeClass('active')
2052        .end()
2053        .find('[data-toggle="tab"]')
2054          .attr('aria-expanded', false)
2055
2056      element
2057        .addClass('active')
2058        .find('[data-toggle="tab"]')
2059          .attr('aria-expanded', true)
2060
2061      if (transition) {
2062        element[0].offsetWidth // reflow for transition
2063        element.addClass('in')
2064      } else {
2065        element.removeClass('fade')
2066      }
2067
2068      if (element.parent('.dropdown-menu')) {
2069        element
2070          .closest('li.dropdown')
2071            .addClass('active')
2072          .end()
2073          .find('[data-toggle="tab"]')
2074            .attr('aria-expanded', true)
2075      }
2076
2077      callback && callback()
2078    }
2079
2080    $active.length && transition ?
2081      $active
2082        .one('bsTransitionEnd', next)
2083        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2084      next()
2085
2086    $active.removeClass('in')
2087  }
2088
2089
2090  // TAB PLUGIN DEFINITION
2091  // =====================
2092
2093  function Plugin(option) {
2094    return this.each(function () {
2095      var $this = $(this)
2096      var data  = $this.data('bs.tab')
2097
2098      if (!data) $this.data('bs.tab', (data = new Tab(this)))
2099      if (typeof option == 'string') data[option]()
2100    })
2101  }
2102
2103  var old = $.fn.tab
2104
2105  $.fn.tab             = Plugin
2106  $.fn.tab.Constructor = Tab
2107
2108
2109  // TAB NO CONFLICT
2110  // ===============
2111
2112  $.fn.tab.noConflict = function () {
2113    $.fn.tab = old
2114    return this
2115  }
2116
2117
2118  // TAB DATA-API
2119  // ============
2120
2121  var clickHandler = function (e) {
2122    e.preventDefault()
2123    Plugin.call($(this), 'show')
2124  }
2125
2126  $(document)
2127    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2128    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2129
2130}(jQuery);
2131;/* ========================================================================
2132 * Bootstrap: affix.js v3.3.1
2133 * http://getbootstrap.com/javascript/#affix
2134 * ========================================================================
2135 * Copyright 2011-2014 Twitter, Inc.
2136 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2137 * ======================================================================== */
2138
2139
2140+function ($) {
2141  'use strict';
2142
2143  // AFFIX CLASS DEFINITION
2144  // ======================
2145
2146  var Affix = function (element, options) {
2147    this.options = $.extend({}, Affix.DEFAULTS, options)
2148
2149    this.$target = $(this.options.target)
2150      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2151      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
2152
2153    this.$element     = $(element)
2154    this.affixed      =
2155    this.unpin        =
2156    this.pinnedOffset = null
2157
2158    this.checkPosition()
2159  }
2160
2161  Affix.VERSION  = '3.3.1'
2162
2163  Affix.RESET    = 'affix affix-top affix-bottom'
2164
2165  Affix.DEFAULTS = {
2166    offset: 0,
2167    target: window
2168  }
2169
2170  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2171    var scrollTop    = this.$target.scrollTop()
2172    var position     = this.$element.offset()
2173    var targetHeight = this.$target.height()
2174
2175    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2176
2177    if (this.affixed == 'bottom') {
2178      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2179      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2180    }
2181
2182    var initializing   = this.affixed == null
2183    var colliderTop    = initializing ? scrollTop : position.top
2184    var colliderHeight = initializing ? targetHeight : height
2185
2186    if (offsetTop != null && colliderTop <= offsetTop) return 'top'
2187    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2188
2189    return false
2190  }
2191
2192  Affix.prototype.getPinnedOffset = function () {
2193    if (this.pinnedOffset) return this.pinnedOffset
2194    this.$element.removeClass(Affix.RESET).addClass('affix')
2195    var scrollTop = this.$target.scrollTop()
2196    var position  = this.$element.offset()
2197    return (this.pinnedOffset = position.top - scrollTop)
2198  }
2199
2200  Affix.prototype.checkPositionWithEventLoop = function () {
2201    setTimeout($.proxy(this.checkPosition, this), 1)
2202  }
2203
2204  Affix.prototype.checkPosition = function () {
2205    if (!this.$element.is(':visible')) return
2206
2207    var height       = this.$element.height()
2208    var offset       = this.options.offset
2209    var offsetTop    = offset.top
2210    var offsetBottom = offset.bottom
2211    var scrollHeight = $('body').height()
2212
2213    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
2214    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
2215    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2216
2217    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2218
2219    if (this.affixed != affix) {
2220      if (this.unpin != null) this.$element.css('top', '')
2221
2222      var affixType = 'affix' + (affix ? '-' + affix : '')
2223      var e         = $.Event(affixType + '.bs.affix')
2224
2225      this.$element.trigger(e)
2226
2227      if (e.isDefaultPrevented()) return
2228
2229      this.affixed = affix
2230      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2231
2232      this.$element
2233        .removeClass(Affix.RESET)
2234        .addClass(affixType)
2235        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2236    }
2237
2238    if (affix == 'bottom') {
2239      this.$element.offset({
2240        top: scrollHeight - height - offsetBottom
2241      })
2242    }
2243  }
2244
2245
2246  // AFFIX PLUGIN DEFINITION
2247  // =======================
2248
2249  function Plugin(option) {
2250    return this.each(function () {
2251      var $this   = $(this)
2252      var data    = $this.data('bs.affix')
2253      var options = typeof option == 'object' && option
2254
2255      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2256      if (typeof option == 'string') data[option]()
2257    })
2258  }
2259
2260  var old = $.fn.affix
2261
2262  $.fn.affix             = Plugin
2263  $.fn.affix.Constructor = Affix
2264
2265
2266  // AFFIX NO CONFLICT
2267  // =================
2268
2269  $.fn.affix.noConflict = function () {
2270    $.fn.affix = old
2271    return this
2272  }
2273
2274
2275  // AFFIX DATA-API
2276  // ==============
2277
2278  $(window).on('load', function () {
2279    $('[data-spy="affix"]').each(function () {
2280      var $spy = $(this)
2281      var data = $spy.data()
2282
2283      data.offset = data.offset || {}
2284
2285      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2286      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
2287
2288      Plugin.call($spy, data)
2289    })
2290  })
2291
2292}(jQuery);
2293;/*global jQuery */
2294/*jshint browser:true */
2295/*!
2296* FitVids 1.1
2297*
2298* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
2299* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
2300* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
2301*
2302*/
2303
2304(function( $ ){
2305
2306  "use strict";
2307
2308  $.fn.fitVids = function( options ) {
2309    var settings = {
2310      customSelector: null,
2311      ignore: null
2312    };
2313
2314    if(!document.getElementById('fit-vids-style')) {
2315      // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
2316      var head = document.head || document.getElementsByTagName('head')[0];
2317      var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
2318      var div = document.createElement('div');
2319      div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
2320      head.appendChild(div.childNodes[1]);
2321    }
2322
2323    if ( options ) {
2324      $.extend( settings, options );
2325    }
2326
2327    return this.each(function(){
2328      var selectors = [
2329        "iframe[src*='player.vimeo.com']",
2330        "iframe[src*='youtube.com']",
2331        "iframe[src*='youtube-nocookie.com']",
2332        "iframe[src*='kickstarter.com'][src*='video.html']",
2333        "object",
2334        "embed"
2335      ];
2336
2337      if (settings.customSelector) {
2338        selectors.push(settings.customSelector);
2339      }
2340
2341      var ignoreList = '.fitvidsignore';
2342
2343      if(settings.ignore) {
2344        ignoreList = ignoreList + ', ' + settings.ignore;
2345      }
2346
2347      var $allVideos = $(this).find(selectors.join(','));
2348      $allVideos = $allVideos.not("object object"); // SwfObj conflict patch
2349      $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
2350
2351      $allVideos.each(function(){
2352        var $this = $(this);
2353        if($this.parents(ignoreList).length > 0) {
2354          return; // Disable FitVids on this video.
2355        }
2356        if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
2357        if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
2358        {
2359          $this.attr('height', 9);
2360          $this.attr('width', 16);
2361        }
2362        var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
2363            width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
2364            aspectRatio = height / width;
2365        if(!$this.attr('id')){
2366          var videoID = 'fitvid' + Math.floor(Math.random()*999999);
2367          $this.attr('id', videoID);
2368        }
2369        $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
2370        $this.removeAttr('height').removeAttr('width');
2371      });
2372    });
2373  };
2374// Works with either jQuery or Zepto
2375})( window.jQuery || window.Zepto );;/**
2376* jquery.matchHeight-min.js master
2377* http://brm.io/jquery-match-height/
2378* License: MIT
2379*/
2380(function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0<d.length?d[d.length-1]:null;null===l?d.push(a):1>=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=
2381function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this);
2382a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),
2383f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");b={display:b};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),
2384a.css(d.property,f-b+"px"))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,
2385this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1}
2385,b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);;!function(a,b,c){"use strict";var d=function(d,e){var f=!!b.getComputedStyle;f||(b.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;return"float"===b&&(b="styleFloat"),c.test(b)&&(b=b.replace(c,function(){return arguments[2].toUpperCase()})),a.currentStyle[b]?a.currentStyle[b]:null},this});var g,h,i,j,k,l,m=function(a,b,c,d){if("addEventListener"in a)try{a.addEventListener(b,c,d)}catch(e){if("object"!=typeof c||!c.handleEvent)throw e;a.addEventListener(b,function(a){c.handleEvent.call(c,a)},d)}else"attachEvent"in a&&("object"==typeof c&&c.handleEvent?a.attachEvent("on"+b,function(){c.handleEvent.call(c)}):a.attachEvent("on"+b,c))},n=function(a,b,c,d){if("removeEventListener"in a)try{a.removeEventListener(b,c,d)}catch(e){if("object"!=typeof c||!c.handleEvent)throw e;a.removeEventListener(b,function(a){c.handleEvent.call(c,a)},d)}else"detachEvent"in a&&("object"==typeof c&&c.handleEvent?a.detachEvent("on"+b,function(){c.handleEvent.call(c)}):a.detachEvent("on"+b,c))},o=function(a){if(a.children.length<1)throw new Error("The Nav container has no containing elements");for(var b=[],c=0;c<a.children.length;c++)1===a.children[c].nodeType&&b.push(a.children[c]);return b},p=function(a,b){for(var c in b)a.setAttribute(c,b[c])},q=function(a,b){0!==a.className.indexOf(b)&&(a.className+=" "+b,a.className=a.className.replace(/(^\s*)|(\s*$)/g,""))},r=function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ").replace(/(^\s*)|(\s*$)/g,"")},s=function(a,b,c){for(var d=0;d<a.length;d++)b.call(c,d,a[d])},t=a.createElement("style"),u=a.documentElement,v=function(b,c){var d;this.options={animate:!0,transition:284,label:"Menu",insert:"before",customToggle:"",closeOnNavClick:!1,openPos:"relative",navClass:"nav-collapse",navActiveClass:"js-nav-active",jsClass:"js",init:function(){},open:function(){},close:function(){}};for(d in c)this.options[d]=c[d];if(q(u,this.options.jsClass),this.wrapperEl=b.replace("#",""),a.getElementById(this.wrapperEl))this.wrapper=a.getElementById(this.wrapperEl);else{if(!a.querySelector(this.wrapperEl))throw new Error("The nav element you are trying to select doesn't exist");this.wrapper=a.querySelector(this.wrapperEl)}this.wrapper.inner=o(this.wrapper),h=this.options,g=this.wrapper,this._init(this)};return v.prototype={destroy:function(){this._removeStyles(),r(g,"closed"),r(g,"opened"),r(g,h.navClass),r(g,h.navClass+"-"+this.index),r(u,h.navActiveClass),g.removeAttribute("style"),g.removeAttribute("aria-hidden"),n(b,"resize",this,!1),n(b,"focus",this,!1),n(a.body,"touchmove",this,!1),n(i,"touchstart",this,!1),n(i,"touchend",this,!1),n(i,"mouseup",this,!1),n(i,"keyup",this,!1),n(i,"click",this,!1),h.customToggle?i.removeAttribute("aria-hidden"):i.parentNode.removeChild(i)},toggle:function(){j===!0&&(l?this.close():this.open())},open:function(){l||(r(g,"closed"),q(g,"opened"),q(u,h.navActiveClass),q(i,"active"),g.style.position=h.openPos,p(g,{"aria-hidden":"false"}),l=!0,h.open())},close:function(){l&&(q(g,"closed"),r(g,"opened"),r(u,h.navActiveClass),r(i,"active"),p(g,{"aria-hidden":"true"}),h.animate?(j=!1,setTimeout(function(){g.style.position="absolute",j=!0},h.transition+10)):g.style.position="absolute",l=!1,h.close())},resize:function(){"none"!==b.getComputedStyle(i,null).getPropertyValue("display")?(k=!0,p(i,{"aria-hidden":"false"}),g.className.match(/(^|\s)closed(\s|$)/)&&(p(g,{"aria-hidden":"true"}),g.style.position="absolute"),this._createStyles(),this._calcHeight()):(k=!1,p(i,{"aria-hidden":"true"}),p(g,{"aria-hidden":"false"}),g.style.position=h.openPos,this._removeStyles())},handleEvent:function(a){var c=a||b.event;switch(c.type){case"touchstart":this._onTouchStart(c);break;case"touchmove":this._onTouchMove(c);break;case"touchend":case"mouseup":this._onTouchEnd(c);break;case"click":this._preventDefault(c);break;case"keyup":this._onKeyUp(c);break;case"focus":case"resize":this.resize(c)}},_init:function(){this.index=c++,q(g,h.navClass),q(g,h.navClass+"-"+this.index),q(g,"closed"),j=!0,l=!1,this._closeOnNavClick(),this._createToggle(),this._transitions(),this.resize();var d=this;setTimeout(function(){d.resize()},20),m(b,"resize",this,!1),m(b,"focus",this,!1),m(a.body,"touchmove",this,!1),m(i,"touchstart",this,!1),m(i,"touchend",this,!1),m(i,"mouseup",this,
2385!1),m(i,"keyup",this,!1),m(i,"click",this,!1),h.init()},_createStyles:function(){t.parentNode||(t.type="text/css",a.getElementsByTagName("head")[0].appendChild(t))},_removeStyles:function(){t.parentNode&&t.parentNode.removeChild(t)},_createToggle:function(){if(h.customToggle){var b=h.customToggle.replace("#","");if(a.getElementById(b))i=a.getElementById(b);else{if(!a.querySelector(b))throw new Error("The custom nav toggle you are trying to select doesn't exist");i=a.querySelector(b)}}else{var c=a.createElement("a");c.innerHTML=h.label,p(c,{href:"#","class":"nav-toggle"}),"after"===h.insert?g.parentNode.insertBefore(c,g.nextSibling):g.parentNode.insertBefore(c,g),i=c}},_closeOnNavClick:function(){if(h.closeOnNavClick){var a=g.getElementsByTagName("a"),b=this;s(a,function(c){m(a[c],"click",function(){k&&b.toggle()},!1)})}},_preventDefault:function(a){return a.preventDefault?(a.stopImmediatePropagation&&a.stopImmediatePropagation(),a.preventDefault(),a.stopPropagation(),!1):void(a.returnValue=!1)},_onTouchStart:function(a){Event.prototype.stopImmediatePropagation||this._preventDefault(a),this.startX=a.touches[0].clientX,this.startY=a.touches[0].clientY,this.touchHasMoved=!1,n(i,"mouseup",this,!1)},_onTouchMove:function(a){(Math.abs(a.touches[0].clientX-this.startX)>10||Math.abs(a.touches[0].clientY-this.startY)>10)&&(this.touchHasMoved=!0)},_onTouchEnd:function(a){if(this._preventDefault(a),k&&!this.touchHasMoved){if("touchend"===a.type)return void this.toggle();var c=a||b.event;3!==c.which&&2!==c.button&&this.toggle()}},_onKeyUp:function(a){var c=a||b.event;13===c.keyCode&&this.toggle()},_transitions:function(){if(h.animate){var a=g.style,b="max-height "+h.transition+"ms";a.WebkitTransition=a.MozTransition=a.OTransition=a.transition=b}},_calcHeight:function(){for(var a=0,b=0;b<g.inner.length;b++)a+=g.inner[b].offsetHeight;var c="."+h.jsClass+" ."+h.navClass+"-"+this.index+".opened{max-height:"+a+"px !important} ."+h.jsClass+" ."+h.navClass+"-"+this.index+".opened.dropdown-active {max-height:9999px !important}";t.styleSheet?t.styleSheet.cssText=c:t.innerHTML=c,c=""}},new v(d,e)};"undefined"!=typeof module&&module.exports?module.exports=d:b.responsiveNav=d}(document,window,0);;/* ========================================================================
2386 * DOM-based Routing
2387 * Based on http://goo.gl/EUTi53 by Paul Irish
2388 *
2389 * Only fires on body classes that match. If a body class contains a dash,
2390 * replace the dash with an underscore when adding it to the object below.
2391 *
2392 * .noConflict()
2393 * The routing is enclosed within an anonymous function so that you can
2394 * always reference jQuery with $, even when in .noConflict() mode.
2395 * ======================================================================== */
2396
2397(function($) {
2398
2399// Use this variable to set up the common and page specific functions. If you
2400// rename this variable, you will also need to rename the namespace below.
2401var uuatheme = {
2402  // All pages
2403  common: {
2404    init: function() {
2405      /* Toggles for search and location */
2406      $('.location-toggle').click(function(e) {
2407        e.preventDefault();
2408        $('.slide-location').toggleClass('active');
2409      });
2410      $('.search-toggle').click(function(e) {
2411        e.preventDefault();
2412        $('.slide-search').toggleClass('active');
2413      });
2414      /* FITVIDS - Target your .container, .wrapper, .post, etc. */
2415      $(".wrap").fitVids();
2416    }
2417  },
2418  // Home page
2419  home: {
2420    init: function() {
2421      /* MatchHeights */
2422      $(function() {
2423        $('.widget .thumbnail, .match').matchHeight();
2424      });
2425    }
2426  },
2427  // About us page, note the change from about-us to about_us.
2428  about_us: {
2429    init: function() {
2430      // JavaScript to be fired on the about us page
2431    }
2432  }
2433};
2434
2435// The routing fires all common scripts, followed by the page specific scripts.
2436// Add additional events for more control over timing e.g. a finalize event
2437var UTIL = {
2438  fire: function(func, funcname, args) {
2439    var namespace = uuatheme;
2440    funcname = (funcname === undefined) ? 'init' : funcname;
2441    if (func !== '' && namespace[func] && typeof namespace[func][funcname] === 'function') {
2442      namespace[func][funcname](args);
2443    }
2444  },
2445  loadEvents: function() {
2446    UTIL.fire('common');
2447
2448    $.each(document.body.className.replace(/-/g, '_').split(/\s+/),function(i,classnm) {
2449      UTIL.fire(classnm);
2450    });
2451  }
2452};
2453
2454// Shortcode - Google Maps
2455var uuatheme_maps = function() {
2456
2457    var map = [];
2458    $( '.uuatheme_map_canvas' ).each(function( i ) {
2459        var lat = $(this).data('lat'),
2460            lng = $(this).data('lng'),
2461            options = $(this).data('options');
2462
2463        var location = new google.maps.LatLng( lat, lng );
2464
2465        map[i] = new google.maps.Map(document.getElementById(this.id), {
2466            zoom: options.zoom,
2467            center: location,
2468            scrollwheel: ( 'true' === options.enablescrollwheel.toLowerCase() ) ? 1 : 0,
2469            disableDefaultUI: ( 'true' === options.disablecontrols.toLowerCase() ) ? 1 : 0,
2470            mapTypeId: google.maps.MapTypeId.ROADMAP
2471        });
2472
2473        var infowindow = new google.maps.InfoWindow({
2474            content: options.label
2475        });
2476
2477        var marker = new google.maps.Marker({
2478            position: location,
2479            animation: google.maps.Animation.DROP,
2480            title: options.label,
2481            map: map[i]
2482        });
2483
2484        google.maps.event.addListenerOnce( map[i], 'tilesloaded', function() {
2485            infowindow.open( map[i], marker );
2486        });
2487    });
2488}
2489
2490$(document)
2491    .ready(UTIL.loadEvents)
2492    .ready(uuatheme_maps);
2493
2494})(jQuery); // Fully reference jQuery after this point.

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.