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