PageSourceSearch

https://nellaware.com/js/bootstrap.js

js nellaware.com collected 2026-09-24 23:26:41 UTC 58,300 bytes, 1,998 lines download raw bytes

1/* ========================================================================
2 * Bootstrap: alert.js v3.0.3
3 * http://getbootstrap.com/javascript/#alerts
4 * ========================================================================
5 * Copyright 2013 Twitter, Inc.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ======================================================================== */
19
20
21+function ($) { "use strict";
22
23  // ALERT CLASS DEFINITION
24  // ======================
25
26  var dismiss = '[data-dismiss="alert"]'
27  var Alert   = function (el) {
28    $(el).on('click', dismiss, this.close)
29  }
30
31  Alert.prototype.close = function (e) {
32    var $this    = $(this)
33    var selector = $this.attr('data-target')
34
35    if (!selector) {
36      selector = $this.attr('href')
37      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
38    }
39
40    var $parent = $(selector)
41
42    if (e) e.preventDefault()
43
44    if (!$parent.length) {
45      $parent = $this.hasClass('alert') ? $this : $this.parent()
46    }
47
48    $parent.trigger(e = $.Event('close.bs.alert'))
49
50    if (e.isDefaultPrevented()) return
51
52    $parent.removeClass('in')
53
54    function removeElement() {
55      $parent.trigger('closed.bs.alert').remove()
56    }
57
58    $.support.transition && $parent.hasClass('fade') ?
59      $parent
60        .one($.support.transition.end, removeElement)
61        .emulateTransitionEnd(150) :
62      removeElement()
63  }
64
65
66  // ALERT PLUGIN DEFINITION
67  // =======================
68
69  var old = $.fn.alert
70
71  $.fn.alert = function (option) {
72    return this.each(function () {
73      var $this = $(this)
74      var data  = $this.data('bs.alert')
75
76      if (!data) $this.data('bs.alert', (data = new Alert(this)))
77      if (typeof option == 'string') data[option].call($this)
78    })
79  }
80
81  $.fn.alert.Constructor = Alert
82
83
84  // ALERT NO CONFLICT
85  // =================
86
87  $.fn.alert.noConflict = function () {
88    $.fn.alert = old
89    return this
90  }
91
92
93  // ALERT DATA-API
94  // ==============
95
96  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
97
98}(jQuery);
99
100/* ========================================================================
101 * Bootstrap: button.js v3.0.3
102 * http://getbootstrap.com/javascript/#buttons
103 * ========================================================================
104 * Copyright 2013 Twitter, Inc.
105 *
106 * Licensed under the Apache License, Version 2.0 (the "License");
107 * you may not use this file except in compliance with the License.
108 * You may obtain a copy of the License at
109 *
110 * http://www.apache.org/licenses/LICENSE-2.0
111 *
112 * Unless required by applicable law or agreed to in writing, software
113 * distributed under the License is distributed on an "AS IS" BASIS,
114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115 * See the License for the specific language governing permissions and
116 * limitations under the License.
117 * ======================================================================== */
118
119
120+function ($) { "use strict";
121
122  // BUTTON PUBLIC CLASS DEFINITION
123  // ==============================
124
125  var Button = function (element, options) {
126    this.$element = $(element)
127    this.options  = $.extend({}, Button.DEFAULTS, options)
128  }
129
130  Button.DEFAULTS = {
131    loadingText: 'loading...'
132  }
133
134  Button.prototype.setState = function (state) {
135    var d    = 'disabled'
136    var $el  = this.$element
137    var val  = $el.is('input') ? 'val' : 'html'
138    var data = $el.data()
139
140    state = state + 'Text'
141
142    if (!data.resetText) $el.data('resetText', $el[val]())
143
144    $el[val](data[state] || this.options[state])
145
146    // push to event loop to allow forms to submit
147    setTimeout(function () {
148      state == 'loadingText' ?
149        $el.addClass(d).attr(d, d) :
150        $el.removeClass(d).removeAttr(d);
151    }, 0)
152  }
153
154  Button.prototype.toggle = function () {
155    var $parent = this.$element.closest('[data-toggle="buttons"]')
156    var changed = true
157
158    if ($parent.length) {
159      var $input = this.$element.find('input')
160      if ($input.prop('type') === 'radio') {
161        // see if clicking on current one
162        if ($input.prop('checked') && this.$element.hasClass('active'))
163          changed = false
164        else
165          $parent.find('.active').removeClass('active')
166      }
167      if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
168    }
169
170    if (changed) this.$element.toggleClass('active')
171  }
172
173
174  // BUTTON PLUGIN DEFINITION
175  // ========================
176
177  var old = $.fn.button
178
179  $.fn.button = function (option) {
180    return this.each(function () {
181      var $this   = $(this)
182      var data    = $this.data('bs.button')
183      var options = typeof option == 'object' && option
184
185      if (!data) $this.data('bs.button', (data = new Button(this, options)))
186
187      if (option == 'toggle') data.toggle()
188      else if (option) data.setState(option)
189    })
190  }
191
192  $.fn.button.Constructor = Button
193
194
195  // BUTTON NO CONFLICT
196  // ==================
197
198  $.fn.button.noConflict = function () {
199    $.fn.button = old
200    return this
201  }
202
203
204  // BUTTON DATA-API
205  // ===============
206
207  $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
208    var $btn = $(e.target)
209    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
210    $btn.button('toggle')
211    e.preventDefault()
212  })
213
214}(jQuery);
215
216/* ========================================================================
217 * Bootstrap: carousel.js v3.0.3
218 * http://getbootstrap.com/javascript/#carousel
219 * ========================================================================
220 * Copyright 2013 Twitter, Inc.
221 *
222 * Licensed under the Apache License, Version 2.0 (the "License");
223 * you may not use this file except in compliance with the License.
224 * You may obtain a copy of the License at
225 *
226 * http://www.apache.org/licenses/LICENSE-2.0
227 *
228 * Unless required by applicable law or agreed to in writing, software
229 * distributed under the License is distributed on an "AS IS" BASIS,
230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231 * See the License for the specific language governing permissions and
232 * limitations under the License.
233 * ======================================================================== */
234
235
236+function ($) { "use strict";
237
238  // CAROUSEL CLASS DEFINITION
239  // =========================
240
241  var Carousel = function (element, options) {
242    this.$element    = $(element)
243    this.$indicators = this.$element.find('.carousel-indicators')
244    this.options     = options
245    this.paused      =
246    this.sliding     =
247    this.interval    =
248    this.$active     =
249    this.$items      = null
250
251    this.options.pause == 'hover' && this.$element
252      .on('mouseenter', $.proxy(this.pause, this))
253      .on('mouseleave', $.proxy(this.cycle, this))
254  }
255
256  Carousel.DEFAULTS = {
257    interval: 5000
258  , pause: 'hover'
259  , wrap: true
260  }
261
262  Carousel.prototype.cycle =  function (e) {
263    e || (this.paused = false)
264
265    this.interval && clearInterval(this.interval)
266
267    this.options.interval
268      && !this.paused
269      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
270
271    return this
272  }
273
274  Carousel.prototype.getActiveIndex = function () {
275    this.$active = this.$element.find('.item.active')
276    this.$items  = this.$active.parent().children()
277
278    return this.$items.index(this.$active)
279  }
280
281  Carousel.prototype.to = function (pos) {
282    var that        = this
283    var activeIndex = this.getActiveIndex()
284
285    if (pos > (this.$items.length - 1) || pos < 0) return
286
287    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
288    if (activeIndex == pos) return this.pause().cycle()
289
290    return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
291  }
292
293  Carousel.prototype.pause = function (e) {
294    e || (this.paused = true)
295
296    if (this.$element.find('.next, .prev').length && $.support.transition.end) {
297      this.$element.trigger($.support.transition.end)
298      this.cycle(true)
299    }
300
301    this.interval = clearInterval(this.interval)
302
303    return this
304  }
305
306  Carousel.prototype.next = function () {
307    if (this.sliding) return
308    return this.slide('next')
309  }
310
311  Carousel.prototype.prev = function () {
312    if (this.sliding) return
313    return this.slide('prev')
314  }
315
316  Carousel.prototype.slide = function (type, next) {
317    var $active   = this.$element.find('.item.active')
318    var $next     = next || $active[type]()
319    var isCycling = this.interval
320    var direction = type == 'next' ? 'left' : 'right'
321    var fallback  = type == 'next' ? 'first' : 'last'
322    var that      = this
323
324    if (!$next.length) {
325      if (!this.options.wrap) return
326      $next = this.$element.find('.item')[fallback]()
327    }
328
329    this.sliding = true
330
331    isCycling && this.pause()
332
333    var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
334
335    if ($next.hasClass('active')) return
336
337    if (this.$indicators.length) {
338      this.$indicators.find('.active').removeClass('active')
339      this.$element.one('slid.bs.carousel', function () {
340        var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
341        $nextIndicator && $nextIndicator.addClass('active')
342      })
343    }
344
345    if ($.support.transition && this.$element.hasClass('slide')) {
346      this.$element.trigger(e)
347      if (e.isDefaultPrevented()) return
348      $next.addClass(type)
349      $next[0].offsetWidth // force reflow
350      $active.addClass(direction)
351      $next.addClass(direction)
352      $active
353        .one($.support.transition.end, function () {
354          $next.removeClass([type, direction].join(' ')).addClass('active')
355          $active.removeClass(['active', direction].join(' '))
356          that.sliding = false
357          setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
358        })
359        .emulateTransitionEnd(600)
360    } else {
361      this.$element.trigger(e)
362      if (e.isDefaultPrevented()) return
363      $active.removeClass('active')
364      $next.addClass('active')
365      this.sliding = false
366      this.$element.trigger('slid.bs.carousel')
367    }
368
369    isCycling && this.cycle()
370
371    return this
372  }
373
374
375  // CAROUSEL PLUGIN DEFINITION
376  // ==========================
377
378  var old = $.fn.carousel
379
380  $.fn.carousel = function (option) {
381    return this.each(function () {
382      var $this   = $(this)
383      var data    = $this.data('bs.carousel')
384      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
385      var action  = typeof option == 'string' ? option : options.slide
386
387      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
388      if (typeof option == 'number') data.to(option)
389      else if (action) data[action]()
390      else if (options.interval) data.pause().cycle()
391    })
392  }
393
394  $.fn.carousel.Constructor = Carousel
395
396
397  // CAROUSEL NO CONFLICT
398  // ====================
399
400  $.fn.carousel.noConflict = function () {
401    $.fn.carousel = old
402    return this
403  }
404
405
406  // CAROUSEL DATA-API
407  // =================
408
409  $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
410    var $this   = $(this), href
411    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
412    var options = $.extend({}, $target.data(), $this.data())
413    var slideIndex = $this.attr('data-slide-to')
414    if (slideIndex) options.interval = false
415
416    $target.carousel(options)
417
418    if (slideIndex = $this.attr('data-slide-to')) {
419      $target.data('bs.carousel').to(slideIndex)
420    }
421
422    e.preventDefault()
423  })
424
425  $(window).on('load', function () {
426    $('[data-ride="carousel"]').each(function () {
427      var $carousel = $(this)
428      $carousel.carousel($carousel.data())
429    })
430  })
431
432}(jQuery);
433
434/* ========================================================================
435 * Bootstrap: dropdown.js v3.0.3
436 * http://getbootstrap.com/javascript/#dropdowns
437 * ========================================================================
438 * Copyright 2013 Twitter, Inc.
439 *
440 * Licensed under the Apache License, Version 2.0 (the "License");
441 * you may not use this file except in compliance with the License.
442 * You may obtain a copy of the License at
443 *
444 * http://www.apache.org/licenses/LICENSE-2.0
445 *
446 * Unless required by applicable law or agreed to in writing, software
447 * distributed under the License is distributed on an "AS IS" BASIS,
448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
449 * See the License for the specific language governing permissions and
450 * limitations under the License.
451 * ======================================================================== */
452
453
454+function ($) { "use strict";
455
456  // DROPDOWN CLASS DEFINITION
457  // =========================
458
459  var backdrop = '.dropdown-backdrop'
460  var toggle   = '[data-toggle=dropdown]'
461  var Dropdown = function (element) {
462    $(element).on('click.bs.dropdown', this.toggle)
463  }
464
465  Dropdown.prototype.toggle = function (e) {
466    var $this = $(this)
467
468    if ($this.is('.disabled, :disabled')) return
469
470    var $parent  = getParent($this)
471    var isActive = $parent.hasClass('open')
472
473    clearMenus()
474
475    if (!isActive) {
476      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
477        // if mobile we use a backdrop because click events don't delegate
478        $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
479      }
480
481      $parent.trigger(e = $.Event('show.bs.dropdown'))
482
483      if (e.isDefaultPrevented()) return
484
485      $parent
486        .toggleClass('open')
487        .trigger('shown.bs.dropdown')
488
489      $this.focus()
490    }
491
492    return false
493  }
494
495  Dropdown.prototype.keydown = function (e) {
496    if (!/(38|40|27)/.test(e.keyCode)) return
497
498    var $this = $(this)
499
500    e.preventDefault()
501    e.stopPropagation()
502
503    if ($this.is('.disabled, :disabled')) return
504
505    var $parent  = getParent($this)
506    var isActive = $parent.hasClass('open')
507
508    if (!isActive || (isActive && e.keyCode == 27)) {
509      if (e.which == 27) $parent.find(toggle).focus()
510      return $this.click()
511    }
512
513    var $items = $('[role=menu] li:not(.divider):visible a', $parent)
514
515    if (!$items.length) return
516
517    var index = $items.index($items.filter(':focus'))
518
519    if (e.keyCode == 38 && index > 0)                 index--                        // up
520    if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
521    if (!~index)                                      index=0
522
523    $items.eq(index).focus()
524  }
525
526  function clearMenus() {
527    $(backdrop).remove()
528    $(toggle).each(function (e) {
529      var $parent = getParent($(this))
530      if (!$parent.hasClass('open')) return
531      $parent.trigger(e = $.Event('hide.bs.dropdown'))
532      if (e.isDefaultPrevented()) return
533      $parent.removeClass('open').trigger('hidden.bs.dropdown')
534    })
535  }
536
537  function getParent($this) {
538    var selector = $this.attr('data-target')
539
540    if (!selector) {
541      selector = $this.attr('href')
542      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
543    }
544
545    var $parent = selector && $(selector)
546
547    return $parent && $parent.length ? $parent : $this.parent()
548  }
549
550
551  // DROPDOWN PLUGIN DEFINITION
552  // ==========================
553
554  var old = $.fn.dropdown
555
556  $.fn.dropdown = function (option) {
557    return this.each(function () {
558      var $this = $(this)
559      var data  = $this.data('bs.dropdown')
560
561      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
562      if (typeof option == 'string') data[option].call($this)
563    })
564  }
565
566  $.fn.dropdown.Constructor = Dropdown
567
568
569  // DROPDOWN NO CONFLICT
570  // ====================
571
572  $.fn.dropdown.noConflict = function () {
573    $.fn.dropdown = old
574    return this
575  }
576
577
578  // APPLY TO STANDARD DROPDOWN ELEMENTS
579  // ===================================
580
581  $(document)
582    .on('click.bs.dropdown.data-api', clearMenus)
583    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
584    .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
585    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
586
587}(jQuery);
588
589/* ========================================================================
590 * Bootstrap: modal.js v3.0.3
591 * http://getbootstrap.com/javascript/#modals
592 * ========================================================================
593 * Copyright 2013 Twitter, Inc.
594 *
595 * Licensed under the Apache License, Version 2.0 (the "License");
596 * you may not use this file except in compliance with the License.
597 * You may obtain a copy of the License at
598 *
599 * http://www.apache.org/licenses/LICENSE-2.0
600 *
601 * Unless required by applicable law or agreed to in writing, software
602 * distributed under the License is distributed on an "AS IS" BASIS,
603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
604 * See the License for the specific language governing permissions and
605 * limitations under the License.
606 * ======================================================================== */
607
608
609+function ($) { "use strict";
610
611  // MODAL CLASS DEFINITION
612  // ======================
613
614  var Modal = function (element, options) {
615    this.options   = options
616    this.$element  = $(element)
617    this.$backdrop =
618    this.isShown   = null
619
620    if (this.options.remote) this.$element.load(this.options.remote)
621  }
622
623  Modal.DEFAULTS = {
624      backdrop: true
625    , keyboard: true
626    , show: true
627  }
628
629  Modal.prototype.toggle = function (_relatedTarget) {
630    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
631  }
632
633  Modal.prototype.show = function (_relatedTarget) {
634    var that = this
635    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
636
637    this.$element.trigger(e)
638
639    if (this.isShown || e.isDefaultPrevented()) return
640
641    this.isShown = true
642
643    this.escape()
644
645    this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
646
647    this.backdrop(function () {
648      var transition = $.support.transition && that.$element.hasClass('fade')
649
650      if (!that.$element.parent().length) {
651        that.$element.appendTo(document.body) // don't move modals dom position
652      }
653
654      that.$element.show()
655
656      if (transition) {
657        that.$element[0].offsetWidth // force reflow
658      }
659
660      that.$element
661        .addClass('in')
662        .attr('aria-hidden', false)
663
664      that.enforceFocus()
665
666      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
667
668      transition ?
669        that.$element.find('.modal-dialog') // wait for modal to slide in
670          .one($.support.transition.end, function () {
671            that.$element.focus().trigger(e)
672          })
673          .emulateTransitionEnd(300) :
674        that.$element.focus().trigger(e)
675    })
676  }
677
678  Modal.prototype.hide = function (e) {
679    if (e) e.preventDefault()
680
681    e = $.Event('hide.bs.modal')
682
683    this.$element.trigger(e)
684
685    if (!this.isShown || e.isDefaultPrevented()) return
686
687    this.isShown = false
688
689    this.escape()
690
691    $(document).off('focusin.bs.modal')
692
693    this.$element
694      .removeClass('in')
695      .attr('aria-hidden', true)
696      .off('click.dismiss.modal')
697
698    $.support.transition && this.$element.hasClass('fade') ?
699      this.$element
700        .one($.support.transition.end, $.proxy(this.hideModal, this))
701        .emulateTransitionEnd(300) :
702      this.hideModal()
703  }
704
705  Modal.prototype.enforceFocus = function () {
706    $(document)
707      .off('focusin.bs.modal') // guard against infinite focus loop
708      .on('focusin.bs.modal', $.proxy(function (e) {
709        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
710          this.$element.focus()
711        }
712      }, this))
713  }
714
715  Modal.prototype.escape = function () {
716    if (this.isShown && this.options.keyboard) {
717      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
718        e.which == 27 && this.hide()
719      }, this))
720    } else if (!this.isShown) {
721      this.$element.off('keyup.dismiss.bs.modal')
722    }
723  }
724
725  Modal.prototype.hideModal = function () {
726    var that = this
727    this.$element.hide()
728    this.backdrop(function () {
729      that.removeBackdrop()
730      that.$element.trigger('hidden.bs.modal')
731    })
732  }
733
734  Modal.prototype.removeBackdrop = function () {
735    this.$backdrop && this.$backdrop.remove()
736    this.$backdrop = null
737  }
738
739  Modal.prototype.backdrop = function (callback) {
740    var that    = this
741    var animate = this.$element.hasClass('fade') ? 'fade' : ''
742
743    if (this.isShown && this.options.backdrop) {
744      var doAnimate = $.support.transition && animate
745
746      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
747        .appendTo(document.body)
748
749      this.$element.on('click.dismiss.modal', $.proxy(function (e) {
750        if (e.target !== e.currentTarget) return
751        this.options.backdrop == 'static'
752          ? this.$element[0].focus.call(this.$element[0])
753          : this.hide.call(this)
754      }, this))
755
756      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
757
758      this.$backdrop.addClass('in')
759
760      if (!callback) return
761
762      doAnimate ?
763        this.$backdrop
764          .one($.support.transition.end, callback)
765          .emulateTransitionEnd(150) :
766        callback()
767
768    } else if (!this.isShown && this.$backdrop) {
769      this.$backdrop.removeClass('in')
770
771      $.support.transition && this.$element.hasClass('fade')?
772        this.$backdrop
773          .one($.support.transition.end, callback)
774          .emulateTransitionEnd(150) :
775        callback()
776
777    } else if (callback) {
778      callback()
779    }
780  }
781
782
783  // MODAL PLUGIN DEFINITION
784  // =======================
785
786  var old = $.fn.modal
787
788  $.fn.modal = function (option, _relatedTarget) {
789    return this.each(function () {
790      var $this   = $(this)
791      var data    = $this.data('bs.modal')
792      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
793
794      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
795      if (typeof option == 'string') data[option](_relatedTarget)
796      else if (options.show) data.show(_relatedTarget)
797    })
798  }
799
800  $.fn.modal.Constructor = Modal
801
802
803  // MODAL NO CONFLICT
804  // =================
805
806  $.fn.modal.noConflict = function () {
807    $.fn.modal = old
808    return this
809  }
810
811
812  // MODAL DATA-API
813  // ==============
814
815  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
816    var $this   = $(this)
817    var href    = $this.attr('href')
818    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
819    var option  = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
820
821    e.preventDefault()
822
823    $target
824      .modal(option, this)
825      .one('hide', function () {
826        $this.is(':visible') && $this.focus()
827      })
828  })
829
830  $(document)
831    .on('show.bs.modal',  '.modal', function () { $(document.body).addClass('modal-open') })
832    .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
833
834}(jQuery);
835
836/* ========================================================================
837 * Bootstrap: tooltip.js v3.0.3
838 * http://getbootstrap.com/javascript/#tooltip
839 * Inspired by the original jQuery.tipsy by Jason Frame
840 * ========================================================================
841 * Copyright 2013 Twitter, Inc.
842 *
843 * Licensed under the Apache License, Version 2.0 (the "License");
844 * you may not use this file except in compliance with the License.
845 * You may obtain a copy of the License at
846 *
847 * http://www.apache.org/licenses/LICENSE-2.0
848 *
849 * Unless required by applicable law or agreed to in writing, software
850 * distributed under the License is distributed on an "AS IS" BASIS,
851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
852 * See the License for the specific language governing permissions and
853 * limitations under the License.
854 * ======================================================================== */
855
856
857+function ($) { "use strict";
858
859  // TOOLTIP PUBLIC CLASS DEFINITION
860  // ===============================
861
862  var Tooltip = function (element, options) {
863    this.type       =
864    this.options    =
865    this.enabled    =
866    this.timeout    =
867    this.hoverState =
868    this.$element   = null
869
870    this.init('tooltip', element, options)
871  }
872
873  Tooltip.DEFAULTS = {
874    animation: true
875  , placement: 'top'
876  , selector: false
877  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
878  , trigger: 'hover focus'
879  , title: ''
880  , delay: 0
881  , html: false
882  , container: false
883  }
884
885  Tooltip.prototype.init = function (type, element, options) {
886    this.enabled  = true
887    this.type     = type
888    this.$element = $(element)
889    this.options  = this.getOptions(options)
890
891    var triggers = this.options.trigger.split(' ')
892
893    for (var i = triggers.length; i--;) {
894      var trigger = triggers[i]
895
896      if (trigger == 'click') {
897        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
898      } else if (trigger != 'manual') {
899        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'
900        var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
901
902        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
903        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
904      }
905    }
906
907    this.options.selector ?
908      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
909      this.fixTitle()
910  }
911
912  Tooltip.prototype.getDefaults = function () {
913    return Tooltip.DEFAULTS
914  }
915
916  Tooltip.prototype.getOptions = function (options) {
917    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
918
919    if (options.delay && typeof options.delay == 'number') {
920      options.delay = {
921        show: options.delay
922      , hide: options.delay
923      }
924    }
925
926    return options
927  }
928
929  Tooltip.prototype.getDelegateOptions = function () {
930    var options  = {}
931    var defaults = this.getDefaults()
932
933    this._options && $.each(this._options, function (key, value) {
934      if (defaults[key] != value) options[key] = value
935    })
936
937    return options
938  }
939
940  Tooltip.prototype.enter = function (obj) {
941    var self = obj instanceof this.constructor ?
942      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
943
944    clearTimeout(self.timeout)
945
946    self.hoverState = 'in'
947
948    if (!self.options.delay || !self.options.delay.show) return self.show()
949
950    self.timeout = setTimeout(function () {
951      if (self.hoverState == 'in') self.show()
952    }, self.options.delay.show)
953  }
954
955  Tooltip.prototype.leave = function (obj) {
956    var self = obj instanceof this.constructor ?
957      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
958
959    clearTimeout(self.timeout)
960
961    self.hoverState = 'out'
962
963    if (!self.options.delay || !self.options.delay.hide) return self.hide()
964
965    self.timeout = setTimeout(function () {
966      if (self.hoverState == 'out') self.hide()
967    }, self.options.delay.hide)
968  }
969
970  Tooltip.prototype.show = function () {
971    var e = $.Event('show.bs.'+ this.type)
972
973    if (this.hasContent() && this.enabled) {
974      this.$element.trigger(e)
975
976      if (e.isDefaultPrevented()) return
977
978      var $tip = this.tip()
979
980      this.setContent()
981
982      if (this.options.animation) $tip.addClass('fade')
983
984      var placement = typeof this.options.placement == 'function' ?
985        this.options.placement.call(this, $tip[0], this.$element[0]) :
986        this.options.placement
987
988      var autoToken = /\s?auto?\s?/i
989      var autoPlace = autoToken.test(placement)
990      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
991
992      $tip
993        .detach()
994        .css({ top: 0, left: 0, display: 'block' })
995        .addClass(placement)
996
997      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
998
999      var pos          = this.getPosition()
1000      var actualWidth  = $tip[0].offsetWidth
1001      var actualHeight = $tip[0].offsetHeight
1002
1003      if (autoPlace) {
1004        var $parent = this.$element.parent()
1005
1006        var orgPlacement = placement
1007        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
1008        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()
1009        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
1010        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left
1011
1012        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :
1013                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :
1014                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :
1015                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :
1016                    placement
1017
1018        $tip
1019          .removeClass(orgPlacement)
1020          .addClass(placement)
1021      }
1022
1023      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1024
1025      this.applyPlacement(calculatedOffset, placement)
1026      this.$element.trigger('shown.bs.' + this.type)
1027    }
1028  }
1029
1030  Tooltip.prototype.applyPlacement = function(offset, placement) {
1031    var replace
1032    var $tip   = this.tip()
1033    var width  = $tip[0].offsetWidth
1034    var height = $tip[0].offsetHeight
1035
1036    // manually read margins because getBoundingClientRect includes difference
1037    var marginTop = parseInt($tip.css('margin-top'), 10)
1038    var marginLeft = parseInt($tip.css('margin-left'), 10)
1039
1040    // we must check for NaN for ie 8/9
1041    if (isNaN(marginTop))  marginTop  = 0
1042    if (isNaN(marginLeft)) marginLeft = 0
1043
1044    offset.top  = offset.top  + marginTop
1045    offset.left = offset.left + marginLeft
1046
1047    $tip
1048      .offset(offset)
1049      .addClass('in')
1050
1051    // check to see if placing tip in new offset caused the tip to resize itself
1052    var actualWidth  = $tip[0].offsetWidth
1053    var actualHeight = $tip[0].offsetHeight
1054
1055    if (placement == 'top' && actualHeight != height) {
1056      replace = true
1057      offset.top = offset.top + height - actualHeight
1058    }
1059
1060    if (/bottom|top/.test(placement)) {
1061      var delta = 0
1062
1063      if (offset.left < 0) {
1064        delta       = offset.left * -2
1065        offset.left = 0
1066
1067        $tip.offset(offset)
1068
1069        actualWidth  = $tip[0].offsetWidth
1070        actualHeight = $tip[0].offsetHeight
1071      }
1072
1073      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
1074    } else {
1075      this.replaceArrow(actualHeight - height, actualHeight, 'top')
1076    }
1077
1078    if (replace) $tip.offset(offset)
1079  }
1080
1081  Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
1082    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
1083  }
1084
1085  Tooltip.prototype.setContent = function () {
1086    var $tip  = this.tip()
1087    var title = this.getTitle()
1088
1089    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1090    $tip.removeClass('fade in top bottom left right')
1091  }
1092
1093  Tooltip.prototype.hide = function () {
1094    var that = this
1095    var $tip = this.tip()
1096    var e    = $.Event('hide.bs.' + this.type)
1097
1098    function complete() {
1099      if (that.hoverState != 'in') $tip.detach()
1100    }
1101
1102    this.$element.trigger(e)
1103
1104    if (e.isDefaultPrevented()) return
1105
1106    $tip.removeClass('in')
1107
1108    $.support.transition && this.$tip.hasClass('fade') ?
1109      $tip
1110        .one($.support.transition.end, complete)
1111        .emulateTransitionEnd(150) :
1112      complete()
1113
1114    this.$element.trigger('hidden.bs.' + this.type)
1115
1116    return this
1117  }
1118
1119  Tooltip.prototype.fixTitle = function () {
1120    var $e = this.$element
1121    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
1122      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1123    }
1124  }
1125
1126  Tooltip.prototype.hasContent = function () {
1127    return this.getTitle()
1128  }
1129
1130  Tooltip.prototype.getPosition = function () {
1131    var el = this.$element[0]
1132    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
1133      width: el.offsetWidth
1134    , height: el.offsetHeight
1135    }, this.$element.offset())
1136  }
1137
1138  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1139    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
1140           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
1141           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1142        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
1143  }
1144
1145  Tooltip.prototype.getTitle = function () {
1146    var title
1147    var $e = this.$element
1148    var o  = this.options
1149
1150    title = $e.attr('data-original-title')
1151      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
1152
1153    return title
1154  }
1155
1156  Tooltip.prototype.tip = function () {
1157    return this.$tip = this.$tip || $(this.options.template)
1158  }
1159
1160  Tooltip.prototype.arrow = function () {
1161    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
1162  }
1163
1164  Tooltip.prototype.validate = function () {
1165    if (!this.$element[0].parentNode) {
1166      this.hide()
1167      this.$element = null
1168      this.options  = null
1169    }
1170  }
1171
1172  Tooltip.prototype.enable = function () {
1173    this.enabled = true
1174  }
1175
1176  Tooltip.prototype.disable = function () {
1177    this.enabled = false
1178  }
1179
1180  Tooltip.prototype.toggleEnabled = function () {
1181    this.enabled = !this.enabled
1182  }
1183
1184  Tooltip.prototype.toggle = function (e) {
1185    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
1186    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1187  }
1188
1189  Tooltip.prototype.destroy = function () {
1190    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
1191  }
1192
1193
1194  // TOOLTIP PLUGIN DEFINITION
1195  // =========================
1196
1197  var old = $.fn.tooltip
1198
1199  $.fn.tooltip = function (option) {
1200    return this.each(function () {
1201      var $this   = $(this)
1202      var data    = $this.data('bs.tooltip')
1203      var options = typeof option == 'object' && option
1204
1205      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1206      if (typeof option == 'string') data[option]()
1207    })
1208  }
1209
1210  $.fn.tooltip.Constructor = Tooltip
1211
1212
1213  // TOOLTIP NO CONFLICT
1214  // ===================
1215
1216  $.fn.tooltip.noConflict = function () {
1217    $.fn.tooltip = old
1218    return this
1219  }
1220
1221}(jQuery);
1222
1223/* ========================================================================
1224 * Bootstrap: popover.js v3.0.3
1225 * http://getbootstrap.com/javascript/#popovers
1226 * ========================================================================
1227 * Copyright 2013 Twitter, Inc.
1228 *
1229 * Licensed under the Apache License, Version 2.0 (the "License");
1230 * you may not use this file except in compliance with the License.
1231 * You may obtain a copy of the License at
1232 *
1233 * http://www.apache.org/licenses/LICENSE-2.0
1234 *
1235 * Unless required by applicable law or agreed to in writing, software
1236 * distributed under the License is distributed on an "AS IS" BASIS,
1237 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1238 * See the License for the specific language governing permissions and
1239 * limitations under the License.
1240 * ======================================================================== */
1241
1242
1243+function ($) { "use strict";
1244
1245  // POPOVER PUBLIC CLASS DEFINITION
1246  // ===============================
1247
1248  var Popover = function (element, options) {
1249    this.init('popover', element, options)
1250  }
1251
1252  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1253
1254  Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
1255    placement: 'right'
1256  , trigger: 'click'
1257  , content: ''
1258  , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1259  })
1260
1261
1262  // NOTE: POPOVER EXTENDS tooltip.js
1263  // ================================
1264
1265  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1266
1267  Popover.prototype.constructor = Popover
1268
1269  Popover.prototype.getDefaults = function () {
1270    return Popover.DEFAULTS
1271  }
1272
1273  Popover.prototype.setContent = function () {
1274    var $tip    = this.tip()
1275    var title   = this.getTitle()
1276    var content = this.getContent()
1277
1278    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1279    $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
1280
1281    $tip.removeClass('fade top bottom left right in')
1282
1283    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1284    // this manually by checking the contents.
1285    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1286  }
1287
1288  Popover.prototype.hasContent = function () {
1289    return this.getTitle() || this.getContent()
1290  }
1291
1292  Popover.prototype.getContent = function () {
1293    var $e = this.$element
1294    var o  = this.options
1295
1296    return $e.attr('data-content')
1297      || (typeof o.content == 'function' ?
1298            o.content.call($e[0]) :
1299            o.content)
1300  }
1301
1302  Popover.prototype.arrow = function () {
1303    return this.$arrow = this.$arrow || this.tip().find('.arrow')
1304  }
1305
1306  Popover.prototype.tip = function () {
1307    if (!this.$tip) this.$tip = $(this.options.template)
1308    return this.$tip
1309  }
1310
1311
1312  // POPOVER PLUGIN DEFINITION
1313  // =========================
1314
1315  var old = $.fn.popover
1316
1317  $.fn.popover = function (option) {
1318    return this.each(function () {
1319      var $this   = $(this)
1320      var data    = $this.data('bs.popover')
1321      var options = typeof option == 'object' && option
1322
1323      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1324      if (typeof option == 'string') data[option]()
1325    })
1326  }
1327
1328  $.fn.popover.Constructor = Popover
1329
1330
1331  // POPOVER NO CONFLICT
1332  // ===================
1333
1334  $.fn.popover.noConflict = function () {
1335    $.fn.popover = old
1336    return this
1337  }
1338
1339}(jQuery);
1340
1341/* ========================================================================
1342 * Bootstrap: tab.js v3.0.3
1343 * http://getbootstrap.com/javascript/#tabs
1344 * ========================================================================
1345 * Copyright 2013 Twitter, Inc.
1346 *
1347 * Licensed under the Apache License, Version 2.0 (the "License");
1348 * you may not use this file except in compliance with the License.
1349 * You may obtain a copy of the License at
1350 *
1351 * http://www.apache.org/licenses/LICENSE-2.0
1352 *
1353 * Unless required by applicable law or agreed to in writing, software
1354 * distributed under the License is distributed on an "AS IS" BASIS,
1355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1356 * See the License for the specific language governing permissions and
1357 * limitations under the License.
1358 * ======================================================================== */
1359
1360
1361+function ($) { "use strict";
1362
1363  // TAB CLASS DEFINITION
1364  // ====================
1365
1366  var Tab = function (element) {
1367    this.element = $(element)
1368  }
1369
1370  Tab.prototype.show = function () {
1371    var $this    = this.element
1372    var $ul      = $this.closest('ul:not(.dropdown-menu)')
1373    var selector = $this.data('target')
1374
1375    if (!selector) {
1376      selector = $this.attr('href')
1377      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1378    }
1379
1380    if ($this.parent('li').hasClass('active')) return
1381
1382    var previous = $ul.find('.active:last a')[0]
1383    var e        = $.Event('show.bs.tab', {
1384      relatedTarget: previous
1385    })
1386
1387    $this.trigger(e)
1388
1389    if (e.isDefaultPrevented()) return
1390
1391    var $target = $(selector)
1392
1393    this.activate($this.parent('li'), $ul)
1394    this.activate($target, $target.parent(), function () {
1395      $this.trigger({
1396        type: 'shown.bs.tab'
1397      , relatedTarget: previous
1398      })
1399    })
1400  }
1401
1402  Tab.prototype.activate = function (element, container, callback) {
1403    var $active    = container.find('> .active')
1404    var transition = callback
1405      && $.support.transition
1406      && $active.hasClass('fade')
1407
1408    function next() {
1409      $active
1410        .removeClass('active')
1411        .find('> .dropdown-menu > .active')
1412        .removeClass('active')
1413
1414      element.addClass('active')
1415
1416      if (transition) {
1417        element[0].offsetWidth // reflow for transition
1418        element.addClass('in')
1419      } else {
1420        element.removeClass('fade')
1421      }
1422
1423      if (element.parent('.dropdown-menu')) {
1424        element.closest('li.dropdown').addClass('active')
1425      }
1426
1427      callback && callback()
1428    }
1429
1430    transition ?
1431      $active
1432        .one($.support.transition.end, next)
1433        .emulateTransitionEnd(150) :
1434      next()
1435
1436    $active.removeClass('in')
1437  }
1438
1439
1440  // TAB PLUGIN DEFINITION
1441  // =====================
1442
1443  var old = $.fn.tab
1444
1445  $.fn.tab = function ( option ) {
1446    return this.each(function () {
1447      var $this = $(this)
1448      var data  = $this.data('bs.tab')
1449
1450      if (!data) $this.data('bs.tab', (data = new Tab(this)))
1451      if (typeof option == 'string') data[option]()
1452    })
1453  }
1454
1455  $.fn.tab.Constructor = Tab
1456
1457
1458  // TAB NO CONFLICT
1459  // ===============
1460
1461  $.fn.tab.noConflict = function () {
1462    $.fn.tab = old
1463    return this
1464  }
1465
1466
1467  // TAB DATA-API
1468  // ============
1469
1470  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
1471    e.preventDefault()
1472    $(this).tab('show')
1473  })
1474
1475}(jQuery);
1476
1477/* ========================================================================
1478 * Bootstrap: affix.js v3.0.3
1479 * http://getbootstrap.com/javascript/#affix
1480 * ========================================================================
1481 * Copyright 2013 Twitter, Inc.
1482 *
1483 * Licensed under the Apache License, Version 2.0 (the "License");
1484 * you may not use this file except in compliance with the License.
1485 * You may obtain a copy of the License at
1486 *
1487 * http://www.apache.org/licenses/LICENSE-2.0
1488 *
1489 * Unless required by applicable law or agreed to in writing, software
1490 * distributed under the License is distributed on an "AS IS" BASIS,
1491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1492 * See the License for the specific language governing permissions and
1493 * limitations under the License.
1494 * ======================================================================== */
1495
1496
1497+function ($) { "use strict";
1498
1499  // AFFIX CLASS DEFINITION
1500  // ======================
1501
1502  var Affix = function (element, options) {
1503    this.options = $.extend({}, Affix.DEFAULTS, options)
1504    this.$window = $(window)
1505      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
1506      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
1507
1508    this.$element = $(element)
1509    this.affixed  =
1510    this.unpin    = null
1511
1512    this.checkPosition()
1513  }
1514
1515  Affix.RESET = 'affix affix-top affix-bottom'
1516
1517  Affix.DEFAULTS = {
1518    offset: 0
1519  }
1520
1521  Affix.prototype.checkPositionWithEventLoop = function () {
1522    setTimeout($.proxy(this.checkPosition, this), 1)
1523  }
1524
1525  Affix.prototype.checkPosition = function () {
1526    if (!this.$element.is(':visible')) return
1527
1528    var scrollHeight = $(document).height()
1529    var scrollTop    = this.$window.scrollTop()
1530    var position     = this.$element.offset()
1531    var offset       = this.options.offset
1532    var offsetTop    = offset.top
1533    var offsetBottom = offset.bottom
1534
1535    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
1536    if (typeof offsetTop == 'function')    offsetTop    = offset.top()
1537    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1538
1539    var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
1540                offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
1541                offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
1542
1543    if (this.affixed === affix) return
1544    if (this.unpin) this.$element.css('top', '')
1545
1546    this.affixed = affix
1547    this.unpin   = affix == 'bottom' ? position.top - scrollTop : null
1548
1549    this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
1550
1551    if (affix == 'bottom') {
1552      this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
1553    }
1554  }
1555
1556
1557  // AFFIX PLUGIN DEFINITION
1558  // =======================
1559
1560  var old = $.fn.affix
1561
1562  $.fn.affix = function (option) {
1563    return this.each(function () {
1564      var $this   = $(this)
1565      var data    = $this.data('bs.affix')
1566      var options = typeof option == 'object' && option
1567
1568      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
1569      if (typeof option == 'string') data[option]()
1570    })
1571  }
1572
1573  $.fn.affix.Constructor = Affix
1574
1575
1576  // AFFIX NO CONFLICT
1577  // =================
1578
1579  $.fn.affix.noConflict = function () {
1580    $.fn.affix = old
1581    return this
1582  }
1583
1584
1585  // AFFIX DATA-API
1586  // ==============
1587
1588  $(window).on('load', function () {
1589    $('[data-spy="affix"]').each(function () {
1590      var $spy = $(this)
1591      var data = $spy.data()
1592
1593      data.offset = data.offset || {}
1594
1595      if (data.offsetBottom) data.offset.bottom = data.offsetBottom
1596      if (data.offsetTop)    data.offset.top    = data.offsetTop
1597
1598      $spy.affix(data)
1599    })
1600  })
1601
1602}(jQuery);
1603
1604/* ========================================================================
1605 * Bootstrap: collapse.js v3.0.3
1606 * http://getbootstrap.com/javascript/#collapse
1607 * ========================================================================
1608 * Copyright 2013 Twitter, Inc.
1609 *
1610 * Licensed under the Apache License, Version 2.0 (the "License");
1611 * you may not use this file except in compliance with the License.
1612 * You may obtain a copy of the License at
1613 *
1614 * http://www.apache.org/licenses/LICENSE-2.0
1615 *
1616 * Unless required by applicable law or agreed to in writing, softw
1616are
1617 * distributed under the License is distributed on an "AS IS" BASIS,
1618 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1619 * See the License for the specific language governing permissions and
1620 * limitations under the License.
1621 * ======================================================================== */
1622
1623
1624+function ($) { "use strict";
1625
1626  // COLLAPSE PUBLIC CLASS DEFINITION
1627  // ================================
1628
1629  var Collapse = function (element, options) {
1630    this.$element      = $(element)
1631    this.options       = $.extend({}, Collapse.DEFAULTS, options)
1632    this.transitioning = null
1633
1634    if (this.options.parent) this.$parent = $(this.options.parent)
1635    if (this.options.toggle) this.toggle()
1636  }
1637
1638  Collapse.DEFAULTS = {
1639    toggle: true
1640  }
1641
1642  Collapse.prototype.dimension = function () {
1643    var hasWidth = this.$element.hasClass('width')
1644    return hasWidth ? 'width' : 'height'
1645  }
1646
1647  Collapse.prototype.show = function () {
1648    if (this.transitioning || this.$element.hasClass('in')) return
1649
1650    var startEvent = $.Event('show.bs.collapse')
1651    this.$element.trigger(startEvent)
1652    if (startEvent.isDefaultPrevented()) return
1653
1654    var actives = this.$parent && this.$parent.find('> .panel > .in')
1655
1656    if (actives && actives.length) {
1657      var hasData = actives.data('bs.collapse')
1658      if (hasData && hasData.transitioning) return
1659      actives.collapse('hide')
1660      hasData || actives.data('bs.collapse', null)
1661    }
1662
1663    var dimension = this.dimension()
1664
1665    this.$element
1666      .removeClass('collapse')
1667      .addClass('collapsing')
1668      [dimension](0)
1669
1670    this.transitioning = 1
1671
1672    var complete = function () {
1673      this.$element
1674        .removeClass('collapsing')
1675        .addClass('in')
1676        [dimension]('auto')
1677      this.transitioning = 0
1678      this.$element.trigger('shown.bs.collapse')
1679    }
1680
1681    if (!$.support.transition) return complete.call(this)
1682
1683    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
1684
1685    this.$element
1686      .one($.support.transition.end, $.proxy(complete, this))
1687      .emulateTransitionEnd(350)
1688      [dimension](this.$element[0][scrollSize])
1689  }
1690
1691  Collapse.prototype.hide = function () {
1692    if (this.transitioning || !this.$element.hasClass('in')) return
1693
1694    var startEvent = $.Event('hide.bs.collapse')
1695    this.$element.trigger(startEvent)
1696    if (startEvent.isDefaultPrevented()) return
1697
1698    var dimension = this.dimension()
1699
1700    this.$element
1701      [dimension](this.$element[dimension]())
1702      [0].offsetHeight
1703
1704    this.$element
1705      .addClass('collapsing')
1706      .removeClass('collapse')
1707      .removeClass('in')
1708
1709    this.transitioning = 1
1710
1711    var complete = function () {
1712      this.transitioning = 0
1713      this.$element
1714        .trigger('hidden.bs.collapse')
1715        .removeClass('collapsing')
1716        .addClass('collapse')
1717    }
1718
1719    if (!$.support.transition) return complete.call(this)
1720
1721    this.$element
1722      [dimension](0)
1723      .one($.support.transition.end, $.proxy(complete, this))
1724      .emulateTransitionEnd(350)
1725  }
1726
1727  Collapse.prototype.toggle = function () {
1728    this[this.$element.hasClass('in') ? 'hide' : 'show']()
1729  }
1730
1731
1732  // COLLAPSE PLUGIN DEFINITION
1733  // ==========================
1734
1735  var old = $.fn.collapse
1736
1737  $.fn.collapse = function (option) {
1738    return this.each(function () {
1739      var $this   = $(this)
1740      var data    = $this.data('bs.collapse')
1741      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
1742
1743      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
1744      if (typeof option == 'string') data[option]()
1745    })
1746  }
1747
1748  $.fn.collapse.Constructor = Collapse
1749
1750
1751  // COLLAPSE NO CONFLICT
1752  // ====================
1753
1754  $.fn.collapse.noConflict = function () {
1755    $.fn.collapse = old
1756    return this
1757  }
1758
1759
1760  // COLLAPSE DATA-API
1761  // =================
1762
1763  $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
1764    var $this   = $(this), href
1765    var target  = $this.attr('data-target')
1766        || e.preventDefault()
1767        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1768    var $target = $(target)
1769    var data    = $target.data('bs.collapse')
1770    var option  = data ? 'toggle' : $this.data()
1771    var parent  = $this.attr('data-parent')
1772    var $parent = parent && $(parent)
1773
1774    if (!data || !data.transitioning) {
1775      if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
1776      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1777    }
1778
1779    $target.collapse(option)
1780  })
1781
1782}(jQuery);
1783
1784/* ========================================================================
1785 * Bootstrap: scrollspy.js v3.0.3
1786 * http://getbootstrap.com/javascript/#scrollspy
1787 * ========================================================================
1788 * Copyright 2013 Twitter, Inc.
1789 *
1790 * Licensed under the Apache License, Version 2.0 (the "License");
1791 * you may not use this file except in compliance with the License.
1792 * You may obtain a copy of the License at
1793 *
1794 * http://www.apache.org/licenses/LICENSE-2.0
1795 *
1796 * Unless required by applicable law or agreed to in writing, software
1797 * distributed under the License is distributed on an "AS IS" BASIS,
1798 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1799 * See the License for the specific language governing permissions and
1800 * limitations under the License.
1801 * ======================================================================== */
1802
1803
1804+function ($) { "use strict";
1805
1806  // SCROLLSPY CLASS DEFINITION
1807  // ==========================
1808
1809  function ScrollSpy(element, options) {
1810    var href
1811    var process  = $.proxy(this.process, this)
1812
1813    this.$element       = $(element).is('body') ? $(window) : $(element)
1814    this.$body          = $('body')
1815    this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
1816    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
1817    this.selector       = (this.options.target
1818      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1819      || '') + ' .nav li > a'
1820    this.offsets        = $([])
1821    this.targets        = $([])
1822    this.activeTarget   = null
1823
1824    this.refresh()
1825    this.process()
1826  }
1827
1828  ScrollSpy.DEFAULTS = {
1829    offset: 10
1830  }
1831
1832  ScrollSpy.prototype.refresh = function () {
1833    var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
1834
1835    this.offsets = $([])
1836    this.targets = $([])
1837
1838    var self     = this
1839    var $targets = this.$body
1840      .find(this.selector)
1841      .map(function () {
1842        var $el   = $(this)
1843        var href  = $el.data('target') || $el.attr('href')
1844        var $href = /^#\w/.test(href) && $(href)
1845
1846        return ($href
1847          && $href.length
1848          && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
1849      })
1850      .sort(function (a, b) { return a[0] - b[0] })
1851      .each(function () {
1852        self.offsets.push(this[0])
1853        self.targets.push(this[1])
1854      })
1855  }
1856
1857  ScrollSpy.prototype.process = function () {
1858    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
1859    var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
1860    var maxScroll    = scrollHeight - this.$scrollElement.height()
1861    var offsets      = this.offsets
1862    var targets      = this.targets
1863    var activeTarget = this.activeTarget
1864    var i
1865
1866    if (scrollTop >= maxScroll) {
1867      return activeTarget != (i = targets.last()[0]) && this.activate(i)
1868    }
1869
1870    for (i = offsets.length; i--;) {
1871      activeTarget != targets[i]
1872        && scrollTop >= offsets[i]
1873        && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1874        && this.activate( targets[i] )
1875    }
1876  }
1877
1878  ScrollSpy.prototype.activate = function (target) {
1879    this.activeTarget = target
1880
1881    $(this.selector)
1882      .parents('.active')
1883      .removeClass('active')
1884
1885    var selector = this.selector
1886      + '[data-target="' + target + '"],'
1887      + this.selector + '[href="' + target + '"]'
1888
1889    var active = $(selector)
1890      .parents('li')
1891      .addClass('active')
1892
1893    if (active.parent('.dropdown-menu').length)  {
1894      active = active
1895        .closest('li.dropdown')
1896        .addClass('active')
1897    }
1898
1899    active.trigger('activate.bs.scrollspy')
1900  }
1901
1902
1903  // SCROLLSPY PLUGIN DEFINITION
1904  // ===========================
1905
1906  var old = $.fn.scrollspy
1907
1908  $.fn.scrollspy = function (option) {
1909    return this.each(function () {
1910      var $this   = $(this)
1911      var data    = $this.data('bs.scrollspy')
1912      var options = typeof option == 'object' && option
1913
1914      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1915      if (typeof option == 'string') data[option]()
1916    })
1917  }
1918
1919  $.fn.scrollspy.Constructor = ScrollSpy
1920
1921
1922  // SCROLLSPY NO CONFLICT
1923  // =====================
1924
1925  $.fn.scrollspy.noConflict = function () {
1926    $.fn.scrollspy = old
1927    return this
1928  }
1929
1930
1931  // SCROLLSPY DATA-API
1932  // ==================
1933
1934  $(window).on('load', function () {
1935    $('[data-spy="scroll"]').each(function () {
1936      var $spy = $(this)
1937      $spy.scrollspy($spy.data())
1938    })
1939  })
1940
1941}(jQuery);
1942
1943/* ========================================================================
1944 * Bootstrap: transition.js v3.0.3
1945 * http://getbootstrap.com/javascript/#transitions
1946 * ========================================================================
1947 * Copyright 2013 Twitter, Inc.
1948 *
1949 * Licensed under the Apache License, Version 2.0 (the "License");
1950 * you may not use this file except in compliance with the License.
1951 * You may obtain a copy of the License at
1952 *
1953 * http://www.apache.org/licenses/LICENSE-2.0
1954 *
1955 * Unless required by applicable law or agreed to in writing, software
1956 * distributed under the License is distributed on an "AS IS" BASIS,
1957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1958 * See the License for the specific language governing permissions and
1959 * limitations under the License.
1960 * ======================================================================== */
1961
1962
1963+function ($) { "use strict";
1964
1965  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
1966  // ============================================================
1967
1968  function transitionEnd() {
1969    var el = document.createElement('bootstrap')
1970
1971    var transEndEventNames = {
1972      'WebkitTransition' : 'webkitTransitionEnd'
1973    , 'MozTransition'    : 'transitionend'
1974    , 'OTransition'      : 'oTransitionEnd otransitionend'
1975    , 'transition'       : 'transitionend'
1976    }
1977
1978    for (var name in transEndEventNames) {
1979      if (el.style[name] !== undefined) {
1980        return { end: transEndEventNames[name] }
1981      }
1982    }
1983  }
1984
1985  // http://blog.alexmaccaw.com/css-transitions
1986  $.fn.emulateTransitionEnd = function (duration) {
1987    var called = false, $el = this
1988    $(this).one($.support.transition.end, function () { called = true })
1989    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
1990    setTimeout(callback, duration)
1991    return this
1992  }
1993
1994  $(function () {
1995    $.support.transition = transitionEnd()
1996  })
1997
1998}(jQuery);

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.