1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/bootstrap-source/bootstrap-3.0.3/dist/js/bootstrap.js Fri Jan 17 11:59:43 2014 +0100
1.3 @@ -0,0 +1,2006 @@
1.4 +/*!
1.5 + * Bootstrap v3.0.3 (http://getbootstrap.com)
1.6 + * Copyright 2013 Twitter, Inc.
1.7 + * Licensed under http://www.apache.org/licenses/LICENSE-2.0
1.8 + */
1.9 +
1.10 +if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
1.11 +
1.12 +/* ========================================================================
1.13 + * Bootstrap: transition.js v3.0.3
1.14 + * http://getbootstrap.com/javascript/#transitions
1.15 + * ========================================================================
1.16 + * Copyright 2013 Twitter, Inc.
1.17 + *
1.18 + * Licensed under the Apache License, Version 2.0 (the "License");
1.19 + * you may not use this file except in compliance with the License.
1.20 + * You may obtain a copy of the License at
1.21 + *
1.22 + * http://www.apache.org/licenses/LICENSE-2.0
1.23 + *
1.24 + * Unless required by applicable law or agreed to in writing, software
1.25 + * distributed under the License is distributed on an "AS IS" BASIS,
1.26 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.27 + * See the License for the specific language governing permissions and
1.28 + * limitations under the License.
1.29 + * ======================================================================== */
1.30 +
1.31 +
1.32 ++function ($) { "use strict";
1.33 +
1.34 + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
1.35 + // ============================================================
1.36 +
1.37 + function transitionEnd() {
1.38 + var el = document.createElement('bootstrap')
1.39 +
1.40 + var transEndEventNames = {
1.41 + 'WebkitTransition' : 'webkitTransitionEnd'
1.42 + , 'MozTransition' : 'transitionend'
1.43 + , 'OTransition' : 'oTransitionEnd otransitionend'
1.44 + , 'transition' : 'transitionend'
1.45 + }
1.46 +
1.47 + for (var name in transEndEventNames) {
1.48 + if (el.style[name] !== undefined) {
1.49 + return { end: transEndEventNames[name] }
1.50 + }
1.51 + }
1.52 + }
1.53 +
1.54 + // http://blog.alexmaccaw.com/css-transitions
1.55 + $.fn.emulateTransitionEnd = function (duration) {
1.56 + var called = false, $el = this
1.57 + $(this).one($.support.transition.end, function () { called = true })
1.58 + var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
1.59 + setTimeout(callback, duration)
1.60 + return this
1.61 + }
1.62 +
1.63 + $(function () {
1.64 + $.support.transition = transitionEnd()
1.65 + })
1.66 +
1.67 +}(jQuery);
1.68 +
1.69 +/* ========================================================================
1.70 + * Bootstrap: alert.js v3.0.3
1.71 + * http://getbootstrap.com/javascript/#alerts
1.72 + * ========================================================================
1.73 + * Copyright 2013 Twitter, Inc.
1.74 + *
1.75 + * Licensed under the Apache License, Version 2.0 (the "License");
1.76 + * you may not use this file except in compliance with the License.
1.77 + * You may obtain a copy of the License at
1.78 + *
1.79 + * http://www.apache.org/licenses/LICENSE-2.0
1.80 + *
1.81 + * Unless required by applicable law or agreed to in writing, software
1.82 + * distributed under the License is distributed on an "AS IS" BASIS,
1.83 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.84 + * See the License for the specific language governing permissions and
1.85 + * limitations under the License.
1.86 + * ======================================================================== */
1.87 +
1.88 +
1.89 ++function ($) { "use strict";
1.90 +
1.91 + // ALERT CLASS DEFINITION
1.92 + // ======================
1.93 +
1.94 + var dismiss = '[data-dismiss="alert"]'
1.95 + var Alert = function (el) {
1.96 + $(el).on('click', dismiss, this.close)
1.97 + }
1.98 +
1.99 + Alert.prototype.close = function (e) {
1.100 + var $this = $(this)
1.101 + var selector = $this.attr('data-target')
1.102 +
1.103 + if (!selector) {
1.104 + selector = $this.attr('href')
1.105 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
1.106 + }
1.107 +
1.108 + var $parent = $(selector)
1.109 +
1.110 + if (e) e.preventDefault()
1.111 +
1.112 + if (!$parent.length) {
1.113 + $parent = $this.hasClass('alert') ? $this : $this.parent()
1.114 + }
1.115 +
1.116 + $parent.trigger(e = $.Event('close.bs.alert'))
1.117 +
1.118 + if (e.isDefaultPrevented()) return
1.119 +
1.120 + $parent.removeClass('in')
1.121 +
1.122 + function removeElement() {
1.123 + $parent.trigger('closed.bs.alert').remove()
1.124 + }
1.125 +
1.126 + $.support.transition && $parent.hasClass('fade') ?
1.127 + $parent
1.128 + .one($.support.transition.end, removeElement)
1.129 + .emulateTransitionEnd(150) :
1.130 + removeElement()
1.131 + }
1.132 +
1.133 +
1.134 + // ALERT PLUGIN DEFINITION
1.135 + // =======================
1.136 +
1.137 + var old = $.fn.alert
1.138 +
1.139 + $.fn.alert = function (option) {
1.140 + return this.each(function () {
1.141 + var $this = $(this)
1.142 + var data = $this.data('bs.alert')
1.143 +
1.144 + if (!data) $this.data('bs.alert', (data = new Alert(this)))
1.145 + if (typeof option == 'string') data[option].call($this)
1.146 + })
1.147 + }
1.148 +
1.149 + $.fn.alert.Constructor = Alert
1.150 +
1.151 +
1.152 + // ALERT NO CONFLICT
1.153 + // =================
1.154 +
1.155 + $.fn.alert.noConflict = function () {
1.156 + $.fn.alert = old
1.157 + return this
1.158 + }
1.159 +
1.160 +
1.161 + // ALERT DATA-API
1.162 + // ==============
1.163 +
1.164 + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
1.165 +
1.166 +}(jQuery);
1.167 +
1.168 +/* ========================================================================
1.169 + * Bootstrap: button.js v3.0.3
1.170 + * http://getbootstrap.com/javascript/#buttons
1.171 + * ========================================================================
1.172 + * Copyright 2013 Twitter, Inc.
1.173 + *
1.174 + * Licensed under the Apache License, Version 2.0 (the "License");
1.175 + * you may not use this file except in compliance with the License.
1.176 + * You may obtain a copy of the License at
1.177 + *
1.178 + * http://www.apache.org/licenses/LICENSE-2.0
1.179 + *
1.180 + * Unless required by applicable law or agreed to in writing, software
1.181 + * distributed under the License is distributed on an "AS IS" BASIS,
1.182 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.183 + * See the License for the specific language governing permissions and
1.184 + * limitations under the License.
1.185 + * ======================================================================== */
1.186 +
1.187 +
1.188 ++function ($) { "use strict";
1.189 +
1.190 + // BUTTON PUBLIC CLASS DEFINITION
1.191 + // ==============================
1.192 +
1.193 + var Button = function (element, options) {
1.194 + this.$element = $(element)
1.195 + this.options = $.extend({}, Button.DEFAULTS, options)
1.196 + }
1.197 +
1.198 + Button.DEFAULTS = {
1.199 + loadingText: 'loading...'
1.200 + }
1.201 +
1.202 + Button.prototype.setState = function (state) {
1.203 + var d = 'disabled'
1.204 + var $el = this.$element
1.205 + var val = $el.is('input') ? 'val' : 'html'
1.206 + var data = $el.data()
1.207 +
1.208 + state = state + 'Text'
1.209 +
1.210 + if (!data.resetText) $el.data('resetText', $el[val]())
1.211 +
1.212 + $el[val](data[state] || this.options[state])
1.213 +
1.214 + // push to event loop to allow forms to submit
1.215 + setTimeout(function () {
1.216 + state == 'loadingText' ?
1.217 + $el.addClass(d).attr(d, d) :
1.218 + $el.removeClass(d).removeAttr(d);
1.219 + }, 0)
1.220 + }
1.221 +
1.222 + Button.prototype.toggle = function () {
1.223 + var $parent = this.$element.closest('[data-toggle="buttons"]')
1.224 + var changed = true
1.225 +
1.226 + if ($parent.length) {
1.227 + var $input = this.$element.find('input')
1.228 + if ($input.prop('type') === 'radio') {
1.229 + // see if clicking on current one
1.230 + if ($input.prop('checked') && this.$element.hasClass('active'))
1.231 + changed = false
1.232 + else
1.233 + $parent.find('.active').removeClass('active')
1.234 + }
1.235 + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
1.236 + }
1.237 +
1.238 + if (changed) this.$element.toggleClass('active')
1.239 + }
1.240 +
1.241 +
1.242 + // BUTTON PLUGIN DEFINITION
1.243 + // ========================
1.244 +
1.245 + var old = $.fn.button
1.246 +
1.247 + $.fn.button = function (option) {
1.248 + return this.each(function () {
1.249 + var $this = $(this)
1.250 + var data = $this.data('bs.button')
1.251 + var options = typeof option == 'object' && option
1.252 +
1.253 + if (!data) $this.data('bs.button', (data = new Button(this, options)))
1.254 +
1.255 + if (option == 'toggle') data.toggle()
1.256 + else if (option) data.setState(option)
1.257 + })
1.258 + }
1.259 +
1.260 + $.fn.button.Constructor = Button
1.261 +
1.262 +
1.263 + // BUTTON NO CONFLICT
1.264 + // ==================
1.265 +
1.266 + $.fn.button.noConflict = function () {
1.267 + $.fn.button = old
1.268 + return this
1.269 + }
1.270 +
1.271 +
1.272 + // BUTTON DATA-API
1.273 + // ===============
1.274 +
1.275 + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
1.276 + var $btn = $(e.target)
1.277 + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
1.278 + $btn.button('toggle')
1.279 + e.preventDefault()
1.280 + })
1.281 +
1.282 +}(jQuery);
1.283 +
1.284 +/* ========================================================================
1.285 + * Bootstrap: carousel.js v3.0.3
1.286 + * http://getbootstrap.com/javascript/#carousel
1.287 + * ========================================================================
1.288 + * Copyright 2013 Twitter, Inc.
1.289 + *
1.290 + * Licensed under the Apache License, Version 2.0 (the "License");
1.291 + * you may not use this file except in compliance with the License.
1.292 + * You may obtain a copy of the License at
1.293 + *
1.294 + * http://www.apache.org/licenses/LICENSE-2.0
1.295 + *
1.296 + * Unless required by applicable law or agreed to in writing, software
1.297 + * distributed under the License is distributed on an "AS IS" BASIS,
1.298 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.299 + * See the License for the specific language governing permissions and
1.300 + * limitations under the License.
1.301 + * ======================================================================== */
1.302 +
1.303 +
1.304 ++function ($) { "use strict";
1.305 +
1.306 + // CAROUSEL CLASS DEFINITION
1.307 + // =========================
1.308 +
1.309 + var Carousel = function (element, options) {
1.310 + this.$element = $(element)
1.311 + this.$indicators = this.$element.find('.carousel-indicators')
1.312 + this.options = options
1.313 + this.paused =
1.314 + this.sliding =
1.315 + this.interval =
1.316 + this.$active =
1.317 + this.$items = null
1.318 +
1.319 + this.options.pause == 'hover' && this.$element
1.320 + .on('mouseenter', $.proxy(this.pause, this))
1.321 + .on('mouseleave', $.proxy(this.cycle, this))
1.322 + }
1.323 +
1.324 + Carousel.DEFAULTS = {
1.325 + interval: 5000
1.326 + , pause: 'hover'
1.327 + , wrap: true
1.328 + }
1.329 +
1.330 + Carousel.prototype.cycle = function (e) {
1.331 + e || (this.paused = false)
1.332 +
1.333 + this.interval && clearInterval(this.interval)
1.334 +
1.335 + this.options.interval
1.336 + && !this.paused
1.337 + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
1.338 +
1.339 + return this
1.340 + }
1.341 +
1.342 + Carousel.prototype.getActiveIndex = function () {
1.343 + this.$active = this.$element.find('.item.active')
1.344 + this.$items = this.$active.parent().children()
1.345 +
1.346 + return this.$items.index(this.$active)
1.347 + }
1.348 +
1.349 + Carousel.prototype.to = function (pos) {
1.350 + var that = this
1.351 + var activeIndex = this.getActiveIndex()
1.352 +
1.353 + if (pos > (this.$items.length - 1) || pos < 0) return
1.354 +
1.355 + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
1.356 + if (activeIndex == pos) return this.pause().cycle()
1.357 +
1.358 + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
1.359 + }
1.360 +
1.361 + Carousel.prototype.pause = function (e) {
1.362 + e || (this.paused = true)
1.363 +
1.364 + if (this.$element.find('.next, .prev').length && $.support.transition.end) {
1.365 + this.$element.trigger($.support.transition.end)
1.366 + this.cycle(true)
1.367 + }
1.368 +
1.369 + this.interval = clearInterval(this.interval)
1.370 +
1.371 + return this
1.372 + }
1.373 +
1.374 + Carousel.prototype.next = function () {
1.375 + if (this.sliding) return
1.376 + return this.slide('next')
1.377 + }
1.378 +
1.379 + Carousel.prototype.prev = function () {
1.380 + if (this.sliding) return
1.381 + return this.slide('prev')
1.382 + }
1.383 +
1.384 + Carousel.prototype.slide = function (type, next) {
1.385 + var $active = this.$element.find('.item.active')
1.386 + var $next = next || $active[type]()
1.387 + var isCycling = this.interval
1.388 + var direction = type == 'next' ? 'left' : 'right'
1.389 + var fallback = type == 'next' ? 'first' : 'last'
1.390 + var that = this
1.391 +
1.392 + if (!$next.length) {
1.393 + if (!this.options.wrap) return
1.394 + $next = this.$element.find('.item')[fallback]()
1.395 + }
1.396 +
1.397 + this.sliding = true
1.398 +
1.399 + isCycling && this.pause()
1.400 +
1.401 + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
1.402 +
1.403 + if ($next.hasClass('active')) return
1.404 +
1.405 + if (this.$indicators.length) {
1.406 + this.$indicators.find('.active').removeClass('active')
1.407 + this.$element.one('slid.bs.carousel', function () {
1.408 + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
1.409 + $nextIndicator && $nextIndicator.addClass('active')
1.410 + })
1.411 + }
1.412 +
1.413 + if ($.support.transition && this.$element.hasClass('slide')) {
1.414 + this.$element.trigger(e)
1.415 + if (e.isDefaultPrevented()) return
1.416 + $next.addClass(type)
1.417 + $next[0].offsetWidth // force reflow
1.418 + $active.addClass(direction)
1.419 + $next.addClass(direction)
1.420 + $active
1.421 + .one($.support.transition.end, function () {
1.422 + $next.removeClass([type, direction].join(' ')).addClass('active')
1.423 + $active.removeClass(['active', direction].join(' '))
1.424 + that.sliding = false
1.425 + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
1.426 + })
1.427 + .emulateTransitionEnd(600)
1.428 + } else {
1.429 + this.$element.trigger(e)
1.430 + if (e.isDefaultPrevented()) return
1.431 + $active.removeClass('active')
1.432 + $next.addClass('active')
1.433 + this.sliding = false
1.434 + this.$element.trigger('slid.bs.carousel')
1.435 + }
1.436 +
1.437 + isCycling && this.cycle()
1.438 +
1.439 + return this
1.440 + }
1.441 +
1.442 +
1.443 + // CAROUSEL PLUGIN DEFINITION
1.444 + // ==========================
1.445 +
1.446 + var old = $.fn.carousel
1.447 +
1.448 + $.fn.carousel = function (option) {
1.449 + return this.each(function () {
1.450 + var $this = $(this)
1.451 + var data = $this.data('bs.carousel')
1.452 + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
1.453 + var action = typeof option == 'string' ? option : options.slide
1.454 +
1.455 + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
1.456 + if (typeof option == 'number') data.to(option)
1.457 + else if (action) data[action]()
1.458 + else if (options.interval) data.pause().cycle()
1.459 + })
1.460 + }
1.461 +
1.462 + $.fn.carousel.Constructor = Carousel
1.463 +
1.464 +
1.465 + // CAROUSEL NO CONFLICT
1.466 + // ====================
1.467 +
1.468 + $.fn.carousel.noConflict = function () {
1.469 + $.fn.carousel = old
1.470 + return this
1.471 + }
1.472 +
1.473 +
1.474 + // CAROUSEL DATA-API
1.475 + // =================
1.476 +
1.477 + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
1.478 + var $this = $(this), href
1.479 + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1.480 + var options = $.extend({}, $target.data(), $this.data())
1.481 + var slideIndex = $this.attr('data-slide-to')
1.482 + if (slideIndex) options.interval = false
1.483 +
1.484 + $target.carousel(options)
1.485 +
1.486 + if (slideIndex = $this.attr('data-slide-to')) {
1.487 + $target.data('bs.carousel').to(slideIndex)
1.488 + }
1.489 +
1.490 + e.preventDefault()
1.491 + })
1.492 +
1.493 + $(window).on('load', function () {
1.494 + $('[data-ride="carousel"]').each(function () {
1.495 + var $carousel = $(this)
1.496 + $carousel.carousel($carousel.data())
1.497 + })
1.498 + })
1.499 +
1.500 +}(jQuery);
1.501 +
1.502 +/* ========================================================================
1.503 + * Bootstrap: collapse.js v3.0.3
1.504 + * http://getbootstrap.com/javascript/#collapse
1.505 + * ========================================================================
1.506 + * Copyright 2013 Twitter, Inc.
1.507 + *
1.508 + * Licensed under the Apache License, Version 2.0 (the "License");
1.509 + * you may not use this file except in compliance with the License.
1.510 + * You may obtain a copy of the License at
1.511 + *
1.512 + * http://www.apache.org/licenses/LICENSE-2.0
1.513 + *
1.514 + * Unless required by applicable law or agreed to in writing, software
1.515 + * distributed under the License is distributed on an "AS IS" BASIS,
1.516 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.517 + * See the License for the specific language governing permissions and
1.518 + * limitations under the License.
1.519 + * ======================================================================== */
1.520 +
1.521 +
1.522 ++function ($) { "use strict";
1.523 +
1.524 + // COLLAPSE PUBLIC CLASS DEFINITION
1.525 + // ================================
1.526 +
1.527 + var Collapse = function (element, options) {
1.528 + this.$element = $(element)
1.529 + this.options = $.extend({}, Collapse.DEFAULTS, options)
1.530 + this.transitioning = null
1.531 +
1.532 + if (this.options.parent) this.$parent = $(this.options.parent)
1.533 + if (this.options.toggle) this.toggle()
1.534 + }
1.535 +
1.536 + Collapse.DEFAULTS = {
1.537 + toggle: true
1.538 + }
1.539 +
1.540 + Collapse.prototype.dimension = function () {
1.541 + var hasWidth = this.$element.hasClass('width')
1.542 + return hasWidth ? 'width' : 'height'
1.543 + }
1.544 +
1.545 + Collapse.prototype.show = function () {
1.546 + if (this.transitioning || this.$element.hasClass('in')) return
1.547 +
1.548 + var startEvent = $.Event('show.bs.collapse')
1.549 + this.$element.trigger(startEvent)
1.550 + if (startEvent.isDefaultPrevented()) return
1.551 +
1.552 + var actives = this.$parent && this.$parent.find('> .panel > .in')
1.553 +
1.554 + if (actives && actives.length) {
1.555 + var hasData = actives.data('bs.collapse')
1.556 + if (hasData && hasData.transitioning) return
1.557 + actives.collapse('hide')
1.558 + hasData || actives.data('bs.collapse', null)
1.559 + }
1.560 +
1.561 + var dimension = this.dimension()
1.562 +
1.563 + this.$element
1.564 + .removeClass('collapse')
1.565 + .addClass('collapsing')
1.566 + [dimension](0)
1.567 +
1.568 + this.transitioning = 1
1.569 +
1.570 + var complete = function () {
1.571 + this.$element
1.572 + .removeClass('collapsing')
1.573 + .addClass('in')
1.574 + [dimension]('auto')
1.575 + this.transitioning = 0
1.576 + this.$element.trigger('shown.bs.collapse')
1.577 + }
1.578 +
1.579 + if (!$.support.transition) return complete.call(this)
1.580 +
1.581 + var scrollSize = $.camelCase(['scroll', dimension].join('-'))
1.582 +
1.583 + this.$element
1.584 + .one($.support.transition.end, $.proxy(complete, this))
1.585 + .emulateTransitionEnd(350)
1.586 + [dimension](this.$element[0][scrollSize])
1.587 + }
1.588 +
1.589 + Collapse.prototype.hide = function () {
1.590 + if (this.transitioning || !this.$element.hasClass('in')) return
1.591 +
1.592 + var startEvent = $.Event('hide.bs.collapse')
1.593 + this.$element.trigger(startEvent)
1.594 + if (startEvent.isDefaultPrevented()) return
1.595 +
1.596 + var dimension = this.dimension()
1.597 +
1.598 + this.$element
1.599 + [dimension](this.$element[dimension]())
1.600 + [0].offsetHeight
1.601 +
1.602 + this.$element
1.603 + .addClass('collapsing')
1.604 + .removeClass('collapse')
1.605 + .removeClass('in')
1.606 +
1.607 + this.transitioning = 1
1.608 +
1.609 + var complete = function () {
1.610 + this.transitioning = 0
1.611 + this.$element
1.612 + .trigger('hidden.bs.collapse')
1.613 + .removeClass('collapsing')
1.614 + .addClass('collapse')
1.615 + }
1.616 +
1.617 + if (!$.support.transition) return complete.call(this)
1.618 +
1.619 + this.$element
1.620 + [dimension](0)
1.621 + .one($.support.transition.end, $.proxy(complete, this))
1.622 + .emulateTransitionEnd(350)
1.623 + }
1.624 +
1.625 + Collapse.prototype.toggle = function () {
1.626 + this[this.$element.hasClass('in') ? 'hide' : 'show']()
1.627 + }
1.628 +
1.629 +
1.630 + // COLLAPSE PLUGIN DEFINITION
1.631 + // ==========================
1.632 +
1.633 + var old = $.fn.collapse
1.634 +
1.635 + $.fn.collapse = function (option) {
1.636 + return this.each(function () {
1.637 + var $this = $(this)
1.638 + var data = $this.data('bs.collapse')
1.639 + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
1.640 +
1.641 + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
1.642 + if (typeof option == 'string') data[option]()
1.643 + })
1.644 + }
1.645 +
1.646 + $.fn.collapse.Constructor = Collapse
1.647 +
1.648 +
1.649 + // COLLAPSE NO CONFLICT
1.650 + // ====================
1.651 +
1.652 + $.fn.collapse.noConflict = function () {
1.653 + $.fn.collapse = old
1.654 + return this
1.655 + }
1.656 +
1.657 +
1.658 + // COLLAPSE DATA-API
1.659 + // =================
1.660 +
1.661 + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
1.662 + var $this = $(this), href
1.663 + var target = $this.attr('data-target')
1.664 + || e.preventDefault()
1.665 + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1.666 + var $target = $(target)
1.667 + var data = $target.data('bs.collapse')
1.668 + var option = data ? 'toggle' : $this.data()
1.669 + var parent = $this.attr('data-parent')
1.670 + var $parent = parent && $(parent)
1.671 +
1.672 + if (!data || !data.transitioning) {
1.673 + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
1.674 + $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1.675 + }
1.676 +
1.677 + $target.collapse(option)
1.678 + })
1.679 +
1.680 +}(jQuery);
1.681 +
1.682 +/* ========================================================================
1.683 + * Bootstrap: dropdown.js v3.0.3
1.684 + * http://getbootstrap.com/javascript/#dropdowns
1.685 + * ========================================================================
1.686 + * Copyright 2013 Twitter, Inc.
1.687 + *
1.688 + * Licensed under the Apache License, Version 2.0 (the "License");
1.689 + * you may not use this file except in compliance with the License.
1.690 + * You may obtain a copy of the License at
1.691 + *
1.692 + * http://www.apache.org/licenses/LICENSE-2.0
1.693 + *
1.694 + * Unless required by applicable law or agreed to in writing, software
1.695 + * distributed under the License is distributed on an "AS IS" BASIS,
1.696 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.697 + * See the License for the specific language governing permissions and
1.698 + * limitations under the License.
1.699 + * ======================================================================== */
1.700 +
1.701 +
1.702 ++function ($) { "use strict";
1.703 +
1.704 + // DROPDOWN CLASS DEFINITION
1.705 + // =========================
1.706 +
1.707 + var backdrop = '.dropdown-backdrop'
1.708 + var toggle = '[data-toggle=dropdown]'
1.709 + var Dropdown = function (element) {
1.710 + $(element).on('click.bs.dropdown', this.toggle)
1.711 + }
1.712 +
1.713 + Dropdown.prototype.toggle = function (e) {
1.714 + var $this = $(this)
1.715 +
1.716 + if ($this.is('.disabled, :disabled')) return
1.717 +
1.718 + var $parent = getParent($this)
1.719 + var isActive = $parent.hasClass('open')
1.720 +
1.721 + clearMenus()
1.722 +
1.723 + if (!isActive) {
1.724 + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
1.725 + // if mobile we use a backdrop because click events don't delegate
1.726 + $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
1.727 + }
1.728 +
1.729 + $parent.trigger(e = $.Event('show.bs.dropdown'))
1.730 +
1.731 + if (e.isDefaultPrevented()) return
1.732 +
1.733 + $parent
1.734 + .toggleClass('open')
1.735 + .trigger('shown.bs.dropdown')
1.736 +
1.737 + $this.focus()
1.738 + }
1.739 +
1.740 + return false
1.741 + }
1.742 +
1.743 + Dropdown.prototype.keydown = function (e) {
1.744 + if (!/(38|40|27)/.test(e.keyCode)) return
1.745 +
1.746 + var $this = $(this)
1.747 +
1.748 + e.preventDefault()
1.749 + e.stopPropagation()
1.750 +
1.751 + if ($this.is('.disabled, :disabled')) return
1.752 +
1.753 + var $parent = getParent($this)
1.754 + var isActive = $parent.hasClass('open')
1.755 +
1.756 + if (!isActive || (isActive && e.keyCode == 27)) {
1.757 + if (e.which == 27) $parent.find(toggle).focus()
1.758 + return $this.click()
1.759 + }
1.760 +
1.761 + var $items = $('[role=menu] li:not(.divider):visible a', $parent)
1.762 +
1.763 + if (!$items.length) return
1.764 +
1.765 + var index = $items.index($items.filter(':focus'))
1.766 +
1.767 + if (e.keyCode == 38 && index > 0) index-- // up
1.768 + if (e.keyCode == 40 && index < $items.length - 1) index++ // down
1.769 + if (!~index) index=0
1.770 +
1.771 + $items.eq(index).focus()
1.772 + }
1.773 +
1.774 + function clearMenus() {
1.775 + $(backdrop).remove()
1.776 + $(toggle).each(function (e) {
1.777 + var $parent = getParent($(this))
1.778 + if (!$parent.hasClass('open')) return
1.779 + $parent.trigger(e = $.Event('hide.bs.dropdown'))
1.780 + if (e.isDefaultPrevented()) return
1.781 + $parent.removeClass('open').trigger('hidden.bs.dropdown')
1.782 + })
1.783 + }
1.784 +
1.785 + function getParent($this) {
1.786 + var selector = $this.attr('data-target')
1.787 +
1.788 + if (!selector) {
1.789 + selector = $this.attr('href')
1.790 + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1.791 + }
1.792 +
1.793 + var $parent = selector && $(selector)
1.794 +
1.795 + return $parent && $parent.length ? $parent : $this.parent()
1.796 + }
1.797 +
1.798 +
1.799 + // DROPDOWN PLUGIN DEFINITION
1.800 + // ==========================
1.801 +
1.802 + var old = $.fn.dropdown
1.803 +
1.804 + $.fn.dropdown = function (option) {
1.805 + return this.each(function () {
1.806 + var $this = $(this)
1.807 + var data = $this.data('bs.dropdown')
1.808 +
1.809 + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
1.810 + if (typeof option == 'string') data[option].call($this)
1.811 + })
1.812 + }
1.813 +
1.814 + $.fn.dropdown.Constructor = Dropdown
1.815 +
1.816 +
1.817 + // DROPDOWN NO CONFLICT
1.818 + // ====================
1.819 +
1.820 + $.fn.dropdown.noConflict = function () {
1.821 + $.fn.dropdown = old
1.822 + return this
1.823 + }
1.824 +
1.825 +
1.826 + // APPLY TO STANDARD DROPDOWN ELEMENTS
1.827 + // ===================================
1.828 +
1.829 + $(document)
1.830 + .on('click.bs.dropdown.data-api', clearMenus)
1.831 + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
1.832 + .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
1.833 + .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
1.834 +
1.835 +}(jQuery);
1.836 +
1.837 +/* ========================================================================
1.838 + * Bootstrap: modal.js v3.0.3
1.839 + * http://getbootstrap.com/javascript/#modals
1.840 + * ========================================================================
1.841 + * Copyright 2013 Twitter, Inc.
1.842 + *
1.843 + * Licensed under the Apache License, Version 2.0 (the "License");
1.844 + * you may not use this file except in compliance with the License.
1.845 + * You may obtain a copy of the License at
1.846 + *
1.847 + * http://www.apache.org/licenses/LICENSE-2.0
1.848 + *
1.849 + * Unless required by applicable law or agreed to in writing, software
1.850 + * distributed under the License is distributed on an "AS IS" BASIS,
1.851 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.852 + * See the License for the specific language governing permissions and
1.853 + * limitations under the License.
1.854 + * ======================================================================== */
1.855 +
1.856 +
1.857 ++function ($) { "use strict";
1.858 +
1.859 + // MODAL CLASS DEFINITION
1.860 + // ======================
1.861 +
1.862 + var Modal = function (element, options) {
1.863 + this.options = options
1.864 + this.$element = $(element)
1.865 + this.$backdrop =
1.866 + this.isShown = null
1.867 +
1.868 + if (this.options.remote) this.$element.load(this.options.remote)
1.869 + }
1.870 +
1.871 + Modal.DEFAULTS = {
1.872 + backdrop: true
1.873 + , keyboard: true
1.874 + , show: true
1.875 + }
1.876 +
1.877 + Modal.prototype.toggle = function (_relatedTarget) {
1.878 + return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
1.879 + }
1.880 +
1.881 + Modal.prototype.show = function (_relatedTarget) {
1.882 + var that = this
1.883 + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
1.884 +
1.885 + this.$element.trigger(e)
1.886 +
1.887 + if (this.isShown || e.isDefaultPrevented()) return
1.888 +
1.889 + this.isShown = true
1.890 +
1.891 + this.escape()
1.892 +
1.893 + this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
1.894 +
1.895 + this.backdrop(function () {
1.896 + var transition = $.support.transition && that.$element.hasClass('fade')
1.897 +
1.898 + if (!that.$element.parent().length) {
1.899 + that.$element.appendTo(document.body) // don't move modals dom position
1.900 + }
1.901 +
1.902 + that.$element.show()
1.903 +
1.904 + if (transition) {
1.905 + that.$element[0].offsetWidth // force reflow
1.906 + }
1.907 +
1.908 + that.$element
1.909 + .addClass('in')
1.910 + .attr('aria-hidden', false)
1.911 +
1.912 + that.enforceFocus()
1.913 +
1.914 + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1.915 +
1.916 + transition ?
1.917 + that.$element.find('.modal-dialog') // wait for modal to slide in
1.918 + .one($.support.transition.end, function () {
1.919 + that.$element.focus().trigger(e)
1.920 + })
1.921 + .emulateTransitionEnd(300) :
1.922 + that.$element.focus().trigger(e)
1.923 + })
1.924 + }
1.925 +
1.926 + Modal.prototype.hide = function (e) {
1.927 + if (e) e.preventDefault()
1.928 +
1.929 + e = $.Event('hide.bs.modal')
1.930 +
1.931 + this.$element.trigger(e)
1.932 +
1.933 + if (!this.isShown || e.isDefaultPrevented()) return
1.934 +
1.935 + this.isShown = false
1.936 +
1.937 + this.escape()
1.938 +
1.939 + $(document).off('focusin.bs.modal')
1.940 +
1.941 + this.$element
1.942 + .removeClass('in')
1.943 + .attr('aria-hidden', true)
1.944 + .off('click.dismiss.modal')
1.945 +
1.946 + $.support.transition && this.$element.hasClass('fade') ?
1.947 + this.$element
1.948 + .one($.support.transition.end, $.proxy(this.hideModal, this))
1.949 + .emulateTransitionEnd(300) :
1.950 + this.hideModal()
1.951 + }
1.952 +
1.953 + Modal.prototype.enforceFocus = function () {
1.954 + $(document)
1.955 + .off('focusin.bs.modal') // guard against infinite focus loop
1.956 + .on('focusin.bs.modal', $.proxy(function (e) {
1.957 + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1.958 + this.$element.focus()
1.959 + }
1.960 + }, this))
1.961 + }
1.962 +
1.963 + Modal.prototype.escape = function () {
1.964 + if (this.isShown && this.options.keyboard) {
1.965 + this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
1.966 + e.which == 27 && this.hide()
1.967 + }, this))
1.968 + } else if (!this.isShown) {
1.969 + this.$element.off('keyup.dismiss.bs.modal')
1.970 + }
1.971 + }
1.972 +
1.973 + Modal.prototype.hideModal = function () {
1.974 + var that = this
1.975 + this.$element.hide()
1.976 + this.backdrop(function () {
1.977 + that.removeBackdrop()
1.978 + that.$element.trigger('hidden.bs.modal')
1.979 + })
1.980 + }
1.981 +
1.982 + Modal.prototype.removeBackdrop = function () {
1.983 + this.$backdrop && this.$backdrop.remove()
1.984 + this.$backdrop = null
1.985 + }
1.986 +
1.987 + Modal.prototype.backdrop = function (callback) {
1.988 + var that = this
1.989 + var animate = this.$element.hasClass('fade') ? 'fade' : ''
1.990 +
1.991 + if (this.isShown && this.options.backdrop) {
1.992 + var doAnimate = $.support.transition && animate
1.993 +
1.994 + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1.995 + .appendTo(document.body)
1.996 +
1.997 + this.$element.on('click.dismiss.modal', $.proxy(function (e) {
1.998 + if (e.target !== e.currentTarget) return
1.999 + this.options.backdrop == 'static'
1.1000 + ? this.$element[0].focus.call(this.$element[0])
1.1001 + : this.hide.call(this)
1.1002 + }, this))
1.1003 +
1.1004 + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1.1005 +
1.1006 + this.$backdrop.addClass('in')
1.1007 +
1.1008 + if (!callback) return
1.1009 +
1.1010 + doAnimate ?
1.1011 + this.$backdrop
1.1012 + .one($.support.transition.end, callback)
1.1013 + .emulateTransitionEnd(150) :
1.1014 + callback()
1.1015 +
1.1016 + } else if (!this.isShown && this.$backdrop) {
1.1017 + this.$backdrop.removeClass('in')
1.1018 +
1.1019 + $.support.transition && this.$element.hasClass('fade')?
1.1020 + this.$backdrop
1.1021 + .one($.support.transition.end, callback)
1.1022 + .emulateTransitionEnd(150) :
1.1023 + callback()
1.1024 +
1.1025 + } else if (callback) {
1.1026 + callback()
1.1027 + }
1.1028 + }
1.1029 +
1.1030 +
1.1031 + // MODAL PLUGIN DEFINITION
1.1032 + // =======================
1.1033 +
1.1034 + var old = $.fn.modal
1.1035 +
1.1036 + $.fn.modal = function (option, _relatedTarget) {
1.1037 + return this.each(function () {
1.1038 + var $this = $(this)
1.1039 + var data = $this.data('bs.modal')
1.1040 + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1.1041 +
1.1042 + if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1.1043 + if (typeof option == 'string') data[option](_relatedTarget)
1.1044 + else if (options.show) data.show(_relatedTarget)
1.1045 + })
1.1046 + }
1.1047 +
1.1048 + $.fn.modal.Constructor = Modal
1.1049 +
1.1050 +
1.1051 + // MODAL NO CONFLICT
1.1052 + // =================
1.1053 +
1.1054 + $.fn.modal.noConflict = function () {
1.1055 + $.fn.modal = old
1.1056 + return this
1.1057 + }
1.1058 +
1.1059 +
1.1060 + // MODAL DATA-API
1.1061 + // ==============
1.1062 +
1.1063 + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1.1064 + var $this = $(this)
1.1065 + var href = $this.attr('href')
1.1066 + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
1.1067 + var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1.1068 +
1.1069 + e.preventDefault()
1.1070 +
1.1071 + $target
1.1072 + .modal(option, this)
1.1073 + .one('hide', function () {
1.1074 + $this.is(':visible') && $this.focus()
1.1075 + })
1.1076 + })
1.1077 +
1.1078 + $(document)
1.1079 + .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
1.1080 + .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
1.1081 +
1.1082 +}(jQuery);
1.1083 +
1.1084 +/* ========================================================================
1.1085 + * Bootstrap: tooltip.js v3.0.3
1.1086 + * http://getbootstrap.com/javascript/#tooltip
1.1087 + * Inspired by the original jQuery.tipsy by Jason Frame
1.1088 + * ========================================================================
1.1089 + * Copyright 2013 Twitter, Inc.
1.1090 + *
1.1091 + * Licensed under the Apache License, Version 2.0 (the "License");
1.1092 + * you may not use this file except in compliance with the License.
1.1093 + * You may obtain a copy of the License at
1.1094 + *
1.1095 + * http://www.apache.org/licenses/LICENSE-2.0
1.1096 + *
1.1097 + * Unless required by applicable law or agreed to in writing, software
1.1098 + * distributed under the License is distributed on an "AS IS" BASIS,
1.1099 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.1100 + * See the License for the specific language governing permissions and
1.1101 + * limitations under the License.
1.1102 + * ======================================================================== */
1.1103 +
1.1104 +
1.1105 ++function ($) { "use strict";
1.1106 +
1.1107 + // TOOLTIP PUBLIC CLASS DEFINITION
1.1108 + // ===============================
1.1109 +
1.1110 + var Tooltip = function (element, options) {
1.1111 + this.type =
1.1112 + this.options =
1.1113 + this.enabled =
1.1114 + this.timeout =
1.1115 + this.hoverState =
1.1116 + this.$element = null
1.1117 +
1.1118 + this.init('tooltip', element, options)
1.1119 + }
1.1120 +
1.1121 + Tooltip.DEFAULTS = {
1.1122 + animation: true
1.1123 + , placement: 'top'
1.1124 + , selector: false
1.1125 + , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
1.1126 + , trigger: 'hover focus'
1.1127 + , title: ''
1.1128 + , delay: 0
1.1129 + , html: false
1.1130 + , container: false
1.1131 + }
1.1132 +
1.1133 + Tooltip.prototype.init = function (type, element, options) {
1.1134 + this.enabled = true
1.1135 + this.type = type
1.1136 + this.$element = $(element)
1.1137 + this.options = this.getOptions(options)
1.1138 +
1.1139 + var triggers = this.options.trigger.split(' ')
1.1140 +
1.1141 + for (var i = triggers.length; i--;) {
1.1142 + var trigger = triggers[i]
1.1143 +
1.1144 + if (trigger == 'click') {
1.1145 + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1.1146 + } else if (trigger != 'manual') {
1.1147 + var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
1.1148 + var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
1.1149 +
1.1150 + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1.1151 + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1.1152 + }
1.1153 + }
1.1154 +
1.1155 + this.options.selector ?
1.1156 + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1.1157 + this.fixTitle()
1.1158 + }
1.1159 +
1.1160 + Tooltip.prototype.getDefaults = function () {
1.1161 + return Tooltip.DEFAULTS
1.1162 + }
1.1163 +
1.1164 + Tooltip.prototype.getOptions = function (options) {
1.1165 + options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1.1166 +
1.1167 + if (options.delay && typeof options.delay == 'number') {
1.1168 + options.delay = {
1.1169 + show: options.delay
1.1170 + , hide: options.delay
1.1171 + }
1.1172 + }
1.1173 +
1.1174 + return options
1.1175 + }
1.1176 +
1.1177 + Tooltip.prototype.getDelegateOptions = function () {
1.1178 + var options = {}
1.1179 + var defaults = this.getDefaults()
1.1180 +
1.1181 + this._options && $.each(this._options, function (key, value) {
1.1182 + if (defaults[key] != value) options[key] = value
1.1183 + })
1.1184 +
1.1185 + return options
1.1186 + }
1.1187 +
1.1188 + Tooltip.prototype.enter = function (obj) {
1.1189 + var self = obj instanceof this.constructor ?
1.1190 + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
1.1191 +
1.1192 + clearTimeout(self.timeout)
1.1193 +
1.1194 + self.hoverState = 'in'
1.1195 +
1.1196 + if (!self.options.delay || !self.options.delay.show) return self.show()
1.1197 +
1.1198 + self.timeout = setTimeout(function () {
1.1199 + if (self.hoverState == 'in') self.show()
1.1200 + }, self.options.delay.show)
1.1201 + }
1.1202 +
1.1203 + Tooltip.prototype.leave = function (obj) {
1.1204 + var self = obj instanceof this.constructor ?
1.1205 + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
1.1206 +
1.1207 + clearTimeout(self.timeout)
1.1208 +
1.1209 + self.hoverState = 'out'
1.1210 +
1.1211 + if (!self.options.delay || !self.options.delay.hide) return self.hide()
1.1212 +
1.1213 + self.timeout = setTimeout(function () {
1.1214 + if (self.hoverState == 'out') self.hide()
1.1215 + }, self.options.delay.hide)
1.1216 + }
1.1217 +
1.1218 + Tooltip.prototype.show = function () {
1.1219 + var e = $.Event('show.bs.'+ this.type)
1.1220 +
1.1221 + if (this.hasContent() && this.enabled) {
1.1222 + this.$element.trigger(e)
1.1223 +
1.1224 + if (e.isDefaultPrevented()) return
1.1225 +
1.1226 + var $tip = this.tip()
1.1227 +
1.1228 + this.setContent()
1.1229 +
1.1230 + if (this.options.animation) $tip.addClass('fade')
1.1231 +
1.1232 + var placement = typeof this.options.placement == 'function' ?
1.1233 + this.options.placement.call(this, $tip[0], this.$element[0]) :
1.1234 + this.options.placement
1.1235 +
1.1236 + var autoToken = /\s?auto?\s?/i
1.1237 + var autoPlace = autoToken.test(placement)
1.1238 + if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1.1239 +
1.1240 + $tip
1.1241 + .detach()
1.1242 + .css({ top: 0, left: 0, display: 'block' })
1.1243 + .addClass(placement)
1.1244 +
1.1245 + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1.1246 +
1.1247 + var pos = this.getPosition()
1.1248 + var actualWidth = $tip[0].offsetWidth
1.1249 + var actualHeight = $tip[0].offsetHeight
1.1250 +
1.1251 + if (autoPlace) {
1.1252 + var $parent = this.$element.parent()
1.1253 +
1.1254 + var orgPlacement = placement
1.1255 + var docScroll = document.documentElement.scrollTop || document.body.scrollTop
1.1256 + var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
1.1257 + var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
1.1258 + var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
1.1259 +
1.1260 + placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
1.1261 + placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
1.1262 + placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
1.1263 + placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
1.1264 + placement
1.1265 +
1.1266 + $tip
1.1267 + .removeClass(orgPlacement)
1.1268 + .addClass(placement)
1.1269 + }
1.1270 +
1.1271 + var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1.1272 +
1.1273 + this.applyPlacement(calculatedOffset, placement)
1.1274 + this.$element.trigger('shown.bs.' + this.type)
1.1275 + }
1.1276 + }
1.1277 +
1.1278 + Tooltip.prototype.applyPlacement = function(offset, placement) {
1.1279 + var replace
1.1280 + var $tip = this.tip()
1.1281 + var width = $tip[0].offsetWidth
1.1282 + var height = $tip[0].offsetHeight
1.1283 +
1.1284 + // manually read margins because getBoundingClientRect includes difference
1.1285 + var marginTop = parseInt($tip.css('margin-top'), 10)
1.1286 + var marginLeft = parseInt($tip.css('margin-left'), 10)
1.1287 +
1.1288 + // we must check for NaN for ie 8/9
1.1289 + if (isNaN(marginTop)) marginTop = 0
1.1290 + if (isNaN(marginLeft)) marginLeft = 0
1.1291 +
1.1292 + offset.top = offset.top + marginTop
1.1293 + offset.left = offset.left + marginLeft
1.1294 +
1.1295 + $tip
1.1296 + .offset(offset)
1.1297 + .addClass('in')
1.1298 +
1.1299 + // check to see if placing tip in new offset caused the tip to resize itself
1.1300 + var actualWidth = $tip[0].offsetWidth
1.1301 + var actualHeight = $tip[0].offsetHeight
1.1302 +
1.1303 + if (placement == 'top' && actualHeight != height) {
1.1304 + replace = true
1.1305 + offset.top = offset.top + height - actualHeight
1.1306 + }
1.1307 +
1.1308 + if (/bottom|top/.test(placement)) {
1.1309 + var delta = 0
1.1310 +
1.1311 + if (offset.left < 0) {
1.1312 + delta = offset.left * -2
1.1313 + offset.left = 0
1.1314 +
1.1315 + $tip.offset(offset)
1.1316 +
1.1317 + actualWidth = $tip[0].offsetWidth
1.1318 + actualHeight = $tip[0].offsetHeight
1.1319 + }
1.1320 +
1.1321 + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
1.1322 + } else {
1.1323 + this.replaceArrow(actualHeight - height, actualHeight, 'top')
1.1324 + }
1.1325 +
1.1326 + if (replace) $tip.offset(offset)
1.1327 + }
1.1328 +
1.1329 + Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
1.1330 + this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
1.1331 + }
1.1332 +
1.1333 + Tooltip.prototype.setContent = function () {
1.1334 + var $tip = this.tip()
1.1335 + var title = this.getTitle()
1.1336 +
1.1337 + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1.1338 + $tip.removeClass('fade in top bottom left right')
1.1339 + }
1.1340 +
1.1341 + Tooltip.prototype.hide = function () {
1.1342 + var that = this
1.1343 + var $tip = this.tip()
1.1344 + var e = $.Event('hide.bs.' + this.type)
1.1345 +
1.1346 + function complete() {
1.1347 + if (that.hoverState != 'in') $tip.detach()
1.1348 + }
1.1349 +
1.1350 + this.$element.trigger(e)
1.1351 +
1.1352 + if (e.isDefaultPrevented()) return
1.1353 +
1.1354 + $tip.removeClass('in')
1.1355 +
1.1356 + $.support.transition && this.$tip.hasClass('fade') ?
1.1357 + $tip
1.1358 + .one($.support.transition.end, complete)
1.1359 + .emulateTransitionEnd(150) :
1.1360 + complete()
1.1361 +
1.1362 + this.$element.trigger('hidden.bs.' + this.type)
1.1363 +
1.1364 + return this
1.1365 + }
1.1366 +
1.1367 + Tooltip.prototype.fixTitle = function () {
1.1368 + var $e = this.$element
1.1369 + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
1.1370 + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1.1371 + }
1.1372 + }
1.1373 +
1.1374 + Tooltip.prototype.hasContent = function () {
1.1375 + return this.getTitle()
1.1376 + }
1.1377 +
1.1378 + Tooltip.prototype.getPosition = function () {
1.1379 + var el = this.$element[0]
1.1380 + return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
1.1381 + width: el.offsetWidth
1.1382 + , height: el.offsetHeight
1.1383 + }, this.$element.offset())
1.1384 + }
1.1385 +
1.1386 + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1.1387 + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1.1388 + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1.1389 + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1.1390 + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1.1391 + }
1.1392 +
1.1393 + Tooltip.prototype.getTitle = function () {
1.1394 + var title
1.1395 + var $e = this.$element
1.1396 + var o = this.options
1.1397 +
1.1398 + title = $e.attr('data-original-title')
1.1399 + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1.1400 +
1.1401 + return title
1.1402 + }
1.1403 +
1.1404 + Tooltip.prototype.tip = function () {
1.1405 + return this.$tip = this.$tip || $(this.options.template)
1.1406 + }
1.1407 +
1.1408 + Tooltip.prototype.arrow = function () {
1.1409 + return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
1.1410 + }
1.1411 +
1.1412 + Tooltip.prototype.validate = function () {
1.1413 + if (!this.$element[0].parentNode) {
1.1414 + this.hide()
1.1415 + this.$element = null
1.1416 + this.options = null
1.1417 + }
1.1418 + }
1.1419 +
1.1420 + Tooltip.prototype.enable = function () {
1.1421 + this.enabled = true
1.1422 + }
1.1423 +
1.1424 + Tooltip.prototype.disable = function () {
1.1425 + this.enabled = false
1.1426 + }
1.1427 +
1.1428 + Tooltip.prototype.toggleEnabled = function () {
1.1429 + this.enabled = !this.enabled
1.1430 + }
1.1431 +
1.1432 + Tooltip.prototype.toggle = function (e) {
1.1433 + var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
1.1434 + self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1.1435 + }
1.1436 +
1.1437 + Tooltip.prototype.destroy = function () {
1.1438 + this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
1.1439 + }
1.1440 +
1.1441 +
1.1442 + // TOOLTIP PLUGIN DEFINITION
1.1443 + // =========================
1.1444 +
1.1445 + var old = $.fn.tooltip
1.1446 +
1.1447 + $.fn.tooltip = function (option) {
1.1448 + return this.each(function () {
1.1449 + var $this = $(this)
1.1450 + var data = $this.data('bs.tooltip')
1.1451 + var options = typeof option == 'object' && option
1.1452 +
1.1453 + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1.1454 + if (typeof option == 'string') data[option]()
1.1455 + })
1.1456 + }
1.1457 +
1.1458 + $.fn.tooltip.Constructor = Tooltip
1.1459 +
1.1460 +
1.1461 + // TOOLTIP NO CONFLICT
1.1462 + // ===================
1.1463 +
1.1464 + $.fn.tooltip.noConflict = function () {
1.1465 + $.fn.tooltip = old
1.1466 + return this
1.1467 + }
1.1468 +
1.1469 +}(jQuery);
1.1470 +
1.1471 +/* ========================================================================
1.1472 + * Bootstrap: popover.js v3.0.3
1.1473 + * http://getbootstrap.com/javascript/#popovers
1.1474 + * ========================================================================
1.1475 + * Copyright 2013 Twitter, Inc.
1.1476 + *
1.1477 + * Licensed under the Apache License, Version 2.0 (the "License");
1.1478 + * you may not use this file except in compliance with the License.
1.1479 + * You may obtain a copy of the License at
1.1480 + *
1.1481 + * http://www.apache.org/licenses/LICENSE-2.0
1.1482 + *
1.1483 + * Unless required by applicable law or agreed to in writing, software
1.1484 + * distributed under the License is distributed on an "AS IS" BASIS,
1.1485 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.1486 + * See the License for the specific language governing permissions and
1.1487 + * limitations under the License.
1.1488 + * ======================================================================== */
1.1489 +
1.1490 +
1.1491 ++function ($) { "use strict";
1.1492 +
1.1493 + // POPOVER PUBLIC CLASS DEFINITION
1.1494 + // ===============================
1.1495 +
1.1496 + var Popover = function (element, options) {
1.1497 + this.init('popover', element, options)
1.1498 + }
1.1499 +
1.1500 + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1.1501 +
1.1502 + Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
1.1503 + placement: 'right'
1.1504 + , trigger: 'click'
1.1505 + , content: ''
1.1506 + , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1.1507 + })
1.1508 +
1.1509 +
1.1510 + // NOTE: POPOVER EXTENDS tooltip.js
1.1511 + // ================================
1.1512 +
1.1513 + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1.1514 +
1.1515 + Popover.prototype.constructor = Popover
1.1516 +
1.1517 + Popover.prototype.getDefaults = function () {
1.1518 + return Popover.DEFAULTS
1.1519 + }
1.1520 +
1.1521 + Popover.prototype.setContent = function () {
1.1522 + var $tip = this.tip()
1.1523 + var title = this.getTitle()
1.1524 + var content = this.getContent()
1.1525 +
1.1526 + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1.1527 + $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
1.1528 +
1.1529 + $tip.removeClass('fade top bottom left right in')
1.1530 +
1.1531 + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1.1532 + // this manually by checking the contents.
1.1533 + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1.1534 + }
1.1535 +
1.1536 + Popover.prototype.hasContent = function () {
1.1537 + return this.getTitle() || this.getContent()
1.1538 + }
1.1539 +
1.1540 + Popover.prototype.getContent = function () {
1.1541 + var $e = this.$element
1.1542 + var o = this.options
1.1543 +
1.1544 + return $e.attr('data-content')
1.1545 + || (typeof o.content == 'function' ?
1.1546 + o.content.call($e[0]) :
1.1547 + o.content)
1.1548 + }
1.1549 +
1.1550 + Popover.prototype.arrow = function () {
1.1551 + return this.$arrow = this.$arrow || this.tip().find('.arrow')
1.1552 + }
1.1553 +
1.1554 + Popover.prototype.tip = function () {
1.1555 + if (!this.$tip) this.$tip = $(this.options.template)
1.1556 + return this.$tip
1.1557 + }
1.1558 +
1.1559 +
1.1560 + // POPOVER PLUGIN DEFINITION
1.1561 + // =========================
1.1562 +
1.1563 + var old = $.fn.popover
1.1564 +
1.1565 + $.fn.popover = function (option) {
1.1566 + return this.each(function () {
1.1567 + var $this = $(this)
1.1568 + var data = $this.data('bs.popover')
1.1569 + var options = typeof option == 'object' && option
1.1570 +
1.1571 + if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1.1572 + if (typeof option == 'string') data[option]()
1.1573 + })
1.1574 + }
1.1575 +
1.1576 + $.fn.popover.Constructor = Popover
1.1577 +
1.1578 +
1.1579 + // POPOVER NO CONFLICT
1.1580 + // ===================
1.1581 +
1.1582 + $.fn.popover.noConflict = function () {
1.1583 + $.fn.popover = old
1.1584 + return this
1.1585 + }
1.1586 +
1.1587 +}(jQuery);
1.1588 +
1.1589 +/* ========================================================================
1.1590 + * Bootstrap: scrollspy.js v3.0.3
1.1591 + * http://getbootstrap.com/javascript/#scrollspy
1.1592 + * ========================================================================
1.1593 + * Copyright 2013 Twitter, Inc.
1.1594 + *
1.1595 + * Licensed under the Apache License, Version 2.0 (the "License");
1.1596 + * you may not use this file except in compliance with the License.
1.1597 + * You may obtain a copy of the License at
1.1598 + *
1.1599 + * http://www.apache.org/licenses/LICENSE-2.0
1.1600 + *
1.1601 + * Unless required by applicable law or agreed to in writing, software
1.1602 + * distributed under the License is distributed on an "AS IS" BASIS,
1.1603 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.1604 + * See the License for the specific language governing permissions and
1.1605 + * limitations under the License.
1.1606 + * ======================================================================== */
1.1607 +
1.1608 +
1.1609 ++function ($) { "use strict";
1.1610 +
1.1611 + // SCROLLSPY CLASS DEFINITION
1.1612 + // ==========================
1.1613 +
1.1614 + function ScrollSpy(element, options) {
1.1615 + var href
1.1616 + var process = $.proxy(this.process, this)
1.1617 +
1.1618 + this.$element = $(element).is('body') ? $(window) : $(element)
1.1619 + this.$body = $('body')
1.1620 + this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process)
1.1621 + this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1.1622 + this.selector = (this.options.target
1.1623 + || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1.1624 + || '') + ' .nav li > a'
1.1625 + this.offsets = $([])
1.1626 + this.targets = $([])
1.1627 + this.activeTarget = null
1.1628 +
1.1629 + this.refresh()
1.1630 + this.process()
1.1631 + }
1.1632 +
1.1633 + ScrollSpy.DEFAULTS = {
1.1634 + offset: 10
1.1635 + }
1.1636 +
1.1637 + ScrollSpy.prototype.refresh = function () {
1.1638 + var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
1.1639 +
1.1640 + this.offsets = $([])
1.1641 + this.targets = $([])
1.1642 +
1.1643 + var self = this
1.1644 + var $targets = this.$body
1.1645 + .find(this.selector)
1.1646 + .map(function () {
1.1647 + var $el = $(this)
1.1648 + var href = $el.data('target') || $el.attr('href')
1.1649 + var $href = /^#\w/.test(href) && $(href)
1.1650 +
1.1651 + return ($href
1.1652 + && $href.length
1.1653 + && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
1.1654 + })
1.1655 + .sort(function (a, b) { return a[0] - b[0] })
1.1656 + .each(function () {
1.1657 + self.offsets.push(this[0])
1.1658 + self.targets.push(this[1])
1.1659 + })
1.1660 + }
1.1661 +
1.1662 + ScrollSpy.prototype.process = function () {
1.1663 + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1.1664 + var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
1.1665 + var maxScroll = scrollHeight - this.$scrollElement.height()
1.1666 + var offsets = this.offsets
1.1667 + var targets = this.targets
1.1668 + var activeTarget = this.activeTarget
1.1669 + var i
1.1670 +
1.1671 + if (scrollTop >= maxScroll) {
1.1672 + return activeTarget != (i = targets.last()[0]) && this.activate(i)
1.1673 + }
1.1674 +
1.1675 + for (i = offsets.length; i--;) {
1.1676 + activeTarget != targets[i]
1.1677 + && scrollTop >= offsets[i]
1.1678 + && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1.1679 + && this.activate( targets[i] )
1.1680 + }
1.1681 + }
1.1682 +
1.1683 + ScrollSpy.prototype.activate = function (target) {
1.1684 + this.activeTarget = target
1.1685 +
1.1686 + $(this.selector)
1.1687 + .parents('.active')
1.1688 + .removeClass('active')
1.1689 +
1.1690 + var selector = this.selector
1.1691 + + '[data-target="' + target + '"],'
1.1692 + + this.selector + '[href="' + target + '"]'
1.1693 +
1.1694 + var active = $(selector)
1.1695 + .parents('li')
1.1696 + .addClass('active')
1.1697 +
1.1698 + if (active.parent('.dropdown-menu').length) {
1.1699 + active = active
1.1700 + .closest('li.dropdown')
1.1701 + .addClass('active')
1.1702 + }
1.1703 +
1.1704 + active.trigger('activate.bs.scrollspy')
1.1705 + }
1.1706 +
1.1707 +
1.1708 + // SCROLLSPY PLUGIN DEFINITION
1.1709 + // ===========================
1.1710 +
1.1711 + var old = $.fn.scrollspy
1.1712 +
1.1713 + $.fn.scrollspy = function (option) {
1.1714 + return this.each(function () {
1.1715 + var $this = $(this)
1.1716 + var data = $this.data('bs.scrollspy')
1.1717 + var options = typeof option == 'object' && option
1.1718 +
1.1719 + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1.1720 + if (typeof option == 'string') data[option]()
1.1721 + })
1.1722 + }
1.1723 +
1.1724 + $.fn.scrollspy.Constructor = ScrollSpy
1.1725 +
1.1726 +
1.1727 + // SCROLLSPY NO CONFLICT
1.1728 + // =====================
1.1729 +
1.1730 + $.fn.scrollspy.noConflict = function () {
1.1731 + $.fn.scrollspy = old
1.1732 + return this
1.1733 + }
1.1734 +
1.1735 +
1.1736 + // SCROLLSPY DATA-API
1.1737 + // ==================
1.1738 +
1.1739 + $(window).on('load', function () {
1.1740 + $('[data-spy="scroll"]').each(function () {
1.1741 + var $spy = $(this)
1.1742 + $spy.scrollspy($spy.data())
1.1743 + })
1.1744 + })
1.1745 +
1.1746 +}(jQuery);
1.1747 +
1.1748 +/* ========================================================================
1.1749 + * Bootstrap: tab.js v3.0.3
1.1750 + * http://getbootstrap.com/javascript/#tabs
1.1751 + * ========================================================================
1.1752 + * Copyright 2013 Twitter, Inc.
1.1753 + *
1.1754 + * Licensed under the Apache License, Version 2.0 (the "License");
1.1755 + * you may not use this file except in compliance with the License.
1.1756 + * You may obtain a copy of the License at
1.1757 + *
1.1758 + * http://www.apache.org/licenses/LICENSE-2.0
1.1759 + *
1.1760 + * Unless required by applicable law or agreed to in writing, software
1.1761 + * distributed under the License is distributed on an "AS IS" BASIS,
1.1762 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.1763 + * See the License for the specific language governing permissions and
1.1764 + * limitations under the License.
1.1765 + * ======================================================================== */
1.1766 +
1.1767 +
1.1768 ++function ($) { "use strict";
1.1769 +
1.1770 + // TAB CLASS DEFINITION
1.1771 + // ====================
1.1772 +
1.1773 + var Tab = function (element) {
1.1774 + this.element = $(element)
1.1775 + }
1.1776 +
1.1777 + Tab.prototype.show = function () {
1.1778 + var $this = this.element
1.1779 + var $ul = $this.closest('ul:not(.dropdown-menu)')
1.1780 + var selector = $this.data('target')
1.1781 +
1.1782 + if (!selector) {
1.1783 + selector = $this.attr('href')
1.1784 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1.1785 + }
1.1786 +
1.1787 + if ($this.parent('li').hasClass('active')) return
1.1788 +
1.1789 + var previous = $ul.find('.active:last a')[0]
1.1790 + var e = $.Event('show.bs.tab', {
1.1791 + relatedTarget: previous
1.1792 + })
1.1793 +
1.1794 + $this.trigger(e)
1.1795 +
1.1796 + if (e.isDefaultPrevented()) return
1.1797 +
1.1798 + var $target = $(selector)
1.1799 +
1.1800 + this.activate($this.parent('li'), $ul)
1.1801 + this.activate($target, $target.parent(), function () {
1.1802 + $this.trigger({
1.1803 + type: 'shown.bs.tab'
1.1804 + , relatedTarget: previous
1.1805 + })
1.1806 + })
1.1807 + }
1.1808 +
1.1809 + Tab.prototype.activate = function (element, container, callback) {
1.1810 + var $active = container.find('> .active')
1.1811 + var transition = callback
1.1812 + && $.support.transition
1.1813 + && $active.hasClass('fade')
1.1814 +
1.1815 + function next() {
1.1816 + $active
1.1817 + .removeClass('active')
1.1818 + .find('> .dropdown-menu > .active')
1.1819 + .removeClass('active')
1.1820 +
1.1821 + element.addClass('active')
1.1822 +
1.1823 + if (transition) {
1.1824 + element[0].offsetWidth // reflow for transition
1.1825 + element.addClass('in')
1.1826 + } else {
1.1827 + element.removeClass('fade')
1.1828 + }
1.1829 +
1.1830 + if (element.parent('.dropdown-menu')) {
1.1831 + element.closest('li.dropdown').addClass('active')
1.1832 + }
1.1833 +
1.1834 + callback && callback()
1.1835 + }
1.1836 +
1.1837 + transition ?
1.1838 + $active
1.1839 + .one($.support.transition.end, next)
1.1840 + .emulateTransitionEnd(150) :
1.1841 + next()
1.1842 +
1.1843 + $active.removeClass('in')
1.1844 + }
1.1845 +
1.1846 +
1.1847 + // TAB PLUGIN DEFINITION
1.1848 + // =====================
1.1849 +
1.1850 + var old = $.fn.tab
1.1851 +
1.1852 + $.fn.tab = function ( option ) {
1.1853 + return this.each(function () {
1.1854 + var $this = $(this)
1.1855 + var data = $this.data('bs.tab')
1.1856 +
1.1857 + if (!data) $this.data('bs.tab', (data = new Tab(this)))
1.1858 + if (typeof option == 'string') data[option]()
1.1859 + })
1.1860 + }
1.1861 +
1.1862 + $.fn.tab.Constructor = Tab
1.1863 +
1.1864 +
1.1865 + // TAB NO CONFLICT
1.1866 + // ===============
1.1867 +
1.1868 + $.fn.tab.noConflict = function () {
1.1869 + $.fn.tab = old
1.1870 + return this
1.1871 + }
1.1872 +
1.1873 +
1.1874 + // TAB DATA-API
1.1875 + // ============
1.1876 +
1.1877 + $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
1.1878 + e.preventDefault()
1.1879 + $(this).tab('show')
1.1880 + })
1.1881 +
1.1882 +}(jQuery);
1.1883 +
1.1884 +/* ========================================================================
1.1885 + * Bootstrap: affix.js v3.0.3
1.1886 + * http://getbootstrap.com/javascript/#affix
1.1887 + * ========================================================================
1.1888 + * Copyright 2013 Twitter, Inc.
1.1889 + *
1.1890 + * Licensed under the Apache License, Version 2.0 (the "License");
1.1891 + * you may not use this file except in compliance with the License.
1.1892 + * You may obtain a copy of the License at
1.1893 + *
1.1894 + * http://www.apache.org/licenses/LICENSE-2.0
1.1895 + *
1.1896 + * Unless required by applicable law or agreed to in writing, software
1.1897 + * distributed under the License is distributed on an "AS IS" BASIS,
1.1898 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1.1899 + * See the License for the specific language governing permissions and
1.1900 + * limitations under the License.
1.1901 + * ======================================================================== */
1.1902 +
1.1903 +
1.1904 ++function ($) { "use strict";
1.1905 +
1.1906 + // AFFIX CLASS DEFINITION
1.1907 + // ======================
1.1908 +
1.1909 + var Affix = function (element, options) {
1.1910 + this.options = $.extend({}, Affix.DEFAULTS, options)
1.1911 + this.$window = $(window)
1.1912 + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
1.1913 + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
1.1914 +
1.1915 + this.$element = $(element)
1.1916 + this.affixed =
1.1917 + this.unpin = null
1.1918 +
1.1919 + this.checkPosition()
1.1920 + }
1.1921 +
1.1922 + Affix.RESET = 'affix affix-top affix-bottom'
1.1923 +
1.1924 + Affix.DEFAULTS = {
1.1925 + offset: 0
1.1926 + }
1.1927 +
1.1928 + Affix.prototype.checkPositionWithEventLoop = function () {
1.1929 + setTimeout($.proxy(this.checkPosition, this), 1)
1.1930 + }
1.1931 +
1.1932 + Affix.prototype.checkPosition = function () {
1.1933 + if (!this.$element.is(':visible')) return
1.1934 +
1.1935 + var scrollHeight = $(document).height()
1.1936 + var scrollTop = this.$window.scrollTop()
1.1937 + var position = this.$element.offset()
1.1938 + var offset = this.options.offset
1.1939 + var offsetTop = offset.top
1.1940 + var offsetBottom = offset.bottom
1.1941 +
1.1942 + if (typeof offset != 'object') offsetBottom = offsetTop = offset
1.1943 + if (typeof offsetTop == 'function') offsetTop = offset.top()
1.1944 + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1.1945 +
1.1946 + var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
1.1947 + offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
1.1948 + offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
1.1949 +
1.1950 + if (this.affixed === affix) return
1.1951 + if (this.unpin) this.$element.css('top', '')
1.1952 +
1.1953 + this.affixed = affix
1.1954 + this.unpin = affix == 'bottom' ? position.top - scrollTop : null
1.1955 +
1.1956 + this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
1.1957 +
1.1958 + if (affix == 'bottom') {
1.1959 + this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
1.1960 + }
1.1961 + }
1.1962 +
1.1963 +
1.1964 + // AFFIX PLUGIN DEFINITION
1.1965 + // =======================
1.1966 +
1.1967 + var old = $.fn.affix
1.1968 +
1.1969 + $.fn.affix = function (option) {
1.1970 + return this.each(function () {
1.1971 + var $this = $(this)
1.1972 + var data = $this.data('bs.affix')
1.1973 + var options = typeof option == 'object' && option
1.1974 +
1.1975 + if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
1.1976 + if (typeof option == 'string') data[option]()
1.1977 + })
1.1978 + }
1.1979 +
1.1980 + $.fn.affix.Constructor = Affix
1.1981 +
1.1982 +
1.1983 + // AFFIX NO CONFLICT
1.1984 + // =================
1.1985 +
1.1986 + $.fn.affix.noConflict = function () {
1.1987 + $.fn.affix = old
1.1988 + return this
1.1989 + }
1.1990 +
1.1991 +
1.1992 + // AFFIX DATA-API
1.1993 + // ==============
1.1994 +
1.1995 + $(window).on('load', function () {
1.1996 + $('[data-spy="affix"]').each(function () {
1.1997 + var $spy = $(this)
1.1998 + var data = $spy.data()
1.1999 +
1.2000 + data.offset = data.offset || {}
1.2001 +
1.2002 + if (data.offsetBottom) data.offset.bottom = data.offsetBottom
1.2003 + if (data.offsetTop) data.offset.top = data.offsetTop
1.2004 +
1.2005 + $spy.affix(data)
1.2006 + })
1.2007 + })
1.2008 +
1.2009 +}(jQuery);