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