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