luci2: switch to twitter bootstrap framework
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Nov 2013 15:09:10 +0000 (15:09 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 4 Nov 2013 15:09:10 +0000 (15:09 +0000)
- drop jquery-ui and old bootstrap resources
- rewrite luci2.js cbi rendering
- break down various deeply nested anonymous functions to reduce memory footprint
- add jquery.peity plugin for charting

12 files changed:
luci2/htdocs/luci2.html
luci2/htdocs/luci2/bootstrap.js [new file with mode: 0644]
luci2/htdocs/luci2/bootstrap/cascade.css [deleted file]
luci2/htdocs/luci2/bootstrap/favicon.ico [deleted file]
luci2/htdocs/luci2/bootstrap/html5.js [deleted file]
luci2/htdocs/luci2/bootstrap/mobile.css [deleted file]
luci2/htdocs/luci2/css/bootstrap.css [new file with mode: 0644]
luci2/htdocs/luci2/css/luci2.css [new file with mode: 0644]
luci2/htdocs/luci2/html5.js [new file with mode: 0644]
luci2/htdocs/luci2/jquery-ui-1.10.3.custom.js [deleted file]
luci2/htdocs/luci2/jquery.peity.js [new file with mode: 0644]
luci2/htdocs/luci2/luci2.js

index 089773f..b390ec1 100644 (file)
@@ -3,14 +3,17 @@
     <head>
         <title>LuCI2</title>
 
     <head>
         <title>LuCI2</title>
 
-        <link rel="stylesheet" href="/luci2/bootstrap/cascade.css">
+        <link rel="stylesheet" href="/luci2/css/bootstrap.css">
+        <link rel="stylesheet" href="/luci2/css/luci2.css">
 
 
-        <!--[if lt IE 9]><script src="/luci2/bootstrap/html5.js"></script><![endif]-->
+        <!--[if lt IE 9]><script src="/luci2/html5.js"></script><![endif]-->
 
         <script type="text/javascript" src="/luci2/jquery-1.9.1.js"></script>
 
         <script type="text/javascript" src="/luci2/jquery-1.9.1.js"></script>
-        <script type="text/javascript" src="/luci2/jquery-ui-1.10.3.custom.js"></script>
+        <script type="text/javascript" src="/luci2/jquery.peity.js"></script>
+        <script type="text/javascript" src="/luci2/bootstrap.js"></script>
         <script type="text/javascript" src="/luci2/luci2.js"></script>
 
         <script type="text/javascript" src="/luci2/luci2.js"></script>
 
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
         <script type="text/javascript">
         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
         <script type="text/javascript">
         </script>
     </head>
     <body>
         </script>
     </head>
     <body>
-        <header>
-            <div class="fill">
-                <div class="container">
-                    <a id="hostname" class="brand" href="#">&nbsp;</a>
-                    <div id="mainmenu"></div>
-
-                    <div class="pull-right" id="changes"></div>
-    <!--
-                    <div class="pull-right">
-                        <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
-                            <span class="label success" id="xhr_poll_status_on">Auto Refresh on</span>
-                            <span class="label" id="xhr_poll_status_off" style="display:none">Auto Refresh off</span>
-                        </span>
-                    </div>
-    -->
+        <div class="navbar navbar-inverse navbar-fixed-top" role="banner">
+            <div class="container">
+                <div class="navbar-header">
+                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </button>
+                    <a class="navbar-brand" href="#" id="hostname">&nbsp;</a>
                 </div>
                 </div>
+                <div class="collapse navbar-collapse" id="mainmenu"></div>
             </div>
             </div>
-        </header>
+        </div>
 
         <div id="viewmenu"></div>
 
 
         <div id="viewmenu"></div>
 
diff --git a/luci2/htdocs/luci2/bootstrap.js b/luci2/htdocs/luci2/bootstrap.js
new file mode 100644 (file)
index 0000000..847ab81
--- /dev/null
@@ -0,0 +1,1488 @@
+/* ========================================================================
+ * Bootstrap: alert.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#alerts
+ * ========================================================================
+ * Copyright 2013 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // ALERT CLASS DEFINITION
+  // ======================
+
+  var dismiss = '[data-dismiss="alert"]'
+  var Alert   = function (el) {
+    $(el).on('click', dismiss, this.close)
+  }
+
+  Alert.prototype.close = function (e) {
+    var $this    = $(this)
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    var $parent = $(selector)
+
+    if (e) e.preventDefault()
+
+    if (!$parent.length) {
+      $parent = $this.hasClass('alert') ? $this : $this.parent()
+    }
+
+    $parent.trigger(e = $.Event('close.bs.alert'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      $parent.trigger('closed.bs.alert').remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent
+        .one($.support.transition.end, removeElement)
+        .emulateTransitionEnd(150) :
+      removeElement()
+  }
+
+
+  // ALERT PLUGIN DEFINITION
+  // =======================
+
+  var old = $.fn.alert
+
+  $.fn.alert = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.alert')
+
+      if (!data) $this.data('bs.alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.alert.Constructor = Alert
+
+
+  // ALERT NO CONFLICT
+  // =================
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+  // ALERT DATA-API
+  // ==============
+
+  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#buttons
+ * ========================================================================
+ * Copyright 2013 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // BUTTON PUBLIC CLASS DEFINITION
+  // ==============================
+
+  var Button = function (element, options) {
+    this.$element = $(element)
+    this.options  = $.extend({}, Button.DEFAULTS, options)
+  }
+
+  Button.DEFAULTS = {
+    loadingText: 'loading...'
+  }
+
+  Button.prototype.setState = function (state) {
+    var d    = 'disabled'
+    var $el  = this.$element
+    var val  = $el.is('input') ? 'val' : 'html'
+    var data = $el.data()
+
+    state = state + 'Text'
+
+    if (!data.resetText) $el.data('resetText', $el[val]())
+
+    $el[val](data[state] || this.options[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout(function () {
+      state == 'loadingText' ?
+        $el.addClass(d).attr(d, d) :
+        $el.removeClass(d).removeAttr(d);
+    }, 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+    if ($parent.length) {
+      var $input = this.$element.find('input')
+        .prop('checked', !this.$element.hasClass('active'))
+        .trigger('change')
+      if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
+    }
+
+    this.$element.toggleClass('active')
+  }
+
+
+  // BUTTON PLUGIN DEFINITION
+  // ========================
+
+  var old = $.fn.button
+
+  $.fn.button = function (option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.button')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  $.fn.button.Constructor = Button
+
+
+  // BUTTON NO CONFLICT
+  // ==================
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+  // BUTTON DATA-API
+  // ===============
+
+  $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
+    var $btn = $(e.target)
+    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+    $btn.button('toggle')
+    e.preventDefault()
+  })
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#dropdowns
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // DROPDOWN CLASS DEFINITION
+  // =========================
+
+  var backdrop = '.dropdown-backdrop'
+  var toggle   = '[data-toggle=dropdown]'
+  var Dropdown = function (element) {
+    var $el = $(element).on('click.bs.dropdown', this.toggle)
+  }
+
+  Dropdown.prototype.toggle = function (e) {
+    var $this = $(this)
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    clearMenus()
+
+    if (!isActive) {
+      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+        // if mobile we we use a backdrop because click events don't delegate
+        $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+      }
+
+      $parent.trigger(e = $.Event('show.bs.dropdown'))
+
+      if (e.isDefaultPrevented()) return
+
+      $parent
+        .toggleClass('open')
+        .trigger('shown.bs.dropdown')
+
+      $this.focus()
+    }
+
+    return false
+  }
+
+  Dropdown.prototype.keydown = function (e) {
+    if (!/(38|40|27)/.test(e.keyCode)) return
+
+    var $this = $(this)
+
+    e.preventDefault()
+    e.stopPropagation()
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    if (!isActive || (isActive && e.keyCode == 27)) {
+      if (e.which == 27) $parent.find(toggle).focus()
+      return $this.click()
+    }
+
+    var $items = $('[role=menu] li:not(.divider):visible a', $parent)
+
+    if (!$items.length) return
+
+    var index = $items.index($items.filter(':focus'))
+
+    if (e.keyCode == 38 && index > 0)                 index--                        // up
+    if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+    if (!~index)                                      index=0
+
+    $items.eq(index).focus()
+  }
+
+  function clearMenus() {
+    $(backdrop).remove()
+    $(toggle).each(function (e) {
+      var $parent = getParent($(this))
+      if (!$parent.hasClass('open')) return
+      $parent.trigger(e = $.Event('hide.bs.dropdown'))
+      if (e.isDefaultPrevented()) return
+      $parent.removeClass('open').trigger('hidden.bs.dropdown')
+    })
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    var $parent = selector && $(selector)
+
+    return $parent && $parent.length ? $parent : $this.parent()
+  }
+
+
+  // DROPDOWN PLUGIN DEFINITION
+  // ==========================
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('dropdown')
+
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.dropdown.Constructor = Dropdown
+
+
+  // DROPDOWN NO CONFLICT
+  // ====================
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  // APPLY TO STANDARD DROPDOWN ELEMENTS
+  // ===================================
+
+  $(document)
+    .on('click.bs.dropdown.data-api', clearMenus)
+    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+    .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
+    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#modals
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // MODAL CLASS DEFINITION
+  // ======================
+
+  var Modal = function (element, options) {
+    this.options   = options
+    this.$element  = $(element)
+    this.$backdrop =
+    this.isShown   = null
+
+    if (this.options.remote) this.$element.load(this.options.remote)
+  }
+
+  Modal.DEFAULTS = {
+      backdrop: true
+    , keyboard: true
+    , show: true
+  }
+
+  Modal.prototype.toggle = function (_relatedTarget) {
+    return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
+  }
+
+  Modal.prototype.show = function (_relatedTarget) {
+    var that = this
+    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+    this.$element.trigger(e)
+
+    if (this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = true
+
+    this.escape()
+
+    this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+    this.backdrop(function () {
+      var transition = $.support.transition && that.$element.hasClass('fade')
+
+      if (!that.$element.parent().length) {
+        that.$element.appendTo(document.body) // don't move modals dom position
+      }
+
+      that.$element.show()
+
+      if (transition) {
+        that.$element[0].offsetWidth // force reflow
+      }
+
+      that.$element
+        .addClass('in')
+        .attr('aria-hidden', false)
+
+      that.enforceFocus()
+
+      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+      transition ?
+        that.$element.find('.modal-dialog') // wait for modal to slide in
+          .one($.support.transition.end, function () {
+            that.$element.focus().trigger(e)
+          })
+          .emulateTransitionEnd(300) :
+        that.$element.focus().trigger(e)
+    })
+  }
+
+  Modal.prototype.hide = function (e) {
+    if (e) e.preventDefault()
+
+    e = $.Event('hide.bs.modal')
+
+    this.$element.trigger(e)
+
+    if (!this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = false
+
+    this.escape()
+
+    $(document).off('focusin.bs.modal')
+
+    this.$element
+      .removeClass('in')
+      .attr('aria-hidden', true)
+      .off('click.dismiss.modal')
+
+    $.support.transition && this.$element.hasClass('fade') ?
+      this.$element
+        .one($.support.transition.end, $.proxy(this.hideModal, this))
+        .emulateTransitionEnd(300) :
+      this.hideModal()
+  }
+
+  Modal.prototype.enforceFocus = function () {
+    $(document)
+      .off('focusin.bs.modal') // guard against infinite focus loop
+      .on('focusin.bs.modal', $.proxy(function (e) {
+        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+          this.$element.focus()
+        }
+      }, this))
+  }
+
+  Modal.prototype.escape = function () {
+    if (this.isShown && this.options.keyboard) {
+      this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+        e.which == 27 && this.hide()
+      }, this))
+    } else if (!this.isShown) {
+      this.$element.off('keyup.dismiss.bs.modal')
+    }
+  }
+
+  Modal.prototype.hideModal = function () {
+    var that = this
+    this.$element.hide()
+    this.backdrop(function () {
+      that.removeBackdrop()
+      that.$element.trigger('hidden.bs.modal')
+    })
+  }
+
+  Modal.prototype.removeBackdrop = function () {
+    this.$backdrop && this.$backdrop.remove()
+    this.$backdrop = null
+  }
+
+  Modal.prototype.backdrop = function (callback) {
+    var that    = this
+    var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+    if (this.isShown && this.options.backdrop) {
+      var doAnimate = $.support.transition && animate
+
+      this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+        .appendTo(document.body)
+
+      this.$element.on('click.dismiss.modal', $.proxy(function (e) {
+        if (e.target !== e.currentTarget) return
+        this.options.backdrop == 'static'
+          ? this.$element[0].focus.call(this.$element[0])
+          : this.hide.call(this)
+      }, this))
+
+      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+      this.$backdrop.addClass('in')
+
+      if (!callback) return
+
+      doAnimate ?
+        this.$backdrop
+          .one($.support.transition.end, callback)
+          .emulateTransitionEnd(150) :
+        callback()
+
+    } else if (!this.isShown && this.$backdrop) {
+      this.$backdrop.removeClass('in')
+
+      $.support.transition && this.$element.hasClass('fade')?
+        this.$backdrop
+          .one($.support.transition.end, callback)
+          .emulateTransitionEnd(150) :
+        callback()
+
+    } else if (callback) {
+      callback()
+    }
+  }
+
+
+  // MODAL PLUGIN DEFINITION
+  // =======================
+
+  var old = $.fn.modal
+
+  $.fn.modal = function (option, _relatedTarget) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.modal')
+      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option](_relatedTarget)
+      else if (options.show) data.show(_relatedTarget)
+    })
+  }
+
+  $.fn.modal.Constructor = Modal
+
+
+  // MODAL NO CONFLICT
+  // =================
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+  // MODAL DATA-API
+  // ==============
+
+  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this   = $(this)
+    var href    = $this.attr('href')
+    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+    var option  = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+    e.preventDefault()
+
+    $target
+      .modal(option, this)
+      .one('hide', function () {
+        $this.is(':visible') && $this.focus()
+      })
+  })
+
+  $(document)
+    .on('show.bs.modal',  '.modal', function () { $(document.body).addClass('modal-open') })
+    .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // TOOLTIP PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Tooltip = function (element, options) {
+    this.type       =
+    this.options    =
+    this.enabled    =
+    this.timeout    =
+    this.hoverState =
+    this.$element   = null
+
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.DEFAULTS = {
+    animation: true
+  , placement: 'top'
+  , selector: false
+  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+  , trigger: 'hover focus'
+  , title: ''
+  , delay: 0
+  , html: false
+  , container: false
+  }
+
+  Tooltip.prototype.init = function (type, element, options) {
+    this.enabled  = true
+    this.type     = type
+    this.$element = $(element)
+    this.options  = this.getOptions(options)
+
+    var triggers = this.options.trigger.split(' ')
+
+    for (var i = triggers.length; i--;) {
+      var trigger = triggers[i]
+
+      if (trigger == 'click') {
+        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+      } else if (trigger != 'manual') {
+        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'
+        var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+
+        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+      }
+    }
+
+    this.options.selector ?
+      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+      this.fixTitle()
+  }
+
+  Tooltip.prototype.getDefaults = function () {
+    return Tooltip.DEFAULTS
+  }
+
+  Tooltip.prototype.getOptions = function (options) {
+    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+    if (options.delay && typeof options.delay == 'number') {
+      options.delay = {
+        show: options.delay
+      , hide: options.delay
+      }
+    }
+
+    return options
+  }
+
+  Tooltip.prototype.getDelegateOptions = function () {
+    var options  = {}
+    var defaults = this.getDefaults()
+
+    this._options && $.each(this._options, function (key, value) {
+      if (defaults[key] != value) options[key] = value
+    })
+
+    return options
+  }
+
+  Tooltip.prototype.enter = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'in'
+
+    if (!self.options.delay || !self.options.delay.show) return self.show()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'in') self.show()
+    }, self.options.delay.show)
+  }
+
+  Tooltip.prototype.leave = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'out'
+
+    if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'out') self.hide()
+    }, self.options.delay.hide)
+  }
+
+  Tooltip.prototype.show = function () {
+    var e = $.Event('show.bs.'+ this.type)
+
+    if (this.hasContent() && this.enabled) {
+      this.$element.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      var $tip = this.tip()
+
+      this.setContent()
+
+      if (this.options.animation) $tip.addClass('fade')
+
+      var placement = typeof this.options.placement == 'function' ?
+        this.options.placement.call(this, $tip[0], this.$element[0]) :
+        this.options.placement
+
+      var autoToken = /\s?auto?\s?/i
+      var autoPlace = autoToken.test(placement)
+      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+      $tip
+        .detach()
+        .css({ top: 0, left: 0, display: 'block' })
+        .addClass(placement)
+
+      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+      var pos          = this.getPosition()
+      var actualWidth  = $tip[0].offsetWidth
+      var actualHeight = $tip[0].offsetHeight
+
+      if (autoPlace) {
+        var $parent = this.$element.parent()
+
+        var orgPlacement = placement
+        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
+        var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()
+        var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
+        var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left
+
+        placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :
+                    placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :
+                    placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :
+                    placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :
+                    placement
+
+        $tip
+          .removeClass(orgPlacement)
+          .addClass(placement)
+      }
+
+      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+      this.applyPlacement(calculatedOffset, placement)
+      this.$element.trigger('shown.bs.' + this.type)
+    }
+  }
+
+  Tooltip.prototype.applyPlacement = function(offset, placement) {
+    var replace
+    var $tip   = this.tip()
+    var width  = $tip[0].offsetWidth
+    var height = $tip[0].offsetHeight
+
+    // manually read margins because getBoundingClientRect includes difference
+    var marginTop = parseInt($tip.css('margin-top'), 10)
+    var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+    // we must check for NaN for ie 8/9
+    if (isNaN(marginTop))  marginTop  = 0
+    if (isNaN(marginLeft)) marginLeft = 0
+
+    offset.top  = offset.top  + marginTop
+    offset.left = offset.left + marginLeft
+
+    $tip
+      .offset(offset)
+      .addClass('in')
+
+    // check to see if placing tip in new offset caused the tip to resize itself
+    var actualWidth  = $tip[0].offsetWidth
+    var actualHeight = $tip[0].offsetHeight
+
+    if (placement == 'top' && actualHeight != height) {
+      replace = true
+      offset.top = offset.top + height - actualHeight
+    }
+
+    if (/bottom|top/.test(placement)) {
+      var delta = 0
+
+      if (offset.left < 0) {
+        delta       = offset.left * -2
+        offset.left = 0
+
+        $tip.offset(offset)
+
+        actualWidth  = $tip[0].offsetWidth
+        actualHeight = $tip[0].offsetHeight
+      }
+
+      this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+    } else {
+      this.replaceArrow(actualHeight - height, actualHeight, 'top')
+    }
+
+    if (replace) $tip.offset(offset)
+  }
+
+  Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
+    this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+  }
+
+  Tooltip.prototype.setContent = function () {
+    var $tip  = this.tip()
+    var title = this.getTitle()
+
+    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+    $tip.removeClass('fade in top bottom left right')
+  }
+
+  Tooltip.prototype.hide = function () {
+    var that = this
+    var $tip = this.tip()
+    var e    = $.Event('hide.bs.' + this.type)
+
+    function complete() {
+      if (that.hoverState != 'in') $tip.detach()
+    }
+
+    this.$element.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    $tip.removeClass('in')
+
+    $.support.transition && this.$tip.hasClass('fade') ?
+      $tip
+        .one($.support.transition.end, complete)
+        .emulateTransitionEnd(150) :
+      complete()
+
+    this.$element.trigger('hidden.bs.' + this.type)
+
+    return this
+  }
+
+  Tooltip.prototype.fixTitle = function () {
+    var $e = this.$element
+    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+    }
+  }
+
+  Tooltip.prototype.hasContent = function () {
+    return this.getTitle()
+  }
+
+  Tooltip.prototype.getPosition = function () {
+    var el = this.$element[0]
+    return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+      width: el.offsetWidth
+    , height: el.offsetHeight
+    }, this.$element.offset())
+  }
+
+  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
+           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
+           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
+  }
+
+  Tooltip.prototype.getTitle = function () {
+    var title
+    var $e = this.$element
+    var o  = this.options
+
+    title = $e.attr('data-original-title')
+      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+    return title
+  }
+
+  Tooltip.prototype.tip = function () {
+    return this.$tip = this.$tip || $(this.options.template)
+  }
+
+  Tooltip.prototype.arrow = function () {
+    return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
+  }
+
+  Tooltip.prototype.validate = function () {
+    if (!this.$element[0].parentNode) {
+      this.hide()
+      this.$element = null
+      this.options  = null
+    }
+  }
+
+  Tooltip.prototype.enable = function () {
+    this.enabled = true
+  }
+
+  Tooltip.prototype.disable = function () {
+    this.enabled = false
+  }
+
+  Tooltip.prototype.toggleEnabled = function () {
+    this.enabled = !this.enabled
+  }
+
+  Tooltip.prototype.toggle = function (e) {
+    var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
+    self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+  }
+
+  Tooltip.prototype.destroy = function () {
+    this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
+  }
+
+
+  // TOOLTIP PLUGIN DEFINITION
+  // =========================
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip = function (option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.tooltip')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tooltip.Constructor = Tooltip
+
+
+  // TOOLTIP NO CONFLICT
+  // ===================
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#popovers
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // POPOVER PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+  Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
+    placement: 'right'
+  , trigger: 'click'
+  , content: ''
+  , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+  // NOTE: POPOVER EXTENDS tooltip.js
+  // ================================
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+  Popover.prototype.constructor = Popover
+
+  Popover.prototype.getDefaults = function () {
+    return Popover.DEFAULTS
+  }
+
+  Popover.prototype.setContent = function () {
+    var $tip    = this.tip()
+    var title   = this.getTitle()
+    var content = this.getContent()
+
+    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+    $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+
+    $tip.removeClass('fade top bottom left right in')
+
+    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+    // this manually by checking the contents.
+    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+  }
+
+  Popover.prototype.hasContent = function () {
+    return this.getTitle() || this.getContent()
+  }
+
+  Popover.prototype.getContent = function () {
+    var $e = this.$element
+    var o  = this.options
+
+    return $e.attr('data-content')
+      || (typeof o.content == 'function' ?
+            o.content.call($e[0]) :
+            o.content)
+  }
+
+  Popover.prototype.arrow = function () {
+    return this.$arrow = this.$arrow || this.tip().find('.arrow')
+  }
+
+  Popover.prototype.tip = function () {
+    if (!this.$tip) this.$tip = $(this.options.template)
+    return this.$tip
+  }
+
+
+  // POPOVER PLUGIN DEFINITION
+  // =========================
+
+  var old = $.fn.popover
+
+  $.fn.popover = function (option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.popover')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.popover.Constructor = Popover
+
+
+  // POPOVER NO CONFLICT
+  // ===================
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#tabs
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // TAB CLASS DEFINITION
+  // ====================
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype.show = function () {
+    var $this    = this.element
+    var $ul      = $this.closest('ul:not(.dropdown-menu)')
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    if ($this.parent('li').hasClass('active')) return
+
+    var previous = $ul.find('.active:last a')[0]
+    var e        = $.Event('show.bs.tab', {
+      relatedTarget: previous
+    })
+
+    $this.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    var $target = $(selector)
+
+    this.activate($this.parent('li'), $ul)
+    this.activate($target, $target.parent(), function () {
+      $this.trigger({
+        type: 'shown.bs.tab'
+      , relatedTarget: previous
+      })
+    })
+  }
+
+  Tab.prototype.activate = function (element, container, callback) {
+    var $active    = container.find('> .active')
+    var transition = callback
+      && $.support.transition
+      && $active.hasClass('fade')
+
+    function next() {
+      $active
+        .removeClass('active')
+        .find('> .dropdown-menu > .active')
+        .removeClass('active')
+
+      element.addClass('active')
+
+      if (transition) {
+        element[0].offsetWidth // reflow for transition
+        element.addClass('in')
+      } else {
+        element.removeClass('fade')
+      }
+
+      if (element.parent('.dropdown-menu')) {
+        element.closest('li.dropdown').addClass('active')
+      }
+
+      callback && callback()
+    }
+
+    transition ?
+      $active
+        .one($.support.transition.end, next)
+        .emulateTransitionEnd(150) :
+      next()
+
+    $active.removeClass('in')
+  }
+
+
+  // TAB PLUGIN DEFINITION
+  // =====================
+
+  var old = $.fn.tab
+
+  $.fn.tab = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.tab')
+
+      if (!data) $this.data('bs.tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+  // TAB NO CONFLICT
+  // ===============
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+  // TAB DATA-API
+  // ============
+
+  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    $(this).tab('show')
+  })
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#collapse
+ * ========================================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // COLLAPSE PUBLIC CLASS DEFINITION
+  // ================================
+
+  var Collapse = function (element, options) {
+    this.$element      = $(element)
+    this.options       = $.extend({}, Collapse.DEFAULTS, options)
+    this.transitioning = null
+
+    if (this.options.parent) this.$parent = $(this.options.parent)
+    if (this.options.toggle) this.toggle()
+  }
+
+  Collapse.DEFAULTS = {
+    toggle: true
+  }
+
+  Collapse.prototype.dimension = function () {
+    var hasWidth = this.$element.hasClass('width')
+    return hasWidth ? 'width' : 'height'
+  }
+
+  Collapse.prototype.show = function () {
+    if (this.transitioning || this.$element.hasClass('in')) return
+
+    var startEvent = $.Event('show.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    var actives = this.$parent && this.$parent.find('> .panel > .in')
+
+    if (actives && actives.length) {
+      var hasData = actives.data('bs.collapse')
+      if (hasData && hasData.transitioning) return
+      actives.collapse('hide')
+      hasData || actives.data('bs.collapse', null)
+    }
+
+    var dimension = this.dimension()
+
+    this.$element
+      .removeClass('collapse')
+      .addClass('collapsing')
+      [dimension](0)
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.$element
+        .removeClass('collapsing')
+        .addClass('in')
+        [dimension]('auto')
+      this.transitioning = 0
+      this.$element.trigger('shown.bs.collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+    this.$element
+      .one($.support.transition.end, $.proxy(complete, this))
+      .emulateTransitionEnd(350)
+      [dimension](this.$element[0][scrollSize])
+  }
+
+  Collapse.prototype.hide = function () {
+    if (this.transitioning || !this.$element.hasClass('in')) return
+
+    var startEvent = $.Event('hide.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    var dimension = this.dimension()
+
+    this.$element
+      [dimension](this.$element[dimension]())
+      [0].offsetHeight
+
+    this.$element
+      .addClass('collapsing')
+      .removeClass('collapse')
+      .removeClass('in')
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.transitioning = 0
+      this.$element
+        .trigger('hidden.bs.collapse')
+        .removeClass('collapsing')
+        .addClass('collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    this.$element
+      [dimension](0)
+      .one($.support.transition.end, $.proxy(complete, this))
+      .emulateTransitionEnd(350)
+  }
+
+  Collapse.prototype.toggle = function () {
+    this[this.$element.hasClass('in') ? 'hide' : 'show']()
+  }
+
+
+  // COLLAPSE PLUGIN DEFINITION
+  // ==========================
+
+  var old = $.fn.collapse
+
+  $.fn.collapse = function (option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.collapse')
+      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.collapse.Constructor = Collapse
+
+
+  // COLLAPSE NO CONFLICT
+  // ====================
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+  // COLLAPSE DATA-API
+  // =================
+
+  $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
+    var $this   = $(this), href
+    var target  = $this.attr('data-target')
+        || e.preventDefault()
+        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+    var $target = $(target)
+    var data    = $target.data('bs.collapse')
+    var option  = data ? 'toggle' : $this.data()
+    var parent  = $this.attr('data-parent')
+    var $parent = parent && $(parent)
+
+    if (!data || !data.transitioning) {
+      if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
+      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+    }
+
+    $target.collapse(option)
+  })
+
+}(window.jQuery);
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.0.0
+ * http://twbs.github.com/bootstrap/javascript.html#transitions
+ * ========================================================================
+ * Copyright 2013 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================================== */
+
+
++function ($) { "use strict";
+
+  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+  // ============================================================
+
+  function transitionEnd() {
+    var el = document.createElement('bootstrap')
+
+    var transEndEventNames = {
+      'WebkitTransition' : 'webkitTransitionEnd'
+    , 'MozTransition'    : 'transitionend'
+    , 'OTransition'      : 'oTransitionEnd otransitionend'
+    , 'transition'       : 'transitionend'
+    }
+
+    for (var name in transEndEventNames) {
+      if (el.style[name] !== undefined) {
+        return { end: transEndEventNames[name] }
+      }
+    }
+  }
+
+  // http://blog.alexmaccaw.com/css-transitions
+  $.fn.emulateTransitionEnd = function (duration) {
+    var called = false, $el = this
+    $(this).one($.support.transition.end, function () { called = true })
+    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+    setTimeout(callback, duration)
+    return this
+  }
+
+  $(function () {
+    $.support.transition = transitionEnd()
+  })
+
+}(window.jQuery);
diff --git a/luci2/htdocs/luci2/bootstrap/cascade.css b/luci2/htdocs/luci2/bootstrap/cascade.css
deleted file mode 100644 (file)
index 24b0bf4..0000000
+++ /dev/null
@@ -1,2247 +0,0 @@
-/*!
- * LuCI Bootstrap Theme
- * Copyright 2012 Nut & Bolt
- * By David Menting <david@nut-bolt.nl>
- * Based on Bootstrap v1.4.0
- *
- * Copyright 2011 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-/* Reset.less
- * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here      that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
-html {
-       margin: 0;
-       padding: 0;
-}
-
-body {
-       margin: 0;
-       padding: 5px;
-}
-
-h1, h2, h3, h4, h5, h6, p, pre, a, abbr, acronym, code, del, em, img, q, s,
-small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset,
-form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td {
-       margin: 0;
-       padding: 0;
-       border: 0;
-       font-weight: normal;
-       font-style: normal;
-       font-size: 100%;
-       line-height: 1;
-       font-family: inherit;
-}
-
-abbr[title], acronym[title] {
-       border-bottom: 1px dotted;
-       cursor: help;
-}
-
-table {
-       border-collapse: collapse;
-       border-spacing: 0;
-}
-
-ol, ul {
-       list-style: none;
-}
-
-q:before,
-q:after,
-blockquote:before,
-blockquote:after {
-       content: "";
-}
-
-html {
-       overflow-y: scroll;
-       font-size: 100%;
-       -webkit-text-size-adjust: 100%;
-       -ms-text-size-adjust: 100%;
-}
-
-a:focus {
-       outline: thin dotted;
-}
-
-a:hover, a:active {
-       outline: 0;
-}
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-nav,
-section {
-       display: block;
-}
-
-sub, sup {
-       font-size: 75%;
-       line-height: 0;
-       position: relative;
-       vertical-align: baseline;
-}
-
-sup {
-       top: -0.5em;
-}
-
-sub {
-       bottom: -0.25em;
-}
-
-img {
-       border: 0;
-       -ms-interpolation-mode: bicubic;
-}
-
-button,
-input,
-select,
-option,
-textarea {
-       font-size: 100%;
-       margin: 0;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-       box-sizing: border-box;
-       vertical-align: baseline;
-       *vertical-align: middle;
-}
-
-button, input {
-       line-height: normal;
-       *overflow: visible;
-}
-
-button::-moz-focus-inner, input::-moz-focus-inner {
-       border: 0;
-       padding: 0;
-}
-
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-       cursor: pointer;
-       -webkit-appearance: button;
-}
-
-input[type="search"] {
-       -webkit-appearance: textfield;
-       -webkit-box-sizing: content-box;
-       -moz-box-sizing: content-box;
-       box-sizing: content-box;
-}
-
-input[type="search"]::-webkit-search-decoration {
-       -webkit-appearance: none;
-}
-
-textarea {
-       overflow: auto;
-       vertical-align: top;
-}
-
-/*
- * Scaffolding
- * Basic and global styles for generating a grid system, structural layout, and page templates
- * ------------------------------------------------------------------------------------------- */
-body {
-       background-color: #ffffff;
-       margin: 0;
-       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-       font-size: 13px;
-       font-weight: normal;
-       line-height: 18px;
-       color: #404040;
-       padding-top: 58px;
-}
-
-.container {
-       width: 100%;
-       max-width: 940px;
-       margin-left: auto;
-       margin-right: auto;
-       zoom: 1;
-}
-
-.container:before, .container:after {
-       display: table;
-       content: "";
-       zoom: 1;
-}
-
-.container:after {
-       clear: both;
-}
-
-a {
-       color: #0069d6;
-       text-decoration: none;
-       line-height: inherit;
-       font-weight: inherit;
-}
-
-a:hover {
-       color: #00438a;
-       text-decoration: underline;
-}
-
-.pull-right {
-       float: right;
-}
-
-.pull-left {
-       float: left;
-}
-
-/* Typography.less
- * Headings, body text, lists, code, and more for a versatile and durable typography system
- * ---------------------------------------------------------------------------------------- */
-p,
-.cbi-map-descr,
-.cbi-section-descr {
-       font-size: 13px;
-       font-weight: normal;
-       line-height: 18px;
-       margin-bottom: 9px;
-}
-
-p small {
-       font-size: 11px;
-       color: #bfbfbf;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-       font-weight: bold;
-       color: #404040;
-}
-
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
-       color: #bfbfbf;
-}
-
-h1 {
-       margin-bottom: 18px;
-       font-size: 30px;
-       line-height: 36px;
-}
-
-h1 small {
-       font-size: 18px;
-}
-
-h2 {
-       font-size: 24px;
-       line-height: 36px;
-       color: #0069D6;
-}
-
-h2 small {
-       font-size: 14px;
-}
-
-h3,
-h4,
-h5,
-h6 {
-       line-height: 36px;
-}
-
-h3 {
-       font-size: 18px;
-}
-
-h3 small {
-       font-size: 14px;
-}
-
-h4 {
-       font-size: 16px;
-}
-
-h4 small {
-       font-size: 12px;
-}
-
-h5 {
-       font-size: 14px;
-}
-
-h6 {
-       font-size: 13px;
-       color: #bfbfbf;
-       text-transform: uppercase;
-}
-
-ul, ol {
-       margin: 0 0 18px 25px;
-}
-
-ul ul,
-ul ol,
-ol ol,
-ol ul {
-       margin-bottom: 0;
-}
-
-ul {
-       list-style: disc;
-}
-
-ol {
-       list-style: decimal;
-}
-
-li {
-       line-height: 18px;
-       color: #808080;
-}
-
-ul.unstyled {
-       list-style: none;
-       margin-left: 0;
-}
-
-dl {
-       margin-bottom: 18px;
-}
-
-dl dt, dl dd {
-       line-height: 18px;
-}
-
-dl dt {
-       font-weight: bold;
-}
-
-dl dd {
-       margin-left: 9px;
-}
-
-hr {
-       margin: 20px 0 19px;
-       border: 0;
-       border-bottom: 1px solid #eee;
-}
-
-strong {
-       font-style: inherit;
-       font-weight: bold;
-}
-
-em {
-       font-style: italic;
-       font-weight: inherit;
-}
-
-small { font-size: 0.9em }
-
-address {
-       display: block;
-       line-height: 18px;
-       margin-bottom: 18px;
-}
-
-code, pre {
-       padding: 0 3px 2px;
-       font-family: Monaco, Andale Mono, Courier New, monospace;
-       font-size: 12px;
-       -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-       border-radius: 3px;
-}
-
-code {
-       background-color: #fee9cc;
-       color: rgba(0, 0, 0, 0.75);
-       padding: 1px 3px;
-}
-
-pre {
-       background-color: #f5f5f5;
-       display: block;
-       padding: 8.5px;
-       margin: 0 0 18px;
-       line-height: 18px;
-       font-size: 12px;
-       border: 1px solid #ccc;
-       border: 1px solid rgba(0, 0, 0, 0.15);
-       -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-       border-radius: 3px;
-       white-space: pre;
-       white-space: pre-wrap;
-       word-wrap: break-word;
-}
-
-/* Forms.less
- * Base styles for various input types, form layouts, and states
- * ------------------------------------------------------------- */
-form {
-       margin-bottom: 18px;
-}
-
-fieldset {
-       padding-top: 9px;
-}
-
-fieldset legend {
-       display: inline-block;
-       position: relative;
-       font-size: 19.5px;
-       line-height: 1;
-       color: #404040;
-       margin-top: 10px;
-       padding-right: 30px;
-       *padding: 0 0 5px 0px;
-       /* IE6-7 */
-
-       *line-height: 1.5;
-       /* IE6-7 */
-
-}
-
-form .clearfix,
-form .cbi-value,
-.cbi-form .cbi-value {
-       margin-bottom: 18px;
-       zoom: 1;
-       overflow: hidden;
-}
-
-form .clearfix:before, form .clearfix:after,
-form .cbi-value:before, form .cbi-value:after,
-.cbi-form .cbi-value:before, form .cbi-value:after {
-       display: table;
-       content: "";
-       zoom: 1;
-}
-
-form .clearfix:after,
-form .cbi-value:after,
-.cbi-form .cbi-value:after {
-       clear: both;
-}
-
-label,
-input,
-select,
-textarea {
-       font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-       font-size: 13px;
-       font-weight: normal;
-       line-height: normal;
-}
-
-form .input,
-form .cbi-value-field,
-.cbi-form .cbi-value-field {
-       margin-left: 20px;
-       width: 250px;
-       float: left;
-}
-
-/* XXX: compatibility */
-form table .cbi-value-field {
-       float: none;
-}
-
-form .cbi-value label.cbi-value-title,
-.cbi-form .cbi-value label.cbi-value-title {
-       padding-top: 6px;
-       font-size: 13px;
-       line-height: 18px;
-       float: left;
-       width: 180px;
-       text-align: right;
-       color: #404040;
-}
-
-form .cbi-value div.cbi-value-dummy,
-.cbi-form .cbi-value div.cbi-value-dummy {
-       padding-top: 6px;
-       line-height: 18px;
-}
-
-form .cbi-value .cbi-value-description,
-.cbi-form .cbi-value .cbi-value-description {
-       padding: 6px 0 0 20px;
-       font-size: 13px;
-       line-height: 18px;
-       margin-left: 20px;
-       float: left;
-       background-image: url("../icons/cbi/help.gif");
-       background-repeat: no-repeat;
-       background-position: 0 7px;
-       width: 300px;
-}
-
-form .cbi-value .cbi-value-description img {
-       vertical-align: middle;
-}
-
-form .cbi-section-table .cbi-value,
-form .cbi-section-table .cbi-value .cbi-value-field,
-form .cbi-section-table .cbi-value .cbi-value-error {
-       margin: 0;
-}
-
-form .cbi-section-table .cbi-value .cbi-value-field,
-form .cbi-section-table .cbi-value .cbi-value-field > input[type="text"],
-form .cbi-section-table .cbi-value .cbi-value-field > select {
-       width: 100%;
-}
-
-form .cbi-section-table .cbi-value .cbi-value-error {
-       width: 100%;
-       max-width: none;
-       -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-    box-sizing: border-box;
-       margin-top: 1px;
-       font-size: 12px;
-       line-height: 14px;
-       font-weight: normal;
-       text-align: left;
-}
-
-form .cbi-section-table .cbi-section-table-sort {
-       padding: 2px;
-       width: 16px;
-       line-height: 0;
-       cursor: move;
-}
-
-form .cbi-section-table .cbi-section-table-sort img {
-       width: 16px;
-       display: inline;
-}
-
-form .cbi-section-table .cbi-section-table-placeholder {
-       padding: 1em;
-       font-style: italic;
-       text-align: center !important;
-}
-
-form .cbi-section-table .cbi-value .cbi-value-title,
-form .cbi-section-table .cbi-value .cbi-value-description {
-       display: none;
-}
-
-form .cbi-value .cbi-value-error,
-.cbi-form .cbi-value .cbi-value-error {
-       background-color: #b94a48;
-       border-radius: 3px;
-       color: #ffffff;
-       float: left;
-       font-size: 13px;
-       line-height: 18px;
-       font-weight: bold;
-       margin-left: 20px;
-       max-width: 300px;
-       padding: 4px 6px;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       display: none;
-}
-
-form .cbi-section-add .cbi-value-error,
-form .cbi-value.error .cbi-value-error,
-.cbi-form .cbi-value.error .cbi-value-error {
-       display: block;
-}
-
-form .cbi-section-add .cbi-value-error {
-       float: none;
-       display: inline;
-       padding: 6px;
-       vertical-align: middle;
-}
-
-input[type=checkbox], input[type=radio] {
-       cursor: pointer;
-}
-
-input,
-textarea,
-select,
-.uneditable-input {
-       display: inline-block;
-       width: 210px;
-       height: 30px;
-       padding: 4px;
-       font-size: 13px;
-       line-height: 18px;
-       color: #808080;
-       border: 1px solid #ccc;
-       -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-       border-radius: 3px;
-}
-
-input.error,
-textarea.error,
-select.error {
-       color: #b94a48;
-       border-color: #b94a48;
-}
-
-select {
-       padding: initial;
-}
-
-input[type=checkbox], input[type=radio] {
-       width: auto;
-       height: auto;
-       padding: 0;
-       margin: 3px 0;
-       *margin-top: 0;
-       /* IE6-7 */
-
-       line-height: normal;
-       border: none;
-}
-
-input[type=file] {
-       background-color: #ffffff;
-       padding: initial;
-       border: initial;
-       line-height: initial;
-       -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-       box-shadow: none;
-       width: auto !important;
-}
-
-input[type=button], input[type=reset], input[type=submit] {
-       width: auto;
-       height: auto;
-}
-
-select, input[type=file] {
-       *height: auto;
-       *margin-top: 4px;
-       /* For IE7, add top margin to align select with labels */
-}
-
-select[multiple] {
-       height: inherit;
-       background-color: #ffffff;
-}
-
-textarea {
-       height: auto;
-}
-
-.uneditable-input {
-       background-color: #ffffff;
-       display: block;
-       border-color: #eee;
-       -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-       -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-       box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-       cursor: not-allowed;
-}
-
-::-moz-placeholder {
-       color: #bfbfbf;
-}
-
-::-webkit-input-placeholder {
-       color: #bfbfbf;
-}
-
-input, textarea {
-       -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-       -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
-       -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
-       -o-transition: border linear 0.2s, box-shadow linear 0.2s;
-       transition: border linear 0.2s, box-shadow linear 0.2s;
-       -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
-       -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
-       box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
-}
-
-input:focus, textarea:focus {
-       outline: 0;
-       border-color: rgba(82, 168, 236, 0.8);
-       -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
-       -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
-       box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
-}
-
-input[type=file]:focus, input[type=checkbox]:focus, select:focus {
-       -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-       box-shadow: none;
-       outline: 1px dotted #666;
-}
-
-form .clearfix.error > label, form .clearfix.error .help-block, form .clearfix.error .help-inline {
-       color: #b94a48;
-}
-
-form .clearfix.error input, form .clearfix.error textarea {
-       color: #b94a48;
-       border-color: #ee5f5b;
-}
-
-form .clearfix.error input:focus, form .clearfix.error textarea:focus {
-       border-color: #e9322d;
-       -webkit-box-shadow: 0 0 6px #f8b9b7;
-       -moz-box-shadow: 0 0 6px #f8b9b7;
-       box-shadow: 0 0 6px #f8b9b7;
-}
-
-form .clearfix.error .input-prepend .add-on, form .clearfix.error .input-append .add-on {
-       color: #b94a48;
-       background-color: #fce6e6;
-       border-color: #b94a48;
-}
-
-form .clearfix.warning > label, form .clearfix.warning .help-block, form .clearfix.warning .help-inline {
-       color: #c09853;
-}
-
-form .clearfix.warning input, form .clearfix.warning textarea {
-       color: #c09853;
-       border-color: #ccae64;
-}
-
-form .clearfix.warning input:focus, form .clearfix.warning textarea:focus {
-       border-color: #be9a3f;
-       -webkit-box-shadow: 0 0 6px #e5d6b1;
-       -moz-box-shadow: 0 0 6px #e5d6b1;
-       box-shadow: 0 0 6px #e5d6b1;
-}
-
-form .clearfix.warning .input-prepend .add-on, form .clearfix.warning .input-append .add-on {
-       color: #c09853;
-       background-color: #d2b877;
-       border-color: #c09853;
-}
-
-form .clearfix.success > label, form .clearfix.success .help-block, form .clearfix.success .help-inline {
-       color: #468847;
-}
-
-form .clearfix.success input, form .clearfix.success textarea {
-       color: #468847;
-       border-color: #57a957;
-}
-
-form .clearfix.success input:focus, form .clearfix.success textarea:focus {
-       border-color: #458845;
-       -webkit-box-shadow: 0 0 6px #9acc9a;
-       -moz-box-shadow: 0 0 6px #9acc9a;
-       box-shadow: 0 0 6px #9acc9a;
-}
-
-form .clearfix.success .input-prepend .add-on, form .clearfix.success .input-append .add-on {
-       color: #468847;
-       background-color: #bcddbc;
-       border-color: #468847;
-}
-
-input[disabled],
-select[disabled],
-button[disabled],
-textarea[disabled],
-input[readonly],
-select[readonly],
-textarea[readonly] {
-       background-color: #f5f5f5;
-       border-color: #ddd;
-}
-
-.actions,
-.cbi-page-actions {
-       background: #f5f5f5;
-       margin-bottom: 18px;
-       padding: 4px 4px 5px 150px;
-       border-top: 1px solid #ddd;
-       -webkit-border-radius: 0 0 3px 3px;
-       -moz-border-radius: 0 0 3px 3px;
-       border-radius: 0 0 3px 3px;
-       text-align: right;
-       margin-top: 9px;
-}
-
-.actions .secondary-action,
-.cbi-page-actions .secondary-action{
-       float: right;
-}
-
-.actions .secondary-action a,
-.cbi-page-actions .secondary-action a {
-       line-height: 30px;
-}
-
-.actions .secondary-action a:hover,
-.cbi-page-actions .secondary-action a:hover {
-       text-decoration: underline;
-}
-
-.help-inline, .help-block {
-       font-size: 13px;
-       line-height: 18px;
-       color: #bfbfbf;
-}
-
-.help-inline {
-       padding-left: 5px;
-       *position: relative;
-       /* IE6-7 */
-
-       *top: -5px;
-       /* IE6-7 */
-
-}
-
-.help-block {
-       display: block;
-       max-width: 600px;
-}
-
-/*
- * Tables.less
- * Tables for, you guessed it, tabular data
- * ---------------------------------------- */
-table {
-       width: 100%;
-       margin-bottom: 18px;
-       padding: 0;
-       font-size: 13px;
-       border-collapse: collapse;
-}
-
-table th, table td {
-       padding: 4px 4px 3px;
-       line-height: 18px;
-       text-align: left;
-}
-
-table th {
-       font-weight: bold;
-       vertical-align: middle;
-}
-
-table td {
-       vertical-align: top;
-       border-top: 1px solid #ddd;
-}
-
-table tbody th {
-       border-top: 1px solid #ddd;
-       vertical-align: top;
-}
-
-/* Patterns.less
- * Repeatable UI elements outside the base styles provided from the scaffolding
- * ---------------------------------------------------------------------------- */
-header {
-       height: 40px;
-       position: fixed;
-       top: 0;
-       left: 0;
-       right: 0;
-       z-index: 10000;
-       overflow: visible;
-       color: #BFBFBF;
-}
-
-header a {
-       color: #bfbfbf;
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-
-header h3 a:hover, header .brand:hover, header ul .active > a {
-       background-color: #333;
-       background-color: rgba(255, 255, 255, 0.05);
-       color: #ffffff;
-       text-decoration: none;
-}
-
-header h3 {
-       position: relative;
-}
-
-header h3 a, header .brand {
-       float: left;
-       display: block;
-       padding: 8px 20px 12px;
-       margin-left: -20px;
-       color: #ffffff;
-       font-size: 20px;
-       font-weight: 200;
-       line-height: 1;
-}
-
-header p {
-       margin: 0;
-       line-height: 40px;
-}
-
-header .fill {
-       background-color: #222;
-       background-color: #222222;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
-       background-image: -moz-linear-gradient(top, #333333, #222222);
-       background-image: -ms-linear-gradient(top, #333333, #222222);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
-       background-image: -webkit-linear-gradient(top, #333333, #222222);
-       background-image: -o-linear-gradient(top, #333333, #222222);
-       background-image: linear-gradient(top, #333333, #222222);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
-       -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-       -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-       box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-       padding: 0 5px;
-}
-
-header div > ul, .nav {
-       display: block;
-       float: left;
-       margin: 0 10px 0 0;
-       position: relative;
-       left: 0;
-}
-
-header div > ul > li, .nav > li {
-       display: block;
-       float: left;
-}
-
-header div > ul a, .nav a {
-       display: block;
-       float: none;
-       padding: 10px 10px 11px;
-       line-height: 19px;
-       text-decoration: none;
-}
-
-header div > ul a:hover, .nav a:hover {
-       color: #ffffff;
-       text-decoration: none;
-}
-
-header div > ul .active > a, .nav .active > a {
-       background-color: #222;
-       background-color: rgba(0, 0, 0, 0.5);
-}
-
-header div > ul.secondary-nav, .nav.secondary-nav {
-       float: right;
-       margin-left: 10px;
-       margin-right: 0;
-}
-
-header div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-header div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
-       right: 0;
-       border: 0;
-}
-
-header div > ul a.menu:hover,
-.nav a.menu:hover,
-header div > ul li.open .menu,
-.nav li.open .menu,
-header div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-header div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
-       background: #444;
-       background: rgba(255, 255, 255, 0.05);
-}
-
-header div > ul .menu-dropdown,
-.nav .menu-dropdown,
-header div > ul .dropdown-menu,
-.nav .dropdown-menu {
-       background-color: #333;
-}
-
-header div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-header div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-header div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-header div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
-       color: #ffffff;
-}
-
-header div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-header div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-header div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-header div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
-       background: #444;
-       background: rgba(255, 255, 255, 0.05);
-}
-
-header div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-header div > ul .dropdown-menu li a,
-.nav .dropdown-menu li a {
-       color: #999;
-       text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
-}
-
-header div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-header div > ul .dropdown-menu li a:hover,
-.nav .dropdown-menu li a:hover {
-       background-color: #191919;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
-       background-image: -moz-linear-gradient(top, #292929, #191919);
-       background-image: -ms-linear-gradient(top, #292929, #191919);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));
-       background-image: -webkit-linear-gradient(top, #292929, #191919);
-       background-image: -o-linear-gradient(top, #292929, #191919);
-       background-image: linear-gradient(top, #292929, #191919);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);
-       color: #ffffff;
-}
-
-header div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-header div > ul .dropdown-menu .active a,
-.nav .dropdown-menu .active a {
-       color: #ffffff;
-}
-
-header div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-header div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
-       background-color: #222;
-       border-color: #444;
-}
-
-header ul .menu-dropdown li a, header ul .dropdown-menu li a {
-       padding: 4px 15px;
-}
-
-li.menu, .dropdown {
-       position: relative;
-}
-
-a.menu:after, .dropdown-toggle:after {
-       width: 0;
-       height: 0;
-       display: inline-block;
-       content: "&darr;";
-       text-indent: -99999px;
-       vertical-align: top;
-       margin-top: 8px;
-       margin-left: 4px;
-       border-left: 4px solid transparent;
-       border-right: 4px solid transparent;
-       border-top: 4px solid #ffffff;
-       filter: alpha(opacity=50);
-       -khtml-opacity: 0.5;
-       -moz-opacity: 0.5;
-       opacity: 0.5;
-}
-
-.menu-dropdown, .dropdown-menu {
-       background-color: #ffffff;
-       float: left;
-       display: none;
-       position: absolute;
-       top: 40px;
-       z-index: 900;
-       min-width: 160px;
-       max-width: 220px;
-       _width: 160px;
-       margin-left: 0;
-       margin-right: 0;
-       padding: 6px 0;
-       zoom: 1;
-       border-color: #999;
-       border-color: rgba(0, 0, 0, 0.2);
-       border-style: solid;
-       border-width: 0 1px 1px;
-       -webkit-border-radius: 0 0 6px 6px;
-       -moz-border-radius: 0 0 6px 6px;
-       border-radius: 0 0 6px 6px;
-       -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-       -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-       box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-       -webkit-background-clip: padding-box;
-       -moz-background-clip: padding-box;
-       background-clip: padding-box;
-}
-
-.menu-dropdown li, .dropdown-menu li {
-       float: none;
-       display: block;
-       background-color: none;
-}
-
-.menu-dropdown .divider, .dropdown-menu .divider {
-       height: 1px;
-       margin: 5px 0;
-       overflow: hidden;
-       background-color: #eee;
-       border-bottom: 1px solid #ffffff;
-}
-
-header .dropdown-menu a, .dropdown-menu a {
-       display: block;
-       padding: 4px 15px;
-       clear: both;
-       font-weight: normal;
-       line-height: 18px;
-       color: #808080;
-       text-shadow: 0 1px 0 #ffffff;
-}
-
-header .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-header .dropdown-menu a.hover,
-.dropdown-menu a.hover {
-       background-color: #dddddd;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));
-       background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
-       background-image: -ms-linear-gradient(top, #eeeeee, #dddddd);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));
-       background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
-       background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
-       background-image: linear-gradient(top, #eeeeee, #dddddd);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
-       color: #404040;
-       text-decoration: none;
-       -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-       -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-       box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-}
-
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
-       color: #ffffff;
-       background: #ccc;
-       background: rgba(0, 0, 0, 0.3);
-}
-
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
-       display: block;
-}
-
-.dropdown:hover ul.dropdown-menu {
-       display: block;
-}
-
-.dropdown-menu .dropdown-menu {
-         position: absolute;
-         left: 159px;
-}
-
-.dropdown-menu li {
-         position: relative;
-}
-
-.cbi-modal-loader,
-.cbi-modal-dialog {
-       position: absolute;
-       left: 0;
-       top: 0;
-       z-index: 10000;
-       background-color: rgba(0, 0, 0, 0.5);
-}
-
-.cbi-modal-loader > div {
-       display: inline-block;
-       position: absolute;
-       top: 50%;
-       left: 50%;
-       color: #000000;
-       font-weight: bold;
-       line-height: 38px;
-       width: 300px;
-       height: 38px;
-       margin-left: -150px;
-       border-radius: 10px;
-       padding: 10px;
-       text-align: center;
-       background: #ffffff 10px center no-repeat url(../icons/loading.gif);
-}
-
-.cbi-modal-dialog > div {
-       display: inline-block;
-       position: absolute;
-       top: 50%;
-       left: 50%;
-       color: #000000;
-       width: 450px;
-       margin-left: -225px;
-       border-radius: 10px;
-       padding: 10px;
-       background-color: #ffffff
-}
-
-.cbi-modal-dialog > div > div.cbi-modal-dialog-header {
-       font-weight: bold;
-       margin-bottom: 10px;
-}
-
-.cbi-modal-dialog > div > div.cbi-modal-dialog-body {
-       overflow: auto;
-       padding: 0 2px;
-}
-
-.cbi-modal-dialog > div > div.cbi-modal-dialog-footer {
-       margin-top: 10px;
-       text-align: right;
-}
-
-.cbi-modal-dialog > div > div.cbi-modal-dialog-footer > button {
-       margin-left: 5px;
-}
-
-.tabs, .cbi-tabmenu {
-       margin: 0 0 18px;
-       padding: 0;
-       list-style: none;
-       zoom: 1;
-}
-
-.tabs:before,
-.cbi-tabmenu:before,
-.tabs:after,
-.cbi-tabmenu:after {
-       display: table;
-       content: "";
-       zoom: 1;
-}
-
-.tabs:after, .cbi-tabmenu:after {
-       clear: both;
-}
-
-.tabs > li, .cbi-tabmenu > li {
-       float: left;
-}
-
-.tabs > li > a, .cbi-tabmenu > li > a {
-       display: block;
-}
-
-.tabs,
-.cbi-tabmenu {
-       border-color: #ddd;
-       border-style: solid;
-       border-width: 0 0 1px;
-}
-
-.tabs > li,
-.cbi-tabmenu > li {
-       position: relative;
-       margin-bottom: -1px;
-}
-
-.tabs > li > a,
-.cbi-tabmenu > li > a {
-       padding: 0 15px;
-       margin-right: 12px;
-       line-height: 34px;
-       border: 1px solid transparent;
-       -webkit-border-radius: 4px 4px 0 0;
-       -moz-border-radius: 4px 4px 0 0;
-       border-radius: 4px 4px 0 0;
-}
-
-.cbi-tabmenu > li > span.badge,
-.cbi-section legend > span.badge {
-       position: absolute;
-       top: -5px;
-       right: 7px;
-       border-radius: 9px;
-       padding: 0 6px;
-       color: #ffffff;
-       background-color: #cccccc;
-       cursor: pointer;
-       font-size: 13px;
-       line-height: 18px;
-}
-
-.tabs > li > a:hover,
-.cbi-tabmenu > li > a:hover {
-       text-decoration: none;
-       background-color: #eee;
-       border-color: #eee #eee #ddd;
-}
-
-.tabs .active > a, .tabs .active > a:hover,
-.cbi-tabmenu .active > a, .cbi-tabmenu .active > a:hover,
-.cbi-tabmenu .ui-state-active > a, .cbi-tabmenu .ui-state-active > a:hover,
-.cbi-tab > a:link, .cbi-tab > a:hover {
-       color: #808080;
-       background-color: #ffffff;
-       border: 1px solid #ddd;
-       border-bottom-color: transparent;
-       cursor: default;
-}
-
-.cbi-tabmenu > .ui-state-active > span.badge,
-.cbi-section .ui-accordion-header-active legend > span.badge {
-       background-color: #b94a48;
-}
-
-.tabs .menu-dropdown, .tabs .dropdown-menu,
-.cbi-tabmenu .menu-dropdown, .cbi-tabmenu .dropdown-menu {
-       top: 35px;
-       border-width: 1px;
-       -webkit-border-radius: 0 6px 6px 6px;
-       -moz-border-radius: 0 6px 6px 6px;
-       border-radius: 0 6px 6px 6px;
-}
-
-.tabs a.menu:after, .tabs .dropdown-toggle:after,
-.cbi-tabmenu a.menu:after, .cbi-tabmenu .dropdown-toggle:after {
-       border-top-color: #999;
-       margin-top: 15px;
-       margin-left: 5px;
-}
-
-.tabs li.open.menu .menu, .tabs .open.dropdown .dropdown-toggle,
-.cbi-tabmenu li.open.menu .menu, .cbi-tabmenu .open.dropdown .dropdown-toggle {
-       border-color: #999;
-}
-
-.tabs li.open a.menu:after, .tabs .dropdown.open .dropdown-toggle:after,
-.cbi-tabmenu li.open a.menu:after, .cbi-tabmenu .dropdown.open .dropdown-toggle:after {
-       border-top-color: #555;
-}
-
-.tab-content > .tab-pane,
-.tab-content > div {
-       display: none;
-}
-
-.tab-content > .active {
-       display: block;
-}
-
-.ui-accordion-header {
-       border-radius: 4px;
-       background-color: #F5F5F5;
-       border: 1px solid #E3E3E3;
-       box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
-       cursor: pointer;
-       outline: 0;
-       padding-left: 10px;
-}
-
-.ui-accordion-content {
-       padding: 0 0 1px 10px;
-}
-
-.ui-accordion-header.ui-state-active {
-       border: inherit;
-       box-shadow: inherit;
-       background-color: inherit;
-       cursor: default;
-}
-
-.cbi-section-add {
-       vertical-align: middle;
-       padding-top: 9px;
-       margin-bottom: 2em;
-}
-
-.cbi-section-add input.cbi-input-text {
-       vertical-align: middle;
-       border-radius: 4px 0 0 4px;
-       border-right: none;
-       width: 150px;
-}
-
-.cbi-section-add img {
-       vertical-align: middle;
-       padding: 6px;
-       border-radius: 0 4px 4px 0;
-}
-
-.cbi-section-head {
-       position: relative;
-       padding-bottom: 10px;
-}
-
-.cbi-section-head .cbi-section-teaser {
-       padding: 10px 0 5px 0;
-       max-width: 920px;
-       overflow: hidden;
-       text-overflow: ellipsis;
-       white-space: nowrap;
-       color: #aaa;
-       text-shadow: 1px 1px 1px #fff;
-}
-
-.cbi-section-head.ui-state-active .cbi-section-teaser {
-       display: none;
-}
-
-.cbi-section-remove {
-       position: absolute;
-       right: 5px;
-       top: 5px;
-}
-
-.breadcrumb {
-       padding: 7px 14px;
-       margin: 0 0 18px;
-       background-color: #f5f5f5;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
-       background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
-       background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
-       background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
-       background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
-       background-image: linear-gradient(top, #ffffff, #f5f5f5);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
-       border: 1px solid #ddd;
-       -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-       border-radius: 3px;
-       -webkit-box-shadow: inset 0 1px 0 #ffffff;
-       -moz-box-shadow: inset 0 1px 0 #ffffff;
-       box-shadow: inset 0 1px 0 #ffffff;
-}
-
-.breadcrumb li {
-       display: inline;
-       text-shadow: 0 1px 0 #ffffff;
-}
-
-.breadcrumb .divider {
-       padding: 0 5px;
-       color: #bfbfbf;
-}
-
-.breadcrumb .active a {
-       color: #404040;
-}
-
-footer {
-       margin-top: 17px;
-       padding-top: 17px;
-       border-top: 1px solid #eee;
-}
-
-.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
-       color: #ffffff;
-}
-
-.btn .close, .alert-message .close {
-       font-family: Arial, sans-serif;
-       line-height: 18px;
-}
-
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
-       background-color: #c43c35;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
-       background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
-       background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
-       background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
-       background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
-       background-image: linear-gradient(top, #ee5f5b, #c43c35);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: #c43c35 #c43c35 #882a25;
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.btn.success, .alert-message.success {
-       background-color: #57a957;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
-       background-image: -moz-linear-gradient(top, #62c462, #57a957);
-       background-image: -ms-linear-gradient(top, #62c462, #57a957);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
-       background-image: -webkit-linear-gradient(top, #62c462, #57a957);
-       background-image: -o-linear-gradient(top, #62c462, #57a957);
-       background-image: linear-gradient(top, #62c462, #57a957);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: #57a957 #57a957 #3d773d;
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.btn.info, .alert-message.info {
-       background-color: #339bb9;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
-       background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
-       background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
-       background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
-       background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
-       background-image: linear-gradient(top, #5bc0de, #339bb9);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: #339bb9 #339bb9 #22697d;
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.btn,
-.cbi-button {
-       cursor: pointer;
-       display: inline-block;
-       background-color: #e6e6e6;
-       background-repeat: no-repeat;
-       background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-       padding: 5px 14px 6px;
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-       color: #333;
-       font-size: 13px;
-       line-height: normal;
-       border: 1px solid #ccc;
-       border-bottom-color: #bbb;
-       -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-       border-radius: 4px;
-       -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       white-space: nowrap;
-}
-
-.cbi-button[disabled] {
-       color: #aaa;
-       text-shadow: 1px 1px 1px #fff;
-       filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-       filter: alpha(opacity=65);
-       -khtml-opacity: 0.65;
-       -moz-opacity: 0.65;
-       opacity: 0.65;
-       cursor: default;
-}
-
-.btn:hover,
-.cbi-button:hover {
-       color: #333;
-       text-decoration: none;
-}
-
-.btn:focus,
-.cbi-button:focus {
-       outline: 1px dotted #666;
-}
-
-.btn.primary,
-.cbi-page-actions .cbi-button-apply,
-.cbi-page-actions .cbi-button-save,
-.cbi-page-actions .cbi-button-reset {
-       color: #ffffff;
-       padding: 5px 14px 6px;
-       background-color: #0064cd;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
-       background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
-       background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
-       background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
-       background-image: -o-linear-gradient(top, #049cdb, #0064cd);
-       background-image: linear-gradient(top, #049cdb, #0064cd);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: #0064cd #0064cd #003f81;
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.cbi-input-invalid {
-       color: #FF0000;
-       border-color: #FF0000;
-}
-
-.cbi-button-up,
-.cbi-input-up {
-       background-position: center center;
-       background-image: url('../icons/cbi/up.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/up.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/up.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/up.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/up.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/up.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-down,
-.cbi-input-down {
-       background-position: center center;
-       background-image: url('../icons/cbi/down.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/down.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/down.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/down.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/down.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/down.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-find,
-.cbi-input-find {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/find.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/find.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/find.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/find.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/find.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/find.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-add,
-.cbi-input-add {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/add.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/add.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/add.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/add.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/add.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/add.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-apply,
-.cbi-input-apply {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/apply.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/apply.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/apply.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/apply.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/apply.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/apply.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-reset,
-.cbi-input-reset {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/reset.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/reset.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reset.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reset.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reset.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reset.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-edit,
-.cbi-input-edit {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/edit.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/edit.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/edit.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/edit.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/edit.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/edit.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-remove,
-.cbi-input-remove {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/remove.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/remove.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/remove.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/remove.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/remove.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/remove.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-reload,
-.cbi-input-reload {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/reload.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/reload.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reload.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reload.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reload.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/reload.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-link,
-.cbi-input-link {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/link.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/link.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/link.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/link.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/link.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/link.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-button-download,
-.cbi-input-download {
-       background-position: 6px center, left top;
-       padding-left: 28px;
-       background-image: url('../icons/cbi/download.gif'), -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: url('../icons/cbi/download.gif'), -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/download.gif'), -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/download.gif'), -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/download.gif'), -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: url('../icons/cbi/download.gif'), linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-}
-
-.cbi-input-networks {
-       list-style: none;
-       margin: 0;
-}
-
-.cbi-input-networks > li {
-       padding: 1px;
-}
-
-.cbi-input-networks > li > label > input {
-       margin-top: 0 !important;
-       vertical-align: middle;
-}
-
-.cbi-input-dynlist select,
-.cbi-input-dynlist input,
-.cbi-input-password input {
-       vertical-align: middle;
-       margin-bottom: 1px;
-}
-
-.cbi-input-dynlist img,
-.cbi-input-password img {
-       vertical-align: middle;
-       padding: 6px;
-       margin: 0 0 1px 1px;
-}
-
-.cbi-splitbutton {
-       vertical-align: middle;
-       white-space: nowrap;
-       display: inline-block;
-}
-
-.cbi-splitbutton input:first-child {
-       vertical-align: middle;
-       border-right-width: 0;
-       border-radius: 3px 0 0 3px;
-}
-
-.cbi-splitbutton input:last-child,
-.cbi-splitbutton button:last-child,
-.cbi-splitbutton .cbi-button:last-child {
-       vertical-align: middle;
-       border-radius: 0 3px 3px 0;
-       border-right-width: 1px;
-}
-
-.cbi-splitbutton img.cbi-button {
-       padding: 6px;
-}
-
-.btn.active, .btn:active {
-       -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-       -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-       box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.btn.disabled {
-       cursor: default;
-       background-image: none;
-       filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-       filter: alpha(opacity=65);
-       -khtml-opacity: 0.65;
-       -moz-opacity: 0.65;
-       opacity: 0.65;
-       -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-       box-shadow: none;
-}
-
-.btn[disabled] {
-       cursor: default;
-       background-image: none;
-       filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-       filter: alpha(opacity=65);
-       -khtml-opacity: 0.65;
-       -moz-opacity: 0.65;
-       opacity: 0.65;
-       -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-       box-shadow: none;
-}
-
-.btn.large {
-       font-size: 15px;
-       line-height: normal;
-       padding: 9px 14px 9px;
-       -webkit-border-radius: 6px;
-       -moz-border-radius: 6px;
-       border-radius: 6px;
-}
-
-.btn.small {
-       padding: 7px 9px 7px;
-       font-size: 11px;
-}
-
-/* Button icons for specific pages */
-.Startup .cbi-section-table input.cbi-input-apply,
-.Startup .cbi-section-table input.cbi-button-apply {
-         background-image: url("../icons/cbi/apply.gif");
-         background-position: 7px 4px;
-         padding: 3px 9px 3px 27px;
-}
-
-.Processes .cbi-section-table input.cbi-input-reload,
-.Startup .cbi-section-table input.cbi-input-reload {
-         background-image: url("../icons/cbi/reload.gif");
-         background-position: 7px 4px;
-         padding: 3px 9px 3px 27px;
-}
-
-.Processes .cbi-section-table input.cbi-input-remove,
-.Processes .cbi-section-table div.cbi-section-remove input,
-.Startup .cbi-section-table input.cbi-input-remove,
-.Startup .cbi-section-table div.cbi-section-remove input  {
-         background-image: url("../icons/cbi/remove.gif");
-         background-position: 7px 4px;
-         padding: 3px 9px 3px 27px;
-}
-
-.Processes .cbi-section-table input.cbi-input-reset,
-.Processes .cbi-section-table input.cbi-button-reset,
-.Startup .cbi-section-table input.cbi-input-reset,
-.Startup .cbi-section-table input.cbi-button-reset  {
-         background-image: url("../icons/cbi/reset.gif");
-         background-position: 7px 4px;
-         padding: 3px 9px 3px 27px;
-}
-
-.Startup .cbi-section-table input.cbi-input-save,
-.Startup .cbi-section-table input.cbi-button-save {
-         background-image: url("../icons/cbi/save.gif");
-         background-position: 7px 4px;
-         padding: 3px 9px 3px 27px;
-}
-
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
-       padding: 0;
-       border: 0;
-}
-
-.close {
-       float: right;
-       color: #000000;
-       font-size: 20px;
-       font-weight: bold;
-       line-height: 13.5px;
-       text-shadow: 0 1px 0 #ffffff;
-       filter: alpha(opacity=25);
-       -khtml-opacity: 0.25;
-       -moz-opacity: 0.25;
-       opacity: 0.25;
-}
-
-.close:hover {
-       color: #000000;
-       text-decoration: none;
-       filter: alpha(opacity=40);
-       -khtml-opacity: 0.4;
-       -moz-opacity: 0.4;
-       opacity: 0.4;
-}
-
-.alert-message {
-       position: relative;
-       padding: 7px 15px;
-       margin-bottom: 18px;
-       color: #404040;
-       background-color: #eedc94;
-       background-repeat: repeat-x;
-       background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
-       background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
-       background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
-       background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
-       background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
-       background-image: -o-linear-gradient(top, #fceec1, #eedc94);
-       background-image: linear-gradient(top, #fceec1, #eedc94);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
-       text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-       border-color: #eedc94 #eedc94 #e4c652;
-       border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-       text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-       border-width: 1px;
-       border-style: solid;
-       -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-       border-radius: 4px;
-       -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
-       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
-}
-
-.alert-message .close {
-       margin-top: 1px;
-       *margin-top: 0;
-}
-
-.alert-message a {
-       font-weight: bold;
-       color: #404040;
-}
-
-.alert-message.danger p a,
-.alert-message.error p a,
-.alert-message.success p a,
-.alert-message.info p a {
-       color: #ffffff;
-}
-
-.alert-message h5 {
-       line-height: 18px;
-}
-
-.alert-message p {
-       margin-bottom: 0;
-}
-
-.alert-message div {
-       margin-top: 5px;
-       margin-bottom: 2px;
-       line-height: 28px;
-}
-
-.alert-message .btn {
-       -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
-       -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
-       box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
-}
-
-.label {
-       padding: 1px 3px 2px;
-       font-size: 9.75px;
-       font-weight: bold;
-       color: #ffffff !important;
-       text-transform: uppercase;
-       white-space: nowrap;
-       background-color: #bfbfbf;
-       -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-       border-radius: 3px;
-       text-shadow: none;
-}
-
-a.label:link,
-a.label:visited {
-       color: #ffffff;
-}
-
-a.label:hover {
-       text-decoration: none;
-}
-
-.label.important {
-       background-color: #c43c35;
-}
-
-.label.warning {
-       background-color: #f89406;
-}
-
-.label.success {
-       background-color: #46a546;
-}
-
-.label.notice {
-       background-color: #62cffc;
-}
-
-/* LuCI specific items */
-.hidden { display: none }
-
-#memtotal > div,
-#memfree > div,
-#memcache > div,
-#membuff > div,
-#conns > div  {
-         border: 1px solid #CCCCCC;
-         border-radius: 3px 3px 3px 3px;
-         color: #808080;
-         display: inline-block;
-         font-size: 13px;
-         height: 22 dpx;
-         line-height: 18px;
-}
-
-#xhr_poll_status {
-         cursor: pointer;
-}
-
-form.inline { display: inline }
-
-header .pull-right { padding-top: 8px; }
-
-#modemenu li:last-child span.divider { display: none }
-
-#syslog {  width: 100%; }
-
-.cbi-section-table tbody tr:nth-child(odd) td, .cbi-section-table tbody tr:nth-child(odd) th {
-       background-color: #f9f9f9;
-}
-
-.cbi-section-table tbody tr:hover td, .cbi-section-table tbody tr:hover th  {
-       background-color: #f5f5f5;
-}
-
-.cbi-section-table tr.cbi-section-table-descr th {
-       font-weight: normal;
-}
-
-.left { text-align: left !important; }
-
-.right { text-align: right !important; }
-
-.cbi-value-field { line-height: 1.5em; }
-
-.cbi-value-field input[type=checkbox],
-.cbi-value-field input[type=radio] {
-       margin-top: 8px;
-       margin-right: 6px;
-}
-
-table table td,
-.cbi-value-field table td {
-       border: none;
-}
-
-table.cbi-section-table input,
-table.cbi-section-table textarea,
-table.cbi-section-table select {
-       width: auto;
-}
-
-table.cbi-section-table td.cbi-section-table-cell {
-       white-space: nowrap;
-}
-
-table.cbi-section-table td.cbi-section-table-cell select {
-       width: inherit;
-}
-
-.ifacebox {
-       background-color: #FFFFFF;
-       border: 1px solid #CCCCCC;
-       margin: 0 10px;
-       text-align: center;
-       white-space: nowrap;
-       background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-       -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-       border-radius: 4px;
-       -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.ifacebox .ifacebox-head {
-       border-bottom: 1px solid #CCCCCC;
-       padding: 2px;
-}
-
-.ifacebox .ifacebox-body {
-       padding: 6px;
-}
-
-.ifacebadge {
-       display: inline-block;
-       white-space: nowrap;
-       background-color: #FFFFFF;
-       border: 1px solid #CCCCCC;
-       padding: 2px;
-       margin-left: 2px;
-       background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
-       background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-       -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-       border-radius: 4px;
-       -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-       box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-
-.ifacebadge > img {
-       width: 16px;
-       height: 16px;
-       vertical-align: middle;
-}
-
-.ifacebadge-active {
-       border-color: #000000;
-       font-weight: bold;
-}
-
-.zonebadge {
-       padding: 2px;
-       border-radius: 4px;
-       display: inline-block;
-       white-space: nowrap;
-       color: #666666;
-       text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-       cursor: pointer;
-}
-
-.zonebadge > em,
-.zonebadge > strong {
-       margin: 5px;
-       display: inline-block;
-}
-
-.zonebadge input {
-       width: 6em;
-       height: 1em;
-}
-
-.zonebadge-empty {
-       border: 1px dashed #AAAAAA;
-       color: #AAAAAA;
-       font-style: italic;
-       font-size: smaller;
-}
-
-.progressbar {
-       position: relative;
-       width: 200px;
-       border: 1px solid #999999;
-       border-radius: 3px;
-}
-
-.progressbar > div {
-       background-color: #CCCCCC;
-       background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#CCCCCC), color-stop(25%, #CCCCCC), to(#E6E6E6));
-       background-image: -webkit-linear-gradient(#CCCCCC, #CCCCCC 25%, #E6E6E6);
-       background-image: -moz-linear-gradient(top, #CCCCCC, #CCCCCC 25%, #E6E6E6);
-       background-image: -ms-linear-gradient(#CCCCCC, #CCCCCC 25%, #E6E6E6);
-       background-image: -o-linear-gradient(#CCCCCC, #CCCCCC 25%, #E6E6E6);
-       background-image: linear-gradient(#CCCCCC, #CCCCCC 25%, #E6E6E6);
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CCCCCC', endColorstr='#E6E6E6', GradientType=0);
-       height: 15px;
-}
-
-.progressbar.intermediate > div {
-       background-image: url("../icons/progress.gif");
-       filter: alpha(opacity=25);
-       -khtml-opacity: 0.25;
-       -moz-opacity: 0.25;
-       opacity: 0.25;
-}
-
-.progressbar > div > div {
-       line-height: 15px;
-       font-size: smaller;
-       color: #000000;
-       text-shadow: 1px 1px 0 #FFFFFF;
-       text-align: center;
-       position: absolute;
-       width: 200px;
-       left: 0;
-       top: 0;
-}
-
-.progressbar.intermediate > div > div {
-       display: none;
-}
-
-div.cbi-value var,
-td.cbi-value-field var {
-       font-style: italic;
-       color: #0069D6;
-}
-
-pre.uci-changes {
-       margin: 3px 0;
-}
-
-pre.uci-changes ins {
-       text-decoration: none;
-       color: #008000;
-}
-
-pre.uci-changes del {
-       text-decoration: none;
-       color: #800000;
-}
diff --git a/luci2/htdocs/luci2/bootstrap/favicon.ico b/luci2/htdocs/luci2/bootstrap/favicon.ico
deleted file mode 100644 (file)
index 77a138b..0000000
Binary files a/luci2/htdocs/luci2/bootstrap/favicon.ico and /dev/null differ
diff --git a/luci2/htdocs/luci2/bootstrap/html5.js b/luci2/htdocs/luci2/bootstrap/html5.js
deleted file mode 100644 (file)
index 1ec510f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
-// Uncompressed source: https://github.com/aFarkas/html5shiv
-(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
\ No newline at end of file
diff --git a/luci2/htdocs/luci2/bootstrap/mobile.css b/luci2/htdocs/luci2/bootstrap/mobile.css
deleted file mode 100644 (file)
index e9d9b61..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-header h3 a, header .brand {
-       display:none !important;
-}
diff --git a/luci2/htdocs/luci2/css/bootstrap.css b/luci2/htdocs/luci2/css/bootstrap.css
new file mode 100644 (file)
index 0000000..d3a6623
--- /dev/null
@@ -0,0 +1,5061 @@
+/*!
+ * Bootstrap v3.0.0
+ *
+ * Copyright 2013 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+video {
+  display: inline-block;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+[hidden] {
+  display: none;
+}
+html {
+  font-family: sans-serif;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+}
+body {
+  margin: 0;
+}
+a:focus {
+  outline: thin dotted;
+}
+a:active,
+a:hover {
+  outline: 0;
+}
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+b,
+strong {
+  font-weight: bold;
+}
+dfn {
+  font-style: italic;
+}
+hr {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  height: 0;
+}
+mark {
+  background: #ff0;
+  color: #000;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, serif;
+  font-size: 1em;
+}
+pre {
+  white-space: pre-wrap;
+}
+q {
+  quotes: "\201C" "\201D" "\2018" "\2019";
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+sup {
+  top: -0.5em;
+}
+sub {
+  bottom: -0.25em;
+}
+img {
+  border: 0;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+figure {
+  margin: 0;
+}
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+legend {
+  border: 0;
+  padding: 0;
+}
+button,
+input,
+select,
+textarea {
+  font-family: inherit;
+  font-size: 100%;
+  margin: 0;
+}
+button,
+input {
+  line-height: normal;
+}
+button,
+select {
+  text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+input[type="checkbox"],
+input[type="radio"] {
+  box-sizing: border-box;
+  padding: 0;
+}
+input[type="search"] {
+  -webkit-appearance: textfield;
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+textarea {
+  overflow: auto;
+  vertical-align: top;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+*,
+*:before,
+*:after {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+html {
+  font-size: 62.5%;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 1.428571429;
+  color: #333333;
+  background-color: #ffffff;
+}
+input,
+button,
+select,
+textarea {
+  font-family: inherit;
+  font-size: inherit;
+  line-height: inherit;
+}
+button,
+input,
+select[multiple],
+textarea {
+  background-image: none;
+}
+a {
+  color: #428bca;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #2a6496;
+  text-decoration: underline;
+}
+a:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+img {
+  vertical-align: middle;
+}
+.img-responsive {
+  display: block;
+  max-width: 100%;
+  height: auto;
+}
+.img-rounded {
+  border-radius: 6px;
+}
+.img-thumbnail {
+  padding: 4px;
+  line-height: 1.428571429;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 4px;
+  -webkit-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+  display: inline-block;
+  max-width: 100%;
+  height: auto;
+}
+.img-circle {
+  border-radius: 50%;
+}
+hr {
+  margin-top: 20px;
+  margin-bottom: 20px;
+  border: 0;
+  border-top: 1px solid #eeeeee;
+}
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  margin: -1px;
+  padding: 0;
+  overflow: hidden;
+  clip: rect(0 0 0 0);
+  border: 0;
+}
+@media print {
+  * {
+    text-shadow: none !important;
+    color: #000 !important;
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  .ir a:after,
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  @page  {
+    margin: 2cm .5cm;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+  .navbar {
+    display: none;
+  }
+  .table td,
+  .table th {
+    background-color: #fff !important;
+  }
+  .btn > .caret,
+  .dropup > .btn > .caret {
+    border-top-color: #000 !important;
+  }
+  .label {
+    border: 1px solid #000;
+  }
+  .table {
+    border-collapse: collapse !important;
+  }
+  .table-bordered th,
+  .table-bordered td {
+    border: 1px solid #ddd !important;
+  }
+}
+p {
+  margin: 0 0 10px;
+}
+.lead {
+  margin-bottom: 20px;
+  font-size: 16.099999999999998px;
+  font-weight: 200;
+  line-height: 1.4;
+}
+@media (min-width: 768px) {
+  .lead {
+    font-size: 21px;
+  }
+}
+small {
+  font-size: 85%;
+}
+cite {
+  font-style: normal;
+}
+.text-muted {
+  color: #999999;
+}
+.text-primary {
+  color: #428bca;
+}
+.text-warning {
+  color: #c09853;
+}
+.text-danger {
+  color: #b94a48;
+}
+.text-success {
+  color: #468847;
+}
+.text-info {
+  color: #3a87ad;
+}
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-weight: 500;
+  line-height: 1.1;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999999;
+}
+h1,
+h2,
+h3 {
+  margin-top: 20px;
+  margin-bottom: 10px;
+}
+h4,
+h5,
+h6 {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+h1,
+.h1 {
+  font-size: 36px;
+}
+h2,
+.h2 {
+  font-size: 30px;
+}
+h3,
+.h3 {
+  font-size: 24px;
+}
+h4,
+.h4 {
+  font-size: 18px;
+}
+h5,
+.h5 {
+  font-size: 14px;
+}
+h6,
+.h6 {
+  font-size: 12px;
+}
+h1 small,
+.h1 small {
+  font-size: 24px;
+}
+h2 small,
+.h2 small {
+  font-size: 18px;
+}
+h3 small,
+.h3 small,
+h4 small,
+.h4 small {
+  font-size: 14px;
+}
+.page-header {
+  padding-bottom: 9px;
+  margin: 40px 0 20px;
+  border-bottom: 1px solid #eeeeee;
+}
+ul,
+ol {
+  margin-top: 0;
+  margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+  margin-bottom: 0;
+}
+.list-unstyled {
+  padding-left: 0;
+  list-style: none;
+}
+.list-inline {
+  padding-left: 0;
+  list-style: none;
+}
+.list-inline > li {
+  display: inline-block;
+  padding-left: 5px;
+  padding-right: 5px;
+}
+dl {
+  margin-bottom: 20px;
+}
+dt,
+dd {
+  line-height: 1.428571429;
+}
+dt {
+  font-weight: bold;
+}
+dd {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .dl-horizontal dt {
+    float: left;
+    width: 160px;
+    clear: left;
+    text-align: right;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .dl-horizontal dd {
+    margin-left: 180px;
+  }
+  .dl-horizontal dd:before,
+  .dl-horizontal dd:after {
+    content: " ";
+    /* 1 */
+  
+    display: table;
+    /* 2 */
+  
+  }
+  .dl-horizontal dd:after {
+    clear: both;
+  }
+  .dl-horizontal dd:before,
+  .dl-horizontal dd:after {
+    content: " ";
+    /* 1 */
+  
+    display: table;
+    /* 2 */
+  
+  }
+  .dl-horizontal dd:after {
+    clear: both;
+  }
+}
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999999;
+}
+abbr.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+blockquote {
+  padding: 10px 20px;
+  margin: 0 0 20px;
+  border-left: 5px solid #eeeeee;
+}
+blockquote p {
+  font-size: 17.5px;
+  font-weight: 300;
+  line-height: 1.25;
+}
+blockquote p:last-child {
+  margin-bottom: 0;
+}
+blockquote small {
+  display: block;
+  line-height: 1.428571429;
+  color: #999999;
+}
+blockquote small:before {
+  content: '\2014 \00A0';
+}
+blockquote.pull-right {
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eeeeee;
+  border-left: 0;
+}
+blockquote.pull-right p,
+blockquote.pull-right small {
+  text-align: right;
+}
+blockquote.pull-right small:before {
+  content: '';
+}
+blockquote.pull-right small:after {
+  content: '\00A0 \2014';
+}
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+address {
+  display: block;
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 1.428571429;
+}
+code,
+pre {
+  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+}
+code {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #c7254e;
+  background-color: #f9f2f4;
+  white-space: nowrap;
+  border-radius: 4px;
+}
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 1.428571429;
+  word-break: break-all;
+  word-wrap: break-word;
+  color: #333333;
+  background-color: #f5f5f5;
+  border: 1px solid #cccccc;
+  border-radius: 4px;
+}
+pre.prettyprint {
+  margin-bottom: 20px;
+}
+pre code {
+  padding: 0;
+  font-size: inherit;
+  color: inherit;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.container:before,
+.container:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.container:after {
+  clear: both;
+}
+.container:before,
+.container:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.container:after {
+  clear: both;
+}
+.row {
+  margin-left: -15px;
+  margin-right: -15px;
+}
+.row:before,
+.row:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.row:after {
+  clear: both;
+}
+.row:before,
+.row:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.row:after {
+  clear: both;
+}
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11,
+.col-xs-12,
+.col-sm-1,
+.col-sm-2,
+.col-sm-3,
+.col-sm-4,
+.col-sm-5,
+.col-sm-6,
+.col-sm-7,
+.col-sm-8,
+.col-sm-9,
+.col-sm-10,
+.col-sm-11,
+.col-sm-12,
+.col-md-1,
+.col-md-2,
+.col-md-3,
+.col-md-4,
+.col-md-5,
+.col-md-6,
+.col-md-7,
+.col-md-8,
+.col-md-9,
+.col-md-10,
+.col-md-11,
+.col-md-12,
+.col-lg-1,
+.col-lg-2,
+.col-lg-3,
+.col-lg-4,
+.col-lg-5,
+.col-lg-6,
+.col-lg-7,
+.col-lg-8,
+.col-lg-9,
+.col-lg-10,
+.col-lg-11,
+.col-lg-12 {
+  position: relative;
+  min-height: 1px;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11 {
+  float: left;
+}
+.col-xs-1 {
+  width: 8.333333333333332%;
+}
+.col-xs-2 {
+  width: 16.666666666666664%;
+}
+.col-xs-3 {
+  width: 25%;
+}
+.col-xs-4 {
+  width: 33.33333333333333%;
+}
+.col-xs-5 {
+  width: 41.66666666666667%;
+}
+.col-xs-6 {
+  width: 50%;
+}
+.col-xs-7 {
+  width: 58.333333333333336%;
+}
+.col-xs-8 {
+  width: 66.66666666666666%;
+}
+.col-xs-9 {
+  width: 75%;
+}
+.col-xs-10 {
+  width: 83.33333333333334%;
+}
+.col-xs-11 {
+  width: 91.66666666666666%;
+}
+.col-xs-12 {
+  width: 100%;
+}
+@media (min-width: 768px) {
+  .container {
+    max-width: 750px;
+  }
+  .col-sm-1,
+  .col-sm-2,
+  .col-sm-3,
+  .col-sm-4,
+  .col-sm-5,
+  .col-sm-6,
+  .col-sm-7,
+  .col-sm-8,
+  .col-sm-9,
+  .col-sm-10,
+  .col-sm-11 {
+    float: left;
+  }
+  .col-sm-1 {
+    width: 8.333333333333332%;
+  }
+  .col-sm-2 {
+    width: 16.666666666666664%;
+  }
+  .col-sm-3 {
+    width: 25%;
+  }
+  .col-sm-4 {
+    width: 33.33333333333333%;
+  }
+  .col-sm-5 {
+    width: 41.66666666666667%;
+  }
+  .col-sm-6 {
+    width: 50%;
+  }
+  .col-sm-7 {
+    width: 58.333333333333336%;
+  }
+  .col-sm-8 {
+    width: 66.66666666666666%;
+  }
+  .col-sm-9 {
+    width: 75%;
+  }
+  .col-sm-10 {
+    width: 83.33333333333334%;
+  }
+  .col-sm-11 {
+    width: 91.66666666666666%;
+  }
+  .col-sm-12 {
+    width: 100%;
+  }
+  .col-sm-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-sm-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-sm-push-3 {
+    left: 25%;
+  }
+  .col-sm-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-sm-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-sm-push-6 {
+    left: 50%;
+  }
+  .col-sm-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-sm-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-sm-push-9 {
+    left: 75%;
+  }
+  .col-sm-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-sm-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-sm-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-sm-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-sm-pull-3 {
+    right: 25%;
+  }
+  .col-sm-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-sm-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-sm-pull-6 {
+    right: 50%;
+  }
+  .col-sm-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-sm-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-sm-pull-9 {
+    right: 75%;
+  }
+  .col-sm-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-sm-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-sm-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-sm-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-sm-offset-3 {
+    margin-left: 25%;
+  }
+  .col-sm-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-sm-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-sm-offset-6 {
+    margin-left: 50%;
+  }
+  .col-sm-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-sm-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-sm-offset-9 {
+    margin-left: 75%;
+  }
+  .col-sm-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-sm-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+}
+@media (min-width: 992px) {
+  .container {
+    max-width: 970px;
+  }
+  .col-md-1,
+  .col-md-2,
+  .col-md-3,
+  .col-md-4,
+  .col-md-5,
+  .col-md-6,
+  .col-md-7,
+  .col-md-8,
+  .col-md-9,
+  .col-md-10,
+  .col-md-11 {
+    float: left;
+  }
+  .col-md-1 {
+    width: 8.333333333333332%;
+  }
+  .col-md-2 {
+    width: 16.666666666666664%;
+  }
+  .col-md-3 {
+    width: 25%;
+  }
+  .col-md-4 {
+    width: 33.33333333333333%;
+  }
+  .col-md-5 {
+    width: 41.66666666666667%;
+  }
+  .col-md-6 {
+    width: 50%;
+  }
+  .col-md-7 {
+    width: 58.333333333333336%;
+  }
+  .col-md-8 {
+    width: 66.66666666666666%;
+  }
+  .col-md-9 {
+    width: 75%;
+  }
+  .col-md-10 {
+    width: 83.33333333333334%;
+  }
+  .col-md-11 {
+    width: 91.66666666666666%;
+  }
+  .col-md-12 {
+    width: 100%;
+  }
+  .col-md-push-0 {
+    left: auto;
+  }
+  .col-md-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-md-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-md-push-3 {
+    left: 25%;
+  }
+  .col-md-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-md-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-md-push-6 {
+    left: 50%;
+  }
+  .col-md-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-md-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-md-push-9 {
+    left: 75%;
+  }
+  .col-md-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-md-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-md-pull-0 {
+    right: auto;
+  }
+  .col-md-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-md-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-md-pull-3 {
+    right: 25%;
+  }
+  .col-md-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-md-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-md-pull-6 {
+    right: 50%;
+  }
+  .col-md-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-md-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-md-pull-9 {
+    right: 75%;
+  }
+  .col-md-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-md-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-md-offset-0 {
+    margin-left: 0;
+  }
+  .col-md-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-md-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-md-offset-3 {
+    margin-left: 25%;
+  }
+  .col-md-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-md-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-md-offset-6 {
+    margin-left: 50%;
+  }
+  .col-md-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-md-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-md-offset-9 {
+    margin-left: 75%;
+  }
+  .col-md-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-md-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+}
+@media (min-width: 1200px) {
+  .container {
+    max-width: 1170px;
+  }
+  .col-lg-1,
+  .col-lg-2,
+  .col-lg-3,
+  .col-lg-4,
+  .col-lg-5,
+  .col-lg-6,
+  .col-lg-7,
+  .col-lg-8,
+  .col-lg-9,
+  .col-lg-10,
+  .col-lg-11 {
+    float: left;
+  }
+  .col-lg-1 {
+    width: 8.333333333333332%;
+  }
+  .col-lg-2 {
+    width: 16.666666666666664%;
+  }
+  .col-lg-3 {
+    width: 25%;
+  }
+  .col-lg-4 {
+    width: 33.33333333333333%;
+  }
+  .col-lg-5 {
+    width: 41.66666666666667%;
+  }
+  .col-lg-6 {
+    width: 50%;
+  }
+  .col-lg-7 {
+    width: 58.333333333333336%;
+  }
+  .col-lg-8 {
+    width: 66.66666666666666%;
+  }
+  .col-lg-9 {
+    width: 75%;
+  }
+  .col-lg-10 {
+    width: 83.33333333333334%;
+  }
+  .col-lg-11 {
+    width: 91.66666666666666%;
+  }
+  .col-lg-12 {
+    width: 100%;
+  }
+  .col-lg-push-0 {
+    left: auto;
+  }
+  .col-lg-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-lg-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-lg-push-3 {
+    left: 25%;
+  }
+  .col-lg-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-lg-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-lg-push-6 {
+    left: 50%;
+  }
+  .col-lg-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-lg-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-lg-push-9 {
+    left: 75%;
+  }
+  .col-lg-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-lg-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-lg-pull-0 {
+    right: auto;
+  }
+  .col-lg-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-lg-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-lg-pull-3 {
+    right: 25%;
+  }
+  .col-lg-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-lg-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-lg-pull-6 {
+    right: 50%;
+  }
+  .col-lg-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-lg-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-lg-pull-9 {
+    right: 75%;
+  }
+  .col-lg-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-lg-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-lg-offset-0 {
+    margin-left: 0;
+  }
+  .col-lg-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-lg-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-lg-offset-3 {
+    margin-left: 25%;
+  }
+  .col-lg-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-lg-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-lg-offset-6 {
+    margin-left: 50%;
+  }
+  .col-lg-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-lg-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-lg-offset-9 {
+    margin-left: 75%;
+  }
+  .col-lg-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-lg-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+}
+table {
+  max-width: 100%;
+  background-color: transparent;
+}
+th {
+  text-align: left;
+}
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+.table thead > tr > th,
+.table tbody > tr > th,
+.table tfoot > tr > th,
+.table thead > tr > td,
+.table tbody > tr > td,
+.table tfoot > tr > td {
+  padding: 8px;
+  line-height: 1.428571429;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+.table thead > tr > th {
+  vertical-align: bottom;
+  border-bottom: 2px solid #dddddd;
+}
+.table caption + thead tr:first-child th,
+.table colgroup + thead tr:first-child th,
+.table thead:first-child tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child td {
+  border-top: 0;
+}
+.table tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+.table .table {
+  background-color: #ffffff;
+}
+.table-condensed thead > tr > th,
+.table-condensed tbody > tr > th,
+.table-condensed tfoot > tr > th,
+.table-condensed thead > tr > td,
+.table-condensed tbody > tr > td,
+.table-condensed tfoot > tr > td {
+  padding: 5px;
+}
+.table-bordered {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+  border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+  background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+  float: none;
+  display: table-column;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+  float: none;
+  display: table-cell;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+  background-color: #f5f5f5;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td {
+  background-color: #d0e9c6;
+  border-color: #c9e2b3;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+  background-color: #f2dede;
+  border-color: #eed3d7;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td {
+  background-color: #ebcccc;
+  border-color: #e6c1c7;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+  background-color: #fcf8e3;
+  border-color: #fbeed5;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td {
+  background-color: #faf2cc;
+  border-color: #f8e5be;
+}
+@media (max-width: 768px) {
+  .table-responsive {
+    width: 100%;
+    margin-bottom: 15px;
+    overflow-y: hidden;
+    overflow-x: scroll;
+    border: 1px solid #dddddd;
+  }
+  .table-responsive > .table {
+    margin-bottom: 0;
+    background-color: #fff;
+  }
+  .table-responsive > .table > thead > tr > th,
+  .table-responsive > .table > tbody > tr > th,
+  .table-responsive > .table > tfoot > tr > th,
+  .table-responsive > .table > thead > tr > td,
+  .table-responsive > .table > tbody > tr > td,
+  .table-responsive > .table > tfoot > tr > td {
+    white-space: nowrap;
+  }
+  .table-responsive > .table-bordered {
+    border: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:first-child,
+  .table-responsive > .table-bordered > tbody > tr > th:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+  .table-responsive > .table-bordered > thead > tr > td:first-child,
+  .table-responsive > .table-bordered > tbody > tr > td:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+    border-left: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:last-child,
+  .table-responsive > .table-bordered > tbody > tr > th:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+  .table-responsive > .table-bordered > thead > tr > td:last-child,
+  .table-responsive > .table-bordered > tbody > tr > td:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+    border-right: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr:last-child > th,
+  .table-responsive > .table-bordered > tbody > tr:last-child > th,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+  .table-responsive > .table-bordered > thead > tr:last-child > td,
+  .table-responsive > .table-bordered > tbody > tr:last-child > td,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+    border-bottom: 0;
+  }
+}
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: inherit;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+label {
+  display: inline-block;
+  margin-bottom: 5px;
+  font-weight: bold;
+}
+input[type="search"] {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  /* IE8-9 */
+
+  line-height: normal;
+}
+input[type="file"] {
+  display: block;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+select optgroup {
+  font-size: inherit;
+  font-style: inherit;
+  font-family: inherit;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+input[type="number"]::-webkit-outer-spin-button,
+input[type="number"]::-webkit-inner-spin-button {
+  height: auto;
+}
+.form-control:-moz-placeholder {
+  color: #999999;
+}
+.form-control::-moz-placeholder {
+  color: #999999;
+}
+.form-control:-ms-input-placeholder {
+  color: #999999;
+}
+.form-control::-webkit-input-placeholder {
+  color: #999999;
+}
+.form-control {
+  display: block;
+  width: 100%;
+  height: 34px;
+  padding: 6px 12px;
+  font-size: 14px;
+  line-height: 1.428571429;
+  color: #555555;
+  vertical-align: middle;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+  border-color: #66afe9;
+  outline: 0;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+}
+textarea.form-control {
+  height: auto;
+}
+.form-group {
+  margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+  display: block;
+  min-height: 20px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  padding-left: 20px;
+  vertical-align: middle;
+}
+.radio label,
+.checkbox label {
+  display: inline;
+  margin-bottom: 0;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+  margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+  display: inline-block;
+  padding-left: 20px;
+  margin-bottom: 0;
+  vertical-align: middle;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+  margin-top: 0;
+  margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+.radio[disabled],
+.radio-inline[disabled],
+.checkbox[disabled],
+.checkbox-inline[disabled],
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"],
+fieldset[disabled] .radio,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox,
+fieldset[disabled] .checkbox-inline {
+  cursor: not-allowed;
+}
+.input-sm {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-sm {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-sm {
+  height: auto;
+}
+.input-lg {
+  height: 45px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+select.input-lg {
+  height: 45px;
+  line-height: 45px;
+}
+textarea.input-lg {
+  height: auto;
+}
+.has-warning .help-block,
+.has-warning .control-label {
+  color: #c09853;
+}
+.has-warning .form-control {
+  border-color: #c09853;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-warning .form-control:focus {
+  border-color: #a47e3c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+.has-warning .input-group-addon {
+  color: #c09853;
+  border-color: #c09853;
+  background-color: #fcf8e3;
+}
+.has-error .help-block,
+.has-error .control-label {
+  color: #b94a48;
+}
+.has-error .form-control {
+  border-color: #b94a48;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-error .form-control:focus {
+  border-color: #953b39;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+.has-error .input-group-addon {
+  color: #b94a48;
+  border-color: #b94a48;
+  background-color: #f2dede;
+}
+.has-success .help-block,
+.has-success .control-label {
+  color: #468847;
+}
+.has-success .form-control {
+  border-color: #468847;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-success .form-control:focus {
+  border-color: #356635;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+.has-success .input-group-addon {
+  color: #468847;
+  border-color: #468847;
+  background-color: #dff0d8;
+}
+.form-control-static {
+  margin-bottom: 0;
+  padding-top: 7px;
+}
+.help-block {
+  display: block;
+  margin-top: 5px;
+  margin-bottom: 10px;
+  color: #737373;
+}
+@media (min-width: 768px) {
+  .form-inline .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .form-control {
+    display: inline-block;
+  }
+  .form-inline .radio,
+  .form-inline .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    padding-left: 0;
+  }
+  .form-inline .radio input[type="radio"],
+  .form-inline .checkbox input[type="checkbox"] {
+    float: none;
+    margin-left: 0;
+  }
+}
+.form-horizontal .control-label,
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+  margin-top: 0;
+  margin-bottom: 0;
+  padding-top: 7px;
+}
+.form-horizontal .form-group {
+  margin-left: -15px;
+  margin-right: -15px;
+}
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.form-horizontal .form-group:after {
+  clear: both;
+}
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.form-horizontal .form-group:after {
+  clear: both;
+}
+@media (min-width: 768px) {
+  .form-horizontal .control-label {
+    text-align: right;
+  }
+}
+.btn {
+  display: inline-block;
+  padding: 6px 12px;
+  margin-bottom: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.428571429;
+  text-align: center;
+  vertical-align: middle;
+  cursor: pointer;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  white-space: nowrap;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  -o-user-select: none;
+  user-select: none;
+}
+.btn:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus {
+  color: #333333;
+  text-decoration: none;
+}
+.btn:active,
+.btn.active {
+  outline: 0;
+  background-image: none;
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+  cursor: not-allowed;
+  pointer-events: none;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.btn-default {
+  color: #333333;
+  background-color: #ffffff;
+  border-color: #cccccc;
+}
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  color: #333333;
+  background-color: #ebebeb;
+  border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  background-color: #ffffff;
+  border-color: #cccccc;
+}
+.btn-primary {
+  color: #ffffff;
+  background-color: #428bca;
+  border-color: #357ebd;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  color: #ffffff;
+  background-color: #3276b1;
+  border-color: #285e8e;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  background-color: #428bca;
+  border-color: #357ebd;
+}
+.btn-warning {
+  color: #ffffff;
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  color: #ffffff;
+  background-color: #ed9c28;
+  border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-danger {
+  color: #ffffff;
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  color: #ffffff;
+  background-color: #d2322d;
+  border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-success {
+  color: #ffffff;
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  color: #ffffff;
+  background-color: #47a447;
+  border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-info {
+  color: #ffffff;
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  color: #ffffff;
+  background-color: #39b3d7;
+  border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-link {
+  color: #428bca;
+  font-weight: normal;
+  cursor: pointer;
+  border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+  background-color: transparent;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+  border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+  color: #2a6496;
+  text-decoration: underline;
+  background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+  color: #999999;
+  text-decoration: none;
+}
+.btn-lg {
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+.btn-sm,
+.btn-xs {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-xs {
+  padding: 1px 5px;
+}
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-left: 0;
+  padding-right: 0;
+}
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+.btn-default .caret {
+  border-top-color: #333333;
+}
+.btn-primary .caret,
+.btn-success .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret {
+  border-top-color: #fff;
+}
+.dropup .btn-default .caret {
+  border-bottom-color: #333333;
+}
+.dropup .btn-primary .caret,
+.dropup .btn-success .caret,
+.dropup .btn-warning .caret,
+.dropup .btn-danger .caret,
+.dropup .btn-info .caret {
+  border-bottom-color: #fff;
+}
+.btn-group,
+.btn-group-vertical {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+  position: relative;
+  float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+  z-index: 2;
+}
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus {
+  outline: none;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+  margin-left: -1px;
+}
+.btn-toolbar:before,
+.btn-toolbar:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.btn-toolbar:after {
+  clear: both;
+}
+.btn-toolbar:before,
+.btn-toolbar:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.btn-toolbar:after {
+  clear: both;
+}
+.btn-toolbar .btn-group {
+  float: left;
+}
+.btn-toolbar > .btn + .btn,
+.btn-toolbar > .btn-group + .btn,
+.btn-toolbar > .btn + .btn-group,
+.btn-toolbar > .btn-group + .btn-group {
+  margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+  border-radius: 0;
+}
+.btn-group > .btn:first-child {
+  margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group > .btn-group {
+  float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group > .btn-group:last-child > .btn:first-child {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group-xs > .btn {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+  padding: 1px 5px;
+}
+.btn-group-sm > .btn {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-group-lg > .btn {
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+.btn-group > .btn + .dropdown-toggle {
+  padding-left: 8px;
+  padding-right: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+  padding-left: 12px;
+  padding-right: 12px;
+}
+.btn-group.open .dropdown-toggle {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.btn .caret {
+  margin-left: 0;
+}
+.btn-lg .caret {
+  border-width: 5px 5px 0;
+  border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+  border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group {
+  display: block;
+  float: none;
+  width: 100%;
+  max-width: 100%;
+}
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.btn-group-vertical > .btn-group:after {
+  clear: both;
+}
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.btn-group-vertical > .btn-group:after {
+  clear: both;
+}
+.btn-group-vertical > .btn-group > .btn {
+  float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+  margin-top: -1px;
+  margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+  border-bottom-left-radius: 4px;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child > .btn:first-child {
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group-justified {
+  display: table;
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: separate;
+}
+.btn-group-justified .btn {
+  float: none;
+  display: table-cell;
+  width: 1%;
+}
+[data-toggle="buttons"] > .btn > input[type="radio"],
+[data-toggle="buttons"] > .btn > input[type="checkbox"] {
+  display: none;
+}
+.input-group {
+  position: relative;
+  display: table;
+  border-collapse: separate;
+}
+.input-group.col {
+  float: none;
+  padding-left: 0;
+  padding-right: 0;
+}
+.input-group .form-control {
+  width: 100%;
+  margin-bottom: 0;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+  height: 45px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+  height: 45px;
+  line-height: 45px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+  display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+  width: 1%;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+.input-group-addon {
+  padding: 6px 12px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1;
+  text-align: center;
+  background-color: #eeeeee;
+  border: 1px solid #cccccc;
+  border-radius: 4px;
+}
+.input-group-addon.input-sm {
+  padding: 5px 10px;
+  font-size: 12px;
+  border-radius: 3px;
+}
+.input-group-addon.input-lg {
+  padding: 10px 16px;
+  font-size: 18px;
+  border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+  margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.input-group-addon:first-child {
+  border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child) {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.input-group-addon:last-child {
+  border-left: 0;
+}
+.input-group-btn {
+  position: relative;
+  white-space: nowrap;
+}
+.input-group-btn > .btn {
+  position: relative;
+}
+.input-group-btn > .btn + .btn {
+  margin-left: -4px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:active {
+  z-index: 2;
+}
+.nav {
+  margin-bottom: 0;
+  padding-left: 0;
+  list-style: none;
+}
+.nav:before,
+.nav:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.nav:after {
+  clear: both;
+}
+.nav:before,
+.nav:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.nav:after {
+  clear: both;
+}
+.nav > li {
+  position: relative;
+  display: block;
+}
+.nav > li > a {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.nav > li.disabled > a {
+  color: #999999;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+  color: #999999;
+  text-decoration: none;
+  background-color: transparent;
+  cursor: not-allowed;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+  background-color: #eeeeee;
+  border-color: #428bca;
+}
+.nav .nav-divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.nav > li > a > img {
+  max-width: none;
+}
+.nav-tabs {
+  border-bottom: 1px solid #dddddd;
+}
+.nav-tabs > li {
+  float: left;
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  margin-right: 2px;
+  line-height: 1.428571429;
+  border: 1px solid transparent;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+  color: #555555;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-bottom-color: transparent;
+  cursor: default;
+}
+.nav-tabs.nav-justified {
+  width: 100%;
+  border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+  float: none;
+}
+.nav-tabs.nav-justified > li > a {
+  text-align: center;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+}
+.nav-tabs.nav-justified > li > a {
+  border-bottom: 1px solid #dddddd;
+  margin-right: 0;
+}
+.nav-tabs.nav-justified > .active > a {
+  border-bottom-color: #ffffff;
+}
+.nav-pills > li {
+  float: left;
+}
+.nav-pills > li > a {
+  border-radius: 5px;
+}
+.nav-pills > li + li {
+  margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+  color: #ffffff;
+  background-color: #428bca;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li + li {
+  margin-top: 2px;
+  margin-left: 0;
+}
+.nav-justified {
+  width: 100%;
+}
+.nav-justified > li {
+  float: none;
+}
+.nav-justified > li > a {
+  text-align: center;
+}
+@media (min-width: 768px) {
+  .nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+}
+.nav-tabs-justified {
+  border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+  border-bottom: 1px solid #dddddd;
+  margin-right: 0;
+}
+.nav-tabs-justified > .active > a {
+  border-bottom-color: #ffffff;
+}
+.tabbable:before,
+.tabbable:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.tabbable:after {
+  clear: both;
+}
+.tabbable:before,
+.tabbable:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.tabbable:after {
+  clear: both;
+}
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+  display: none;
+}
+.tab-content > .active,
+.pill-content > .active {
+  display: block;
+}
+.nav .caret {
+  border-top-color: #428bca;
+  border-bottom-color: #428bca;
+}
+.nav a:hover .caret {
+  border-top-color: #2a6496;
+  border-bottom-color: #2a6496;
+}
+.nav-tabs .dropdown-menu {
+  margin-top: -1px;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.navbar {
+  position: relative;
+  z-index: 1000;
+  min-height: 50px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+}
+.navbar:before,
+.navbar:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar:after {
+  clear: both;
+}
+.navbar:before,
+.navbar:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar:after {
+  clear: both;
+}
+@media (min-width: 768px) {
+  .navbar {
+    border-radius: 4px;
+  }
+}
+.navbar-header:before,
+.navbar-header:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar-header:after {
+  clear: both;
+}
+.navbar-header:before,
+.navbar-header:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar-header:after {
+  clear: both;
+}
+@media (min-width: 768px) {
+  .navbar-header {
+    float: left;
+  }
+}
+.navbar-collapse {
+  max-height: 340px;
+  overflow-x: visible;
+  padding-right: 15px;
+  padding-left: 15px;
+  border-top: 1px solid transparent;
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
+  -webkit-overflow-scrolling: touch;
+}
+.navbar-collapse:before,
+.navbar-collapse:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar-collapse:after {
+  clear: both;
+}
+.navbar-collapse:before,
+.navbar-collapse:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.navbar-collapse:after {
+  clear: both;
+}
+.navbar-collapse.in {
+  overflow-y: auto;
+}
+@media (min-width: 768px) {
+  .navbar-collapse {
+    width: auto;
+    border-top: 0;
+    box-shadow: none;
+  }
+  .navbar-collapse.collapse {
+    display: block !important;
+    height: auto !important;
+    padding-bottom: 0;
+    overflow: visible !important;
+  }
+  .navbar-collapse.in {
+    overflow-y: visible;
+  }
+  .navbar-collapse .navbar-nav.navbar-left:first-child {
+    margin-left: -15px;
+  }
+  .navbar-collapse .navbar-nav.navbar-right:last-child {
+    margin-right: -15px;
+  }
+  .navbar-collapse .navbar-text:last-child {
+    margin-right: 0;
+  }
+}
+.container > .navbar-header,
+.container > .navbar-collapse {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .container > .navbar-header,
+  .container > .navbar-collapse {
+    margin-right: 0;
+    margin-left: 0;
+  }
+}
+.navbar-static-top {
+  border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+  .navbar-static-top {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top {
+  z-index: 1030;
+  top: 0;
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+  margin-bottom: 0;
+}
+.navbar-brand {
+  float: left;
+  padding: 15px 15px;
+  font-size: 18px;
+  line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+  text-decoration: none;
+}
+@media (min-width: 768px) {
+  .navbar > .container .navbar-brand {
+    margin-left: -15px;
+  }
+}
+.navbar-toggle {
+  position: relative;
+  float: right;
+  margin-right: 15px;
+  padding: 9px 10px;
+  margin-top: 8px;
+  margin-bottom: 8px;
+  background-color: transparent;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.navbar-toggle .icon-bar {
+  display: block;
+  width: 22px;
+  height: 2px;
+  border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+  margin-top: 4px;
+}
+@media (min-width: 768px) {
+  .navbar-toggle {
+    display: none;
+  }
+}
+.navbar-nav {
+  margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+@media (max-width: 767px) {
+  .navbar-nav .open .dropdown-menu {
+    position: static;
+    float: none;
+    width: auto;
+    margin-top: 0;
+    background-color: transparent;
+    border: 0;
+    box-shadow: none;
+  }
+  .navbar-nav .open .dropdown-menu > li > a,
+  .navbar-nav .open .dropdown-menu .dropdown-header {
+    padding: 5px 15px 5px 25px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a {
+    line-height: 20px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-nav .open .dropdown-menu > li > a:focus {
+    background-image: none;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-nav {
+    float: left;
+    margin: 0;
+  }
+  .navbar-nav > li {
+    float: left;
+  }
+  .navbar-nav > li > a {
+    padding-top: 15px;
+    padding-bottom: 15px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-left {
+    float: left !important;
+  }
+  .navbar-right {
+    float: right !important;
+  }
+}
+.navbar-form {
+  margin-left: -15px;
+  margin-right: -15px;
+  padding: 10px 15px;
+  border-top: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  margin-top: 8px;
+  margin-bottom: 8px;
+}
+@media (min-width: 768px) {
+  .navbar-form .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .form-control {
+    display: inline-block;
+  }
+  .navbar-form .radio,
+  .navbar-form .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    padding-left: 0;
+  }
+  .navbar-form .radio input[type="radio"],
+  .navbar-form .checkbox input[type="checkbox"] {
+    float: none;
+    margin-left: 0;
+  }
+}
+@media (max-width: 767px) {
+  .navbar-form .form-group {
+    margin-bottom: 5px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-form {
+    width: auto;
+    border: 0;
+    margin-left: 0;
+    margin-right: 0;
+    padding-top: 0;
+    padding-bottom: 0;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+  }
+}
+.navbar-nav > li > .dropdown-menu {
+  margin-top: 0;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.navbar-nav.pull-right > li > .dropdown-menu,
+.navbar-nav > li > .dropdown-menu.pull-right {
+  left: auto;
+  right: 0;
+}
+.navbar-btn {
+  margin-top: 8px;
+  margin-bottom: 8px;
+}
+.navbar-text {
+  float: left;
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+  .navbar-text {
+    margin-left: 15px;
+    margin-right: 15px;
+  }
+}
+.navbar-default {
+  background-color: #f8f8f8;
+  border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+  color: #777777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+  color: #5e5e5e;
+  background-color: transparent;
+}
+.navbar-default .navbar-text {
+  color: #777777;
+}
+.navbar-default .navbar-nav > li > a {
+  color: #777777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+  color: #333333;
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+  color: #555555;
+  background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+  color: #cccccc;
+  background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+  border-color: #dddddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+  background-color: #dddddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+  background-color: #cccccc;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+  border-color: #e6e6e6;
+}
+.navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.navbar-default .navbar-nav > .dropdown > a:focus .caret {
+  border-top-color: #333333;
+  border-bottom-color: #333333;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+  background-color: #e7e7e7;
+  color: #555555;
+}
+.navbar-default .navbar-nav > .open > a .caret,
+.navbar-default .navbar-nav > .open > a:hover .caret,
+.navbar-default .navbar-nav > .open > a:focus .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+.navbar-default .navbar-nav > .dropdown > a .caret {
+  border-top-color: #777777;
+  border-bottom-color: #777777;
+}
+@media (max-width: 767px) {
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+    color: #777777;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #333333;
+    background-color: transparent;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #555555;
+    background-color: #e7e7e7;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #cccccc;
+    background-color: transparent;
+  }
+}
+.navbar-default .navbar-link {
+  color: #777777;
+}
+.navbar-default .navbar-link:hover {
+  color: #333333;
+}
+.navbar-inverse {
+  background-color: #222222;
+  border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+  color: #999999;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+  color: #999999;
+}
+.navbar-inverse .navbar-nav > li > a {
+  color: #999999;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+  color: #ffffff;
+  background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+  color: #444444;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+  border-color: #333333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+  background-color: #333333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+  background-color: #ffffff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+  border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+  background-color: #080808;
+  color: #ffffff;
+}
+.navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+.navbar-inverse .navbar-nav > .dropdown > a .caret {
+  border-top-color: #999999;
+  border-bottom-color: #999999;
+}
+.navbar-inverse .navbar-nav > .open > a .caret,
+.navbar-inverse .navbar-nav > .open > a:hover .caret,
+.navbar-inverse .navbar-nav > .open > a:focus .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+@media (max-width: 767px) {
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+    border-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+    color: #999999;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #ffffff;
+    background-color: transparent;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #ffffff;
+    background-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #444444;
+    background-color: transparent;
+  }
+}
+.navbar-inverse .navbar-link {
+  color: #999999;
+}
+.navbar-inverse .navbar-link:hover {
+  color: #ffffff;
+}
+.breadcrumb {
+  padding: 8px 15px;
+  margin-bottom: 20px;
+  list-style: none;
+  background-color: #f5f5f5;
+  border-radius: 4px;
+}
+.breadcrumb > li {
+  display: inline-block;
+}
+.breadcrumb > li + li:before {
+  content: "/\00a0";
+  padding: 0 5px;
+  color: #cccccc;
+}
+.breadcrumb > .active {
+  color: #999999;
+}
+.pagination {
+  display: inline-block;
+  padding-left: 0;
+  margin: 20px 0;
+  border-radius: 4px;
+}
+.pagination > li {
+  display: inline;
+}
+.pagination > li > a,
+.pagination > li > span {
+  position: relative;
+  float: left;
+  padding: 6px 12px;
+  line-height: 1.428571429;
+  text-decoration: none;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  margin-left: -1px;
+}
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+  margin-left: 0;
+  border-bottom-left-radius: 4px;
+  border-top-left-radius: 4px;
+}
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+  border-bottom-right-radius: 4px;
+  border-top-right-radius: 4px;
+}
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+  background-color: #eeeeee;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+  z-index: 2;
+  color: #ffffff;
+  background-color: #428bca;
+  border-color: #428bca;
+  cursor: default;
+}
+.pagination > .disabled > span,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+  color: #999999;
+  background-color: #ffffff;
+  border-color: #dddddd;
+  cursor: not-allowed;
+}
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+  padding: 10px 16px;
+  font-size: 18px;
+}
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+  border-bottom-left-radius: 6px;
+  border-top-left-radius: 6px;
+}
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+  border-bottom-right-radius: 6px;
+  border-top-right-radius: 6px;
+}
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+  padding: 5px 10px;
+  font-size: 12px;
+}
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+  border-bottom-left-radius: 3px;
+  border-top-left-radius: 3px;
+}
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+  border-bottom-right-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.pager {
+  padding-left: 0;
+  margin: 20px 0;
+  list-style: none;
+  text-align: center;
+}
+.pager:before,
+.pager:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.pager:after {
+  clear: both;
+}
+.pager:before,
+.pager:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.pager:after {
+  clear: both;
+}
+.pager li {
+  display: inline;
+}
+.pager li > a,
+.pager li > span {
+  display: inline-block;
+  padding: 5px 14px;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 15px;
+}
+.pager li > a:hover,
+.pager li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.pager .next > a,
+.pager .next > span {
+  float: right;
+}
+.pager .previous > a,
+.pager .previous > span {
+  float: left;
+}
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+  color: #999999;
+  background-color: #ffffff;
+  cursor: not-allowed;
+}
+.label {
+  display: inline;
+  padding: .2em .6em .3em;
+  font-size: 75%;
+  font-weight: bold;
+  line-height: 1;
+  color: #ffffff;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: baseline;
+  border-radius: .25em;
+}
+.label[href]:hover,
+.label[href]:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.label:empty {
+  display: none;
+}
+.label-default {
+  background-color: #999999;
+}
+.label-default[href]:hover,
+.label-default[href]:focus {
+  background-color: #808080;
+}
+.label-primary {
+  background-color: #428bca;
+}
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+  background-color: #3071a9;
+}
+.label-success {
+  background-color: #5cb85c;
+}
+.label-success[href]:hover,
+.label-success[href]:focus {
+  background-color: #449d44;
+}
+.label-info {
+  background-color: #5bc0de;
+}
+.label-info[href]:hover,
+.label-info[href]:focus {
+  background-color: #31b0d5;
+}
+.label-warning {
+  background-color: #f0ad4e;
+}
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+  background-color: #ec971f;
+}
+.label-danger {
+  background-color: #d9534f;
+}
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+  background-color: #c9302c;
+}
+.badge {
+  display: inline-block;
+  min-width: 10px;
+  padding: 3px 7px;
+  font-size: 12px;
+  font-weight: bold;
+  color: #ffffff;
+  line-height: 1;
+  vertical-align: baseline;
+  white-space: nowrap;
+  text-align: center;
+  background-color: #999999;
+  border-radius: 10px;
+}
+.badge:empty {
+  display: none;
+}
+a.badge:hover,
+a.badge:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.btn .badge {
+  position: relative;
+  top: -1px;
+}
+a.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+  color: #428bca;
+  background-color: #ffffff;
+}
+.nav-pills > li > a > .badge {
+  margin-left: 3px;
+}
+.thumbnail {
+  padding: 4px;
+  line-height: 1.428571429;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 4px;
+  -webkit-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+  display: inline-block;
+  max-width: 100%;
+  height: auto;
+  display: block;
+}
+.thumbnail > img {
+  display: block;
+  max-width: 100%;
+  height: auto;
+}
+a.thumbnail:hover,
+a.thumbnail:focus {
+  border-color: #428bca;
+}
+.thumbnail > img {
+  margin-left: auto;
+  margin-right: auto;
+}
+.thumbnail .caption {
+  padding: 9px;
+  color: #333333;
+}
+.alert {
+  padding: 15px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.alert h4 {
+  margin-top: 0;
+  color: inherit;
+}
+.alert .alert-link {
+  font-weight: bold;
+}
+.alert > p,
+.alert > ul {
+  margin-bottom: 0;
+}
+.alert > p + p {
+  margin-top: 5px;
+}
+.alert-dismissable {
+  padding-right: 35px;
+}
+.alert-dismissable .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  color: inherit;
+}
+.alert-success {
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+  color: #468847;
+}
+.alert-success hr {
+  border-top-color: #c9e2b3;
+}
+.alert-success .alert-link {
+  color: #356635;
+}
+.alert-info {
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+  color: #3a87ad;
+}
+.alert-info hr {
+  border-top-color: #a6e1ec;
+}
+.alert-info .alert-link {
+  color: #2d6987;
+}
+.alert-warning {
+  background-color: #fcf8e3;
+  border-color: #fbeed5;
+  color: #c09853;
+}
+.alert-warning hr {
+  border-top-color: #f8e5be;
+}
+.alert-warning .alert-link {
+  color: #a47e3c;
+}
+.alert-danger {
+  background-color: #f2dede;
+  border-color: #eed3d7;
+  color: #b94a48;
+}
+.alert-danger hr {
+  border-top-color: #e6c1c7;
+}
+.alert-danger .alert-link {
+  color: #953b39;
+}
+@-webkit-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+@-moz-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+@-o-keyframes progress-bar-stripes {
+  from {
+    background-position: 0 0;
+  }
+  to {
+    background-position: 40px 0;
+  }
+}
+@keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+.progress {
+  overflow: hidden;
+  height: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+.progress-bar {
+  float: left;
+  width: 0%;
+  height: 100%;
+  font-size: 12px;
+  color: #ffffff;
+  text-align: center;
+  background-color: #428bca;
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+  -webkit-transition: width 0.6s ease;
+  transition: width 0.6s ease;
+}
+.progress-striped .progress-bar {
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-size: 40px 40px;
+}
+.progress.active .progress-bar {
+  -webkit-animation: progress-bar-stripes 2s linear infinite;
+  -moz-animation: progress-bar-stripes 2s linear infinite;
+  -ms-animation: progress-bar-stripes 2s linear infinite;
+  -o-animation: progress-bar-stripes 2s linear infinite;
+  animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-bar-success {
+  background-color: #5cb85c;
+}
+.progress-striped .progress-bar-success {
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-info {
+  background-color: #5bc0de;
+}
+.progress-striped .progress-bar-info {
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-warning {
+  background-color: #f0ad4e;
+}
+.progress-striped .progress-bar-warning {
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-danger {
+  background-color: #d9534f;
+}
+.progress-striped .progress-bar-danger {
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.list-group {
+  margin-bottom: 20px;
+  padding-left: 0;
+}
+.list-group-item {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+  margin-bottom: -1px;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+}
+.list-group-item:first-child {
+  border-top-right-radius: 4px;
+  border-top-left-radius: 4px;
+}
+.list-group-item:last-child {
+  margin-bottom: 0;
+  border-bottom-right-radius: 4px;
+  border-bottom-left-radius: 4px;
+}
+.list-group-item > .badge {
+  float: right;
+}
+.list-group-item > .badge + .badge {
+  margin-right: 5px;
+}
+a.list-group-item {
+  color: #555555;
+}
+a.list-group-item .list-group-item-heading {
+  color: #333333;
+}
+a.list-group-item:hover,
+a.list-group-item:focus {
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+  z-index: 2;
+  color: #ffffff;
+  background-color: #428bca;
+  border-color: #428bca;
+}
+.list-group-item.active .list-group-item-heading,
+.list-group-item.active:hover .list-group-item-heading,
+.list-group-item.active:focus .list-group-item-heading {
+  color: inherit;
+}
+.list-group-item.active .list-group-item-text,
+.list-group-item.active:hover .list-group-item-text,
+.list-group-item.active:focus .list-group-item-text {
+  color: #e1edf7;
+}
+.list-group-item-heading {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+.list-group-item-text {
+  margin-bottom: 0;
+  line-height: 1.3;
+}
+.panel {
+  margin-bottom: 20px;
+  background-color: #ffffff;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.panel-body {
+  padding: 15px;
+}
+.panel-body:before,
+.panel-body:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.panel-body:after {
+  clear: both;
+}
+.panel-body:before,
+.panel-body:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.panel-body:after {
+  clear: both;
+}
+.panel > .list-group {
+  margin-bottom: 0;
+}
+.panel > .list-group .list-group-item {
+  border-width: 1px 0;
+}
+.panel > .list-group .list-group-item:first-child {
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.panel > .list-group .list-group-item:last-child {
+  border-bottom: 0;
+}
+.panel-heading + .list-group .list-group-item:first-child {
+  border-top-width: 0;
+}
+.panel > .table {
+  margin-bottom: 0;
+}
+.panel > .panel-body + .table {
+  border-top: 1px solid #dddddd;
+}
+.panel-heading {
+  padding: 10px 15px;
+  border-bottom: 1px solid transparent;
+  border-top-right-radius: 3px;
+  border-top-left-radius: 3px;
+}
+.panel-title {
+  margin-top: 0;
+  margin-bottom: 0;
+  font-size: 16px;
+}
+.panel-title > a {
+  color: inherit;
+}
+.panel-footer {
+  padding: 10px 15px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #dddddd;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.panel-group .panel {
+  margin-bottom: 0;
+  border-radius: 4px;
+  overflow: hidden;
+}
+.panel-group .panel + .panel {
+  margin-top: 5px;
+}
+.panel-group .panel-heading {
+  border-bottom: 0;
+}
+.panel-group .panel-heading + .panel-collapse .panel-body {
+  border-top: 1px solid #dddddd;
+}
+.panel-group .panel-footer {
+  border-top: 0;
+}
+.panel-group .panel-footer + .panel-collapse .panel-body {
+  border-bottom: 1px solid #dddddd;
+}
+.panel-default {
+  border-color: #dddddd;
+}
+.panel-default > .panel-heading {
+  color: #333333;
+  background-color: #f5f5f5;
+  border-color: #dddddd;
+}
+.panel-default > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #dddddd;
+}
+.panel-default > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #dddddd;
+}
+.panel-primary {
+  border-color: #428bca;
+}
+.panel-primary > .panel-heading {
+  color: #ffffff;
+  background-color: #428bca;
+  border-color: #428bca;
+}
+.panel-primary > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #428bca;
+}
+.panel-primary > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #428bca;
+}
+.panel-success {
+  border-color: #d6e9c6;
+}
+.panel-success > .panel-heading {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+.panel-success > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #d6e9c6;
+}
+.panel-success > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #d6e9c6;
+}
+.panel-warning {
+  border-color: #fbeed5;
+}
+.panel-warning > .panel-heading {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #fbeed5;
+}
+.panel-warning > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #fbeed5;
+}
+.panel-warning > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #fbeed5;
+}
+.panel-danger {
+  border-color: #eed3d7;
+}
+.panel-danger > .panel-heading {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #eed3d7;
+}
+.panel-danger > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #eed3d7;
+}
+.panel-danger > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #eed3d7;
+}
+.panel-info {
+  border-color: #bce8f1;
+}
+.panel-info > .panel-heading {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+.panel-info > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #bce8f1;
+}
+.panel-info > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #bce8f1;
+}
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, 0.15);
+}
+.well-lg {
+  padding: 24px;
+  border-radius: 6px;
+}
+.well-sm {
+  padding: 9px;
+  border-radius: 3px;
+}
+.close {
+  float: right;
+  font-size: 21px;
+  font-weight: bold;
+  line-height: 1;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover,
+.close:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  margin-left: 2px;
+  vertical-align: middle;
+  border-top: 4px solid #000000;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+  border-bottom: 0 dotted;
+  content: "";
+}
+.dropdown {
+  position: relative;
+}
+.dropdown-toggle:focus {
+  outline: 0;
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  font-size: 14px;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  background-clip: padding-box;
+}
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 1.428571429;
+  color: #333333;
+  white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  text-decoration: none;
+  color: #ffffff;
+  background-color: #428bca;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  color: #ffffff;
+  text-decoration: none;
+  outline: 0;
+  background-color: #428bca;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  color: #999999;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  text-decoration: none;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  cursor: not-allowed;
+}
+.open > .dropdown-menu {
+  display: block;
+}
+.open > a {
+  outline: 0;
+}
+.dropdown-header {
+  display: block;
+  padding: 3px 20px;
+  font-size: 12px;
+  line-height: 1.428571429;
+  color: #999999;
+}
+.dropdown-backdrop {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  top: 0;
+  z-index: 990;
+}
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  border-top: 0 dotted;
+  border-bottom: 4px solid #000000;
+  content: "";
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+  .navbar-right .dropdown-menu {
+    right: 0;
+    left: auto;
+  }
+}
+.tooltip {
+  position: absolute;
+  z-index: 1030;
+  display: block;
+  visibility: visible;
+  font-size: 12px;
+  line-height: 1.4;
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.tooltip.in {
+  opacity: 0.9;
+  filter: alpha(opacity=90);
+}
+.tooltip.top {
+  margin-top: -3px;
+  padding: 5px 0;
+}
+.tooltip.right {
+  margin-left: 3px;
+  padding: 0 5px;
+}
+.tooltip.bottom {
+  margin-top: 3px;
+  padding: 5px 0;
+}
+.tooltip.left {
+  margin-left: -3px;
+  padding: 0 5px;
+}
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #ffffff;
+  text-align: center;
+  text-decoration: none;
+  background-color: #000000;
+  border-radius: 4px;
+}
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.top-left .tooltip-arrow {
+  bottom: 0;
+  left: 5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.top-right .tooltip-arrow {
+  bottom: 0;
+  right: 5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-width: 5px 5px 5px 0;
+  border-right-color: #000000;
+}
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-width: 5px 0 5px 5px;
+  border-left-color: #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+  top: 0;
+  left: 5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+  top: 0;
+  right: 5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1010;
+  display: none;
+  max-width: 276px;
+  padding: 1px;
+  text-align: left;
+  background-color: #ffffff;
+  background-clip: padding-box;
+  border: 1px solid #cccccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  white-space: normal;
+}
+.popover.top {
+  margin-top: -10px;
+}
+.popover.right {
+  margin-left: 10px;
+}
+.popover.bottom {
+  margin-top: 10px;
+}
+.popover.left {
+  margin-left: -10px;
+}
+.popover-title {
+  margin: 0;
+  padding: 8px 14px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 18px;
+  background-color: #f7f7f7;
+  border-bottom: 1px solid #ebebeb;
+  border-radius: 5px 5px 0 0;
+}
+.popover-content {
+  padding: 9px 14px;
+}
+.popover .arrow,
+.popover .arrow:after {
+  position: absolute;
+  display: block;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.popover .arrow {
+  border-width: 11px;
+}
+.popover .arrow:after {
+  border-width: 10px;
+  content: "";
+}
+.popover.top .arrow {
+  left: 50%;
+  margin-left: -11px;
+  border-bottom-width: 0;
+  border-top-color: #999999;
+  border-top-color: rgba(0, 0, 0, 0.25);
+  bottom: -11px;
+}
+.popover.top .arrow:after {
+  content: " ";
+  bottom: 1px;
+  margin-left: -10px;
+  border-bottom-width: 0;
+  border-top-color: #ffffff;
+}
+.popover.right .arrow {
+  top: 50%;
+  left: -11px;
+  margin-top: -11px;
+  border-left-width: 0;
+  border-right-color: #999999;
+  border-right-color: rgba(0, 0, 0, 0.25);
+}
+.popover.right .arrow:after {
+  content: " ";
+  left: 1px;
+  bottom: -10px;
+  border-left-width: 0;
+  border-right-color: #ffffff;
+}
+.popover.bottom .arrow {
+  left: 50%;
+  margin-left: -11px;
+  border-top-width: 0;
+  border-bottom-color: #999999;
+  border-bottom-color: rgba(0, 0, 0, 0.25);
+  top: -11px;
+}
+.popover.bottom .arrow:after {
+  content: " ";
+  top: 1px;
+  margin-left: -10px;
+  border-top-width: 0;
+  border-bottom-color: #ffffff;
+}
+.popover.left .arrow {
+  top: 50%;
+  right: -11px;
+  margin-top: -11px;
+  border-right-width: 0;
+  border-left-color: #999999;
+  border-left-color: rgba(0, 0, 0, 0.25);
+}
+.popover.left .arrow:after {
+  content: " ";
+  right: 1px;
+  border-right-width: 0;
+  border-left-color: #ffffff;
+  bottom: -10px;
+}
+.modal-open {
+  overflow: hidden;
+}
+body.modal-open,
+.modal-open .navbar-fixed-top,
+.modal-open .navbar-fixed-bottom {
+  margin-right: 15px;
+}
+.modal {
+  display: none;
+  overflow: auto;
+  overflow-y: scroll;
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1040;
+}
+.modal.fade .modal-dialog {
+  -webkit-transform: translate(0, -25%);
+  -ms-transform: translate(0, -25%);
+  transform: translate(0, -25%);
+  -webkit-transition: -webkit-transform 0.3s ease-out;
+  -moz-transition: -moz-transform 0.3s ease-out;
+  -o-transition: -o-transform 0.3s ease-out;
+  transition: transform 0.3s ease-out;
+}
+.modal.in .modal-dialog {
+  -webkit-transform: translate(0, 0);
+  -ms-transform: translate(0, 0);
+  transform: translate(0, 0);
+}
+.modal-dialog {
+  margin-left: auto;
+  margin-right: auto;
+  width: auto;
+  padding: 10px;
+  z-index: 1050;
+}
+.modal-content {
+  position: relative;
+  background-color: #ffffff;
+  border: 1px solid #999999;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 6px;
+  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  background-clip: padding-box;
+  outline: none;
+}
+.modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1030;
+  background-color: #000000;
+}
+.modal-backdrop.fade {
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.modal-backdrop.in {
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+.modal-header {
+  padding: 15px;
+  border-bottom: 1px solid #e5e5e5;
+  min-height: 16.428571429px;
+}
+.modal-header .close {
+  margin-top: -2px;
+}
+.modal-title {
+  margin: 0;
+  line-height: 1.428571429;
+}
+.modal-body {
+  position: relative;
+  padding: 20px;
+}
+.modal-footer {
+  margin-top: 15px;
+  padding: 19px 20px 20px;
+  text-align: right;
+  border-top: 1px solid #e5e5e5;
+}
+.modal-footer:before,
+.modal-footer:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.modal-footer:after {
+  clear: both;
+}
+.modal-footer:before,
+.modal-footer:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.modal-footer:after {
+  clear: both;
+}
+.modal-footer .btn + .btn {
+  margin-left: 5px;
+  margin-bottom: 0;
+}
+.modal-footer .btn-group .btn + .btn {
+  margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+  margin-left: 0;
+}
+@media screen and (min-width: 768px) {
+  .modal-dialog {
+    left: 50%;
+    right: auto;
+    width: 600px;
+    padding-top: 30px;
+    padding-bottom: 30px;
+  }
+  .modal-content {
+    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+  }
+}
+.clearfix:before,
+.clearfix:after {
+  content: " ";
+  /* 1 */
+
+  display: table;
+  /* 2 */
+
+}
+.clearfix:after {
+  clear: both;
+}
+.pull-right {
+  float: right !important;
+}
+.pull-left {
+  float: left !important;
+}
+.hide {
+  display: none !important;
+}
+.show {
+  display: block !important;
+}
+.invisible {
+  visibility: hidden;
+}
+.text-hide {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+.affix {
+  position: fixed;
+}
+@-ms-viewport {
+  width: device-width;
+}
+@media screen and (max-width: 400px) {
+  @-ms-viewport {
+    width: 320px;
+  }
+}
+.hidden {
+  display: none !important;
+  visibility: hidden !important;
+}
+.visible-xs {
+  display: none !important;
+}
+tr.visible-xs {
+  display: none !important;
+}
+th.visible-xs,
+td.visible-xs {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-xs {
+    display: block !important;
+  }
+  tr.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-xs,
+  td.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-xs.visible-sm {
+    display: block !important;
+  }
+  tr.visible-xs.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-xs.visible-sm,
+  td.visible-xs.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-xs.visible-md {
+    display: block !important;
+  }
+  tr.visible-xs.visible-md {
+    display: table-row !important;
+  }
+  th.visible-xs.visible-md,
+  td.visible-xs.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-xs.visible-lg {
+    display: block !important;
+  }
+  tr.visible-xs.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-xs.visible-lg,
+  td.visible-xs.visible-lg {
+    display: table-cell !important;
+  }
+}
+.visible-sm {
+  display: none !important;
+}
+tr.visible-sm {
+  display: none !important;
+}
+th.visible-sm,
+td.visible-sm {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-sm.visible-xs {
+    display: block !important;
+  }
+  tr.visible-sm.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-sm.visible-xs,
+  td.visible-sm.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm {
+    display: block !important;
+  }
+  tr.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-sm,
+  td.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-sm.visible-md {
+    display: block !important;
+  }
+  tr.visible-sm.visible-md {
+    display: table-row !important;
+  }
+  th.visible-sm.visible-md,
+  td.visible-sm.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-sm.visible-lg {
+    display: block !important;
+  }
+  tr.visible-sm.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-sm.visible-lg,
+  td.visible-sm.visible-lg {
+    display: table-cell !important;
+  }
+}
+.visible-md {
+  display: none !important;
+}
+tr.visible-md {
+  display: none !important;
+}
+th.visible-md,
+td.visible-md {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-md.visible-xs {
+    display: block !important;
+  }
+  tr.visible-md.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-md.visible-xs,
+  td.visible-md.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-md.visible-sm {
+    display: block !important;
+  }
+  tr.visible-md.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-md.visible-sm,
+  td.visible-md.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md {
+    display: block !important;
+  }
+  tr.visible-md {
+    display: table-row !important;
+  }
+  th.visible-md,
+  td.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-md.visible-lg {
+    display: block !important;
+  }
+  tr.visible-md.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-md.visible-lg,
+  td.visible-md.visible-lg {
+    display: table-cell !important;
+  }
+}
+.visible-lg {
+  display: none !important;
+}
+tr.visible-lg {
+  display: none !important;
+}
+th.visible-lg,
+td.visible-lg {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-lg.visible-xs {
+    display: block !important;
+  }
+  tr.visible-lg.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-lg.visible-xs,
+  td.visible-lg.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-lg.visible-sm {
+    display: block !important;
+  }
+  tr.visible-lg.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-lg.visible-sm,
+  td.visible-lg.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-lg.visible-md {
+    display: block !important;
+  }
+  tr.visible-lg.visible-md {
+    display: table-row !important;
+  }
+  th.visible-lg.visible-md,
+  td.visible-lg.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg {
+    display: block !important;
+  }
+  tr.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-lg,
+  td.visible-lg {
+    display: table-cell !important;
+  }
+}
+.hidden-xs {
+  display: block !important;
+}
+tr.hidden-xs {
+  display: table-row !important;
+}
+th.hidden-xs,
+td.hidden-xs {
+  display: table-cell !important;
+}
+@media (max-width: 767px) {
+  .hidden-xs {
+    display: none !important;
+  }
+  tr.hidden-xs {
+    display: none !important;
+  }
+  th.hidden-xs,
+  td.hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-xs.hidden-sm {
+    display: none !important;
+  }
+  tr.hidden-xs.hidden-sm {
+    display: none !important;
+  }
+  th.hidden-xs.hidden-sm,
+  td.hidden-xs.hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-xs.hidden-md {
+    display: none !important;
+  }
+  tr.hidden-xs.hidden-md {
+    display: none !important;
+  }
+  th.hidden-xs.hidden-md,
+  td.hidden-xs.hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-xs.hidden-lg {
+    display: none !important;
+  }
+  tr.hidden-xs.hidden-lg {
+    display: none !important;
+  }
+  th.hidden-xs.hidden-lg,
+  td.hidden-xs.hidden-lg {
+    display: none !important;
+  }
+}
+.hidden-sm {
+  display: block !important;
+}
+tr.hidden-sm {
+  display: table-row !important;
+}
+th.hidden-sm,
+td.hidden-sm {
+  display: table-cell !important;
+}
+@media (max-width: 767px) {
+  .hidden-sm.hidden-xs {
+    display: none !important;
+  }
+  tr.hidden-sm.hidden-xs {
+    display: none !important;
+  }
+  th.hidden-sm.hidden-xs,
+  td.hidden-sm.hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-sm {
+    display: none !important;
+  }
+  tr.hidden-sm {
+    display: none !important;
+  }
+  th.hidden-sm,
+  td.hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-sm.hidden-md {
+    display: none !important;
+  }
+  tr.hidden-sm.hidden-md {
+    display: none !important;
+  }
+  th.hidden-sm.hidden-md,
+  td.hidden-sm.hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-sm.hidden-lg {
+    display: none !important;
+  }
+  tr.hidden-sm.hidden-lg {
+    display: none !important;
+  }
+  th.hidden-sm.hidden-lg,
+  td.hidden-sm.hidden-lg {
+    display: none !important;
+  }
+}
+.hidden-md {
+  display: block !important;
+}
+tr.hidden-md {
+  display: table-row !important;
+}
+th.hidden-md,
+td.hidden-md {
+  display: table-cell !important;
+}
+@media (max-width: 767px) {
+  .hidden-md.hidden-xs {
+    display: none !important;
+  }
+  tr.hidden-md.hidden-xs {
+    display: none !important;
+  }
+  th.hidden-md.hidden-xs,
+  td.hidden-md.hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-md.hidden-sm {
+    display: none !important;
+  }
+  tr.hidden-md.hidden-sm {
+    display: none !important;
+  }
+  th.hidden-md.hidden-sm,
+  td.hidden-md.hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-md {
+    display: none !important;
+  }
+  tr.hidden-md {
+    display: none !important;
+  }
+  th.hidden-md,
+  td.hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-md.hidden-lg {
+    display: none !important;
+  }
+  tr.hidden-md.hidden-lg {
+    display: none !important;
+  }
+  th.hidden-md.hidden-lg,
+  td.hidden-md.hidden-lg {
+    display: none !important;
+  }
+}
+.hidden-lg {
+  display: block !important;
+}
+tr.hidden-lg {
+  display: table-row !important;
+}
+th.hidden-lg,
+td.hidden-lg {
+  display: table-cell !important;
+}
+@media (max-width: 767px) {
+  .hidden-lg.hidden-xs {
+    display: none !important;
+  }
+  tr.hidden-lg.hidden-xs {
+    display: none !important;
+  }
+  th.hidden-lg.hidden-xs,
+  td.hidden-lg.hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-lg.hidden-sm {
+    display: none !important;
+  }
+  tr.hidden-lg.hidden-sm {
+    display: none !important;
+  }
+  th.hidden-lg.hidden-sm,
+  td.hidden-lg.hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-lg.hidden-md {
+    display: none !important;
+  }
+  tr.hidden-lg.hidden-md {
+    display: none !important;
+  }
+  th.hidden-lg.hidden-md,
+  td.hidden-lg.hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-lg {
+    display: none !important;
+  }
+  tr.hidden-lg {
+    display: none !important;
+  }
+  th.hidden-lg,
+  td.hidden-lg {
+    display: none !important;
+  }
+}
+.visible-print {
+  display: none !important;
+}
+tr.visible-print {
+  display: none !important;
+}
+th.visible-print,
+td.visible-print {
+  display: none !important;
+}
+@media print {
+  .visible-print {
+    display: block !important;
+  }
+  tr.visible-print {
+    display: table-row !important;
+  }
+  th.visible-print,
+  td.visible-print {
+    display: table-cell !important;
+  }
+  .hidden-print {
+    display: none !important;
+  }
+  tr.hidden-print {
+    display: none !important;
+  }
+  th.hidden-print,
+  td.hidden-print {
+    display: none !important;
+  }
+}
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity 0.15s linear;
+  transition: opacity 0.15s linear;
+}
+.fade.in {
+  opacity: 1;
+}
+.collapse {
+  display: none;
+}
+.collapse.in {
+  display: block;
+}
+.collapsing {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height 0.35s ease;
+  transition: height 0.35s ease;
+}
diff --git a/luci2/htdocs/luci2/css/luci2.css b/luci2/htdocs/luci2/css/luci2.css
new file mode 100644 (file)
index 0000000..e9f05ab
--- /dev/null
@@ -0,0 +1,100 @@
+body {
+    padding-top: 55px;
+}
+
+.fade.in {
+    background-color: rgba(0, 0, 0, 0.5);
+}
+
+.progress {
+    position: relative;
+    width: 250px;
+}
+
+.progress-bar {
+    z-index: 1;
+    position: absolute;
+}
+
+.progress small {
+    position: absolute;
+    top: 0;
+    z-index: 2;
+    color: black;
+    text-align: center;
+    width: 100%;
+}
+
+.nav.nav-tabs {
+    margin-bottom: 15px;
+}
+
+.luci2-modal-loader {
+    background: #FFFFFF url(/luci2/icons/loading.gif) no-repeat 10px center;
+    text-align: center;
+}
+
+.luci2-section-header {
+    position: relative;
+}
+
+.luci2-section-header .badge {
+    position: absolute;
+    left: -11px;
+    top: -7px;
+    background-color: #D9534F;
+}
+
+.nav-tabs li a .badge {
+    background-color: #D9534F;
+}
+
+.nav-tabs li.active a .badge {
+    display: none;
+}
+
+.list-group-item .luci2-section-header > .btn-group {
+    position: absolute;
+    top: 2px;
+    right: 2px;
+    z-index: 10;
+    box-shadow: -5px 0 5px 10px #FFFFFF;
+    display: none;
+}
+
+.list-group-item:hover .luci2-section-header > .btn-group {
+    display: inline-block;
+}
+
+.luci2-section-teaser {
+    font-size: 90%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
+    margin-bottom: 0 !important;
+}
+
+.panel > .list-group > .list-group-item:first-child {
+    border-top: none;
+    border-top-left-radius: 4px;
+    border-top-right-radius: 4px;
+}
+
+.panel > .panel-body + .list-group > .list-group-item:first-child {
+    border-top: 1px solid #DDDDDD;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+}
+
+table.table td .btn-group {
+    white-space: nowrap;
+}
+
+table.table td .btn-group > .btn {
+    float: none;
+}
+
+.luci2-form-error .control-label {
+    color: #B94A48;
+}
diff --git a/luci2/htdocs/luci2/html5.js b/luci2/htdocs/luci2/html5.js
new file mode 100644 (file)
index 0000000..448cebd
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
+a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
+c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
+"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
+if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
diff --git a/luci2/htdocs/luci2/jquery-ui-1.10.3.custom.js b/luci2/htdocs/luci2/jquery-ui-1.10.3.custom.js
deleted file mode 100644 (file)
index ed72a1c..0000000
+++ /dev/null
@@ -1,3642 +0,0 @@
-/*! jQuery UI - v1.10.3 - 2013-10-15
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.tabs.js
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
-       runiqueId = /^ui-id-\d+$/;
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
-       version: "1.10.3",
-
-       keyCode: {
-               BACKSPACE: 8,
-               COMMA: 188,
-               DELETE: 46,
-               DOWN: 40,
-               END: 35,
-               ENTER: 13,
-               ESCAPE: 27,
-               HOME: 36,
-               LEFT: 37,
-               NUMPAD_ADD: 107,
-               NUMPAD_DECIMAL: 110,
-               NUMPAD_DIVIDE: 111,
-               NUMPAD_ENTER: 108,
-               NUMPAD_MULTIPLY: 106,
-               NUMPAD_SUBTRACT: 109,
-               PAGE_DOWN: 34,
-               PAGE_UP: 33,
-               PERIOD: 190,
-               RIGHT: 39,
-               SPACE: 32,
-               TAB: 9,
-               UP: 38
-       }
-});
-
-// plugins
-$.fn.extend({
-       focus: (function( orig ) {
-               return function( delay, fn ) {
-                       return typeof delay === "number" ?
-                               this.each(function() {
-                                       var elem = this;
-                                       setTimeout(function() {
-                                               $( elem ).focus();
-                                               if ( fn ) {
-                                                       fn.call( elem );
-                                               }
-                                       }, delay );
-                               }) :
-                               orig.apply( this, arguments );
-               };
-       })( $.fn.focus ),
-
-       scrollParent: function() {
-               var scrollParent;
-               if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
-                       scrollParent = this.parents().filter(function() {
-                               return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
-                       }).eq(0);
-               } else {
-                       scrollParent = this.parents().filter(function() {
-                               return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
-                       }).eq(0);
-               }
-
-               return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
-       },
-
-       zIndex: function( zIndex ) {
-               if ( zIndex !== undefined ) {
-                       return this.css( "zIndex", zIndex );
-               }
-
-               if ( this.length ) {
-                       var elem = $( this[ 0 ] ), position, value;
-                       while ( elem.length && elem[ 0 ] !== document ) {
-                               // Ignore z-index if position is set to a value where z-index is ignored by the browser
-                               // This makes behavior of this function consistent across browsers
-                               // WebKit always returns auto if the element is positioned
-                               position = elem.css( "position" );
-                               if ( position === "absolute" || position === "relative" || position === "fixed" ) {
-                                       // IE returns 0 when zIndex is not specified
-                                       // other browsers return a string
-                                       // we ignore the case of nested elements with an explicit value of 0
-                                       // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
-                                       value = parseInt( elem.css( "zIndex" ), 10 );
-                                       if ( !isNaN( value ) && value !== 0 ) {
-                                               return value;
-                                       }
-                               }
-                               elem = elem.parent();
-                       }
-               }
-
-               return 0;
-       },
-
-       uniqueId: function() {
-               return this.each(function() {
-                       if ( !this.id ) {
-                               this.id = "ui-id-" + (++uuid);
-                       }
-               });
-       },
-
-       removeUniqueId: function() {
-               return this.each(function() {
-                       if ( runiqueId.test( this.id ) ) {
-                               $( this ).removeAttr( "id" );
-                       }
-               });
-       }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
-       var map, mapName, img,
-               nodeName = element.nodeName.toLowerCase();
-       if ( "area" === nodeName ) {
-               map = element.parentNode;
-               mapName = map.name;
-               if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
-                       return false;
-               }
-               img = $( "img[usemap=#" + mapName + "]" )[0];
-               return !!img && visible( img );
-       }
-       return ( /input|select|textarea|button|object/.test( nodeName ) ?
-               !element.disabled :
-               "a" === nodeName ?
-                       element.href || isTabIndexNotNaN :
-                       isTabIndexNotNaN) &&
-               // the element and all of its ancestors must be visible
-               visible( element );
-}
-
-function visible( element ) {
-       return $.expr.filters.visible( element ) &&
-               !$( element ).parents().addBack().filter(function() {
-                       return $.css( this, "visibility" ) === "hidden";
-               }).length;
-}
-
-$.extend( $.expr[ ":" ], {
-       data: $.expr.createPseudo ?
-               $.expr.createPseudo(function( dataName ) {
-                       return function( elem ) {
-                               return !!$.data( elem, dataName );
-                       };
-               }) :
-               // support: jQuery <1.8
-               function( elem, i, match ) {
-                       return !!$.data( elem, match[ 3 ] );
-               },
-
-       focusable: function( element ) {
-               return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
-       },
-
-       tabbable: function( element ) {
-               var tabIndex = $.attr( element, "tabindex" ),
-                       isTabIndexNaN = isNaN( tabIndex );
-               return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
-       }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
-       $.each( [ "Width", "Height" ], function( i, name ) {
-               var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
-                       type = name.toLowerCase(),
-                       orig = {
-                               innerWidth: $.fn.innerWidth,
-                               innerHeight: $.fn.innerHeight,
-                               outerWidth: $.fn.outerWidth,
-                               outerHeight: $.fn.outerHeight
-                       };
-
-               function reduce( elem, size, border, margin ) {
-                       $.each( side, function() {
-                               size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
-                               if ( border ) {
-                                       size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
-                               }
-                               if ( margin ) {
-                                       size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
-                               }
-                       });
-                       return size;
-               }
-
-               $.fn[ "inner" + name ] = function( size ) {
-                       if ( size === undefined ) {
-                               return orig[ "inner" + name ].call( this );
-                       }
-
-                       return this.each(function() {
-                               $( this ).css( type, reduce( this, size ) + "px" );
-                       });
-               };
-
-               $.fn[ "outer" + name] = function( size, margin ) {
-                       if ( typeof size !== "number" ) {
-                               return orig[ "outer" + name ].call( this, size );
-                       }
-
-                       return this.each(function() {
-                               $( this).css( type, reduce( this, size, true, margin ) + "px" );
-                       });
-               };
-       });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
-       $.fn.addBack = function( selector ) {
-               return this.add( selector == null ?
-                       this.prevObject : this.prevObject.filter( selector )
-               );
-       };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
-       $.fn.removeData = (function( removeData ) {
-               return function( key ) {
-                       if ( arguments.length ) {
-                               return removeData.call( this, $.camelCase( key ) );
-                       } else {
-                               return removeData.call( this );
-                       }
-               };
-       })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.support.selectstart = "onselectstart" in document.createElement( "div" );
-$.fn.extend({
-       disableSelection: function() {
-               return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
-                       ".ui-disableSelection", function( event ) {
-                               event.preventDefault();
-                       });
-       },
-
-       enableSelection: function() {
-               return this.unbind( ".ui-disableSelection" );
-       }
-});
-
-$.extend( $.ui, {
-       // $.ui.plugin is deprecated. Use $.widget() extensions instead.
-       plugin: {
-               add: function( module, option, set ) {
-                       var i,
-                               proto = $.ui[ module ].prototype;
-                       for ( i in set ) {
-                               proto.plugins[ i ] = proto.plugins[ i ] || [];
-                               proto.plugins[ i ].push( [ option, set[ i ] ] );
-                       }
-               },
-               call: function( instance, name, args ) {
-                       var i,
-                               set = instance.plugins[ name ];
-                       if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
-                               return;
-                       }
-
-                       for ( i = 0; i < set.length; i++ ) {
-                               if ( instance.options[ set[ i ][ 0 ] ] ) {
-                                       set[ i ][ 1 ].apply( instance.element, args );
-                               }
-                       }
-               }
-       },
-
-       // only used by resizable
-       hasScroll: function( el, a ) {
-
-               //If overflow is hidden, the element might have extra content, but the user wants to hide it
-               if ( $( el ).css( "overflow" ) === "hidden") {
-                       return false;
-               }
-
-               var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
-                       has = false;
-
-               if ( el[ scroll ] > 0 ) {
-                       return true;
-               }
-
-               // TODO: determine which cases actually cause this to happen
-               // if the element doesn't have the scroll set, see if it's possible to
-               // set the scroll
-               el[ scroll ] = 1;
-               has = ( el[ scroll ] > 0 );
-               el[ scroll ] = 0;
-               return has;
-       }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
-       slice = Array.prototype.slice,
-       _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
-       for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
-               try {
-                       $( elem ).triggerHandler( "remove" );
-               // http://bugs.jquery.com/ticket/8235
-               } catch( e ) {}
-       }
-       _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
-       var fullName, existingConstructor, constructor, basePrototype,
-               // proxiedPrototype allows the provided prototype to remain unmodified
-               // so that it can be used as a mixin for multiple widgets (#8876)
-               proxiedPrototype = {},
-               namespace = name.split( "." )[ 0 ];
-
-       name = name.split( "." )[ 1 ];
-       fullName = namespace + "-" + name;
-
-       if ( !prototype ) {
-               prototype = base;
-               base = $.Widget;
-       }
-
-       // create selector for plugin
-       $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
-               return !!$.data( elem, fullName );
-       };
-
-       $[ namespace ] = $[ namespace ] || {};
-       existingConstructor = $[ namespace ][ name ];
-       constructor = $[ namespace ][ name ] = function( options, element ) {
-               // allow instantiation without "new" keyword
-               if ( !this._createWidget ) {
-                       return new constructor( options, element );
-               }
-
-               // allow instantiation without initializing for simple inheritance
-               // must use "new" keyword (the code above always passes args)
-               if ( arguments.length ) {
-                       this._createWidget( options, element );
-               }
-       };
-       // extend with the existing constructor to carry over any static properties
-       $.extend( constructor, existingConstructor, {
-               version: prototype.version,
-               // copy the object used to create the prototype in case we need to
-               // redefine the widget later
-               _proto: $.extend( {}, prototype ),
-               // track widgets that inherit from this widget in case this widget is
-               // redefined after a widget inherits from it
-               _childConstructors: []
-       });
-
-       basePrototype = new base();
-       // we need to make the options hash a property directly on the new instance
-       // otherwise we'll modify the options hash on the prototype that we're
-       // inheriting from
-       basePrototype.options = $.widget.extend( {}, basePrototype.options );
-       $.each( prototype, function( prop, value ) {
-               if ( !$.isFunction( value ) ) {
-                       proxiedPrototype[ prop ] = value;
-                       return;
-               }
-               proxiedPrototype[ prop ] = (function() {
-                       var _super = function() {
-                                       return base.prototype[ prop ].apply( this, arguments );
-                               },
-                               _superApply = function( args ) {
-                                       return base.prototype[ prop ].apply( this, args );
-                               };
-                       return function() {
-                               var __super = this._super,
-                                       __superApply = this._superApply,
-                                       returnValue;
-
-                               this._super = _super;
-                               this._superApply = _superApply;
-
-                               returnValue = value.apply( this, arguments );
-
-                               this._super = __super;
-                               this._superApply = __superApply;
-
-                               return returnValue;
-                       };
-               })();
-       });
-       constructor.prototype = $.widget.extend( basePrototype, {
-               // TODO: remove support for widgetEventPrefix
-               // always use the name + a colon as the prefix, e.g., draggable:start
-               // don't prefix for widgets that aren't DOM-based
-               widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
-       }, proxiedPrototype, {
-               constructor: constructor,
-               namespace: namespace,
-               widgetName: name,
-               widgetFullName: fullName
-       });
-
-       // If this widget is being redefined then we need to find all widgets that
-       // are inheriting from it and redefine all of them so that they inherit from
-       // the new version of this widget. We're essentially trying to replace one
-       // level in the prototype chain.
-       if ( existingConstructor ) {
-               $.each( existingConstructor._childConstructors, function( i, child ) {
-                       var childPrototype = child.prototype;
-
-                       // redefine the child widget using the same prototype that was
-                       // originally used, but inherit from the new version of the base
-                       $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
-               });
-               // remove the list of existing child constructors from the old constructor
-               // so the old child constructors can be garbage collected
-               delete existingConstructor._childConstructors;
-       } else {
-               base._childConstructors.push( constructor );
-       }
-
-       $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
-       var input = slice.call( arguments, 1 ),
-               inputIndex = 0,
-               inputLength = input.length,
-               key,
-               value;
-       for ( ; inputIndex < inputLength; inputIndex++ ) {
-               for ( key in input[ inputIndex ] ) {
-                       value = input[ inputIndex ][ key ];
-                       if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
-                               // Clone objects
-                               if ( $.isPlainObject( value ) ) {
-                                       target[ key ] = $.isPlainObject( target[ key ] ) ?
-                                               $.widget.extend( {}, target[ key ], value ) :
-                                               // Don't extend strings, arrays, etc. with objects
-                                               $.widget.extend( {}, value );
-                               // Copy everything else by reference
-                               } else {
-                                       target[ key ] = value;
-                               }
-                       }
-               }
-       }
-       return target;
-};
-
-$.widget.bridge = function( name, object ) {
-       var fullName = object.prototype.widgetFullName || name;
-       $.fn[ name ] = function( options ) {
-               var isMethodCall = typeof options === "string",
-                       args = slice.call( arguments, 1 ),
-                       returnValue = this;
-
-               // allow multiple hashes to be passed on init
-               options = !isMethodCall && args.length ?
-                       $.widget.extend.apply( null, [ options ].concat(args) ) :
-                       options;
-
-               if ( isMethodCall ) {
-                       this.each(function() {
-                               var methodValue,
-                                       instance = $.data( this, fullName );
-                               if ( !instance ) {
-                                       return $.error( "cannot call methods on " + name + " prior to initialization; " +
-                                               "attempted to call method '" + options + "'" );
-                               }
-                               if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
-                                       return $.error( "no such method '" + options + "' for " + name + " widget instance" );
-                               }
-                               methodValue = instance[ options ].apply( instance, args );
-                               if ( methodValue !== instance && methodValue !== undefined ) {
-                                       returnValue = methodValue && methodValue.jquery ?
-                                               returnValue.pushStack( methodValue.get() ) :
-                                               methodValue;
-                                       return false;
-                               }
-                       });
-               } else {
-                       this.each(function() {
-                               var instance = $.data( this, fullName );
-                               if ( instance ) {
-                                       instance.option( options || {} )._init();
-                               } else {
-                                       $.data( this, fullName, new object( options, this ) );
-                               }
-                       });
-               }
-
-               return returnValue;
-       };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
-       widgetName: "widget",
-       widgetEventPrefix: "",
-       defaultElement: "<div>",
-       options: {
-               disabled: false,
-
-               // callbacks
-               create: null
-       },
-       _createWidget: function( options, element ) {
-               element = $( element || this.defaultElement || this )[ 0 ];
-               this.element = $( element );
-               this.uuid = uuid++;
-               this.eventNamespace = "." + this.widgetName + this.uuid;
-               this.options = $.widget.extend( {},
-                       this.options,
-                       this._getCreateOptions(),
-                       options );
-
-               this.bindings = $();
-               this.hoverable = $();
-               this.focusable = $();
-
-               if ( element !== this ) {
-                       $.data( element, this.widgetFullName, this );
-                       this._on( true, this.element, {
-                               remove: function( event ) {
-                                       if ( event.target === element ) {
-                                               this.destroy();
-                                       }
-                               }
-                       });
-                       this.document = $( element.style ?
-                               // element within the document
-                               element.ownerDocument :
-                               // element is window or document
-                               element.document || element );
-                       this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
-               }
-
-               this._create();
-               this._trigger( "create", null, this._getCreateEventData() );
-               this._init();
-       },
-       _getCreateOptions: $.noop,
-       _getCreateEventData: $.noop,
-       _create: $.noop,
-       _init: $.noop,
-
-       destroy: function() {
-               this._destroy();
-               // we can probably remove the unbind calls in 2.0
-               // all event bindings should go through this._on()
-               this.element
-                       .unbind( this.eventNamespace )
-                       // 1.9 BC for #7810
-                       // TODO remove dual storage
-                       .removeData( this.widgetName )
-                       .removeData( this.widgetFullName )
-                       // support: jquery <1.6.3
-                       // http://bugs.jquery.com/ticket/9413
-                       .removeData( $.camelCase( this.widgetFullName ) );
-               this.widget()
-                       .unbind( this.eventNamespace )
-                       .removeAttr( "aria-disabled" )
-                       .removeClass(
-                               this.widgetFullName + "-disabled " +
-                               "ui-state-disabled" );
-
-               // clean up events and states
-               this.bindings.unbind( this.eventNamespace );
-               this.hoverable.removeClass( "ui-state-hover" );
-               this.focusable.removeClass( "ui-state-focus" );
-       },
-       _destroy: $.noop,
-
-       widget: function() {
-               return this.element;
-       },
-
-       option: function( key, value ) {
-               var options = key,
-                       parts,
-                       curOption,
-                       i;
-
-               if ( arguments.length === 0 ) {
-                       // don't return a reference to the internal hash
-                       return $.widget.extend( {}, this.options );
-               }
-
-               if ( typeof key === "string" ) {
-                       // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
-                       options = {};
-                       parts = key.split( "." );
-                       key = parts.shift();
-                       if ( parts.length ) {
-                               curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
-                               for ( i = 0; i < parts.length - 1; i++ ) {
-                                       curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
-                                       curOption = curOption[ parts[ i ] ];
-                               }
-                               key = parts.pop();
-                               if ( value === undefined ) {
-                                       return curOption[ key ] === undefined ? null : curOption[ key ];
-                               }
-                               curOption[ key ] = value;
-                       } else {
-                               if ( value === undefined ) {
-                                       return this.options[ key ] === undefined ? null : this.options[ key ];
-                               }
-                               options[ key ] = value;
-                       }
-               }
-
-               this._setOptions( options );
-
-               return this;
-       },
-       _setOptions: function( options ) {
-               var key;
-
-               for ( key in options ) {
-                       this._setOption( key, options[ key ] );
-               }
-
-               return this;
-       },
-       _setOption: function( key, value ) {
-               this.options[ key ] = value;
-
-               if ( key === "disabled" ) {
-                       this.widget()
-                               .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
-                               .attr( "aria-disabled", value );
-                       this.hoverable.removeClass( "ui-state-hover" );
-                       this.focusable.removeClass( "ui-state-focus" );
-               }
-
-               return this;
-       },
-
-       enable: function() {
-               return this._setOption( "disabled", false );
-       },
-       disable: function() {
-               return this._setOption( "disabled", true );
-       },
-
-       _on: function( suppressDisabledCheck, element, handlers ) {
-               var delegateElement,
-                       instance = this;
-
-               // no suppressDisabledCheck flag, shuffle arguments
-               if ( typeof suppressDisabledCheck !== "boolean" ) {
-                       handlers = element;
-                       element = suppressDisabledCheck;
-                       suppressDisabledCheck = false;
-               }
-
-               // no element argument, shuffle and use this.element
-               if ( !handlers ) {
-                       handlers = element;
-                       element = this.element;
-                       delegateElement = this.widget();
-               } else {
-                       // accept selectors, DOM elements
-                       element = delegateElement = $( element );
-                       this.bindings = this.bindings.add( element );
-               }
-
-               $.each( handlers, function( event, handler ) {
-                       function handlerProxy() {
-                               // allow widgets to customize the disabled handling
-                               // - disabled as an array instead of boolean
-                               // - disabled class as method for disabling individual parts
-                               if ( !suppressDisabledCheck &&
-                                               ( instance.options.disabled === true ||
-                                                       $( this ).hasClass( "ui-state-disabled" ) ) ) {
-                                       return;
-                               }
-                               return ( typeof handler === "string" ? instance[ handler ] : handler )
-                                       .apply( instance, arguments );
-                       }
-
-                       // copy the guid so direct unbinding works
-                       if ( typeof handler !== "string" ) {
-                               handlerProxy.guid = handler.guid =
-                                       handler.guid || handlerProxy.guid || $.guid++;
-                       }
-
-                       var match = event.match( /^(\w+)\s*(.*)$/ ),
-                               eventName = match[1] + instance.eventNamespace,
-                               selector = match[2];
-                       if ( selector ) {
-                               delegateElement.delegate( selector, eventName, handlerProxy );
-                       } else {
-                               element.bind( eventName, handlerProxy );
-                       }
-               });
-       },
-
-       _off: function( element, eventName ) {
-               eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
-               element.unbind( eventName ).undelegate( eventName );
-       },
-
-       _delay: function( handler, delay ) {
-               function handlerProxy() {
-                       return ( typeof handler === "string" ? instance[ handler ] : handler )
-                               .apply( instance, arguments );
-               }
-               var instance = this;
-               return setTimeout( handlerProxy, delay || 0 );
-       },
-
-       _hoverable: function( element ) {
-               this.hoverable = this.hoverable.add( element );
-               this._on( element, {
-                       mouseenter: function( event ) {
-                               $( event.currentTarget ).addClass( "ui-state-hover" );
-                       },
-                       mouseleave: function( event ) {
-                               $( event.currentTarget ).removeClass( "ui-state-hover" );
-                       }
-               });
-       },
-
-       _focusable: function( element ) {
-               this.focusable = this.focusable.add( element );
-               this._on( element, {
-                       focusin: function( event ) {
-                               $( event.currentTarget ).addClass( "ui-state-focus" );
-                       },
-                       focusout: function( event ) {
-                               $( event.currentTarget ).removeClass( "ui-state-focus" );
-                       }
-               });
-       },
-
-       _trigger: function( type, event, data ) {
-               var prop, orig,
-                       callback = this.options[ type ];
-
-               data = data || {};
-               event = $.Event( event );
-               event.type = ( type === this.widgetEventPrefix ?
-                       type :
-                       this.widgetEventPrefix + type ).toLowerCase();
-               // the original event may come from any element
-               // so we need to reset the target on the new event
-               event.target = this.element[ 0 ];
-
-               // copy original event properties over to the new event
-               orig = event.originalEvent;
-               if ( orig ) {
-                       for ( prop in orig ) {
-                               if ( !( prop in event ) ) {
-                                       event[ prop ] = orig[ prop ];
-                               }
-                       }
-               }
-
-               this.element.trigger( event, data );
-               return !( $.isFunction( callback ) &&
-                       callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
-                       event.isDefaultPrevented() );
-       }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
-       $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
-               if ( typeof options === "string" ) {
-                       options = { effect: options };
-               }
-               var hasOptions,
-                       effectName = !options ?
-                               method :
-                               options === true || typeof options === "number" ?
-                                       defaultEffect :
-                                       options.effect || defaultEffect;
-               options = options || {};
-               if ( typeof options === "number" ) {
-                       options = { duration: options };
-               }
-               hasOptions = !$.isEmptyObject( options );
-               options.complete = callback;
-               if ( options.delay ) {
-                       element.delay( options.delay );
-               }
-               if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
-                       element[ method ]( options );
-               } else if ( effectName !== method && element[ effectName ] ) {
-                       element[ effectName ]( options.duration, options.easing, callback );
-               } else {
-                       element.queue(function( next ) {
-                               $( this )[ method ]();
-                               if ( callback ) {
-                                       callback.call( element[ 0 ] );
-                               }
-                               next();
-                       });
-               }
-       };
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
-       mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
-       version: "1.10.3",
-       options: {
-               cancel: "input,textarea,button,select,option",
-               distance: 1,
-               delay: 0
-       },
-       _mouseInit: function() {
-               var that = this;
-
-               this.element
-                       .bind("mousedown."+this.widgetName, function(event) {
-                               return that._mouseDown(event);
-                       })
-                       .bind("click."+this.widgetName, function(event) {
-                               if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
-                                       $.removeData(event.target, that.widgetName + ".preventClickEvent");
-                                       event.stopImmediatePropagation();
-                                       return false;
-                               }
-                       });
-
-               this.started = false;
-       },
-
-       // TODO: make sure destroying one instance of mouse doesn't mess with
-       // other instances of mouse
-       _mouseDestroy: function() {
-               this.element.unbind("."+this.widgetName);
-               if ( this._mouseMoveDelegate ) {
-                       $(document)
-                               .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
-                               .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
-               }
-       },
-
-       _mouseDown: function(event) {
-               // don't let more than one widget handle mouseStart
-               if( mouseHandled ) { return; }
-
-               // we may have missed mouseup (out of window)
-               (this._mouseStarted && this._mouseUp(event));
-
-               this._mouseDownEvent = event;
-
-               var that = this,
-                       btnIsLeft = (event.which === 1),
-                       // event.target.nodeName works around a bug in IE 8 with
-                       // disabled inputs (#7620)
-                       elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
-               if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
-                       return true;
-               }
-
-               this.mouseDelayMet = !this.options.delay;
-               if (!this.mouseDelayMet) {
-                       this._mouseDelayTimer = setTimeout(function() {
-                               that.mouseDelayMet = true;
-                       }, this.options.delay);
-               }
-
-               if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
-                       this._mouseStarted = (this._mouseStart(event) !== false);
-                       if (!this._mouseStarted) {
-                               event.preventDefault();
-                               return true;
-                       }
-               }
-
-               // Click event may never have fired (Gecko & Opera)
-               if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
-                       $.removeData(event.target, this.widgetName + ".preventClickEvent");
-               }
-
-               // these delegates are required to keep context
-               this._mouseMoveDelegate = function(event) {
-                       return that._mouseMove(event);
-               };
-               this._mouseUpDelegate = function(event) {
-                       return that._mouseUp(event);
-               };
-               $(document)
-                       .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
-                       .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
-               event.preventDefault();
-
-               mouseHandled = true;
-               return true;
-       },
-
-       _mouseMove: function(event) {
-               // IE mouseup check - mouseup happened when mouse was out of window
-               if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
-                       return this._mouseUp(event);
-               }
-
-               if (this._mouseStarted) {
-                       this._mouseDrag(event);
-                       return event.preventDefault();
-               }
-
-               if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
-                       this._mouseStarted =
-                               (this._mouseStart(this._mouseDownEvent, event) !== false);
-                       (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
-               }
-
-               return !this._mouseStarted;
-       },
-
-       _mouseUp: function(event) {
-               $(document)
-                       .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
-                       .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
-
-               if (this._mouseStarted) {
-                       this._mouseStarted = false;
-
-                       if (event.target === this._mouseDownEvent.target) {
-                               $.data(event.target, this.widgetName + ".preventClickEvent", true);
-                       }
-
-                       this._mouseStop(event);
-               }
-
-               return false;
-       },
-
-       _mouseDistanceMet: function(event) {
-               return (Math.max(
-                               Math.abs(this._mouseDownEvent.pageX - event.pageX),
-                               Math.abs(this._mouseDownEvent.pageY - event.pageY)
-                       ) >= this.options.distance
-               );
-       },
-
-       _mouseDelayMet: function(/* event */) {
-               return this.mouseDelayMet;
-       },
-
-       // These are placeholder methods, to be overriden by extending plugin
-       _mouseStart: function(/* event */) {},
-       _mouseDrag: function(/* event */) {},
-       _mouseStop: function(/* event */) {},
-       _mouseCapture: function(/* event */) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-/*jshint loopfunc: true */
-
-function isOverAxis( x, reference, size ) {
-       return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-function isFloating(item) {
-       return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
-}
-
-$.widget("ui.sortable", $.ui.mouse, {
-       version: "1.10.3",
-       widgetEventPrefix: "sort",
-       ready: false,
-       options: {
-               appendTo: "parent",
-               axis: false,
-               connectWith: false,
-               containment: false,
-               cursor: "auto",
-               cursorAt: false,
-               dropOnEmpty: true,
-               forcePlaceholderSize: false,
-               forceHelperSize: false,
-               grid: false,
-               handle: false,
-               helper: "original",
-               items: "> *",
-               opacity: false,
-               placeholder: false,
-               revert: false,
-               scroll: true,
-               scrollSensitivity: 20,
-               scrollSpeed: 20,
-               scope: "default",
-               tolerance: "intersect",
-               zIndex: 1000,
-
-               // callbacks
-               activate: null,
-               beforeStop: null,
-               change: null,
-               deactivate: null,
-               out: null,
-               over: null,
-               receive: null,
-               remove: null,
-               sort: null,
-               start: null,
-               stop: null,
-               update: null
-       },
-       _create: function() {
-
-               var o = this.options;
-               this.containerCache = {};
-               this.element.addClass("ui-sortable");
-
-               //Get the items
-               this.refresh();
-
-               //Let's determine if the items are being displayed horizontally
-               this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
-
-               //Let's determine the parent's offset
-               this.offset = this.element.offset();
-
-               //Initialize mouse events for interaction
-               this._mouseInit();
-
-               //We're ready to go
-               this.ready = true;
-
-       },
-
-       _destroy: function() {
-               this.element
-                       .removeClass("ui-sortable ui-sortable-disabled");
-               this._mouseDestroy();
-
-               for ( var i = this.items.length - 1; i >= 0; i-- ) {
-                       this.items[i].item.removeData(this.widgetName + "-item");
-               }
-
-               return this;
-       },
-
-       _setOption: function(key, value){
-               if ( key === "disabled" ) {
-                       this.options[ key ] = value;
-
-                       this.widget().toggleClass( "ui-sortable-disabled", !!value );
-               } else {
-                       // Don't call widget base _setOption for disable as it adds ui-state-disabled class
-                       $.Widget.prototype._setOption.apply(this, arguments);
-               }
-       },
-
-       _mouseCapture: function(event, overrideHandle) {
-               var currentItem = null,
-                       validHandle = false,
-                       that = this;
-
-               if (this.reverting) {
-                       return false;
-               }
-
-               if(this.options.disabled || this.options.type === "static") {
-                       return false;
-               }
-
-               //We have to refresh the items data once first
-               this._refreshItems(event);
-
-               //Find out if the clicked node (or one of its parents) is a actual item in this.items
-               $(event.target).parents().each(function() {
-                       if($.data(this, that.widgetName + "-item") === that) {
-                               currentItem = $(this);
-                               return false;
-                       }
-               });
-               if($.data(event.target, that.widgetName + "-item") === that) {
-                       currentItem = $(event.target);
-               }
-
-               if(!currentItem) {
-                       return false;
-               }
-               if(this.options.handle && !overrideHandle) {
-                       $(this.options.handle, currentItem).find("*").addBack().each(function() {
-                               if(this === event.target) {
-                                       validHandle = true;
-                               }
-                       });
-                       if(!validHandle) {
-                               return false;
-                       }
-               }
-
-               this.currentItem = currentItem;
-               this._removeCurrentsFromItems();
-               return true;
-
-       },
-
-       _mouseStart: function(event, overrideHandle, noActivation) {
-
-               var i, body,
-                       o = this.options;
-
-               this.currentContainer = this;
-
-               //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
-               this.refreshPositions();
-
-               //Create and append the visible helper
-               this.helper = this._createHelper(event);
-
-               //Cache the helper size
-               this._cacheHelperProportions();
-
-               /*
-                * - Position generation -
-                * This block generates everything position related - it's the core of draggables.
-                */
-
-               //Cache the margins of the original element
-               this._cacheMargins();
-
-               //Get the next scrolling parent
-               this.scrollParent = this.helper.scrollParent();
-
-               //The element's absolute position on the page minus margins
-               this.offset = this.currentItem.offset();
-               this.offset = {
-                       top: this.offset.top - this.margins.top,
-                       left: this.offset.left - this.margins.left
-               };
-
-               $.extend(this.offset, {
-                       click: { //Where the click happened, relative to the element
-                               left: event.pageX - this.offset.left,
-                               top: event.pageY - this.offset.top
-                       },
-                       parent: this._getParentOffset(),
-                       relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
-               });
-
-               // Only after we got the offset, we can change the helper's position to absolute
-               // TODO: Still need to figure out a way to make relative sorting possible
-               this.helper.css("position", "absolute");
-               this.cssPosition = this.helper.css("position");
-
-               //Generate the original position
-               this.originalPosition = this._generatePosition(event);
-               this.originalPageX = event.pageX;
-               this.originalPageY = event.pageY;
-
-               //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
-               (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
-               //Cache the former DOM position
-               this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
-               //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
-               if(this.helper[0] !== this.currentItem[0]) {
-                       this.currentItem.hide();
-               }
-
-               //Create the placeholder
-               this._createPlaceholder();
-
-               //Set a containment if given in the options
-               if(o.containment) {
-                       this._setContainment();
-               }
-
-               if( o.cursor && o.cursor !== "auto" ) { // cursor option
-                       body = this.document.find( "body" );
-
-                       // support: IE
-                       this.storedCursor = body.css( "cursor" );
-                       body.css( "cursor", o.cursor );
-
-                       this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
-               }
-
-               if(o.opacity) { // opacity option
-                       if (this.helper.css("opacity")) {
-                               this._storedOpacity = this.helper.css("opacity");
-                       }
-                       this.helper.css("opacity", o.opacity);
-               }
-
-               if(o.zIndex) { // zIndex option
-                       if (this.helper.css("zIndex")) {
-                               this._storedZIndex = this.helper.css("zIndex");
-                       }
-                       this.helper.css("zIndex", o.zIndex);
-               }
-
-               //Prepare scrolling
-               if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
-                       this.overflowOffset = this.scrollParent.offset();
-               }
-
-               //Call callbacks
-               this._trigger("start", event, this._uiHash());
-
-               //Recache the helper size
-               if(!this._preserveHelperProportions) {
-                       this._cacheHelperProportions();
-               }
-
-
-               //Post "activate" events to possible containers
-               if( !noActivation ) {
-                       for ( i = this.containers.length - 1; i >= 0; i-- ) {
-                               this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
-                       }
-               }
-
-               //Prepare possible droppables
-               if($.ui.ddmanager) {
-                       $.ui.ddmanager.current = this;
-               }
-
-               if ($.ui.ddmanager && !o.dropBehaviour) {
-                       $.ui.ddmanager.prepareOffsets(this, event);
-               }
-
-               this.dragging = true;
-
-               this.helper.addClass("ui-sortable-helper");
-               this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-               return true;
-
-       },
-
-       _mouseDrag: function(event) {
-               var i, item, itemElement, intersection,
-                       o = this.options,
-                       scrolled = false;
-
-               //Compute the helpers position
-               this.position = this._generatePosition(event);
-               this.positionAbs = this._convertPositionTo("absolute");
-
-               if (!this.lastPositionAbs) {
-                       this.lastPositionAbs = this.positionAbs;
-               }
-
-               //Do scrolling
-               if(this.options.scroll) {
-                       if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
-
-                               if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
-                                       this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
-                               } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
-                                       this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
-                               }
-
-                               if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
-                                       this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
-                               } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
-                                       this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
-                               }
-
-                       } else {
-
-                               if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
-                                       scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
-                               } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
-                                       scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
-                               }
-
-                               if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
-                                       scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
-                               } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
-                                       scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
-                               }
-
-                       }
-
-                       if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
-                               $.ui.ddmanager.prepareOffsets(this, event);
-                       }
-               }
-
-               //Regenerate the absolute position used for position checks
-               this.positionAbs = this._convertPositionTo("absolute");
-
-               //Set the helper position
-               if(!this.options.axis || this.options.axis !== "y") {
-                       this.helper[0].style.left = this.position.left+"px";
-               }
-               if(!this.options.axis || this.options.axis !== "x") {
-                       this.helper[0].style.top = this.position.top+"px";
-               }
-
-               //Rearrange
-               for (i = this.items.length - 1; i >= 0; i--) {
-
-                       //Cache variables and intersection, continue if no intersection
-                       item = this.items[i];
-                       itemElement = item.item[0];
-                       intersection = this._intersectsWithPointer(item);
-                       if (!intersection) {
-                               continue;
-                       }
-
-                       // Only put the placeholder inside the current Container, skip all
-                       // items form other containers. This works because when moving
-                       // an item from one container to another the
-                       // currentContainer is switched before the placeholder is moved.
-                       //
-                       // Without this moving items in "sub-sortables" can cause the placeholder to jitter
-                       // beetween the outer and inner container.
-                       if (item.instance !== this.currentContainer) {
-                               continue;
-                       }
-
-                       // cannot intersect with itself
-                       // no useless actions that have been done before
-                       // no action if the item moved is the parent of the item checked
-                       if (itemElement !== this.currentItem[0] &&
-                               this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
-                               !$.contains(this.placeholder[0], itemElement) &&
-                               (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
-                       ) {
-
-                               this.direction = intersection === 1 ? "down" : "up";
-
-                               if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
-                                       this._rearrange(event, item);
-                               } else {
-                                       break;
-                               }
-
-                               this._trigger("change", event, this._uiHash());
-                               break;
-                       }
-               }
-
-               //Post events to containers
-               this._contactContainers(event);
-
-               //Interconnect with droppables
-               if($.ui.ddmanager) {
-                       $.ui.ddmanager.drag(this, event);
-               }
-
-               //Call callbacks
-               this._trigger("sort", event, this._uiHash());
-
-               this.lastPositionAbs = this.positionAbs;
-               return false;
-
-       },
-
-       _mouseStop: function(event, noPropagation) {
-
-               if(!event) {
-                       return;
-               }
-
-               //If we are using droppables, inform the manager about the drop
-               if ($.ui.ddmanager && !this.options.dropBehaviour) {
-                       $.ui.ddmanager.drop(this, event);
-               }
-
-               if(this.options.revert) {
-                       var that = this,
-                               cur = this.placeholder.offset(),
-                               axis = this.options.axis,
-                               animation = {};
-
-                       if ( !axis || axis === "x" ) {
-                               animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
-                       }
-                       if ( !axis || axis === "y" ) {
-                               animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
-                       }
-                       this.reverting = true;
-                       $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
-                               that._clear(event);
-                       });
-               } else {
-                       this._clear(event, noPropagation);
-               }
-
-               return false;
-
-       },
-
-       cancel: function() {
-
-               if(this.dragging) {
-
-                       this._mouseUp({ target: null });
-
-                       if(this.options.helper === "original") {
-                               this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
-                       } else {
-                               this.currentItem.show();
-                       }
-
-                       //Post deactivating events to containers
-                       for (var i = this.containers.length - 1; i >= 0; i--){
-                               this.containers[i]._trigger("deactivate", null, this._uiHash(this));
-                               if(this.containers[i].containerCache.over) {
-                                       this.containers[i]._trigger("out", null, this._uiHash(this));
-                                       this.containers[i].containerCache.over = 0;
-                               }
-                       }
-
-               }
-
-               if (this.placeholder) {
-                       //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
-                       if(this.placeholder[0].parentNode) {
-                               this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-                       }
-                       if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
-                               this.helper.remove();
-                       }
-
-                       $.extend(this, {
-                               helper: null,
-                               dragging: false,
-                               reverting: false,
-                               _noFinalSort: null
-                       });
-
-                       if(this.domPosition.prev) {
-                               $(this.domPosition.prev).after(this.currentItem);
-                       } else {
-                               $(this.domPosition.parent).prepend(this.currentItem);
-                       }
-               }
-
-               return this;
-
-       },
-
-       serialize: function(o) {
-
-               var items = this._getItemsAsjQuery(o && o.connected),
-                       str = [];
-               o = o || {};
-
-               $(items).each(function() {
-                       var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
-                       if (res) {
-                               str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
-                       }
-               });
-
-               if(!str.length && o.key) {
-                       str.push(o.key + "=");
-               }
-
-               return str.join("&");
-
-       },
-
-       toArray: function(o) {
-
-               var items = this._getItemsAsjQuery(o && o.connected),
-                       ret = [];
-
-               o = o || {};
-
-               items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
-               return ret;
-
-       },
-
-       /* Be careful with the following core functions */
-       _intersectsWith: function(item) {
-
-               var x1 = this.positionAbs.left,
-                       x2 = x1 + this.helperProportions.width,
-                       y1 = this.positionAbs.top,
-                       y2 = y1 + this.helperProportions.height,
-                       l = item.left,
-                       r = l + item.width,
-                       t = item.top,
-                       b = t + item.height,
-                       dyClick = this.offset.click.top,
-                       dxClick = this.offset.click.left,
-                       isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
-                       isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
-                       isOverElement = isOverElementHeight && isOverElementWidth;
-
-               if ( this.options.tolerance === "pointer" ||
-                       this.options.forcePointerForContainers ||
-                       (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
-               ) {
-                       return isOverElement;
-               } else {
-
-                       return (l < x1 + (this.helperProportions.width / 2) && // Right Half
-                               x2 - (this.helperProportions.width / 2) < r && // Left Half
-                               t < y1 + (this.helperProportions.height / 2) && // Bottom Half
-                               y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
-               }
-       },
-
-       _intersectsWithPointer: function(item) {
-
-               var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
-                       isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
-                       isOverElement = isOverElementHeight && isOverElementWidth,
-                       verticalDirection = this._getDragVerticalDirection(),
-                       horizontalDirection = this._getDragHorizontalDirection();
-
-               if (!isOverElement) {
-                       return false;
-               }
-
-               return this.floating ?
-                       ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
-                       : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
-       },
-
-       _intersectsWithSides: function(item) {
-
-               var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
-                       isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
-                       verticalDirection = this._getDragVerticalDirection(),
-                       horizontalDirection = this._getDragHorizontalDirection();
-
-               if (this.floating && horizontalDirection) {
-                       return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
-               } else {
-                       return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
-               }
-
-       },
-
-       _getDragVerticalDirection: function() {
-               var delta = this.positionAbs.top - this.lastPositionAbs.top;
-               return delta !== 0 && (delta > 0 ? "down" : "up");
-       },
-
-       _getDragHorizontalDirection: function() {
-               var delta = this.positionAbs.left - this.lastPositionAbs.left;
-               return delta !== 0 && (delta > 0 ? "right" : "left");
-       },
-
-       refresh: function(event) {
-               this._refreshItems(event);
-               this.refreshPositions();
-               return this;
-       },
-
-       _connectWith: function() {
-               var options = this.options;
-               return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
-       },
-
-       _getItemsAsjQuery: function(connected) {
-
-               var i, j, cur, inst,
-                       items = [],
-                       queries = [],
-                       connectWith = this._connectWith();
-
-               if(connectWith && connected) {
-                       for (i = connectWith.length - 1; i >= 0; i--){
-                               cur = $(connectWith[i]);
-                               for ( j = cur.length - 1; j >= 0; j--){
-                                       inst = $.data(cur[j], this.widgetFullName);
-                                       if(inst && inst !== this && !inst.options.disabled) {
-                                               queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
-                                       }
-                               }
-                       }
-               }
-
-               queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
-               for (i = queries.length - 1; i >= 0; i--){
-                       queries[i][0].each(function() {
-                               items.push(this);
-                       });
-               }
-
-               return $(items);
-
-       },
-
-       _removeCurrentsFromItems: function() {
-
-               var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
-               this.items = $.grep(this.items, function (item) {
-                       for (var j=0; j < list.length; j++) {
-                               if(list[j] === item.item[0]) {
-                                       return false;
-                               }
-                       }
-                       return true;
-               });
-
-       },
-
-       _refreshItems: function(event) {
-
-               this.items = [];
-               this.containers = [this];
-
-               var i, j, cur, inst, targetData, _queries, item, queriesLength,
-                       items = this.items,
-                       queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
-                       connectWith = this._connectWith();
-
-               if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
-                       for (i = connectWith.length - 1; i >= 0; i--){
-                               cur = $(connectWith[i]);
-                               for (j = cur.length - 1; j >= 0; j--){
-                                       inst = $.data(cur[j], this.widgetFullName);
-                                       if(inst && inst !== this && !inst.options.disabled) {
-                                               queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
-                                               this.containers.push(inst);
-                                       }
-                               }
-                       }
-               }
-
-               for (i = queries.length - 1; i >= 0; i--) {
-                       targetData = queries[i][1];
-                       _queries = queries[i][0];
-
-                       for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
-                               item = $(_queries[j]);
-
-                               item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
-                               items.push({
-                                       item: item,
-                                       instance: targetData,
-                                       width: 0, height: 0,
-                                       left: 0, top: 0
-                               });
-                       }
-               }
-
-       },
-
-       refreshPositions: function(fast) {
-
-               //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
-               if(this.offsetParent && this.helper) {
-                       this.offset.parent = this._getParentOffset();
-               }
-
-               var i, item, t, p;
-
-               for (i = this.items.length - 1; i >= 0; i--){
-                       item = this.items[i];
-
-                       //We ignore calculating positions of all connected containers when we're not over them
-                       if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
-                               continue;
-                       }
-
-                       t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
-                       if (!fast) {
-                               item.width = t.outerWidth();
-                               item.height = t.outerHeight();
-                       }
-
-                       p = t.offset();
-                       item.left = p.left;
-                       item.top = p.top;
-               }
-
-               if(this.options.custom && this.options.custom.refreshContainers) {
-                       this.options.custom.refreshContainers.call(this);
-               } else {
-                       for (i = this.containers.length - 1; i >= 0; i--){
-                               p = this.containers[i].element.offset();
-                               this.containers[i].containerCache.left = p.left;
-                               this.containers[i].containerCache.top = p.top;
-                               this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
-                               this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
-                       }
-               }
-
-               return this;
-       },
-
-       _createPlaceholder: function(that) {
-               that = that || this;
-               var className,
-                       o = that.options;
-
-               if(!o.placeholder || o.placeholder.constructor === String) {
-                       className = o.placeholder;
-                       o.placeholder = {
-                               element: function() {
-
-                                       var nodeName = that.currentItem[0].nodeName.toLowerCase(),
-                                               element = $( "<" + nodeName + ">", that.document[0] )
-                                                       .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
-                                                       .removeClass("ui-sortable-helper");
-
-                                       if ( nodeName === "tr" ) {
-                                               that.currentItem.children().each(function() {
-                                                       $( "<td>&#160;</td>", that.document[0] )
-                                                               .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
-                                                               .appendTo( element );
-                                               });
-                                       } else if ( nodeName === "img" ) {
-                                               element.attr( "src", that.currentItem.attr( "src" ) );
-                                       }
-
-                                       if ( !className ) {
-                                               element.css( "visibility", "hidden" );
-                                       }
-
-                                       return element;
-                               },
-                               update: function(container, p) {
-
-                                       // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
-                                       // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
-                                       if(className && !o.forcePlaceholderSize) {
-                                               return;
-                                       }
-
-                                       //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
-                                       if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
-                                       if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
-                               }
-                       };
-               }
-
-               //Create the placeholder
-               that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
-               //Append it after the actual current item
-               that.currentItem.after(that.placeholder);
-
-               //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
-               o.placeholder.update(that, that.placeholder);
-
-       },
-
-       _contactContainers: function(event) {
-               var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
-                       innermostContainer = null,
-                       innermostIndex = null;
-
-               // get innermost container that intersects with item
-               for (i = this.containers.length - 1; i >= 0; i--) {
-
-                       // never consider a container that's located within the item itself
-                       if($.contains(this.currentItem[0], this.containers[i].element[0])) {
-                               continue;
-                       }
-
-                       if(this._intersectsWith(this.containers[i].containerCache)) {
-
-                               // if we've already found a container and it's more "inner" than this, then continue
-                               if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
-                                       continue;
-                               }
-
-                               innermostContainer = this.containers[i];
-                               innermostIndex = i;
-
-                       } else {
-                               // container doesn't intersect. trigger "out" event if necessary
-                               if(this.containers[i].containerCache.over) {
-                                       this.containers[i]._trigger("out", event, this._uiHash(this));
-                                       this.containers[i].containerCache.over = 0;
-                               }
-                       }
-
-               }
-
-               // if no intersecting containers found, return
-               if(!innermostContainer) {
-                       return;
-               }
-
-               // move the item into the container if it's not there already
-               if(this.containers.length === 1) {
-                       if (!this.containers[innermostIndex].containerCache.over) {
-                               this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
-                               this.containers[innermostIndex].containerCache.over = 1;
-                       }
-               } else {
-
-                       //When entering a new container, we will find the item with the least distance and append our item near it
-                       dist = 10000;
-                       itemWithLeastDistance = null;
-                       floating = innermostContainer.floating || isFloating(this.currentItem);
-                       posProperty = floating ? "left" : "top";
-                       sizeProperty = floating ? "width" : "height";
-                       base = this.positionAbs[posProperty] + this.offset.click[posProperty];
-                       for (j = this.items.length - 1; j >= 0; j--) {
-                               if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
-                                       continue;
-                               }
-                               if(this.items[j].item[0] === this.currentItem[0]) {
-                                       continue;
-                               }
-                               if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
-                                       continue;
-                               }
-                               cur = this.items[j].item.offset()[posProperty];
-                               nearBottom = false;
-                               if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
-                                       nearBottom = true;
-                                       cur += this.items[j][sizeProperty];
-                               }
-
-                               if(Math.abs(cur - base) < dist) {
-                                       dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
-                                       this.direction = nearBottom ? "up": "down";
-                               }
-                       }
-
-                       //Check if dropOnEmpty is enabled
-                       if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
-                               return;
-                       }
-
-                       if(this.currentContainer === this.containers[innermostIndex]) {
-                               return;
-                       }
-
-                       itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
-                       this._trigger("change", event, this._uiHash());
-                       this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-                       this.currentContainer = this.containers[innermostIndex];
-
-                       //Update the placeholder
-                       this.options.placeholder.update(this.currentContainer, this.placeholder);
-
-                       this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
-                       this.containers[innermostIndex].containerCache.over = 1;
-               }
-
-
-       },
-
-       _createHelper: function(event) {
-
-               var o = this.options,
-                       helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
-               //Add the helper to the DOM if that didn't happen already
-               if(!helper.parents("body").length) {
-                       $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
-               }
-
-               if(helper[0] === this.currentItem[0]) {
-                       this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
-               }
-
-               if(!helper[0].style.width || o.forceHelperSize) {
-                       helper.width(this.currentItem.width());
-               }
-               if(!helper[0].style.height || o.forceHelperSize) {
-                       helper.height(this.currentItem.height());
-               }
-
-               return helper;
-
-       },
-
-       _adjustOffsetFromHelper: function(obj) {
-               if (typeof obj === "string") {
-                       obj = obj.split(" ");
-               }
-               if ($.isArray(obj)) {
-                       obj = {left: +obj[0], top: +obj[1] || 0};
-               }
-               if ("left" in obj) {
-                       this.offset.click.left = obj.left + this.margins.left;
-               }
-               if ("right" in obj) {
-                       this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
-               }
-               if ("top" in obj) {
-                       this.offset.click.top = obj.top + this.margins.top;
-               }
-               if ("bottom" in obj) {
-                       this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
-               }
-       },
-
-       _getParentOffset: function() {
-
-
-               //Get the offsetParent and cache its position
-               this.offsetParent = this.helper.offsetParent();
-               var po = this.offsetParent.offset();
-
-               // This is a special case where we need to modify a offset calculated on start, since the following happened:
-               // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
-               // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
-               //    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
-               if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
-                       po.left += this.scrollParent.scrollLeft();
-                       po.top += this.scrollParent.scrollTop();
-               }
-
-               // This needs to be actually done for all browsers, since pageX/pageY includes this information
-               // with an ugly IE fix
-               if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
-                       po = { top: 0, left: 0 };
-               }
-
-               return {
-                       top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
-                       left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
-               };
-
-       },
-
-       _getRelativeOffset: function() {
-
-               if(this.cssPosition === "relative") {
-                       var p = this.currentItem.position();
-                       return {
-                               top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
-                               left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
-                       };
-               } else {
-                       return { top: 0, left: 0 };
-               }
-
-       },
-
-       _cacheMargins: function() {
-               this.margins = {
-                       left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
-                       top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
-               };
-       },
-
-       _cacheHelperProportions: function() {
-               this.helperProportions = {
-                       width: this.helper.outerWidth(),
-                       height: this.helper.outerHeight()
-               };
-       },
-
-       _setContainment: function() {
-
-               var ce, co, over,
-                       o = this.options;
-               if(o.containment === "parent") {
-                       o.containment = this.helper[0].parentNode;
-               }
-               if(o.containment === "document" || o.containment === "window") {
-                       this.containment = [
-                               0 - this.offset.relative.left - this.offset.parent.left,
-                               0 - this.offset.relative.top - this.offset.parent.top,
-                               $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
-                               ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
-                       ];
-               }
-
-               if(!(/^(document|window|parent)$/).test(o.containment)) {
-                       ce = $(o.containment)[0];
-                       co = $(o.containment).offset();
-                       over = ($(ce).css("overflow") !== "hidden");
-
-                       this.containment = [
-                               co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
-                               co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
-                               co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
-                               co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
-                       ];
-               }
-
-       },
-
-       _convertPositionTo: function(d, pos) {
-
-               if(!pos) {
-                       pos = this.position;
-               }
-               var mod = d === "absolute" ? 1 : -1,
-                       scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
-                       scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
-               return {
-                       top: (
-                               pos.top +                                                                                                                               // The absolute mouse position
-                               this.offset.relative.top * mod +                                                                                // Only for relative positioned nodes: Relative offset from element to offset parent
-                               this.offset.parent.top * mod -                                                                                  // The offsetParent's offset without borders (offset + border)
-                               ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
-                       ),
-                       left: (
-                               pos.left +                                                                                                                              // The absolute mouse position
-                               this.offset.relative.left * mod +                                                                               // Only for relative positioned nodes: Relative offset from element to offset parent
-                               this.offset.parent.left * mod   -                                                                               // The offsetParent's offset without borders (offset + border)
-                               ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
-                       )
-               };
-
-       },
-
-       _generatePosition: function(event) {
-
-               var top, left,
-                       o = this.options,
-                       pageX = event.pageX,
-                       pageY = event.pageY,
-                       scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
-               // This is another very weird special case that only happens for relative elements:
-               // 1. If the css position is relative
-               // 2. and the scroll parent is the document or similar to the offset parent
-               // we have to refresh the relative offset during the scroll so there are no jumps
-               if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
-                       this.offset.relative = this._getRelativeOffset();
-               }
-
-               /*
-                * - Position constraining -
-                * Constrain the position to a mix of grid, containment.
-                */
-
-               if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
-                       if(this.containment) {
-                               if(event.pageX - this.offset.click.left < this.containment[0]) {
-                                       pageX = this.containment[0] + this.offset.click.left;
-                               }
-                               if(event.pageY - this.offset.click.top < this.containment[1]) {
-                                       pageY = this.containment[1] + this.offset.click.top;
-                               }
-                               if(event.pageX - this.offset.click.left > this.containment[2]) {
-                                       pageX = this.containment[2] + this.offset.click.left;
-                               }
-                               if(event.pageY - this.offset.click.top > this.containment[3]) {
-                                       pageY = this.containment[3] + this.offset.click.top;
-                               }
-                       }
-
-                       if(o.grid) {
-                               top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
-                               pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
-                               left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
-                               pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
-                       }
-
-               }
-
-               return {
-                       top: (
-                               pageY -                                                                                                                         // The absolute mouse position
-                               this.offset.click.top -                                                                                                 // Click offset (relative to the element)
-                               this.offset.relative.top        -                                                                                       // Only for relative positioned nodes: Relative offset from element to offset parent
-                               this.offset.parent.top +                                                                                                // The offsetParent's offset without borders (offset + border)
-                               ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
-                       ),
-                       left: (
-                               pageX -                                                                                                                         // The absolute mouse position
-                               this.offset.click.left -                                                                                                // Click offset (relative to the element)
-                               this.offset.relative.left       -                                                                                       // Only for relative positioned nodes: Relative offset from element to offset parent
-                               this.offset.parent.left +                                                                                               // The offsetParent's offset without borders (offset + border)
-                               ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
-                       )
-               };
-
-       },
-
-       _rearrange: function(event, i, a, hardRefresh) {
-
-               a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
-               //Various things done here to improve the performance:
-               // 1. we create a setTimeout, that calls refreshPositions
-               // 2. on the instance, we have a counter variable, that get's higher after every append
-               // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
-               // 4. this lets only the last addition to the timeout stack through
-               this.counter = this.counter ? ++this.counter : 1;
-               var counter = this.counter;
-
-               this._delay(function() {
-                       if(counter === this.counter) {
-                               this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
-                       }
-               });
-
-       },
-
-       _clear: function(event, noPropagation) {
-
-               this.reverting = false;
-               // We delay all events that have to be triggered to after the point where the placeholder has been removed and
-               // everything else normalized again
-               var i,
-                       delayedTriggers = [];
-
-               // We first have to update the dom position of the actual currentItem
-               // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
-               if(!this._noFinalSort && this.currentItem.parent().length) {
-                       this.placeholder.before(this.currentItem);
-               }
-               this._noFinalSort = null;
-
-               if(this.helper[0] === this.currentItem[0]) {
-                       for(i in this._storedCSS) {
-                               if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
-                                       this._storedCSS[i] = "";
-                               }
-                       }
-                       this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
-               } else {
-                       this.currentItem.show();
-               }
-
-               if(this.fromOutside && !noPropagation) {
-                       delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
-               }
-               if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
-                       delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
-               }
-
-               // Check if the items Container has Changed and trigger appropriate
-               // events.
-               if (this !== this.currentContainer) {
-                       if(!noPropagation) {
-                               delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
-                               delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); };  }).call(this, this.currentContainer));
-                               delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this));  }; }).call(this, this.currentContainer));
-                       }
-               }
-
-
-               //Post events to containers
-               for (i = this.containers.length - 1; i >= 0; i--){
-                       if(!noPropagation) {
-                               delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
-                       }
-                       if(this.containers[i].containerCache.over) {
-                               delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
-                               this.containers[i].containerCache.over = 0;
-                       }
-               }
-
-               //Do what was originally in plugins
-               if ( this.storedCursor ) {
-                       this.document.find( "body" ).css( "cursor", this.storedCursor );
-                       this.storedStylesheet.remove();
-               }
-               if(this._storedOpacity) {
-                       this.helper.css("opacity", this._storedOpacity);
-               }
-               if(this._storedZIndex) {
-                       this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
-               }
-
-               this.dragging = false;
-               if(this.cancelHelperRemoval) {
-                       if(!noPropagation) {
-                               this._trigger("beforeStop", event, this._uiHash());
-                               for (i=0; i < delayedTriggers.length; i++) {
-                                       delayedTriggers[i].call(this, event);
-                               } //Trigger all delayed events
-                               this._trigger("stop", event, this._uiHash());
-                       }
-
-                       this.fromOutside = false;
-                       return false;
-               }
-
-               if(!noPropagation) {
-                       this._trigger("beforeStop", event, this._uiHash());
-               }
-
-               //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
-               this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
-               if(this.helper[0] !== this.currentItem[0]) {
-                       this.helper.remove();
-               }
-               this.helper = null;
-
-               if(!noPropagation) {
-                       for (i=0; i < delayedTriggers.length; i++) {
-                               delayedTriggers[i].call(this, event);
-                       } //Trigger all delayed events
-                       this._trigger("stop", event, this._uiHash());
-               }
-
-               this.fromOutside = false;
-               return true;
-
-       },
-
-       _trigger: function() {
-               if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
-                       this.cancel();
-               }
-       },
-
-       _uiHash: function(_inst) {
-               var inst = _inst || this;
-               return {
-                       helper: inst.helper,
-                       placeholder: inst.placeholder || $([]),
-                       position: inst.position,
-                       originalPosition: inst.originalPosition,
-                       offset: inst.positionAbs,
-                       item: inst.currentItem,
-                       sender: _inst ? _inst.element : null
-               };
-       }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-var uid = 0,
-       hideProps = {},
-       showProps = {};
-
-hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
-       hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
-showProps.height = showProps.paddingTop = showProps.paddingBottom =
-       showProps.borderTopWidth = showProps.borderBottomWidth = "show";
-
-$.widget( "ui.accordion", {
-       version: "1.10.3",
-       options: {
-               active: 0,
-               animate: {},
-               collapsible: false,
-               event: "click",
-               header: "> li > :first-child,> :not(li):even",
-               heightStyle: "auto",
-               icons: {
-                       activeHeader: "ui-icon-triangle-1-s",
-                       header: "ui-icon-triangle-1-e"
-               },
-
-               // callbacks
-               activate: null,
-               beforeActivate: null
-       },
-
-       _create: function() {
-               var options = this.options;
-               this.prevShow = this.prevHide = $();
-               this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
-                       // ARIA
-                       .attr( "role", "tablist" );
-
-               // don't allow collapsible: false and active: false / null
-               if ( !options.collapsible && (options.active === false || options.active == null) ) {
-                       options.active = 0;
-               }
-
-               this._processPanels();
-               // handle negative values
-               if ( options.active < 0 ) {
-                       options.active += this.headers.length;
-               }
-               this._refresh();
-       },
-
-       _getCreateEventData: function() {
-               return {
-                       header: this.active,
-                       panel: !this.active.length ? $() : this.active.next(),
-                       content: !this.active.length ? $() : this.active.next()
-               };
-       },
-
-       _createIcons: function() {
-               var icons = this.options.icons;
-               if ( icons ) {
-                       $( "<span>" )
-                               .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
-                               .prependTo( this.headers );
-                       this.active.children( ".ui-accordion-header-icon" )
-                               .removeClass( icons.header )
-                               .addClass( icons.activeHeader );
-                       this.headers.addClass( "ui-accordion-icons" );
-               }
-       },
-
-       _destroyIcons: function() {
-               this.headers
-                       .removeClass( "ui-accordion-icons" )
-                       .children( ".ui-accordion-header-icon" )
-                               .remove();
-       },
-
-       _destroy: function() {
-               var contents;
-
-               // clean up main element
-               this.element
-                       .removeClass( "ui-accordion ui-widget ui-helper-reset" )
-                       .removeAttr( "role" );
-
-               // clean up headers
-               this.headers
-                       .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
-                       .removeAttr( "role" )
-                       .removeAttr( "aria-selected" )
-                       .removeAttr( "aria-controls" )
-                       .removeAttr( "tabIndex" )
-                       .each(function() {
-                               if ( /^ui-accordion/.test( this.id ) ) {
-                                       this.removeAttribute( "id" );
-                               }
-                       });
-               this._destroyIcons();
-
-               // clean up content panels
-               contents = this.headers.next()
-                       .css( "display", "" )
-                       .removeAttr( "role" )
-                       .removeAttr( "aria-expanded" )
-                       .removeAttr( "aria-hidden" )
-                       .removeAttr( "aria-labelledby" )
-                       .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
-                       .each(function() {
-                               if ( /^ui-accordion/.test( this.id ) ) {
-                                       this.removeAttribute( "id" );
-                               }
-                       });
-               if ( this.options.heightStyle !== "content" ) {
-                       contents.css( "height", "" );
-               }
-       },
-
-       _setOption: function( key, value ) {
-               if ( key === "active" ) {
-                       // _activate() will handle invalid values and update this.options
-                       this._activate( value );
-                       return;
-               }
-
-               if ( key === "event" ) {
-                       if ( this.options.event ) {
-                               this._off( this.headers, this.options.event );
-                       }
-                       this._setupEvents( value );
-               }
-
-               this._super( key, value );
-
-               // setting collapsible: false while collapsed; open first panel
-               if ( key === "collapsible" && !value && this.options.active === false ) {
-                       this._activate( 0 );
-               }
-
-               if ( key === "icons" ) {
-                       this._destroyIcons();
-                       if ( value ) {
-                               this._createIcons();
-                       }
-               }
-
-               // #5332 - opacity doesn't cascade to positioned elements in IE
-               // so we need to add the disabled class to the headers and panels
-               if ( key === "disabled" ) {
-                       this.headers.add( this.headers.next() )
-                               .toggleClass( "ui-state-disabled", !!value );
-               }
-       },
-
-       _keydown: function( event ) {
-               /*jshint maxcomplexity:15*/
-               if ( event.altKey || event.ctrlKey ) {
-                       return;
-               }
-
-               var keyCode = $.ui.keyCode,
-                       length = this.headers.length,
-                       currentIndex = this.headers.index( event.target ),
-                       toFocus = false;
-
-               switch ( event.keyCode ) {
-                       case keyCode.RIGHT:
-                       case keyCode.DOWN:
-                               toFocus = this.headers[ ( currentIndex + 1 ) % length ];
-                               break;
-                       case keyCode.LEFT:
-                       case keyCode.UP:
-                               toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
-                               break;
-                       case keyCode.SPACE:
-                       case keyCode.ENTER:
-                               this._eventHandler( event );
-                               break;
-                       case keyCode.HOME:
-                               toFocus = this.headers[ 0 ];
-                               break;
-                       case keyCode.END:
-                               toFocus = this.headers[ length - 1 ];
-                               break;
-               }
-
-               if ( toFocus ) {
-                       $( event.target ).attr( "tabIndex", -1 );
-                       $( toFocus ).attr( "tabIndex", 0 );
-                       toFocus.focus();
-                       event.preventDefault();
-               }
-       },
-
-       _panelKeyDown : function( event ) {
-               if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
-                       $( event.currentTarget ).prev().focus();
-               }
-       },
-
-       refresh: function() {
-               var options = this.options;
-               this._processPanels();
-
-               // was collapsed or no panel
-               if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
-                       options.active = false;
-                       this.active = $();
-               // active false only when collapsible is true
-               } else if ( options.active === false ) {
-                       this._activate( 0 );
-               // was active, but active panel is gone
-               } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
-                       // all remaining panel are disabled
-                       if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
-                               options.active = false;
-                               this.active = $();
-                       // activate previous panel
-                       } else {
-                               this._activate( Math.max( 0, options.active - 1 ) );
-                       }
-               // was active, active panel still exists
-               } else {
-                       // make sure active index is correct
-                       options.active = this.headers.index( this.active );
-               }
-
-               this._destroyIcons();
-
-               this._refresh();
-       },
-
-       _processPanels: function() {
-               this.headers = this.element.find( this.options.header )
-                       .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
-
-               this.headers.next()
-                       .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
-                       .filter(":not(.ui-accordion-content-active)")
-                       .hide();
-       },
-
-       _refresh: function() {
-               var maxHeight,
-                       options = this.options,
-                       heightStyle = options.heightStyle,
-                       parent = this.element.parent(),
-                       accordionId = this.accordionId = "ui-accordion-" +
-                               (this.element.attr( "id" ) || ++uid);
-
-               this.active = this._findActive( options.active )
-                       .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
-                       .removeClass( "ui-corner-all" );
-               this.active.next()
-                       .addClass( "ui-accordion-content-active" )
-                       .show();
-
-               this.headers
-                       .attr( "role", "tab" )
-                       .each(function( i ) {
-                               var header = $( this ),
-                                       headerId = header.attr( "id" ),
-                                       panel = header.next(),
-                                       panelId = panel.attr( "id" );
-                               if ( !headerId ) {
-                                       headerId = accordionId + "-header-" + i;
-                                       header.attr( "id", headerId );
-                               }
-                               if ( !panelId ) {
-                                       panelId = accordionId + "-panel-" + i;
-                                       panel.attr( "id", panelId );
-                               }
-                               header.attr( "aria-controls", panelId );
-                               panel.attr( "aria-labelledby", headerId );
-                       })
-                       .next()
-                               .attr( "role", "tabpanel" );
-
-               this.headers
-                       .not( this.active )
-                       .attr({
-                               "aria-selected": "false",
-                               tabIndex: -1
-                       })
-                       .next()
-                               .attr({
-                                       "aria-expanded": "false",
-                                       "aria-hidden": "true"
-                               })
-                               .hide();
-
-               // make sure at least one header is in the tab order
-               if ( !this.active.length ) {
-                       this.headers.eq( 0 ).attr( "tabIndex", 0 );
-               } else {
-                       this.active.attr({
-                               "aria-selected": "true",
-                               tabIndex: 0
-                       })
-                       .next()
-                               .attr({
-                                       "aria-expanded": "true",
-                                       "aria-hidden": "false"
-                               });
-               }
-
-               this._createIcons();
-
-               this._setupEvents( options.event );
-
-               if ( heightStyle === "fill" ) {
-                       maxHeight = parent.height();
-                       this.element.siblings( ":visible" ).each(function() {
-                               var elem = $( this ),
-                                       position = elem.css( "position" );
-
-                               if ( position === "absolute" || position === "fixed" ) {
-                                       return;
-                               }
-                               maxHeight -= elem.outerHeight( true );
-                       });
-
-                       this.headers.each(function() {
-                               maxHeight -= $( this ).outerHeight( true );
-                       });
-
-                       this.headers.next()
-                               .each(function() {
-                                       $( this ).height( Math.max( 0, maxHeight -
-                                               $( this ).innerHeight() + $( this ).height() ) );
-                               })
-                               .css( "overflow", "auto" );
-               } else if ( heightStyle === "auto" ) {
-                       maxHeight = 0;
-                       this.headers.next()
-                               .each(function() {
-                                       maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
-                               })
-                               .height( maxHeight );
-               }
-       },
-
-       _activate: function( index ) {
-               var active = this._findActive( index )[ 0 ];
-
-               // trying to activate the already active panel
-               if ( active === this.active[ 0 ] ) {
-                       return;
-               }
-
-               // trying to collapse, simulate a click on the currently active header
-               active = active || this.active[ 0 ];
-
-               this._eventHandler({
-                       target: active,
-                       currentTarget: active,
-                       preventDefault: $.noop
-               });
-       },
-
-       _findActive: function( selector ) {
-               return typeof selector === "number" ? this.headers.eq( selector ) : $();
-       },
-
-       _setupEvents: function( event ) {
-               var events = {
-                       keydown: "_keydown"
-               };
-               if ( event ) {
-                       $.each( event.split(" "), function( index, eventName ) {
-                               events[ eventName ] = "_eventHandler";
-                       });
-               }
-
-               this._off( this.headers.add( this.headers.next() ) );
-               this._on( this.headers, events );
-               this._on( this.headers.next(), { keydown: "_panelKeyDown" });
-               this._hoverable( this.headers );
-               this._focusable( this.headers );
-       },
-
-       _eventHandler: function( event ) {
-               var options = this.options,
-                       active = this.active,
-                       clicked = $( event.currentTarget ),
-                       clickedIsActive = clicked[ 0 ] === active[ 0 ],
-                       collapsing = clickedIsActive && options.collapsible,
-                       toShow = collapsing ? $() : clicked.next(),
-                       toHide = active.next(),
-                       eventData = {
-                               oldHeader: active,
-                               oldPanel: toHide,
-                               newHeader: collapsing ? $() : clicked,
-                               newPanel: toShow
-                       };
-
-               event.preventDefault();
-
-               if (
-                               // click on active header, but not collapsible
-                               ( clickedIsActive && !options.collapsible ) ||
-                               // allow canceling activation
-                               ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
-                       return;
-               }
-
-               options.active = collapsing ? false : this.headers.index( clicked );
-
-               // when the call to ._toggle() comes after the class changes
-               // it causes a very odd bug in IE 8 (see #6720)
-               this.active = clickedIsActive ? $() : clicked;
-               this._toggle( eventData );
-
-               // switch classes
-               // corner classes on the previously active header stay after the animation
-               active.removeClass( "ui-accordion-header-active ui-state-active" );
-               if ( options.icons ) {
-                       active.children( ".ui-accordion-header-icon" )
-                               .removeClass( options.icons.activeHeader )
-                               .addClass( options.icons.header );
-               }
-
-               if ( !clickedIsActive ) {
-                       clicked
-                               .removeClass( "ui-corner-all" )
-                               .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
-                       if ( options.icons ) {
-                               clicked.children( ".ui-accordion-header-icon" )
-                                       .removeClass( options.icons.header )
-                                       .addClass( options.icons.activeHeader );
-                       }
-
-                       clicked
-                               .next()
-                               .addClass( "ui-accordion-content-active" );
-               }
-       },
-
-       _toggle: function( data ) {
-               var toShow = data.newPanel,
-                       toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
-               // handle activating a panel during the animation for another activation
-               this.prevShow.add( this.prevHide ).stop( true, true );
-               this.prevShow = toShow;
-               this.prevHide = toHide;
-
-               if ( this.options.animate ) {
-                       this._animate( toShow, toHide, data );
-               } else {
-                       toHide.hide();
-                       toShow.show();
-                       this._toggleComplete( data );
-               }
-
-               toHide.attr({
-                       "aria-expanded": "false",
-                       "aria-hidden": "true"
-               });
-               toHide.prev().attr( "aria-selected", "false" );
-               // if we're switching panels, remove the old header from the tab order
-               // if we're opening from collapsed state, remove the previous header from the tab order
-               // if we're collapsing, then keep the collapsing header in the tab order
-               if ( toShow.length && toHide.length ) {
-                       toHide.prev().attr( "tabIndex", -1 );
-               } else if ( toShow.length ) {
-                       this.headers.filter(function() {
-                               return $( this ).attr( "tabIndex" ) === 0;
-                       })
-                       .attr( "tabIndex", -1 );
-               }
-
-               toShow
-                       .attr({
-                               "aria-expanded": "true",
-                               "aria-hidden": "false"
-                       })
-                       .prev()
-                               .attr({
-                                       "aria-selected": "true",
-                                       tabIndex: 0
-                               });
-       },
-
-       _animate: function( toShow, toHide, data ) {
-               var total, easing, duration,
-                       that = this,
-                       adjust = 0,
-                       down = toShow.length &&
-                               ( !toHide.length || ( toShow.index() < toHide.index() ) ),
-                       animate = this.options.animate || {},
-                       options = down && animate.down || animate,
-                       complete = function() {
-                               that._toggleComplete( data );
-                       };
-
-               if ( typeof options === "number" ) {
-                       duration = options;
-               }
-               if ( typeof options === "string" ) {
-                       easing = options;
-               }
-               // fall back from options to animation in case of partial down settings
-               easing = easing || options.easing || animate.easing;
-               duration = duration || options.duration || animate.duration;
-
-               if ( !toHide.length ) {
-                       return toShow.animate( showProps, duration, easing, complete );
-               }
-               if ( !toShow.length ) {
-                       return toHide.animate( hideProps, duration, easing, complete );
-               }
-
-               total = toShow.show().outerHeight();
-               toHide.animate( hideProps, {
-                       duration: duration,
-                       easing: easing,
-                       step: function( now, fx ) {
-                               fx.now = Math.round( now );
-                       }
-               });
-               toShow
-                       .hide()
-                       .animate( showProps, {
-                               duration: duration,
-                               easing: easing,
-                               complete: complete,
-                               step: function( now, fx ) {
-                                       fx.now = Math.round( now );
-                                       if ( fx.prop !== "height" ) {
-                                               adjust += fx.now;
-                                       } else if ( that.options.heightStyle !== "content" ) {
-                                               fx.now = Math.round( total - toHide.outerHeight() - adjust );
-                                               adjust = 0;
-                                       }
-                               }
-                       });
-       },
-
-       _toggleComplete: function( data ) {
-               var toHide = data.oldPanel;
-
-               toHide
-                       .removeClass( "ui-accordion-content-active" )
-                       .prev()
-                               .removeClass( "ui-corner-top" )
-                               .addClass( "ui-corner-all" );
-
-               // Work around for rendering bug in IE (#5421)
-               if ( toHide.length ) {
-                       toHide.parent()[0].className = toHide.parent()[0].className;
-               }
-
-               this._trigger( "activate", null, data );
-       }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var tabId = 0,
-       rhash = /#.*$/;
-
-function getNextTabId() {
-       return ++tabId;
-}
-
-function isLocal( anchor ) {
-       return anchor.hash.length > 1 &&
-               decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
-                       decodeURIComponent( location.href.replace( rhash, "" ) );
-}
-
-$.widget( "ui.tabs", {
-       version: "1.10.3",
-       delay: 300,
-       options: {
-               active: null,
-               collapsible: false,
-               event: "click",
-               heightStyle: "content",
-               hide: null,
-               show: null,
-
-               // callbacks
-               activate: null,
-               beforeActivate: null,
-               beforeLoad: null,
-               load: null
-       },
-
-       _create: function() {
-               var that = this,
-                       options = this.options;
-
-               this.running = false;
-
-               this.element
-                       .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
-                       .toggleClass( "ui-tabs-collapsible", options.collapsible )
-                       // Prevent users from focusing disabled tabs via click
-                       .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
-                               if ( $( this ).is( ".ui-state-disabled" ) ) {
-                                       event.preventDefault();
-                               }
-                       })
-                       // support: IE <9
-                       // Preventing the default action in mousedown doesn't prevent IE
-                       // from focusing the element, so if the anchor gets focused, blur.
-                       // We don't have to worry about focusing the previously focused
-                       // element since clicking on a non-focusable element should focus
-                       // the body anyway.
-                       .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
-                               if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
-                                       this.blur();
-                               }
-                       });
-
-               this._processTabs();
-               options.active = this._initialActive();
-
-               // Take disabling tabs via class attribute from HTML
-               // into account and update option properly.
-               if ( $.isArray( options.disabled ) ) {
-                       options.disabled = $.unique( options.disabled.concat(
-                               $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
-                                       return that.tabs.index( li );
-                               })
-                       ) ).sort();
-               }
-
-               // check for length avoids error when initializing empty list
-               if ( this.options.active !== false && this.anchors.length ) {
-                       this.active = this._findActive( options.active );
-               } else {
-                       this.active = $();
-               }
-
-               this._refresh();
-
-               if ( this.active.length ) {
-                       this.load( options.active );
-               }
-       },
-
-       _initialActive: function() {
-               var active = this.options.active,
-                       collapsible = this.options.collapsible,
-                       locationHash = location.hash.substring( 1 );
-
-               if ( active === null ) {
-                       // check the fragment identifier in the URL
-                       if ( locationHash ) {
-                               this.tabs.each(function( i, tab ) {
-                                       if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
-                                               active = i;
-                                               return false;
-                                       }
-                               });
-                       }
-
-                       // check for a tab marked active via a class
-                       if ( active === null ) {
-                               active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
-                       }
-
-                       // no active tab, set to false
-                       if ( active === null || active === -1 ) {
-                               active = this.tabs.length ? 0 : false;
-                       }
-               }
-
-               // handle numbers: negative, out of range
-               if ( active !== false ) {
-                       active = this.tabs.index( this.tabs.eq( active ) );
-                       if ( active === -1 ) {
-                               active = collapsible ? false : 0;
-                       }
-               }
-
-               // don't allow collapsible: false and active: false
-               if ( !collapsible && active === false && this.anchors.length ) {
-                       active = 0;
-               }
-
-               return active;
-       },
-
-       _getCreateEventData: function() {
-               return {
-                       tab: this.active,
-                       panel: !this.active.length ? $() : this._getPanelForTab( this.active )
-               };
-       },
-
-       _tabKeydown: function( event ) {
-               /*jshint maxcomplexity:15*/
-               var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
-                       selectedIndex = this.tabs.index( focusedTab ),
-                       goingForward = true;
-
-               if ( this._handlePageNav( event ) ) {
-                       return;
-               }
-
-               switch ( event.keyCode ) {
-                       case $.ui.keyCode.RIGHT:
-                       case $.ui.keyCode.DOWN:
-                               selectedIndex++;
-                               break;
-                       case $.ui.keyCode.UP:
-                       case $.ui.keyCode.LEFT:
-                               goingForward = false;
-                               selectedIndex--;
-                               break;
-                       case $.ui.keyCode.END:
-                               selectedIndex = this.anchors.length - 1;
-                               break;
-                       case $.ui.keyCode.HOME:
-                               selectedIndex = 0;
-                               break;
-                       case $.ui.keyCode.SPACE:
-                               // Activate only, no collapsing
-                               event.preventDefault();
-                               clearTimeout( this.activating );
-                               this._activate( selectedIndex );
-                               return;
-                       case $.ui.keyCode.ENTER:
-                               // Toggle (cancel delayed activation, allow collapsing)
-                               event.preventDefault();
-                               clearTimeout( this.activating );
-                               // Determine if we should collapse or activate
-                               this._activate( selectedIndex === this.options.active ? false : selectedIndex );
-                               return;
-                       default:
-                               return;
-               }
-
-               // Focus the appropriate tab, based on which key was pressed
-               event.preventDefault();
-               clearTimeout( this.activating );
-               selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
-               // Navigating with control key will prevent automatic activation
-               if ( !event.ctrlKey ) {
-                       // Update aria-selected immediately so that AT think the tab is already selected.
-                       // Otherwise AT may confuse the user by stating that they need to activate the tab,
-                       // but the tab will already be activated by the time the announcement finishes.
-                       focusedTab.attr( "aria-selected", "false" );
-                       this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
-                       this.activating = this._delay(function() {
-                               this.option( "active", selectedIndex );
-                       }, this.delay );
-               }
-       },
-
-       _panelKeydown: function( event ) {
-               if ( this._handlePageNav( event ) ) {
-                       return;
-               }
-
-               // Ctrl+up moves focus to the current tab
-               if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
-                       event.preventDefault();
-                       this.active.focus();
-               }
-       },
-
-       // Alt+page up/down moves focus to the previous/next tab (and activates)
-       _handlePageNav: function( event ) {
-               if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
-                       this._activate( this._focusNextTab( this.options.active - 1, false ) );
-                       return true;
-               }
-               if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
-                       this._activate( this._focusNextTab( this.options.active + 1, true ) );
-                       return true;
-               }
-       },
-
-       _findNextTab: function( index, goingForward ) {
-               var lastTabIndex = this.tabs.length - 1;
-
-               function constrain() {
-                       if ( index > lastTabIndex ) {
-                               index = 0;
-                       }
-                       if ( index < 0 ) {
-                               index = lastTabIndex;
-                       }
-                       return index;
-               }
-
-               while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
-                       index = goingForward ? index + 1 : index - 1;
-               }
-
-               return index;
-       },
-
-       _focusNextTab: function( index, goingForward ) {
-               index = this._findNextTab( index, goingForward );
-               this.tabs.eq( index ).focus();
-               return index;
-       },
-
-       _setOption: function( key, value ) {
-               if ( key === "active" ) {
-                       // _activate() will handle invalid values and update this.options
-                       this._activate( value );
-                       return;
-               }
-
-               if ( key === "disabled" ) {
-                       // don't use the widget factory's disabled handling
-                       this._setupDisabled( value );
-                       return;
-               }
-
-               this._super( key, value);
-
-               if ( key === "collapsible" ) {
-                       this.element.toggleClass( "ui-tabs-collapsible", value );
-                       // Setting collapsible: false while collapsed; open first panel
-                       if ( !value && this.options.active === false ) {
-                               this._activate( 0 );
-                       }
-               }
-
-               if ( key === "event" ) {
-                       this._setupEvents( value );
-               }
-
-               if ( key === "heightStyle" ) {
-                       this._setupHeightStyle( value );
-               }
-       },
-
-       _tabId: function( tab ) {
-               return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
-       },
-
-       _sanitizeSelector: function( hash ) {
-               return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
-       },
-
-       refresh: function() {
-               var options = this.options,
-                       lis = this.tablist.children( ":has(a[href])" );
-
-               // get disabled tabs from class attribute from HTML
-               // this will get converted to a boolean if needed in _refresh()
-               options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
-                       return lis.index( tab );
-               });
-
-               this._processTabs();
-
-               // was collapsed or no tabs
-               if ( options.active === false || !this.anchors.length ) {
-                       options.active = false;
-                       this.active = $();
-               // was active, but active tab is gone
-               } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
-                       // all remaining tabs are disabled
-                       if ( this.tabs.length === options.disabled.length ) {
-                               options.active = false;
-                               this.active = $();
-                       // activate previous tab
-                       } else {
-                               this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
-                       }
-               // was active, active tab still exists
-               } else {
-                       // make sure active index is correct
-                       options.active = this.tabs.index( this.active );
-               }
-
-               this._refresh();
-       },
-
-       _refresh: function() {
-               this._setupDisabled( this.options.disabled );
-               this._setupEvents( this.options.event );
-               this._setupHeightStyle( this.options.heightStyle );
-
-               this.tabs.not( this.active ).attr({
-                       "aria-selected": "false",
-                       tabIndex: -1
-               });
-               this.panels.not( this._getPanelForTab( this.active ) )
-                       .hide()
-                       .attr({
-                               "aria-expanded": "false",
-                               "aria-hidden": "true"
-                       });
-
-               // Make sure one tab is in the tab order
-               if ( !this.active.length ) {
-                       this.tabs.eq( 0 ).attr( "tabIndex", 0 );
-               } else {
-                       this.active
-                               .addClass( "ui-tabs-active ui-state-active" )
-                               .attr({
-                                       "aria-selected": "true",
-                                       tabIndex: 0
-                               });
-                       this._getPanelForTab( this.active )
-                               .show()
-                               .attr({
-                                       "aria-expanded": "true",
-                                       "aria-hidden": "false"
-                               });
-               }
-       },
-
-       _processTabs: function() {
-               var that = this;
-
-               this.tablist = this._getList()
-                       .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
-                       .attr( "role", "tablist" );
-
-               this.tabs = this.tablist.find( "> li:has(a[href])" )
-                       .addClass( "ui-state-default ui-corner-top" )
-                       .attr({
-                               role: "tab",
-                               tabIndex: -1
-                       });
-
-               this.anchors = this.tabs.map(function() {
-                               return $( "a", this )[ 0 ];
-                       })
-                       .addClass( "ui-tabs-anchor" )
-                       .attr({
-                               role: "presentation",
-                               tabIndex: -1
-                       });
-
-               this.panels = $();
-
-               this.anchors.each(function( i, anchor ) {
-                       var selector, panel, panelId,
-                               anchorId = $( anchor ).uniqueId().attr( "id" ),
-                               tab = $( anchor ).closest( "li" ),
-                               originalAriaControls = tab.attr( "aria-controls" );
-
-                       // inline tab
-                       if ( isLocal( anchor ) ) {
-                               selector = anchor.hash;
-                               panel = that.element.find( that._sanitizeSelector( selector ) );
-                       // remote tab
-                       } else {
-                               panelId = that._tabId( tab );
-                               selector = "#" + panelId;
-                               panel = that.element.find( selector );
-                               if ( !panel.length ) {
-                                       panel = that._createPanel( panelId );
-                                       panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
-                               }
-                               panel.attr( "aria-live", "polite" );
-                       }
-
-                       if ( panel.length) {
-                               that.panels = that.panels.add( panel );
-                       }
-                       if ( originalAriaControls ) {
-                               tab.data( "ui-tabs-aria-controls", originalAriaControls );
-                       }
-                       tab.attr({
-                               "aria-controls": selector.substring( 1 ),
-                               "aria-labelledby": anchorId
-                       });
-                       panel.attr( "aria-labelledby", anchorId );
-               });
-
-               this.panels
-                       .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
-                       .attr( "role", "tabpanel" );
-       },
-
-       // allow overriding how to find the list for rare usage scenarios (#7715)
-       _getList: function() {
-               return this.element.find( "ol,ul" ).eq( 0 );
-       },
-
-       _createPanel: function( id ) {
-               return $( "<div>" )
-                       .attr( "id", id )
-                       .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
-                       .data( "ui-tabs-destroy", true );
-       },
-
-       _setupDisabled: function( disabled ) {
-               if ( $.isArray( disabled ) ) {
-                       if ( !disabled.length ) {
-                               disabled = false;
-                       } else if ( disabled.length === this.anchors.length ) {
-                               disabled = true;
-                       }
-               }
-
-               // disable tabs
-               for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
-                       if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
-                               $( li )
-                                       .addClass( "ui-state-disabled" )
-                                       .attr( "aria-disabled", "true" );
-                       } else {
-                               $( li )
-                                       .removeClass( "ui-state-disabled" )
-                                       .removeAttr( "aria-disabled" );
-                       }
-               }
-
-               this.options.disabled = disabled;
-       },
-
-       _setupEvents: function( event ) {
-               var events = {
-                       click: function( event ) {
-                               event.preventDefault();
-                       }
-               };
-               if ( event ) {
-                       $.each( event.split(" "), function( index, eventName ) {
-                               events[ eventName ] = "_eventHandler";
-                       });
-               }
-
-               this._off( this.anchors.add( this.tabs ).add( this.panels ) );
-               this._on( this.anchors, events );
-               this._on( this.tabs, { keydown: "_tabKeydown" } );
-               this._on( this.panels, { keydown: "_panelKeydown" } );
-
-               this._focusable( this.tabs );
-               this._hoverable( this.tabs );
-       },
-
-       _setupHeightStyle: function( heightStyle ) {
-               var maxHeight,
-                       parent = this.element.parent();
-
-               if ( heightStyle === "fill" ) {
-                       maxHeight = parent.height();
-                       maxHeight -= this.element.outerHeight() - this.element.height();
-
-                       this.element.siblings( ":visible" ).each(function() {
-                               var elem = $( this ),
-                                       position = elem.css( "position" );
-
-                               if ( position === "absolute" || position === "fixed" ) {
-                                       return;
-                               }
-                               maxHeight -= elem.outerHeight( true );
-                       });
-
-                       this.element.children().not( this.panels ).each(function() {
-                               maxHeight -= $( this ).outerHeight( true );
-                       });
-
-                       this.panels.each(function() {
-                               $( this ).height( Math.max( 0, maxHeight -
-                                       $( this ).innerHeight() + $( this ).height() ) );
-                       })
-                       .css( "overflow", "auto" );
-               } else if ( heightStyle === "auto" ) {
-                       maxHeight = 0;
-                       this.panels.each(function() {
-                               maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
-                       }).height( maxHeight );
-               }
-       },
-
-       _eventHandler: function( event ) {
-               var options = this.options,
-                       active = this.active,
-                       anchor = $( event.currentTarget ),
-                       tab = anchor.closest( "li" ),
-                       clickedIsActive = tab[ 0 ] === active[ 0 ],
-                       collapsing = clickedIsActive && options.collapsible,
-                       toShow = collapsing ? $() : this._getPanelForTab( tab ),
-                       toHide = !active.length ? $() : this._getPanelForTab( active ),
-                       eventData = {
-                               oldTab: active,
-                               oldPanel: toHide,
-                               newTab: collapsing ? $() : tab,
-                               newPanel: toShow
-                       };
-
-               event.preventDefault();
-
-               if ( tab.hasClass( "ui-state-disabled" ) ||
-                               // tab is already loading
-                               tab.hasClass( "ui-tabs-loading" ) ||
-                               // can't switch durning an animation
-                               this.running ||
-                               // click on active header, but not collapsible
-                               ( clickedIsActive && !options.collapsible ) ||
-                               // allow canceling activation
-                               ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
-                       return;
-               }
-
-               options.active = collapsing ? false : this.tabs.index( tab );
-
-               this.active = clickedIsActive ? $() : tab;
-               if ( this.xhr ) {
-                       this.xhr.abort();
-               }
-
-               if ( !toHide.length && !toShow.length ) {
-                       $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
-               }
-
-               if ( toShow.length ) {
-                       this.load( this.tabs.index( tab ), event );
-               }
-               this._toggle( event, eventData );
-       },
-
-       // handles show/hide for selecting tabs
-       _toggle: function( event, eventData ) {
-               var that = this,
-                       toShow = eventData.newPanel,
-                       toHide = eventData.oldPanel;
-
-               this.running = true;
-
-               function complete() {
-                       that.running = false;
-                       that._trigger( "activate", event, eventData );
-               }
-
-               function show() {
-                       eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
-                       if ( toShow.length && that.options.show ) {
-                               that._show( toShow, that.options.show, complete );
-                       } else {
-                               toShow.show();
-                               complete();
-                       }
-               }
-
-               // start out by hiding, then showing, then completing
-               if ( toHide.length && this.options.hide ) {
-                       this._hide( toHide, this.options.hide, function() {
-                               eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
-                               show();
-                       });
-               } else {
-                       eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
-                       toHide.hide();
-                       show();
-               }
-
-               toHide.attr({
-                       "aria-expanded": "false",
-                       "aria-hidden": "true"
-               });
-               eventData.oldTab.attr( "aria-selected", "false" );
-               // If we're switching tabs, remove the old tab from the tab order.
-               // If we're opening from collapsed state, remove the previous tab from the tab order.
-               // If we're collapsing, then keep the collapsing tab in the tab order.
-               if ( toShow.length && toHide.length ) {
-                       eventData.oldTab.attr( "tabIndex", -1 );
-               } else if ( toShow.length ) {
-                       this.tabs.filter(function() {
-                               return $( this ).attr( "tabIndex" ) === 0;
-                       })
-                       .attr( "tabIndex", -1 );
-               }
-
-               toShow.attr({
-                       "aria-expanded": "true",
-                       "aria-hidden": "false"
-               });
-               eventData.newTab.attr({
-                       "aria-selected": "true",
-                       tabIndex: 0
-               });
-       },
-
-       _activate: function( index ) {
-               var anchor,
-                       active = this._findActive( index );
-
-               // trying to activate the already active panel
-               if ( active[ 0 ] === this.active[ 0 ] ) {
-                       return;
-               }
-
-               // trying to collapse, simulate a click on the current active header
-               if ( !active.length ) {
-                       active = this.active;
-               }
-
-               anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
-               this._eventHandler({
-                       target: anchor,
-                       currentTarget: anchor,
-                       preventDefault: $.noop
-               });
-       },
-
-       _findActive: function( index ) {
-               return index === false ? $() : this.tabs.eq( index );
-       },
-
-       _getIndex: function( index ) {
-               // meta-function to give users option to provide a href string instead of a numerical index.
-               if ( typeof index === "string" ) {
-                       index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
-               }
-
-               return index;
-       },
-
-       _destroy: function() {
-               if ( this.xhr ) {
-                       this.xhr.abort();
-               }
-
-               this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
-               this.tablist
-                       .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
-                       .removeAttr( "role" );
-
-               this.anchors
-                       .removeClass( "ui-tabs-anchor" )
-                       .removeAttr( "role" )
-                       .removeAttr( "tabIndex" )
-                       .removeUniqueId();
-
-               this.tabs.add( this.panels ).each(function() {
-                       if ( $.data( this, "ui-tabs-destroy" ) ) {
-                               $( this ).remove();
-                       } else {
-                               $( this )
-                                       .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
-                                               "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
-                                       .removeAttr( "tabIndex" )
-                                       .removeAttr( "aria-live" )
-                                       .removeAttr( "aria-busy" )
-                                       .removeAttr( "aria-selected" )
-                                       .removeAttr( "aria-labelledby" )
-                                       .removeAttr( "aria-hidden" )
-                                       .removeAttr( "aria-expanded" )
-                                       .removeAttr( "role" );
-                       }
-               });
-
-               this.tabs.each(function() {
-                       var li = $( this ),
-                               prev = li.data( "ui-tabs-aria-controls" );
-                       if ( prev ) {
-                               li
-                                       .attr( "aria-controls", prev )
-                                       .removeData( "ui-tabs-aria-controls" );
-                       } else {
-                               li.removeAttr( "aria-controls" );
-                       }
-               });
-
-               this.panels.show();
-
-               if ( this.options.heightStyle !== "content" ) {
-                       this.panels.css( "height", "" );
-               }
-       },
-
-       enable: function( index ) {
-               var disabled = this.options.disabled;
-               if ( disabled === false ) {
-                       return;
-               }
-
-               if ( index === undefined ) {
-                       disabled = false;
-               } else {
-                       index = this._getIndex( index );
-                       if ( $.isArray( disabled ) ) {
-                               disabled = $.map( disabled, function( num ) {
-                                       return num !== index ? num : null;
-                               });
-                       } else {
-                               disabled = $.map( this.tabs, function( li, num ) {
-                                       return num !== index ? num : null;
-                               });
-                       }
-               }
-               this._setupDisabled( disabled );
-       },
-
-       disable: function( index ) {
-               var disabled = this.options.disabled;
-               if ( disabled === true ) {
-                       return;
-               }
-
-               if ( index === undefined ) {
-                       disabled = true;
-               } else {
-                       index = this._getIndex( index );
-                       if ( $.inArray( index, disabled ) !== -1 ) {
-                               return;
-                       }
-                       if ( $.isArray( disabled ) ) {
-                               disabled = $.merge( [ index ], disabled ).sort();
-                       } else {
-                               disabled = [ index ];
-                       }
-               }
-               this._setupDisabled( disabled );
-       },
-
-       load: function( index, event ) {
-               index = this._getIndex( index );
-               var that = this,
-                       tab = this.tabs.eq( index ),
-                       anchor = tab.find( ".ui-tabs-anchor" ),
-                       panel = this._getPanelForTab( tab ),
-                       eventData = {
-                               tab: tab,
-                               panel: panel
-                       };
-
-               // not remote
-               if ( isLocal( anchor[ 0 ] ) ) {
-                       return;
-               }
-
-               this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
-               // support: jQuery <1.8
-               // jQuery <1.8 returns false if the request is canceled in beforeSend,
-               // but as of 1.8, $.ajax() always returns a jqXHR object.
-               if ( this.xhr && this.xhr.statusText !== "canceled" ) {
-                       tab.addClass( "ui-tabs-loading" );
-                       panel.attr( "aria-busy", "true" );
-
-                       this.xhr
-                               .success(function( response ) {
-                                       // support: jQuery <1.8
-                                       // http://bugs.jquery.com/ticket/11778
-                                       setTimeout(function() {
-                                               panel.html( response );
-                                               that._trigger( "load", event, eventData );
-                                       }, 1 );
-                               })
-                               .complete(function( jqXHR, status ) {
-                                       // support: jQuery <1.8
-                                       // http://bugs.jquery.com/ticket/11778
-                                       setTimeout(function() {
-                                               if ( status === "abort" ) {
-                                                       that.panels.stop( false, true );
-                                               }
-
-                                               tab.removeClass( "ui-tabs-loading" );
-                                               panel.removeAttr( "aria-busy" );
-
-                                               if ( jqXHR === that.xhr ) {
-                                                       delete that.xhr;
-                                               }
-                                       }, 1 );
-                               });
-               }
-       },
-
-       _ajaxSettings: function( anchor, event, eventData ) {
-               var that = this;
-               return {
-                       url: anchor.attr( "href" ),
-                       beforeSend: function( jqXHR, settings ) {
-                               return that._trigger( "beforeLoad", event,
-                                       $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
-                       }
-               };
-       },
-
-       _getPanelForTab: function( tab ) {
-               var id = $( tab ).attr( "aria-controls" );
-               return this.element.find( this._sanitizeSelector( "#" + id ) );
-       }
-});
-
-})( jQuery );
diff --git a/luci2/htdocs/luci2/jquery.peity.js b/luci2/htdocs/luci2/jquery.peity.js
new file mode 100644 (file)
index 0000000..05fa8c8
--- /dev/null
@@ -0,0 +1,261 @@
+// Peity jQuery plugin version 1.2.0
+// (c) 2013 Ben Pickles
+//
+// http://benpickles.github.com/peity
+//
+// Released under MIT license.
+(function($, document, Math, devicePixelRatio) {
+  var canvasSupported = document.createElement("canvas").getContext
+
+  var peity = $.fn.peity = function(type, options) {
+    if (canvasSupported) {
+      this.each(function() {
+        var $this = $(this)
+        var chart = $this.data("peity")
+
+        if (chart) {
+          if (type) chart.type = type
+          $.extend(chart.opts, options)
+          chart.draw()
+        } else {
+          var defaults = peity.defaults[type]
+          var data = {}
+
+          $.each($this.data(), function(name, value) {
+            if (name in defaults) data[name] = value
+          })
+
+          var opts = $.extend({}, defaults, data, options)
+          var chart = new Peity($this, type, opts)
+          chart.draw()
+
+          $this
+            .change(function() { chart.draw() })
+            .data("peity", chart)
+        }
+      });
+    }
+
+    return this;
+  };
+
+  var Peity = function($el, type, opts) {
+    this.$el = $el
+    this.type = type
+    this.opts = opts
+  }
+
+  var PeityPrototype = Peity.prototype
+
+  PeityPrototype.colours = function() {
+    var colours = this.opts.colours
+    var func = colours
+
+    if (!$.isFunction(func)) {
+      func = function(_, i) {
+        return colours[i % colours.length]
+      }
+    }
+
+    return func
+  }
+
+  PeityPrototype.draw = function() {
+    peity.graphers[this.type].call(this, this.opts)
+  }
+
+  PeityPrototype.prepareCanvas = function(width, height) {
+    var canvas = this.canvas
+    var $canvas
+
+    if (canvas) {
+      this.context.clearRect(0, 0, canvas.width, canvas.height)
+      $canvas = $(canvas)
+    } else {
+      $canvas = $("<canvas>").css({
+        height: height,
+        width: width
+      }).addClass("peity").data("peity", this)
+
+      this.canvas = canvas = $canvas[0]
+      this.context = canvas.getContext("2d")
+      this.$el.hide().after(canvas)
+    }
+
+    canvas.height = $canvas.height() * devicePixelRatio
+    canvas.width = $canvas.width() * devicePixelRatio
+
+    return canvas
+  }
+
+  PeityPrototype.values = function() {
+    return $.map(this.$el.text().split(this.opts.delimiter), function(value) {
+      return parseFloat(value)
+    })
+  }
+
+  peity.defaults = {}
+  peity.graphers = {}
+
+  peity.register = function(type, defaults, grapher) {
+    this.defaults[type] = defaults
+    this.graphers[type] = grapher
+  }
+
+  peity.register(
+    'pie',
+    {
+      colours: ["#ff9900", "#fff4dd", "#ffc66e"],
+      delimiter: null,
+      diameter: 16
+    },
+    function(opts) {
+      if (!opts.delimiter) {
+        var delimiter = this.$el.text().match(/[^0-9\.]/)
+        opts.delimiter = delimiter ? delimiter[0] : ","
+      }
+
+      var values = this.values()
+
+      if (opts.delimiter == "/") {
+        var v1 = values[0]
+        var v2 = values[1]
+        values = [v1, v2 - v1]
+      }
+
+      var i = 0
+      var length = values.length
+      var sum = 0
+
+      for (; i < length; i++) {
+        sum += values[i]
+      }
+
+      var canvas = this.prepareCanvas(opts.width || opts.diameter, opts.height || opts.diameter)
+      var context = this.context
+      var width = canvas.width
+      var height = canvas.height
+      var radius = Math.min(width, height) / 2
+      var pi = Math.PI
+      var colours = this.colours()
+
+      context.save()
+      context.translate(width / 2, height / 2)
+      context.rotate(-pi / 2)
+
+      for (i = 0; i < length; i++) {
+        var value = values[i]
+        var slice = (value / sum) * pi * 2
+
+        context.beginPath()
+        context.moveTo(0, 0)
+        context.arc(0, 0, radius, 0, slice, false)
+        context.fillStyle = colours.call(this, value, i, values)
+        context.fill()
+        context.rotate(slice)
+      }
+
+      context.restore()
+    }
+  )
+
+  peity.register(
+    "line",
+    {
+      colour: "#c6d9fd",
+      strokeColour: "#4d89f9",
+      strokeWidth: 1,
+      delimiter: ",",
+      height: 16,
+      max: null,
+      min: 0,
+      width: 32
+    },
+    function(opts) {
+      var values = this.values()
+      if (values.length == 1) values.push(values[0])
+      var max = Math.max.apply(Math, values.concat([opts.max]));
+      var min = Math.min.apply(Math, values.concat([opts.min]))
+
+      var canvas = this.prepareCanvas(opts.width, opts.height)
+      var context = this.context
+      var width = canvas.width
+      var height = canvas.height
+      var xQuotient = width / (values.length - 1)
+      var yQuotient = height / (max - min)
+
+      var coords = [];
+      var i;
+
+      context.beginPath();
+      context.moveTo(0, height + (min * yQuotient))
+
+      for (i = 0; i < values.length; i++) {
+        var x = i * xQuotient
+        var y = height - (yQuotient * (values[i] - min))
+
+        coords.push({ x: x, y: y });
+        context.lineTo(x, y);
+      }
+
+      context.lineTo(width, height + (min * yQuotient))
+      context.fillStyle = opts.colour;
+      context.fill();
+
+      if (opts.strokeWidth) {
+        context.beginPath();
+        context.moveTo(0, coords[0].y);
+        for (i = 0; i < coords.length; i++) {
+          context.lineTo(coords[i].x, coords[i].y);
+        }
+        context.lineWidth = opts.strokeWidth * devicePixelRatio;
+        context.strokeStyle = opts.strokeColour;
+        context.stroke();
+      }
+    }
+  );
+
+  peity.register(
+    'bar',
+    {
+      colours: ["#4D89F9"],
+      delimiter: ",",
+      height: 16,
+      max: null,
+      min: 0,
+      spacing: devicePixelRatio,
+      width: 32
+    },
+    function(opts) {
+      var values = this.values()
+      var max = Math.max.apply(Math, values.concat([opts.max]));
+      var min = Math.min.apply(Math, values.concat([opts.min]))
+
+      var canvas = this.prepareCanvas(opts.width, opts.height)
+      var context = this.context
+
+      var width = canvas.width
+      var height = canvas.height
+      var yQuotient = height / (max - min)
+      var space = opts.spacing
+      var xQuotient = (width + space) / values.length
+      var colours = this.colours()
+
+      for (var i = 0; i < values.length; i++) {
+        var value = values[i]
+        var y = height - (yQuotient * (value - min))
+        var h
+
+        if (value == 0) {
+          if (min >= 0 || max > 0) y -= 1
+          h = 1
+        } else {
+          h = yQuotient * values[i]
+        }
+
+        context.fillStyle = colours.call(this, value, i, values)
+        context.fillRect(i * xQuotient, y, xQuotient - space, h)
+      }
+    }
+  );
+})(jQuery, document, Math, window.devicePixelRatio || 1);
index 55de4c9..98cd441 100644 (file)
@@ -1653,29 +1653,22 @@ function LuCI2()
 
                        var state = _luci2.ui._loading || (_luci2.ui._loading = {
                                modal: $('<div />')
 
                        var state = _luci2.ui._loading || (_luci2.ui._loading = {
                                modal: $('<div />')
-                                       .addClass('cbi-modal-loader')
-                                       .append($('<div />').text(_luci2.tr('Loading data...')))
+                                       .addClass('modal fade')
+                                       .append($('<div />')
+                                               .addClass('modal-dialog')
+                                               .append($('<div />')
+                                                       .addClass('modal-content luci2-modal-loader')
+                                                       .append($('<div />')
+                                                               .addClass('modal-body')
+                                                               .text(_luci2.tr('Loading data…')))))
                                        .appendTo(body)
                                        .appendTo(body)
+                                       .modal({
+                                               backdrop: 'static',
+                                               keyboard: false
+                                       })
                        });
 
                        });
 
-                       if (enable)
-                       {
-                               body.css('overflow', 'hidden');
-                               body.css('padding', 0);
-                               body.css('width', win.width());
-                               body.css('height', win.height());
-                               state.modal.css('width', win.width());
-                               state.modal.css('height', win.height());
-                               state.modal.show();
-                       }
-                       else
-                       {
-                               state.modal.hide();
-                               body.css('overflow', '');
-                               body.css('padding', '');
-                               body.css('width', '');
-                               body.css('height', '');
-                       }
+                       state.modal.modal(enable ? 'show' : 'hide');
                },
 
                dialog: function(title, content, options)
                },
 
                dialog: function(title, content, options)
@@ -1685,26 +1678,23 @@ function LuCI2()
 
                        var state = _luci2.ui._dialog || (_luci2.ui._dialog = {
                                dialog: $('<div />')
 
                        var state = _luci2.ui._dialog || (_luci2.ui._dialog = {
                                dialog: $('<div />')
-                                       .addClass('cbi-modal-dialog')
+                                       .addClass('modal fade')
                                        .append($('<div />')
                                        .append($('<div />')
+                                               .addClass('modal-dialog')
                                                .append($('<div />')
                                                .append($('<div />')
-                                                       .addClass('cbi-modal-dialog-header'))
-                                               .append($('<div />')
-                                                       .addClass('cbi-modal-dialog-body'))
-                                               .append($('<div />')
-                                                       .addClass('cbi-modal-dialog-footer')
-                                                       .append($('<button />')
-                                                               .addClass('cbi-button')
-                                                               .text(_luci2.tr('Close'))
-                                                               .click(function() {
-                                                                       $('body')
-                                                                               .css('overflow', '')
-                                                                               .css('padding', '')
-                                                                               .css('width', '')
-                                                                               .css('height', '');
-
-                                                                       $(this).parent().parent().parent().hide();
-                                                               }))))
+                                                       .addClass('modal-content')
+                                                       .append($('<div />')
+                                                               .addClass('modal-header')
+                                                               .append('<h4 />')
+                                                                       .addClass('modal-title'))
+                                                       .append($('<div />')
+                                                               .addClass('modal-body'))
+                                                       .append($('<div />')
+                                                               .addClass('modal-footer')
+                                                               .append(_luci2.ui.button(_luci2.tr('Close'), 'primary')
+                                                                       .click(function() {
+                                                                               $(this).parents('div.modal').modal('hide');
+                                                                       })))))
                                        .appendTo(body)
                        });
 
                                        .appendTo(body)
                        });
 
@@ -1713,66 +1703,39 @@ function LuCI2()
 
                        if (title === false)
                        {
 
                        if (title === false)
                        {
-                               body
-                                       .css('overflow', '')
-                                       .css('padding', '')
-                                       .css('width', '')
-                                       .css('height', '');
-
-                               state.dialog.hide();
+                               state.dialog.modal('hide');
 
                                return;
                        }
 
 
                                return;
                        }
 
-                       var cnt = state.dialog.children().children('div.cbi-modal-dialog-body');
-                       var ftr = state.dialog.children().children('div.cbi-modal-dialog-footer');
+                       var cnt = state.dialog.children().children().children('div.modal-body');
+                       var ftr = state.dialog.children().children().children('div.modal-footer');
 
                        ftr.empty();
 
                        if (options.style == 'confirm')
                        {
 
                        ftr.empty();
 
                        if (options.style == 'confirm')
                        {
-                               ftr.append($('<button />')
-                                       .addClass('cbi-button')
-                                       .text(_luci2.tr('Ok'))
+                               ftr.append(_luci2.ui.button(_luci2.tr('Ok'), 'primary')
                                        .click(options.confirm || function() { _luci2.ui.dialog(false) }));
 
                                        .click(options.confirm || function() { _luci2.ui.dialog(false) }));
 
-                               ftr.append($('<button />')
-                                       .addClass('cbi-button')
-                                       .text(_luci2.tr('Cancel'))
+                               ftr.append(_luci2.ui.button(_luci2.tr('Cancel'), 'default')
                                        .click(options.cancel || function() { _luci2.ui.dialog(false) }));
                        }
                        else if (options.style == 'close')
                        {
                                        .click(options.cancel || function() { _luci2.ui.dialog(false) }));
                        }
                        else if (options.style == 'close')
                        {
-                               ftr.append($('<button />')
-                                       .addClass('cbi-button')
-                                       .text(_luci2.tr('Close'))
+                               ftr.append(_luci2.ui.button(_luci2.tr('Close'), 'primary')
                                        .click(options.close || function() { _luci2.ui.dialog(false) }));
                        }
                        else if (options.style == 'wait')
                        {
                                        .click(options.close || function() { _luci2.ui.dialog(false) }));
                        }
                        else if (options.style == 'wait')
                        {
-                               ftr.append($('<button />')
-                                       .addClass('cbi-button')
-                                       .text(_luci2.tr('Close'))
+                               ftr.append(_luci2.ui.button(_luci2.tr('Close'), 'primary')
                                        .attr('disabled', true));
                        }
 
                                        .attr('disabled', true));
                        }
 
-                       state.dialog.find('div.cbi-modal-dialog-header').text(title);
-                       state.dialog.show();
+                       state.dialog.find('h4:first').text(title);
+                       state.dialog.modal('show');
 
 
-                       cnt
-                               .css('max-height', Math.floor(win.height() * 0.70) + 'px')
-                               .empty()
-                               .append(content);
-
-                       state.dialog.children()
-                               .css('margin-top', -Math.floor(state.dialog.children().height() / 2) + 'px');
-
-                       body.css('overflow', 'hidden');
-                       body.css('padding', 0);
-                       body.css('width', win.width());
-                       body.css('height', win.height());
-                       state.dialog.css('width', win.width());
-                       state.dialog.css('height', win.height());
+                       cnt.empty().append(content);
                },
 
                upload: function(title, content, options)
                },
 
                upload: function(title, content, options)
@@ -1796,11 +1759,12 @@ function LuCI2()
                                                .addClass('cbi-input-file'))
                                        .append($('<div />')
                                                .css('width', '100%')
                                                .addClass('cbi-input-file'))
                                        .append($('<div />')
                                                .css('width', '100%')
-                                               .addClass('progressbar')
-                                               .addClass('intermediate')
+                                               .addClass('progress progress-striped active')
                                                .append($('<div />')
                                                .append($('<div />')
+                                                       .addClass('progress-bar')
                                                        .css('width', '100%')))
                                        .append($('<iframe />')
                                                        .css('width', '100%')))
                                        .append($('<iframe />')
+                                               .addClass('pull-right')
                                                .attr('name', 'cbi-fileupload-frame')
                                                .css('width', '1px')
                                                .css('height', '1px')
                                                .attr('name', 'cbi-fileupload-frame')
                                                .css('width', '1px')
                                                .css('height', '1px')
@@ -1839,7 +1803,7 @@ function LuCI2()
 
                                confirm_cb: function() {
                                        var f = state.form.find('.cbi-input-file');
 
                                confirm_cb: function() {
                                        var f = state.form.find('.cbi-input-file');
-                                       var b = state.form.find('.progressbar');
+                                       var b = state.form.find('.progress');
                                        var p = state.form.find('p');
 
                                        if (!f.val())
                                        var p = state.form.find('p');
 
                                        if (!f.val())
@@ -1856,7 +1820,7 @@ function LuCI2()
                                }
                        });
 
                                }
                        });
 
-                       state.form.find('.progressbar').hide();
+                       state.form.find('.progress').hide();
                        state.form.find('.cbi-input-file').val('').show();
                        state.form.find('p').text(content || _luci2.tr('Select the file to upload and press "%s" to proceed.').format(_luci2.tr('Ok')));
 
                        state.form.find('.cbi-input-file').val('').show();
                        state.form.find('p').text(content || _luci2.tr('Select the file to upload and press "%s" to proceed.').format(_luci2.tr('Ok')));
 
@@ -1960,7 +1924,7 @@ function LuCI2()
                                                                .attr('type', 'text')
                                                                .attr('name', 'username')
                                                                .attr('value', 'root')
                                                                .attr('type', 'text')
                                                                .attr('name', 'username')
                                                                .attr('value', 'root')
-                                                               .addClass('cbi-input-text')
+                                                               .addClass('form-control')
                                                                .keypress(function(ev) {
                                                                        if (ev.which == 10 || ev.which == 13)
                                                                                state.confirm_cb();
                                                                .keypress(function(ev) {
                                                                        if (ev.which == 10 || ev.which == 13)
                                                                                state.confirm_cb();
@@ -1972,7 +1936,7 @@ function LuCI2()
                                                        .append($('<input />')
                                                                .attr('type', 'password')
                                                                .attr('name', 'password')
                                                        .append($('<input />')
                                                                .attr('type', 'password')
                                                                .attr('name', 'password')
-                                                               .addClass('cbi-input-password')
+                                                               .addClass('form-control')
                                                                .keypress(function(ev) {
                                                                        if (ev.which == 10 || ev.which == 13)
                                                                                state.confirm_cb();
                                                                .keypress(function(ev) {
                                                                        if (ev.which == 10 || ev.which == 13)
                                                                                state.confirm_cb();
@@ -2322,19 +2286,47 @@ function LuCI2()
                                        _luci2.ui.loading(false);
                                })
                        });
                                        _luci2.ui.loading(false);
                                })
                        });
+               },
+
+               button: function(label, style, title)
+               {
+                       style = style || 'default';
+
+                       return $('<button />')
+                               .attr('type', 'button')
+                               .attr('title', title ? title : '')
+                               .addClass('btn btn-' + style)
+                               .text(label);
                }
        };
 
                }
        };
 
-       var AbstractWidget = Class.extend({
+       this.ui.AbstractWidget = Class.extend({
                i18n: function(text) {
                        return text;
                },
 
                i18n: function(text) {
                        return text;
                },
 
-               toString: function() {
-                       var x = document.createElement('div');
-                               x.appendChild(this.render());
+               label: function() {
+                       var key = arguments[0];
+                       var args = [ ];
+
+                       for (var i = 1; i < arguments.length; i++)
+                               args.push(arguments[i]);
 
 
-                       return x.innerHTML;
+                       switch (typeof(this.options[key]))
+                       {
+                       case 'undefined':
+                               return '';
+
+                       case 'function':
+                               return this.options[key].apply(this, args);
+
+                       default:
+                               return ''.format.apply('' + this.options[key], args);
+                       }
+               },
+
+               toString: function() {
+                       return $('<div />').append(this.render()).html();
                },
 
                insertInto: function(id) {
                },
 
                insertInto: function(id) {
@@ -2346,7 +2338,7 @@ function LuCI2()
                }
        });
 
                }
        });
 
-       this.ui.view = AbstractWidget.extend({
+       this.ui.view = this.ui.AbstractWidget.extend({
                _fetch_template: function()
                {
                        return $.ajax(_luci2.globals.resource + '/template/' + this.options.name + '.htm', {
                _fetch_template: function()
                {
                        return $.ajax(_luci2.globals.resource + '/template/' + this.options.name + '.htm', {
@@ -2392,7 +2384,7 @@ function LuCI2()
                                container.append($('<h2 />').append(this.title));
 
                        if (this.description)
                                container.append($('<h2 />').append(this.title));
 
                        if (this.description)
-                               container.append($('<div />').addClass('cbi-map-descr').append(this.description));
+                               container.append($('<p />').append(this.description));
 
                        var self = this;
                        var args = [ ];
 
                        var self = this;
                        var args = [ ];
@@ -2443,7 +2435,7 @@ function LuCI2()
                }
        });
 
                }
        });
 
-       this.ui.menu = AbstractWidget.extend({
+       this.ui.menu = this.ui.AbstractWidget.extend({
                init: function() {
                        this._nodes = { };
                },
                init: function() {
                        this._nodes = { };
                },
@@ -2530,9 +2522,9 @@ function LuCI2()
                        var list = $('<ul />');
 
                        if (level == 0)
                        var list = $('<ul />');
 
                        if (level == 0)
-                               list.addClass('nav');
+                               list.addClass('nav').addClass('navbar-nav');
                        else if (level == 1)
                        else if (level == 1)
-                               list.addClass('dropdown-menu');
+                               list.addClass('dropdown-menu').addClass('navbar-inverse');
 
                        for (var i = 0; i < nodes.length; i++)
                        {
 
                        for (var i = 0; i < nodes.length; i++)
                        {
@@ -2546,16 +2538,24 @@ function LuCI2()
                                var item = $('<li />')
                                        .append($('<a />')
                                                .attr('href', '#')
                                var item = $('<li />')
                                        .append($('<a />')
                                                .attr('href', '#')
-                                               .text(_luci2.tr(nodes[i].title))
-                                               .click(nodes[i], this._onclick))
+                                               .text(_luci2.tr(nodes[i].title)))
                                        .appendTo(list);
 
                                if (nodes[i].childs && level < max)
                                {
                                        item.addClass('dropdown');
                                        .appendTo(list);
 
                                if (nodes[i].childs && level < max)
                                {
                                        item.addClass('dropdown');
-                                       item.find('a').addClass('menu');
+
+                                       item.find('a')
+                                               .addClass('dropdown-toggle')
+                                               .attr('data-toggle', 'dropdown')
+                                               .append('<b class="caret"></b>');
+
                                        item.append(this._render(nodes[i].childs, level + 1));
                                }
                                        item.append(this._render(nodes[i].childs, level + 1));
                                }
+                               else
+                               {
+                                       item.find('a').click(nodes[i], this._onclick);
+                               }
                        }
 
                        return list.get(0);
                        }
 
                        return list.get(0);
@@ -2587,7 +2587,7 @@ function LuCI2()
                }
        });
 
                }
        });
 
-       this.ui.table = AbstractWidget.extend({
+       this.ui.table = this.ui.AbstractWidget.extend({
                init: function()
                {
                        this._rows = [ ];
                init: function()
                {
                        this._rows = [ ];
@@ -2634,7 +2634,7 @@ function LuCI2()
                        }
 
                        var table = document.createElement('table');
                        }
 
                        var table = document.createElement('table');
-                               table.className = 'cbi-section-table';
+                               table.className = 'table table-condensed table-hover';
 
                        var has_caption = false;
                        var has_description = false;
 
                        var has_caption = false;
                        var has_description = false;
@@ -2753,32 +2753,34 @@ function LuCI2()
                }
        });
 
                }
        });
 
-       this.ui.progress = AbstractWidget.extend({
+       this.ui.progress = this.ui.AbstractWidget.extend({
                render: function()
                {
                        var vn = parseInt(this.options.value) || 0;
                        var mn = parseInt(this.options.max) || 100;
                        var pc = Math.floor((100 / mn) * vn);
 
                render: function()
                {
                        var vn = parseInt(this.options.value) || 0;
                        var mn = parseInt(this.options.max) || 100;
                        var pc = Math.floor((100 / mn) * vn);
 
-                       var bar = document.createElement('div');
-                               bar.className = 'progressbar';
-
-                       bar.appendChild(document.createElement('div'));
-                       bar.lastChild.appendChild(document.createElement('div'));
-                       bar.lastChild.style.width = pc + '%';
+                       var text;
 
                        if (typeof(this.options.format) == 'string')
 
                        if (typeof(this.options.format) == 'string')
-                               $(bar.lastChild.lastChild).append(this.options.format.format(this.options.value, this.options.max, pc));
+                               text = this.options.format.format(this.options.value, this.options.max, pc);
                        else if (typeof(this.options.format) == 'function')
                        else if (typeof(this.options.format) == 'function')
-                               $(bar.lastChild.lastChild).append(this.options.format(pc));
+                               text = this.options.format(pc);
                        else
                        else
-                               $(bar.lastChild.lastChild).append('%.2f%%'.format(pc));
+                               text = '%.2f%%'.format(pc);
 
 
-                       return bar;
+                       return $('<div />')
+                               .addClass('progress')
+                               .append($('<div />')
+                                       .addClass('progress-bar')
+                                       .addClass('progress-bar-info')
+                                       .css('width', pc + '%'))
+                               .append($('<small />')
+                                       .text(text));
                }
        });
 
                }
        });
 
-       this.ui.devicebadge = AbstractWidget.extend({
+       this.ui.devicebadge = this.ui.AbstractWidget.extend({
                render: function()
                {
                        var l2dev = this.options.l2_device || this.options.device;
                render: function()
                {
                        var l2dev = this.options.l2_device || this.options.device;
@@ -2786,7 +2788,7 @@ function LuCI2()
                        var dev = l3dev || l2dev || '?';
 
                        var span = document.createElement('span');
                        var dev = l3dev || l2dev || '?';
 
                        var span = document.createElement('span');
-                               span.className = 'ifacebadge';
+                               span.className = 'badge';
 
                        if (typeof(this.options.signal) == 'number' ||
                                typeof(this.options.noise) == 'number')
 
                        if (typeof(this.options.signal) == 'number' ||
                                typeof(this.options.noise) == 'number')
@@ -3347,7 +3349,7 @@ function LuCI2()
        };
 
 
        };
 
 
-       this.cbi.AbstractValue = AbstractWidget.extend({
+       this.cbi.AbstractValue = this.ui.AbstractWidget.extend({
                init: function(name, options)
                {
                        this.name = name;
                init: function(name, options)
                {
                        this.name = name;
@@ -3368,27 +3370,42 @@ function LuCI2()
                        return this.section.id('field', sid || '__unknown__', this.name);
                },
 
                        return this.section.id('field', sid || '__unknown__', this.name);
                },
 
-               render: function(sid)
+               render: function(sid, condensed)
                {
                        var i = this.instance[sid] = { };
 
                {
                        var i = this.instance[sid] = { };
 
-                       i.top = $('<div />').addClass('cbi-value');
+                       i.top = $('<div />');
 
 
-                       if (typeof(this.options.caption) == 'string')
-                               $('<label />')
-                                       .addClass('cbi-value-title')
-                                       .attr('for', this.id(sid))
-                                       .text(this.options.caption)
-                                       .appendTo(i.top);
+                       if (!condensed)
+                       {
+                               i.top.addClass('form-group');
 
 
-                       i.widget = $('<div />').addClass('cbi-value-field').append(this.widget(sid)).appendTo(i.top);
-                       i.error = $('<div />').addClass('cbi-value-error').appendTo(i.top);
+                               if (typeof(this.options.caption) == 'string')
+                                       $('<label />')
+                                               .addClass('col-lg-2 control-label')
+                                               .attr('for', this.id(sid))
+                                               .text(this.options.caption)
+                                               .appendTo(i.top);
+                       }
+
+                       i.error = $('<div />')
+                               .addClass('label label-danger');
+
+                       i.widget = $('<div />')
+
+                               .append(this.widget(sid))
+                               .append(i.error)
+                               .appendTo(i.top);
+
+                       if (!condensed)
+                       {
+                               i.widget.addClass('col-lg-5');
 
 
-                       if (typeof(this.options.description) == 'string')
                                $('<div />')
                                $('<div />')
-                                       .addClass('cbi-value-description')
-                                       .text(this.options.description)
+                                       .addClass('col-lg-5')
+                                       .text((typeof(this.options.description) == 'string') ? this.options.description : '')
                                        .appendTo(i.top);
                                        .appendTo(i.top);
+                       }
 
                        return i.top;
                },
 
                        return i.top;
                },
@@ -3492,6 +3509,52 @@ function LuCI2()
                        return chg;
                },
 
                        return chg;
                },
 
+               _ev_validate: function(ev)
+               {
+                       var d = ev.data;
+                       var rv = true;
+                       var val = d.elem.val();
+                       var vstack = d.vstack;
+
+                       if (vstack && typeof(vstack[0]) == 'function')
+                       {
+                               delete validation.message;
+
+                               if ((val.length == 0 && !d.opt))
+                               {
+                                       d.elem.parents('div.form-group, td').first().addClass('luci2-form-error');
+                                       d.elem.parents('div.input-group, div.form-group, td').first().addClass('has-error');
+
+                                       d.inst.error.text(_luci2.tr('Field must not be empty'));
+                                       rv = false;
+                               }
+                               else if (val.length > 0 && !vstack[0].apply(val, vstack[1]))
+                               {
+                                       d.elem.parents('div.form-group, td').first().addClass('luci2-form-error');
+                                       d.elem.parents('div.input-group, div.form-group, td').first().addClass('has-error');
+
+                                       d.inst.error.text(validation.message.format.apply(validation.message, vstack[1]));
+                                       rv = false;
+                               }
+                               else
+                               {
+                                       d.elem.parents('div.form-group, td').first().removeClass('luci2-form-error');
+                                       d.elem.parents('div.input-group, div.form-group, td').first().removeClass('has-error');
+
+                                       if (d.multi && d.inst.widget && d.inst.widget.find('input.error, select.error').length > 0)
+                                               rv = false;
+                                       else
+                                               d.inst.error.text('');
+                               }
+                       }
+
+                       if (rv)
+                               for (var field in d.self.rdependency)
+                                       d.self.rdependency[field].toggle(d.sid);
+
+                       return rv;
+               },
+
                validator: function(sid, elem, multi)
                {
                        if (typeof(this.options.datatype) == 'undefined' && $.isEmptyObject(this.rdependency))
                validator: function(sid, elem, multi)
                {
                        if (typeof(this.options.datatype) == 'undefined' && $.isEmptyObject(this.rdependency))
@@ -3516,79 +3579,31 @@ function LuCI2()
                        }
 
                        var evdata = {
                        }
 
                        var evdata = {
-                               self:  this,
-                               sid:   sid,
-                               elem:  elem,
-                               multi: multi,
-                               inst:  this.instance[sid],
-                               opt:   this.options.optional
-                       };
-
-                       var validator = function(ev)
-                       {
-                               var d = ev.data;
-                               var rv = true;
-                               var val = d.elem.val();
-
-                               if (vstack && typeof(vstack[0]) == 'function')
-                               {
-                                       delete validation.message;
-
-                                       if ((val.length == 0 && !d.opt))
-                                       {
-                                               d.elem.addClass('error');
-                                               d.inst.top.addClass('error');
-                                               d.inst.error.text(_luci2.tr('Field must not be empty'));
-                                               rv = false;
-                                       }
-                                       else if (val.length > 0 && !vstack[0].apply(val, vstack[1]))
-                                       {
-                                               d.elem.addClass('error');
-                                               d.inst.top.addClass('error');
-                                               d.inst.error.text(validation.message.format.apply(validation.message, vstack[1]));
-                                               rv = false;
-                                       }
-                                       else
-                                       {
-                                               d.elem.removeClass('error');
-
-                                               if (d.multi && d.inst.widget.find('input.error, select.error').length > 0)
-                                               {
-                                                       rv = false;
-                                               }
-                                               else
-                                               {
-                                                       d.inst.top.removeClass('error');
-                                                       d.inst.error.text('');
-                                               }
-                                       }
-                               }
-
-                               if (rv)
-                               {
-                                       for (var field in d.self.rdependency)
-                                               d.self.rdependency[field].toggle(d.sid);
-                               }
-
-                               return rv;
+                               self:   this,
+                               sid:    sid,
+                               elem:   elem,
+                               multi:  multi,
+                               vstack: vstack,
+                               inst:   this.instance[sid],
+                               opt:    this.options.optional
                        };
 
                        if (elem.prop('tagName') == 'SELECT')
                        {
                        };
 
                        if (elem.prop('tagName') == 'SELECT')
                        {
-                               elem.change(evdata, validator);
+                               elem.change(evdata, this._ev_validate);
                        }
                        else if (elem.prop('tagName') == 'INPUT' && elem.attr('type') == 'checkbox')
                        {
                        }
                        else if (elem.prop('tagName') == 'INPUT' && elem.attr('type') == 'checkbox')
                        {
-                               elem.click(evdata, validator);
-                               elem.blur(evdata, validator);
+                               elem.click(evdata, this._ev_validate);
+                               elem.blur(evdata, this._ev_validate);
                        }
                        else
                        {
                        }
                        else
                        {
-                               elem.keyup(evdata, validator);
-                               elem.blur(evdata, validator);
+                               elem.keyup(evdata, this._ev_validate);
+                               elem.blur(evdata, this._ev_validate);
                        }
 
                        }
 
-                       elem.attr('cbi-validate', true).on('validate', evdata, validator);
+                       elem.attr('cbi-validate', true).on('validate', evdata, this._ev_validate);
 
                        return elem;
                },
 
                        return elem;
                },
@@ -3734,11 +3749,14 @@ function LuCI2()
                        if (typeof(o.disabled) == 'undefined') o.disabled = '0';
 
                        var i = $('<input />')
                        if (typeof(o.disabled) == 'undefined') o.disabled = '0';
 
                        var i = $('<input />')
+                               .addClass('form-control')
                                .attr('id', this.id(sid))
                                .attr('type', 'checkbox')
                                .prop('checked', this.ucivalue(sid));
 
                                .attr('id', this.id(sid))
                                .attr('type', 'checkbox')
                                .prop('checked', this.ucivalue(sid));
 
-                       return this.validator(sid, i);
+                       return $('<div />')
+                               .addClass('checkbox')
+                               .append(this.validator(sid, i));
                },
 
                ucivalue: function(sid)
                },
 
                ucivalue: function(sid)
@@ -3792,6 +3810,7 @@ function LuCI2()
                widget: function(sid)
                {
                        var i = $('<input />')
                widget: function(sid)
                {
                        var i = $('<input />')
+                               .addClass('form-control')
                                .attr('id', this.id(sid))
                                .attr('type', 'text')
                                .attr('placeholder', this.options.placeholder)
                                .attr('id', this.id(sid))
                                .attr('type', 'text')
                                .attr('placeholder', this.options.placeholder)
@@ -3805,26 +3824,28 @@ function LuCI2()
                widget: function(sid)
                {
                        var i = $('<input />')
                widget: function(sid)
                {
                        var i = $('<input />')
+                               .addClass('form-control')
                                .attr('id', this.id(sid))
                                .attr('type', 'password')
                                .attr('placeholder', this.options.placeholder)
                                .val(this.ucivalue(sid));
 
                                .attr('id', this.id(sid))
                                .attr('type', 'password')
                                .attr('placeholder', this.options.placeholder)
                                .val(this.ucivalue(sid));
 
-                       var t = $('<img />')
-                               .attr('src', _luci2.globals.resource + '/icons/cbi/reload.gif')
-                               .attr('title', _luci2.tr('Reveal or hide password'))
-                               .addClass('cbi-button')
-                               .click(function(ev) {
-                                       var i = $(this).prev();
-                                       var t = i.attr('type');
-                                       i.attr('type', (t == 'password') ? 'text' : 'password');
-                                       i = t = null;
-                               });
+                       var t = $('<span />')
+                               .addClass('input-group-btn')
+                               .append(_luci2.ui.button(_luci2.tr('Reveal'), 'default')
+                                       .click(function(ev) {
+                                               var b = $(this);
+                                               var i = b.parent().prev();
+                                               var t = i.attr('type');
+                                               b.text(t == 'password' ? _luci2.tr('Hide') : _luci2.tr('Reveal'));
+                                               i.attr('type', (t == 'password') ? 'text' : 'password');
+                                               b = i = t = null;
+                                       }));
 
                        this.validator(sid, i);
 
                        return $('<div />')
 
                        this.validator(sid, i);
 
                        return $('<div />')
-                               .addClass('cbi-input-password')
+                               .addClass('input-group')
                                .append(i)
                                .append(t);
                }
                                .append(i)
                                .append(t);
                }
@@ -3833,7 +3854,8 @@ function LuCI2()
        this.cbi.ListValue = this.cbi.AbstractValue.extend({
                widget: function(sid)
                {
        this.cbi.ListValue = this.cbi.AbstractValue.extend({
                widget: function(sid)
                {
-                       var s = $('<select />');
+                       var s = $('<select />')
+                               .addClass('form-control');
 
                        if (this.options.optional)
                                $('<option />')
 
                        if (this.options.optional)
                                $('<option />')
@@ -4052,7 +4074,7 @@ function LuCI2()
                        var v = s.values || [ ];
                        delete s.values;
 
                        var v = s.values || [ ];
                        delete s.values;
 
-                       $(s.parent).children('input').each(function(i) {
+                       $(s.parent).children('div.input-group').children('input').each(function(i) {
                                if (i != del)
                                        v.push(this.value || '');
                        });
                                if (i != del)
                                        v.push(this.value || '');
                        });
@@ -4076,17 +4098,33 @@ function LuCI2()
                                        sid: s.sid,
                                        self: s.self,
                                        parent: s.parent,
                                        sid: s.sid,
                                        self: s.self,
                                        parent: s.parent,
-                                       index: i
+                                       index: i,
+                                       remove: ((i+1) < v.length)
                                };
 
                                };
 
+                               var btn;
+                               if (evdata.remove)
+                                       btn = _luci2.ui.button('–', 'danger').click(evdata, this._btnclick);
+                               else
+                                       btn = _luci2.ui.button('+', 'success').click(evdata, this._btnclick);
+
                                if (this.choices)
                                {
                                        var txt = $('<input />')
                                if (this.choices)
                                {
                                        var txt = $('<input />')
+                                               .addClass('form-control')
                                                .attr('type', 'text')
                                                .attr('type', 'text')
-                                               .hide()
-                                               .appendTo(s.parent);
+                                               .hide();
 
                                        var sel = $('<select />')
 
                                        var sel = $('<select />')
+                                               .addClass('form-control');
+
+                                       $('<div />')
+                                               .addClass('input-group')
+                                               .append(txt)
+                                               .append(sel)
+                                               .append($('<span />')
+                                                       .addClass('input-group-btn')
+                                                       .append(btn))
                                                .appendTo(s.parent);
 
                                        evdata.input = this.validator(s.sid, txt, true);
                                                .appendTo(s.parent);
 
                                        evdata.input = this.validator(s.sid, txt, true);
@@ -4110,12 +4148,18 @@ function LuCI2()
                                                .attr('type', 'text')
                                                .attr('index', i)
                                                .attr('placeholder', (i == 0) ? this.options.placeholder : '')
                                                .attr('type', 'text')
                                                .attr('index', i)
                                                .attr('placeholder', (i == 0) ? this.options.placeholder : '')
-                                               .addClass('cbi-input-text')
+                                               .addClass('form-control')
                                                .keydown(evdata, this._keydown)
                                                .keypress(evdata, this._keypress)
                                                .val(v[i]);
 
                                                .keydown(evdata, this._keydown)
                                                .keypress(evdata, this._keypress)
                                                .val(v[i]);
 
-                                       f.appendTo(s.parent);
+                                       $('<div />')
+                                               .addClass('input-group')
+                                               .append(f)
+                                               .append($('<span />')
+                                                       .addClass('input-group-btn')
+                                                       .append(btn))
+                                               .appendTo(s.parent);
 
                                        if (i == focus)
                                        {
 
                                        if (i == focus)
                                        {
@@ -4136,16 +4180,6 @@ function LuCI2()
                                        f = null;
                                }
 
                                        f = null;
                                }
 
-                               $('<img />')
-                                       .attr('src', _luci2.globals.resource + ((i+1) < v.length ? '/icons/cbi/remove.gif' : '/icons/cbi/add.gif'))
-                                       .attr('title', (i+1) < v.length ? _luci2.tr('Remove entry') : _luci2.tr('Add entry'))
-                                       .addClass('cbi-button')
-                                       .click(evdata, this._btnclick)
-                                       .appendTo(s.parent);
-
-                               $('<br />')
-                                       .appendTo(s.parent);
-
                                evdata = null;
                        }
 
                                evdata = null;
                        }
 
@@ -4210,7 +4244,7 @@ function LuCI2()
 
                                /* arrow up */
                                case 38:
 
                                /* arrow up */
                                case 38:
-                                       var prev = input.prevAll('input:first');
+                                       var prev = input.parent().prevAll('div.input-group:first').children('input');
                                        if (prev.is(':visible'))
                                                prev.focus();
                                        else
                                        if (prev.is(':visible'))
                                                prev.focus();
                                        else
@@ -4219,7 +4253,7 @@ function LuCI2()
 
                                /* arrow down */
                                case 40:
 
                                /* arrow down */
                                case 40:
-                                       var next = input.nextAll('input:first');
+                                       var next = input.parent().nextAll('div.input-group:first').children('input');
                                        if (next.is(':visible'))
                                                next.focus();
                                        else
                                        if (next.is(':visible'))
                                                next.focus();
                                        else
@@ -4234,7 +4268,7 @@ function LuCI2()
                {
                        if (!this.getAttribute('disabled'))
                        {
                {
                        if (!this.getAttribute('disabled'))
                        {
-                               if (ev.target.src.indexOf('remove') > -1)
+                               if (ev.data.remove)
                                {
                                        var index = ev.data.index;
                                        ev.data.self._redraw(-index, -1, index, ev.data);
                                {
                                        var index = ev.data.index;
                                        ev.data.self._redraw(-index, -1, index, ev.data);
@@ -4298,7 +4332,7 @@ function LuCI2()
                widget: function(sid)
                {
                        return $('<div />')
                widget: function(sid)
                {
                        return $('<div />')
-                               .addClass('cbi-value-dummy')
+                               .addClass('form-control-static')
                                .attr('id', this.id(sid))
                                .html(this.ucivalue(sid));
                },
                                .attr('id', this.id(sid))
                                .html(this.ucivalue(sid));
                },
@@ -4362,7 +4396,7 @@ function LuCI2()
                        var id = this.id(sid);
                        var ul = $('<ul />')
                                .attr('id', id)
                        var id = this.id(sid);
                        var ul = $('<ul />')
                                .attr('id', id)
-                               .addClass('cbi-input-networks');
+                               .addClass('list-unstyled');
 
                        var itype = this.options.multiple ? 'checkbox' : 'radio';
                        var value = this.ucivalue(sid);
 
                        var itype = this.options.multiple ? 'checkbox' : 'radio';
                        var value = this.ucivalue(sid);
@@ -4380,7 +4414,7 @@ function LuCI2()
                                {
                                        var iface = this.interfaces[i];
                                        var badge = $('<span />')
                                {
                                        var iface = this.interfaces[i];
                                        var badge = $('<span />')
-                                               .addClass('ifacebadge')
+                                               .addClass('badge')
                                                .text('%s: '.format(iface['interface']));
 
                                        if (iface.device && iface.device.subdevices)
                                                .text('%s: '.format(iface['interface']));
 
                                        if (iface.device && iface.device.subdevices)
@@ -4393,12 +4427,13 @@ function LuCI2()
 
                                        $('<li />')
                                                .append($('<label />')
 
                                        $('<li />')
                                                .append($('<label />')
+                                                       .addClass('radio inline')
                                                        .append($('<input />')
                                                                .attr('name', itype + id)
                                                                .attr('type', itype)
                                                                .attr('value', iface['interface'])
                                                                .prop('checked', !!check[iface['interface']])
                                                        .append($('<input />')
                                                                .attr('name', itype + id)
                                                                .attr('type', itype)
                                                                .attr('value', iface['interface'])
                                                                .prop('checked', !!check[iface['interface']])
-                                                               .addClass('cbi-input-' + itype))
+                                                               .addClass('form-control'))
                                                        .append(badge))
                                                .appendTo(ul);
                                }
                                                        .append(badge))
                                                .appendTo(ul);
                                }
@@ -4408,12 +4443,13 @@ function LuCI2()
                        {
                                $('<li />')
                                        .append($('<label />')
                        {
                                $('<li />')
                                        .append($('<label />')
+                                               .addClass('radio inline text-muted')
                                                .append($('<input />')
                                                        .attr('name', itype + id)
                                                        .attr('type', itype)
                                                        .attr('value', '')
                                                        .prop('checked', !value)
                                                .append($('<input />')
                                                        .attr('name', itype + id)
                                                        .attr('type', itype)
                                                        .attr('value', '')
                                                        .prop('checked', !value)
-                                                       .addClass('cbi-input-' + itype))
+                                                       .addClass('form-control'))
                                                .append(_luci2.tr('unspecified')))
                                        .appendTo(ul);
                        }
                                                .append(_luci2.tr('unspecified')))
                                        .appendTo(ul);
                        }
@@ -4472,7 +4508,7 @@ function LuCI2()
        });
 
 
        });
 
 
-       this.cbi.AbstractSection = AbstractWidget.extend({
+       this.cbi.AbstractSection = this.ui.AbstractWidget.extend({
                id: function()
                {
                        var s = [ arguments[0], this.map.uci_package, this.uci_type ];
                id: function()
                {
                        var s = [ arguments[0], this.map.uci_package, this.uci_type ];
@@ -4561,60 +4597,63 @@ function LuCI2()
                        return rv;
                },
 
                        return rv;
                },
 
-               validate: function(sid)
+               validate_section: function(sid)
                {
                {
-                       var rv = true;
-
-                       if (!sid)
-                       {
-                               var as = this.sections();
-                               for (var i = 0; i < as.length; i++)
-                                       if (!this.validate(as[i]['.name']))
-                                               rv = false;
-                               return rv;
-                       }
-
                        var inst = this.instance[sid];
                        var inst = this.instance[sid];
-                       var sv = rv[sid] || (rv[sid] = { });
 
                        var invals = 0;
 
                        var invals = 0;
-                       var legend = $('#' + this.id('sort', sid)).find('legend:first');
-
-                       legend.children('span').detach();
+                       var badge = $('#' + this.id('teaser', sid)).children('span:first');
 
                        for (var i = 0; i < this.tabs.length; i++)
                        {
                                var inval = 0;
 
                        for (var i = 0; i < this.tabs.length; i++)
                        {
                                var inval = 0;
-                               var tab = $('#' + this.id('tabhead', sid, this.tabs[i].id));
-
-                               tab.children('span').detach();
+                               var stbadge = $('#' + this.id('nodetab', sid, this.tabs[i].id)).children('span:first');
 
                                for (var j = 0; j < this.tabs[i].fields.length; j++)
                                        if (!this.tabs[i].fields[j].validate(sid))
                                                inval++;
 
                                if (inval > 0)
 
                                for (var j = 0; j < this.tabs[i].fields.length; j++)
                                        if (!this.tabs[i].fields[j].validate(sid))
                                                inval++;
 
                                if (inval > 0)
-                               {
-                                       $('<span />')
-                                               .addClass('badge')
-                                               .attr('title', _luci2.tr('%d Errors'.format(inval)))
-                                               .text(inval)
-                                               .appendTo(tab);
+                                       stbadge.text(inval)
+                                               .attr('title', _luci2.trp('1 Error', '%d Errors', inval).format(inval));
+                               else
+                                       stbadge.text('');
 
 
-                                       invals += inval;
-                                       tab = null;
-                                       rv = false;
-                               }
+                               invals += inval;
                        }
 
                        if (invals > 0)
                        }
 
                        if (invals > 0)
-                               $('<span />')
-                                       .addClass('badge')
-                                       .attr('title', _luci2.tr('%d Errors'.format(invals)))
-                                       .text(invals)
-                                       .appendTo(legend);
+                               badge.text(invals)
+                                       .attr('title', _luci2.trp('1 Error', '%d Errors', invals).format(invals));
+                       else
+                               badge.text('');
 
 
-                       return rv;
+                       return invals;
+               },
+
+               validate: function()
+               {
+                       this.error_count = 0;
+
+                       var as = this.sections();
+
+                       for (var i = 0; i < as.length; i++)
+                       {
+                               var invals = this.validate_section(as[i]['.name']);
+
+                               if (invals > 0)
+                                       this.error_count += invals;
+                       }
+
+                       var badge = $('#' + this.id('sectiontab')).children('span:first');
+
+                       if (this.error_count > 0)
+                               badge.text(this.error_count)
+                                       .attr('title', _luci2.trp('1 Error', '%d Errors', this.error_count).format(this.error_count));
+                       else
+                               badge.text('');
+
+                       return (this.error_count == 0);
                }
        });
 
                }
        });
 
@@ -4625,6 +4664,7 @@ function LuCI2()
                        this.options  = options;
                        this.tabs     = [ ];
                        this.fields   = { };
                        this.options  = options;
                        this.tabs     = [ ];
                        this.fields   = { };
+                       this.error_count  = 0;
                        this.active_panel = 0;
                        this.active_tab   = { };
                },
                        this.active_panel = 0;
                        this.active_tab   = { };
                },
@@ -4661,7 +4701,7 @@ function LuCI2()
                        this.map.remove(this.map.uci_package, sid);
                },
 
                        this.map.remove(this.map.uci_package, sid);
                },
 
-               _add: function(ev)
+               _ev_add: function(ev)
                {
                        var addb = $(this);
                        var name = undefined;
                {
                        var addb = $(this);
                        var name = undefined;
@@ -4683,14 +4723,11 @@ function LuCI2()
                        _luci2.ui.restoreScrollTop();
                },
 
                        _luci2.ui.restoreScrollTop();
                },
 
-               _remove: function(ev)
+               _ev_remove: function(ev)
                {
                        var self = ev.data.self;
                        var sid  = ev.data.sid;
 
                {
                        var self = ev.data.self;
                        var sid  = ev.data.sid;
 
-                       if (ev.data.index == (self.sections().length - 1))
-                               self.active_panel = -1;
-
                        _luci2.ui.saveScrollTop();
 
                        self.map.save();
                        _luci2.ui.saveScrollTop();
 
                        self.map.save();
@@ -4702,7 +4739,7 @@ function LuCI2()
                        ev.stopPropagation();
                },
 
                        ev.stopPropagation();
                },
 
-               _sid: function(ev)
+               _ev_sid: function(ev)
                {
                        var self = ev.data.self;
                        var text = $(this);
                {
                        var self = ev.data.self;
                        var text = $(this);
@@ -4747,6 +4784,80 @@ function LuCI2()
                        return true;
                },
 
                        return true;
                },
 
+               _ev_tab: function(ev)
+               {
+                       var self = ev.data.self;
+                       var sid  = ev.data.sid;
+
+                       self.validate();
+                       self.active_tab[sid] = parseInt(ev.target.getAttribute('data-luci2-tab-index'));
+               },
+
+               _ev_panel_collapse: function(ev)
+               {
+                       var self = ev.data.self;
+
+                       var this_panel = $(ev.target);
+                       var this_toggle = this_panel.prevAll('[data-toggle="collapse"]:first');
+
+                       var prev_toggle = $($(ev.delegateTarget).find('[data-toggle="collapse"]:eq(%d)'.format(self.active_panel)));
+                       var prev_panel = $(prev_toggle.attr('data-target'));
+
+                       prev_panel
+                               .removeClass('in')
+                               .addClass('collapse');
+
+                       prev_toggle.find('.luci2-section-teaser')
+                               .show()
+                               .children('span:last')
+                               .empty()
+                               .append(self.teaser(prev_panel.attr('data-luci2-sid')));
+
+                       this_toggle.find('.luci2-section-teaser')
+                               .hide();
+
+                       self.active_panel = parseInt(this_panel.attr('data-luci2-panel-index'));
+                       self.validate();
+               },
+
+               _ev_panel_open: function(ev)
+               {
+                       var self  = ev.data.self;
+                       var panel = $($(this).attr('data-target'));
+                       var index = parseInt(panel.attr('data-luci2-panel-index'));
+
+                       if (index == self.active_panel)
+                               ev.stopPropagation();
+               },
+
+               _ev_sort: function(ev)
+               {
+                       var self    = ev.data.self;
+                       var cur_idx = ev.data.index;
+                       var new_idx = cur_idx + (ev.data.up ? -1 : 1);
+                       var s       = self.sections();
+
+                       if (new_idx >= 0 && new_idx < s.length)
+                       {
+                               var tmp = s[cur_idx]['.index'];
+
+                               s[cur_idx]['.index'] = s[new_idx]['.index'];
+                               s[new_idx]['.index'] = tmp;
+
+                               if (self.active_panel == cur_idx)
+                                       self.active_panel = new_idx;
+                               else if (self.active_panel == new_idx)
+                                       self.active_panel = cur_idx;
+
+                               self.map.uci.reorder = true;
+
+                               self.map.save();
+                               self.map.redraw();
+                       }
+
+                       ev.stopPropagation();
+               },
+
                teaser: function(sid)
                {
                        var tf = this.teaser_fields;
                teaser: function(sid)
                {
                        var tf = this.teaser_fields;
@@ -4795,6 +4906,9 @@ function LuCI2()
 
                _render_add: function()
                {
 
                _render_add: function()
                {
+                       if (!this.options.addremove)
+                               return null;
+
                        var text = _luci2.tr('Add section');
                        var ttip = _luci2.tr('Create new section...');
 
                        var text = _luci2.tr('Add section');
                        var ttip = _luci2.tr('Create new section...');
 
@@ -4803,7 +4917,7 @@ function LuCI2()
                        else if (typeof(this.options.add_caption) == 'string')
                                text = this.options.add_caption, ttip = '';
 
                        else if (typeof(this.options.add_caption) == 'string')
                                text = this.options.add_caption, ttip = '';
 
-                       var add = $('<div />').addClass('cbi-section-add');
+                       var add = $('<div />');
 
                        if (this.options.anonymous === false)
                        {
 
                        if (this.options.anonymous === false)
                        {
@@ -4811,15 +4925,15 @@ function LuCI2()
                                        .addClass('cbi-input-text')
                                        .attr('type', 'text')
                                        .attr('placeholder', ttip)
                                        .addClass('cbi-input-text')
                                        .attr('type', 'text')
                                        .attr('placeholder', ttip)
-                                       .blur({ self: this }, this._sid)
-                                       .keyup({ self: this }, this._sid)
+                                       .blur({ self: this }, this._ev_sid)
+                                       .keyup({ self: this }, this._ev_sid)
                                        .appendTo(add);
 
                                $('<img />')
                                        .attr('src', _luci2.globals.resource + '/icons/cbi/add.gif')
                                        .attr('title', text)
                                        .addClass('cbi-button')
                                        .appendTo(add);
 
                                $('<img />')
                                        .attr('src', _luci2.globals.resource + '/icons/cbi/add.gif')
                                        .attr('title', text)
                                        .addClass('cbi-button')
-                                       .click({ self: this }, this._add)
+                                       .click({ self: this }, this._ev_add)
                                        .appendTo(add);
 
                                $('<div />')
                                        .appendTo(add);
 
                                $('<div />')
@@ -4829,13 +4943,9 @@ function LuCI2()
                        }
                        else
                        {
                        }
                        else
                        {
-                               $('<input />')
-                                       .attr('type', 'button')
-                                       .addClass('cbi-button')
-                                       .addClass('cbi-button-add')
-                                       .val(text).attr('title', ttip)
-                                       .click({ self: this }, this._add)
-                                       .appendTo(add)
+                               _luci2.ui.button(text, 'success', ttip)
+                                       .click({ self: this }, this._ev_add)
+                                       .appendTo(add);
                        }
 
                        return add;
                        }
 
                        return add;
@@ -4843,6 +4953,9 @@ function LuCI2()
 
                _render_remove: function(sid, index)
                {
 
                _render_remove: function(sid, index)
                {
+                       if (!this.options.addremove)
+                               return null;
+
                        var text = _luci2.tr('Remove');
                        var ttip = _luci2.tr('Remove this section');
 
                        var text = _luci2.tr('Remove');
                        var ttip = _luci2.tr('Remove this section');
 
@@ -4851,228 +4964,236 @@ function LuCI2()
                        else if (typeof(this.options.remove_caption) == 'string')
                                text = this.options.remove_caption, ttip = '';
 
                        else if (typeof(this.options.remove_caption) == 'string')
                                text = this.options.remove_caption, ttip = '';
 
-                       return $('<input />')
-                               .attr('type', 'button')
-                               .addClass('cbi-button')
-                               .addClass('cbi-button-remove')
-                               .val(text).attr('title', ttip)
-                               .click({ self: this, sid: sid, index: index }, this._remove);
+                       return _luci2.ui.button(text, 'danger', ttip)
+                               .click({ self: this, sid: sid, index: index }, this._ev_remove);
                },
 
                },
 
-               _render_caption: function(sid)
+               _render_sort: function(sid, index)
                {
                {
-                       if (typeof(this.options.caption) == 'string')
-                       {
-                               return $('<legend />')
-                                       .text(this.options.caption.format(sid));
-                       }
-                       else if (typeof(this.options.caption) == 'function')
-                       {
-                               return $('<legend />')
-                                       .text(this.options.caption.call(this, sid));
-                       }
+                       if (!this.options.sortable)
+                               return null;
+
+                       var b1 = _luci2.ui.button('↑', 'info', _luci2.tr('Move up'))
+                               .click({ self: this, index: index, up: true }, this._ev_sort);
+
+                       var b2 = _luci2.ui.button('↓', 'info', _luci2.tr('Move down'))
+                               .click({ self: this, index: index, up: false }, this._ev_sort);
 
 
-                       return '';
+                       return b1.add(b2);
                },
 
                },
 
-               render: function()
+               _render_caption: function()
                {
                {
-                       var allsections = $();
-                       var panel_index = 0;
+                       return $('<h3 />')
+                               .addClass('panel-title')
+                               .append(this.label('caption') || this.uci_type);
+               },
 
 
-                       this.instance = { };
+               _render_description: function()
+               {
+                       var text = this.label('description');
 
 
-                       var s = this.sections();
+                       if (text)
+                               return $('<div />')
+                                       .addClass('luci2-section-description')
+                                       .text(text);
 
 
-                       if (s.length == 0)
+                       return null;
+               },
+
+               _render_teaser: function(sid, index)
+               {
+                       if (this.options.collabsible || this.map.options.collabsible)
                        {
                        {
-                               var fieldset = $('<fieldset />')
-                                       .addClass('cbi-section');
+                               return $('<div />')
+                                       .attr('id', this.id('teaser', sid))
+                                       .addClass('luci2-section-teaser well well-sm')
+                                       .append($('<span />')
+                                               .addClass('badge'))
+                                       .append($('<span />'));
+                       }
 
 
-                               var head = $('<div />')
-                                       .addClass('cbi-section-head')
-                                       .appendTo(fieldset);
+                       return null;
+               },
 
 
-                               head.append(this._render_caption(undefined));
+               _render_head: function(condensed)
+               {
+                       if (condensed)
+                               return null;
 
 
-                               if (typeof(this.options.description) == 'string')
-                               {
-                                       $('<div />')
-                                               .addClass('cbi-section-descr')
-                                               .text(this.options.description)
-                                               .appendTo(head);
-                               }
+                       return $('<div />')
+                               .addClass('panel-heading')
+                               .append(this._render_caption())
+                               .append(this._render_description());
+               },
 
 
-                               allsections = allsections.add(fieldset);
-                       }
+               _render_tab_description: function(sid, index, tab_index)
+               {
+                       var tab = this.tabs[tab_index];
 
 
-                       for (var i = 0; i < s.length; i++)
+                       if (typeof(tab.description) == 'string')
                        {
                        {
-                               var sid = s[i]['.name'];
-                               var inst = this.instance[sid] = { tabs: [ ] };
-
-                               var fieldset = $('<fieldset />')
-                                       .attr('id', this.id('sort', sid))
-                                       .addClass('cbi-section');
+                               return $('<div />')
+                                       .addClass('cbi-tab-descr')
+                                       .text(tab.description);
+                       }
 
 
-                               var head = $('<div />')
-                                       .addClass('cbi-section-head')
-                                       .attr('cbi-section-num', this.index)
-                                       .attr('cbi-section-id', sid);
+                       return null;
+               },
 
 
-                               head.append(this._render_caption(sid));
+               _render_tab_head: function(sid, index, tab_index)
+               {
+                       var tab = this.tabs[tab_index];
+                       var cur = this.active_tab[sid] || 0;
 
 
-                               if (typeof(this.options.description) == 'string')
-                               {
-                                       $('<div />')
-                                               .addClass('cbi-section-descr')
-                                               .text(this.options.description)
-                                               .appendTo(head);
-                               }
+                       var tabh = $('<li />')
+                               .append($('<a />')
+                                       .attr('id', this.id('nodetab', sid, tab.id))
+                                       .attr('href', '#' + this.id('node', sid, tab.id))
+                                       .attr('data-toggle', 'tab')
+                                       .attr('data-luci2-tab-index', tab_index)
+                                       .text((tab.caption ? tab.caption.format(tab.id) : tab.id) + ' ')
+                                       .append($('<span />')
+                                               .addClass('badge'))
+                                       .on('shown.bs.tab', { self: this, sid: sid }, this._ev_tab));
 
 
-                               var teaser;
-                               if ((s.length > 1 && this.options.collabsible) || this.map.options.collabsible)
-                                       teaser = $('<div />')
-                                               .addClass('cbi-section-teaser')
-                                               .appendTo(head);
+                       if (cur == tab_index)
+                               tabh.addClass('active');
 
 
-                               if (this.options.addremove)
-                                       $('<div />')
-                                               .addClass('cbi-section-remove')
-                                               .addClass('right')
-                                               .append(this._render_remove(sid, panel_index))
-                                               .appendTo(head);
+                       return tabh;
+               },
 
 
-                               var body = $('<div />')
-                                       .attr('index', panel_index++);
+               _render_tab_body: function(sid, index, tab_index)
+               {
+                       var tab = this.tabs[tab_index];
+                       var cur = this.active_tab[sid] || 0;
 
 
-                               var fields = $('<fieldset />')
-                                       .addClass('cbi-section-node');
+                       var tabb = $('<div />')
+                               .addClass('tab-pane')
+                               .attr('id', this.id('node', sid, tab.id))
+                               .attr('data-luci2-tab-index', tab_index)
+                               .append(this._render_tab_description(sid, index, tab_index));
 
 
-                               if (this.tabs.length > 1)
-                               {
-                                       var menu = $('<ul />')
-                                               .addClass('cbi-tabmenu');
+                       if (cur == tab_index)
+                               tabb.addClass('active');
 
 
-                                       for (var j = 0; j < this.tabs.length; j++)
-                                       {
-                                               var tabid = this.id('tab', sid, this.tabs[j].id);
-                                               var theadid = this.id('tabhead', sid, this.tabs[j].id);
+                       for (var i = 0; i < tab.fields.length; i++)
+                               tabb.append(tab.fields[i].render(sid));
 
 
-                                               var tabc = $('<div />')
-                                                       .addClass('cbi-tabcontainer')
-                                                       .attr('id', tabid)
-                                                       .attr('index', j);
+                       return tabb;
+               },
 
 
-                                               if (typeof(this.tabs[j].description) == 'string')
-                                               {
-                                                       $('<div />')
-                                                               .addClass('cbi-tab-descr')
-                                                               .text(this.tabs[j].description)
-                                                               .appendTo(tabc);
-                                               }
+               _render_section_head: function(sid, index)
+               {
+                       var head = $('<div />')
+                               .addClass('luci2-section-header')
+                               .append(this._render_teaser(sid, index))
+                               .append($('<div />')
+                                       .addClass('btn-group')
+                                       .append(this._render_sort(sid, index))
+                                       .append(this._render_remove(sid, index)));
 
 
-                                               for (var k = 0; k < this.tabs[j].fields.length; k++)
-                                                       this.tabs[j].fields[k].render(sid).appendTo(tabc);
+                       if (this.options.collabsible)
+                       {
+                               head.attr('data-toggle', 'collapse')
+                                       .attr('data-parent', this.id('sectiongroup'))
+                                       .attr('data-target', '#' + this.id('panel', sid))
+                                       .on('click', { self: this }, this._ev_panel_open);
+                       }
 
 
-                                               tabc.appendTo(fields);
-                                               tabc = null;
+                       return head;
+               },
 
 
-                                               $('<li />').attr('id', theadid).append(
-                                                       $('<a />')
-                                                               .text(this.tabs[j].caption.format(this.tabs[j].id))
-                                                               .attr('href', '#' + tabid)
-                                               ).appendTo(menu);
-                                       }
+               _render_section_body: function(sid, index)
+               {
+                       var body = $('<div />')
+                               .attr('id', this.id('panel', sid))
+                               .attr('data-luci2-panel-index', index)
+                               .attr('data-luci2-sid', sid);
 
 
-                                       menu.appendTo(body);
-                                       menu = null;
+                       if (this.options.collabsible || this.map.options.collabsible)
+                       {
+                               body.addClass('panel-collapse collapse');
 
 
-                                       fields.appendTo(body);
-                                       fields = null;
+                               if (index == this.active_panel)
+                                       body.addClass('in');
+                       }
 
 
-                                       var t = body.tabs({ active: this.active_tab[sid] });
+                       var tab_heads = $('<ul />')
+                               .addClass('nav nav-tabs');
 
 
-                                       t.on('tabsactivate', { self: this, sid: sid }, function(ev, ui) {
-                                               var d = ev.data;
-                                               d.self.validate();
-                                               d.self.active_tab[d.sid] = parseInt(ui.newPanel.attr('index'));
-                                       });
-                               }
-                               else
-                               {
-                                       for (var j = 0; j < this.tabs[0].fields.length; j++)
-                                               this.tabs[0].fields[j].render(sid).appendTo(fields);
+                       var tab_bodies = $('<div />')
+                               .addClass('form-horizontal tab-content')
+                               .append(tab_heads);
 
 
-                                       fields.appendTo(body);
-                                       fields = null;
-                               }
+                       for (var j = 0; j < this.tabs.length; j++)
+                       {
+                               tab_heads.append(this._render_tab_head(sid, index, j));
+                               tab_bodies.append(this._render_tab_body(sid, index, j));
+                       }
 
 
-                               head.appendTo(fieldset);
-                               head = null;
+                       body.append(tab_bodies);
 
 
-                               body.appendTo(fieldset);
-                               body = null;
+                       if (this.tabs.length <= 1)
+                               tab_heads.hide();
 
 
-                               allsections = allsections.add(fieldset);
-                               fieldset = null;
+                       return body;
+               },
 
 
-                               //this.validate(sid);
-                               //
-                               //if (teaser)
-                               //      teaser.append(this.teaser(sid));
-                       }
+               _render_body: function(condensed)
+               {
+                       var s = this.sections();
 
 
-                       if (this.options.collabsible && s.length > 1)
-                       {
-                               var a = $('<div />').append(allsections).accordion({
-                                       header: '> fieldset > div.cbi-section-head',
-                                       heightStyle: 'content',
-                                       active: this.active_panel
-                               });
+                       if (this.active_panel < 0)
+                               this.active_panel += s.length;
+                       else if (this.active_panel >= s.length)
+                               this.active_panel = s.length - 1;
 
 
-                               a.on('accordionbeforeactivate', { self: this }, function(ev, ui) {
-                                       var h = ui.oldHeader;
-                                       var s = ev.data.self;
-                                       var i = h.attr('cbi-section-id');
+                       var body = $('<ul />')
+                               .addClass('list-group');
 
 
-                                       h.children('.cbi-section-teaser').empty().append(s.teaser(i));
-                                       s.validate();
-                               });
+                       if (this.options.collabsible)
+                       {
+                               body.attr('id', this.id('sectiongroup'))
+                                       .on('show.bs.collapse', { self: this }, this._ev_panel_collapse);
+                       }
 
 
-                               a.on('accordionactivate', { self: this }, function(ev, ui) {
-                                       ev.data.self.active_panel = parseInt(ui.newPanel.attr('index'));
-                               });
+                       if (s.length == 0)
+                       {
+                               body.append($('<li />')
+                                       .addClass('list-group-item text-muted')
+                                       .text(this.label('placeholder') || _luci2.tr('There are no entries defined yet.')))
+                       }
 
 
-                               if (this.options.sortable)
-                               {
-                                       var s = a.sortable({
-                                               axis: 'y',
-                                               handle: 'div.cbi-section-head'
-                                       });
+                       for (var i = 0; i < s.length; i++)
+                       {
+                               var sid = s[i]['.name'];
+                               var inst = this.instance[sid] = { tabs: [ ] };
 
 
-                                       s.on('sortupdate', { self: this, ids: s.sortable('toArray') }, function(ev, ui) {
-                                               var sections = [ ];
-                                               for (var i = 0; i < ev.data.ids.length; i++)
-                                                       sections.push(ev.data.ids[i].substring(ev.data.ids[i].lastIndexOf('.') + 1));
-                                               _luci2.uci.order(ev.data.self.map.uci_package, sections);
-                                       });
+                               body.append($('<li />')
+                                       .addClass('list-group-item')
+                                       .append(this._render_section_head(sid, i))
+                                       .append(this._render_section_body(sid, i)));
+                       }
 
 
-                                       s.on('sortstop', function(ev, ui) {
-                                               ui.item.children('div.cbi-section-head').triggerHandler('focusout');
-                                       });
-                               }
+                       return body;
+               },
 
 
-                               if (this.options.addremove)
-                                       this._render_add().appendTo(a);
+               render: function(condensed)
+               {
+                       this.instance = { };
 
 
-                               return a;
-                       }
+                       var panel = $('<div />')
+                               .addClass('panel panel-default')
+                               .append(this._render_head(condensed))
+                               .append(this._render_body(condensed));
 
                        if (this.options.addremove)
 
                        if (this.options.addremove)
-                               allsections = allsections.add(this._render_add());
+                               panel.append($('<div />')
+                                       .addClass('panel-footer')
+                                       .append(this._render_add()));
 
 
-                       return allsections;
+                       return panel;
                },
 
                finish: function()
                },
 
                finish: function()
@@ -5083,146 +5204,101 @@ function LuCI2()
                        {
                                var sid = s[i]['.name'];
 
                        {
                                var sid = s[i]['.name'];
 
-                               this.validate(sid);
+                               this.validate_section(sid);
 
 
-                               $('#' + this.id('sort', sid))
-                                       .children('.cbi-section-head')
-                                       .children('.cbi-section-teaser')
-                                       .append(this.teaser(sid));
+                               if (i != this.active_panel)
+                                       $('#' + this.id('teaser', sid)).children('span:last')
+                                               .append(this.teaser(sid));
+                               else
+                                       $('#' + this.id('teaser', sid))
+                                               .hide();
                        }
                }
        });
 
        this.cbi.TableSection = this.cbi.TypedSection.extend({
                        }
                }
        });
 
        this.cbi.TableSection = this.cbi.TypedSection.extend({
-               render: function()
+               _render_table_head: function()
                {
                {
-                       var allsections = $();
-                       var panel_index = 0;
-
-                       this.instance = { };
-
-                       var s = this.sections();
-
-                       var fieldset = $('<fieldset />')
-                               .addClass('cbi-section');
-
-                       fieldset.append(this._render_caption(sid));
-
-                       if (typeof(this.options.description) == 'string')
-                       {
-                               $('<div />')
-                                       .addClass('cbi-section-descr')
-                                       .text(this.options.description)
-                                       .appendTo(fieldset);
-                       }
-
-                       var fields = $('<div />')
-                               .addClass('cbi-section-node')
-                               .appendTo(fieldset);
-
-                       var table = $('<table />')
-                               .addClass('cbi-section-table')
-                               .appendTo(fields);
-
                        var thead = $('<thead />')
                        var thead = $('<thead />')
-                               .append($('<tr />').addClass('cbi-section-table-titles'))
-                               .appendTo(table);
+                               .append($('<tr />')
+                                       .addClass('cbi-section-table-titles'));
 
                        for (var j = 0; j < this.tabs[0].fields.length; j++)
 
                        for (var j = 0; j < this.tabs[0].fields.length; j++)
-                               $('<th />')
+                               thead.children().append($('<th />')
                                        .addClass('cbi-section-table-cell')
                                        .css('width', this.tabs[0].fields[j].options.width || '')
                                        .addClass('cbi-section-table-cell')
                                        .css('width', this.tabs[0].fields[j].options.width || '')
-                                       .append(this.tabs[0].fields[j].options.caption)
-                                       .appendTo(thead.children());
+                                       .append(this.tabs[0].fields[j].label('caption')));
 
 
-                       if (this.options.sortable)
-                               $('<th />').addClass('cbi-section-table-cell').text(' ').appendTo(thead.children());
+                       if (this.options.addremove !== false || this.options.sortable)
+                               thead.children().append($('<th />')
+                                       .addClass('cbi-section-table-cell')
+                                       .text(' '));
 
 
-                       if (this.options.addremove !== false)
-                               $('<th />').addClass('cbi-section-table-cell').text(' ').appendTo(thead.children());
+                       return thead;
+               },
 
 
-                       var tbody = $('<tbody />')
-                               .appendTo(table);
+               _render_table_row: function(sid, index)
+               {
+                       var row = $('<tr />')
+                               .attr('data-luci2-sid', sid);
 
 
-                       if (s.length == 0)
+                       for (var j = 0; j < this.tabs[0].fields.length; j++)
                        {
                        {
-                               $('<tr />')
-                                       .addClass('cbi-section-table-row')
-                                       .append(
-                                               $('<td />')
-                                                       .addClass('cbi-section-table-cell')
-                                                       .addClass('cbi-section-table-placeholder')
-                                                       .attr('colspan', thead.children().children().length)
-                                                       .text(this.options.placeholder || _luci2.tr('This section contains no values yet')))
-                                       .appendTo(tbody);
+                               row.append($('<td />')
+                                       .css('width', this.tabs[0].fields[j].options.width || '')
+                                       .append(this.tabs[0].fields[j].render(sid, true)));
                        }
 
                        }
 
-                       for (var i = 0; i < s.length; i++)
+                       if (this.options.addremove !== false || this.options.sortable)
                        {
                        {
-                               var sid = s[i]['.name'];
-                               var inst = this.instance[sid] = { tabs: [ ] };
+                               row.append($('<td />')
+                                       .addClass('text-right')
+                                       .append($('<div />')
+                                               .addClass('btn-group')
+                                               .append(this._render_sort(sid, index))
+                                               .append(this._render_remove(sid, index))));
+                       }
 
 
-                               var row = $('<tr />')
-                                       .addClass('cbi-section-table-row')
-                                       .appendTo(tbody);
+                       return row;
+               },
 
 
-                               for (var j = 0; j < this.tabs[0].fields.length; j++)
-                               {
-                                       $('<td />')
-                                               .addClass('cbi-section-table-cell')
-                                               .css('width', this.tabs[0].fields[j].options.width || '')
-                                               .append(this.tabs[0].fields[j].render(sid, true))
-                                               .appendTo(row);
-                               }
+               _render_table_body: function()
+               {
+                       var s = this.sections();
 
 
-                               if (this.options.sortable)
-                               {
-                                       $('<td />')
-                                               .addClass('cbi-section-table-cell')
-                                               .addClass('cbi-section-table-sort')
-                                               .append($('<img />').attr('src', _luci2.globals.resource + '/icons/cbi/up.gif').attr('title', _luci2.tr('Drag to sort')))
-                                               .append($('<br />'))
-                                               .append($('<img />').attr('src', _luci2.globals.resource + '/icons/cbi/down.gif').attr('title', _luci2.tr('Drag to sort')))
-                                               .appendTo(row);
-                               }
+                       var tbody = $('<tbody />');
 
 
-                               if (this.options.addremove !== false)
-                               {
-                                       $('<td />')
-                                               .addClass('cbi-section-table-cell')
-                                               .append(this._render_remove(sid))
-                                               .appendTo(row);
-                               }
+                       if (s.length == 0)
+                       {
+                               var cols = this.tabs[0].fields.length;
 
 
-                               this.validate(sid);
+                               if (this.options.addremove !== false || this.options.sortable)
+                                       cols++;
 
 
-                               row = null;
+                               tbody.append($('<tr />')
+                                       .append($('<td />')
+                                               .addClass('text-muted')
+                                               .attr('colspan', cols)
+                                               .text(this.label('placeholder') || _luci2.tr('There are no entries defined yet.'))));
                        }
 
                        }
 
-                       if (this.options.sortable)
+                       for (var i = 0; i < s.length; i++)
                        {
                        {
-                               var s = tbody.sortable({
-                                       handle: 'td.cbi-section-table-sort'
-                               });
-
-                               s.on('sortupdate', { self: this, ids: s.sortable('toArray') }, function(ev, ui) {
-                                       var sections = [ ];
-                                       for (var i = 0; i < ev.data.ids.length; i++)
-                                               sections.push(ev.data.ids[i].substring(ev.data.ids[i].lastIndexOf('.') + 1));
-                                       _luci2.uci.order(ev.data.self.map.uci_package, sections);
-                               });
+                               var sid = s[i]['.name'];
+                               var inst = this.instance[sid] = { tabs: [ ] };
 
 
-                               s.on('sortstop', function(ev, ui) {
-                                       ui.item.children('div.cbi-section-head').triggerHandler('focusout');
-                               });
+                               tbody.append(this._render_table_row(sid, i));
                        }
 
                        }
 
-                       if (this.options.addremove)
-                               this._render_add().appendTo(fieldset);
-
-                       fields = table = thead = tbody = null;
+                       return tbody;
+               },
 
 
-                       return fieldset;
+               _render_body: function(condensed)
+               {
+                       return $('<table />')
+                               .addClass('table table-condensed table-hover')
+                               .append(this._render_table_head())
+                               .append(this._render_table_body());
                }
        });
 
                }
        });
 
@@ -5256,7 +5332,7 @@ function LuCI2()
                }
        });
 
                }
        });
 
-       this.cbi.Map = AbstractWidget.extend({
+       this.cbi.Map = this.ui.AbstractWidget.extend({
                init: function(uci_package, options)
                {
                        var self = this;
                init: function(uci_package, options)
                {
                        var self = this;
@@ -5273,19 +5349,49 @@ function LuCI2()
                        });
                },
 
                        });
                },
 
+               _load_cb: function(packages)
+               {
+                       for (var i = 0; i < packages.length; i++)
+                       {
+                               this.uci.values[packages[i]['.package']] = packages[i];
+                               delete packages[i]['.package'];
+                       }
+
+                       var deferreds = [ _luci2.deferrable(this.options.prepare()) ];
+
+                       for (var i = 0; i < this.sections.length; i++)
+                       {
+                               for (var f in this.sections[i].fields)
+                               {
+                                       if (typeof(this.sections[i].fields[f].load) != 'function')
+                                               continue;
+
+                                       var s = this.sections[i].sections();
+                                       for (var j = 0; j < s.length; j++)
+                                       {
+                                               var rv = this.sections[i].fields[f].load(s[j]['.name']);
+                                               if (_luci2.isDeferred(rv))
+                                                       deferreds.push(rv);
+                                       }
+                               }
+                       }
+
+                       return $.when.apply($, deferreds);
+               },
+
                load: function()
                {
                load: function()
                {
+                       var self = this;
+
                        this.uci = {
                                newid:   0,
                                values:  { },
                                creates: { },
                                changes: { },
                        this.uci = {
                                newid:   0,
                                values:  { },
                                creates: { },
                                changes: { },
-                               deletes: { }
+                               deletes: { },
+                               reorder: false
                        };
 
                        };
 
-                       if (typeof(this.active_panel) == 'undefined')
-                               this.active_panel = 0;
-
                        var packages = { };
 
                        for (var i = 0; i < this.sections.length; i++)
                        var packages = { };
 
                        for (var i = 0; i < this.sections.length; i++)
@@ -5293,126 +5399,125 @@ function LuCI2()
 
                        packages[this.uci_package] = true;
 
 
                        packages[this.uci_package] = true;
 
-                       var load_cb = this._load_cb || (this._load_cb = $.proxy(function(packages) {
-                               for (var i = 0; i < packages.length; i++)
-                               {
-                                       this.uci.values[packages[i]['.package']] = packages[i];
-                                       delete packages[i]['.package'];
-                               }
-
-                               var deferreds = [ _luci2.deferrable(this.options.prepare()) ];
-
-                               for (var i = 0; i < this.sections.length; i++)
-                               {
-                                       for (var f in this.sections[i].fields)
-                                       {
-                                               if (typeof(this.sections[i].fields[f].load) != 'function')
-                                                       continue;
-
-                                               var s = this.sections[i].sections();
-                                               for (var j = 0; j < s.length; j++)
-                                               {
-                                                       var rv = this.sections[i].fields[f].load(s[j]['.name']);
-                                                       if (_luci2.isDeferred(rv))
-                                                               deferreds.push(rv);
-                                               }
-                                       }
-                               }
-
-                               return $.when.apply($, deferreds);
-                       }, this));
-
                        _luci2.rpc.batch();
 
                        for (var pkg in packages)
                                _luci2.uci.get_all(pkg);
 
                        _luci2.rpc.batch();
 
                        for (var pkg in packages)
                                _luci2.uci.get_all(pkg);
 
-                       return _luci2.rpc.flush().then(load_cb);
+                       return _luci2.rpc.flush().then(function(packages) {
+                               return self._load_cb(packages);
+                       });
                },
 
                },
 
-               render: function()
+               _ev_tab: function(ev)
                {
                {
-                       var map = $('<div />').addClass('cbi-map');
+                       var self = ev.data.self;
 
 
-                       if (typeof(this.options.caption) == 'string')
-                               $('<h2 />').text(this.options.caption).appendTo(map);
+                       self.validate();
+                       self.active_tab = parseInt(ev.target.getAttribute('data-luci2-tab-index'));
+               },
 
 
-                       if (typeof(this.options.description) == 'string')
-                               $('<div />').addClass('cbi-map-descr').text(this.options.description).appendTo(map);
+               _render_tab_head: function(tab_index)
+               {
+                       var section = this.sections[tab_index];
+                       var cur = this.active_tab || 0;
 
 
-                       var sections = $('<div />').appendTo(map);
+                       var tabh = $('<li />')
+                               .append($('<a />')
+                                       .attr('id', section.id('sectiontab'))
+                                       .attr('href', '#' + section.id('section'))
+                                       .attr('data-toggle', 'tab')
+                                       .attr('data-luci2-tab-index', tab_index)
+                                       .text(section.label('caption') + ' ')
+                                       .append($('<span />')
+                                               .addClass('badge'))
+                                       .on('shown.bs.tab', { self: this }, this._ev_tab));
 
 
-                       for (var i = 0; i < this.sections.length; i++)
-                       {
-                               var s = this.sections[i].render();
+                       if (cur == tab_index)
+                               tabh.addClass('active');
 
 
-                               if (this.options.readonly || this.sections[i].options.readonly)
-                                       s.find('input, select, button, img.cbi-button').attr('disabled', true);
+                       return tabh;
+               },
 
 
-                               s.appendTo(sections);
+               _render_tab_body: function(tab_index)
+               {
+                       var section = this.sections[tab_index];
+                       var desc = section.label('description');
+                       var cur = this.active_tab || 0;
 
 
-                               if (this.sections[i].options.active)
-                                       this.active_panel = i;
-                       }
+                       var tabb = $('<div />')
+                               .addClass('tab-pane')
+                               .attr('id', section.id('section'))
+                               .attr('data-luci2-tab-index', tab_index);
 
 
-                       if (this.options.collabsible)
-                       {
-                               var a = sections.accordion({
-                                       header: '> fieldset > div.cbi-section-head',
-                                       heightStyle: 'content',
-                                       active: this.active_panel
-                               });
+                       if (cur == tab_index)
+                               tabb.addClass('active');
 
 
-                               a.on('accordionbeforeactivate', { self: this }, function(ev, ui) {
-                                       var h = ui.oldHeader;
-                                       var s = ev.data.self.sections[parseInt(h.attr('cbi-section-num'))];
-                                       var i = h.attr('cbi-section-id');
+                       if (desc)
+                               tabb.append($('<p />')
+                                       .text(desc));
 
 
-                                       h.children('.cbi-section-teaser').empty().append(s.teaser(i));
+                       var s = section.render(this.options.tabbed);
 
 
-                                       for (var i = 0; i < ev.data.self.sections.length; i++)
-                                               ev.data.self.sections[i].validate();
-                               });
+                       if (this.options.readonly || section.options.readonly)
+                               s.find('input, select, button, img.cbi-button').attr('disabled', true);
 
 
-                               a.on('accordionactivate', { self: this }, function(ev, ui) {
-                                       ev.data.self.active_panel = parseInt(ui.newPanel.attr('index'));
-                               });
-                       }
+                       tabb.append(s);
 
 
-                       if (this.options.pageaction !== false)
+                       return tabb;
+               },
+
+               _render_body: function()
+               {
+                       var tabs = $('<ul />')
+                               .addClass('nav nav-tabs');
+
+                       var body = $('<div />')
+                               .append(tabs);
+
+                       for (var i = 0; i < this.sections.length; i++)
                        {
                        {
-                               var a = $('<div />')
-                                       .addClass('cbi-page-actions')
-                                       .appendTo(map);
+                               tabs.append(this._render_tab_head(i));
+                               body.append(this._render_tab_body(i));
+                       }
 
 
-                               $('<input />')
-                                       .addClass('cbi-button').addClass('cbi-button-apply')
-                                       .attr('type', 'button')
-                                       .val(_luci2.tr('Save & Apply'))
-                                       .appendTo(a);
+                       if (this.options.tabbed)
+                               body.addClass('tab-content');
+                       else
+                               tabs.hide();
 
 
-                               $('<input />')
-                                       .addClass('cbi-button').addClass('cbi-button-save')
-                                       .attr('type', 'button')
-                                       .val(_luci2.tr('Save'))
-                                       .click({ self: this }, function(ev) { ev.data.self.send(); })
-                                       .appendTo(a);
+                       return body;
+               },
 
 
-                               $('<input />')
-                                       .addClass('cbi-button').addClass('cbi-button-reset')
-                                       .attr('type', 'button')
-                                       .val(_luci2.tr('Reset'))
-                                       .click({ self: this }, function(ev) { ev.data.self.insertInto(ev.data.self.target); })
-                                       .appendTo(a);
+               render: function()
+               {
+                       var map = $('<form />');
 
 
-                               a = null;
-                       }
+                       if (typeof(this.options.caption) == 'string')
+                               map.append($('<h2 />')
+                                       .text(this.options.caption));
+
+                       if (typeof(this.options.description) == 'string')
+                               map.append($('<p />')
+                                       .text(this.options.description));
 
 
-                       var top = $('<form />').append(map);
+                       map.append(this._render_body());
 
 
-                       map = null;
+                       if (this.options.pageaction !== false)
+                       {
+                               map.append($('<div />')
+                                       .addClass('panel panel-default panel-body text-right')
+                                       .append($('<div />')
+                                               .addClass('btn-group')
+                                               .append(_luci2.ui.button(_luci2.tr('Save & Apply'), 'primary')
+                                                       .click({ self: this }, function(ev) {  }))
+                                               .append(_luci2.ui.button(_luci2.tr('Save'), 'default')
+                                                       .click({ self: this }, function(ev) { ev.data.self.send(); }))
+                                               .append(_luci2.ui.button(_luci2.tr('Reset'), 'default')
+                                                       .click({ self: this }, function(ev) { ev.data.self.insertInto(ev.data.self.target); }))));
+                       }
 
 
-                       return top;
+                       return map;
                },
 
                finish: function()
                },
 
                finish: function()
@@ -5473,7 +5578,8 @@ function LuCI2()
                                '.type':      type,
                                '.name':      s,
                                '.create':    name,
                                '.type':      type,
                                '.name':      s,
                                '.create':    name,
-                               '.anonymous': !name
+                               '.anonymous': !name,
+                               '.index':     1000 + this.uci.newid
                        };
 
                        return s;
                        };
 
                        return s;
@@ -5517,12 +5623,17 @@ function LuCI2()
                                if (!del || del[s] !== true)
                                        sa.push(pkg[s]);
 
                                if (!del || del[s] !== true)
                                        sa.push(pkg[s]);
 
-                       sa.sort(function(a, b) { return a['.index'] - b['.index'] });
-
                        if (crt)
                                for (var s in crt)
                                        sa.push(crt[s]);
 
                        if (crt)
                                for (var s in crt)
                                        sa.push(crt[s]);
 
+                       sa.sort(function(a, b) {
+                               return a['.index'] - b['.index'];
+                       });
+
+                       for (var i = 0; i < sa.length; i++)
+                               sa[i]['.index'] = i;
+
                        if (typeof(cb) == 'function')
                                for (var i = 0; i < sa.length; i++)
                                        cb.apply(this, [ sa[i] ]);
                        if (typeof(cb) == 'function')
                                for (var i = 0; i < sa.length; i++)
                                        cb.apply(this, [ sa[i] ]);
@@ -5624,8 +5735,10 @@ function LuCI2()
                        var rv = true;
 
                        for (var i = 0; i < this.sections.length; i++)
                        var rv = true;
 
                        for (var i = 0; i < this.sections.length; i++)
+                       {
                                if (!this.sections[i].validate())
                                        rv = false;
                                if (!this.sections[i].validate())
                                        rv = false;
+                       }
 
                        return rv;
                },
 
                        return rv;
                },
@@ -5660,60 +5773,117 @@ function LuCI2()
                        return $.when.apply($, deferreds);
                },
 
                        return $.when.apply($, deferreds);
                },
 
-               send: function()
+               _send_uci_reorder: function()
                {
                {
-                       if (!this.validate())
+                       if (!this.uci.reorder)
                                return _luci2.deferrable();
 
                                return _luci2.deferrable();
 
-                       var send_cb = this._send_cb || (this._send_cb = $.proxy(function() {
-                               _luci2.rpc.batch();
+                       _luci2.rpc.batch();
 
 
-                               if (this.uci.creates)
-                                       for (var c in this.uci.creates)
-                                               for (var s in this.uci.creates[c])
-                                               {
-                                                       var r = {
-                                                               config: c,
-                                                               values: { }
-                                                       };
+                       /*
+                        gather all created and existing sections, sort them according
+                        to their index value and issue an uci order call
+                       */
+                       for (var c in this.uci.values)
+                       {
+                               var o = [ ];
 
 
-                                                       for (var k in this.uci.creates[c][s])
-                                                       {
-                                                               if (k == '.type')
-                                                                       r.type = this.uci.creates[c][s][k];
-                                                               else if (k == '.create')
-                                                                       r.name = this.uci.creates[c][s][k];
-                                                               else if (k.charAt(0) != '.')
-                                                                       r.values[k] = this.uci.creates[c][s][k];
-                                                       }
+                               if (this.uci.creates && this.uci.creates[c])
+                                       for (var s in this.uci.creates[c])
+                                               o.push(this.uci.creates[c][s]);
 
 
-                                                       _luci2.uci.add(r.config, r.type, r.name, r.values);
-                                               }
+                               for (var s in this.uci.values[c])
+                                       o.push(this.uci.values[c][s]);
+
+                               if (o.length > 0)
+                               {
+                                       o.sort(function(a, b) {
+                                               return (a['.index'] - b['.index']);
+                                       });
+
+                                       var sids = [ ];
+
+                                       for (var i = 0; i < o.length; i++)
+                                               sids.push(o[i]['.name']);
+
+                                       _luci2.uci.order(c, sids);
+                               }
+                       }
+
+                       return _luci2.rpc.flush();
+               },
 
 
-                               if (this.uci.changes)
-                                       for (var c in this.uci.changes)
-                                               for (var s in this.uci.changes[c])
-                                                       _luci2.uci.set(c, s, this.uci.changes[c][s]);
+               _send_uci: function()
+               {
+                       _luci2.rpc.batch();
+
+                       var self = this;
+                       var snew = [ ];
 
 
-                               if (this.uci.deletes)
-                                       for (var c in this.uci.deletes)
-                                               for (var s in this.uci.deletes[c])
+                       if (this.uci.creates)
+                               for (var c in this.uci.creates)
+                                       for (var s in this.uci.creates[c])
+                                       {
+                                               var r = {
+                                                       config: c,
+                                                       values: { }
+                                               };
+
+                                               for (var k in this.uci.creates[c][s])
                                                {
                                                {
-                                                       var o = this.uci.deletes[c][s];
-                                                       _luci2.uci['delete'](c, s, (o === true) ? undefined : o);
+                                                       if (k == '.type')
+                                                               r.type = this.uci.creates[c][s][k];
+                                                       else if (k == '.create')
+                                                               r.name = this.uci.creates[c][s][k];
+                                                       else if (k.charAt(0) != '.')
+                                                               r.values[k] = this.uci.creates[c][s][k];
                                                }
 
                                                }
 
-                               return _luci2.rpc.flush().then(function() {
-                                       return _luci2.ui.updateChanges();
-                               });
-                       }, this));
+                                               snew.push(this.uci.creates[c][s]);
+
+                                               _luci2.uci.add(r.config, r.type, r.name, r.values);
+                                       }
+
+                       if (this.uci.changes)
+                               for (var c in this.uci.changes)
+                                       for (var s in this.uci.changes[c])
+                                               _luci2.uci.set(c, s, this.uci.changes[c][s]);
+
+                       if (this.uci.deletes)
+                               for (var c in this.uci.deletes)
+                                       for (var s in this.uci.deletes[c])
+                                       {
+                                               var o = this.uci.deletes[c][s];
+                                               _luci2.uci['delete'](c, s, (o === true) ? undefined : o);
+                                       }
+
+                       return _luci2.rpc.flush().then(function(responses) {
+                               /*
+                                array "snew" holds references to the created uci sections,
+                                use it to assign the returned names of the new sections
+                               */
+                               for (var i = 0; i < snew.length; i++)
+                                       snew[i]['.name'] = responses[i];
+
+                               return self._send_uci_reorder();
+                       });
+               },
+
+               send: function()
+               {
+                       if (!this.validate())
+                               return _luci2.deferrable();
 
                        var self = this;
 
                        _luci2.ui.saveScrollTop();
                        _luci2.ui.loading(true);
 
 
                        var self = this;
 
                        _luci2.ui.saveScrollTop();
                        _luci2.ui.loading(true);
 
-                       return this.save().then(send_cb).then(function() {
+                       return this.save().then(function() {
+                               return self._send_uci();
+                       }).then(function() {
+                               return _luci2.ui.updateChanges();
+                       }).then(function() {
                                return self.load();
                        }).then(function() {
                                self.redraw();
                                return self.load();
                        }).then(function() {
                                self.redraw();