PageSourceSearch

https://www.debata.olsztyn.pl/media/foundry/3.1/scripts/bootstrap.js

js debata.olsztyn.pl collected 2026-10-02 12:01:07 UTC 60,100 bytes, 2,158 lines download raw bytes

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

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.