text: /*!
   * Bootstrap v3.3.2 (http://getbootstrap.com)
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   */
  
  if (typeof jQuery === 'undefined') {
    throw new Error('Bootstrap\'s JavaScript requires jQuery')
  }
  
  +function ($) {
    'use strict';
    var version = $.fn.jquery.split(' ')[0].split('.')
    if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
      throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
    }
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: transition.js v3.3.2
   * http://getbootstrap.com/javascript/#transitions
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/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] }
        }
      }
  
      return false // explicit for ie8 (  ._.)
    }
  
    // http://blog.alexmaccaw.com/css-transitions
    $.fn.emulateTransitionEnd = function (duration) {
      var called = false
      var $el = this
      $(this).one('bsTransitionEnd', function () { called = true })
      var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
      setTimeout(callback, duration)
      return this
    }
  
    $(function () {
      $.support.transition = transitionEnd()
  
      if (!$.support.transition) return
  
      $.event.special.bsTransitionEnd = {
        bindType: $.support.transition.end,
        delegateType: $.support.transition.end,
        handle: function (e) {
          if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
        }
      }
    })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: alert.js v3.3.2
   * http://getbootstrap.com/javascript/#alerts
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // ALERT CLASS DEFINITION
    // ======================
  
    var dismiss = '[data-dismiss="alert"]'
    var Alert   = function (el) {
      $(el).on('click', dismiss, this.close)
    }
  
    Alert.VERSION = '3.3.2'
  
    Alert.TRANSITION_DURATION = 150
  
    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.closest('.alert')
      }
  
      $parent.trigger(e = $.Event('close.bs.alert'))
  
      if (e.isDefaultPrevented()) return
  
      $parent.removeClass('in')
  
      function removeElement() {
        // detach from parent, fire event then clean up data
        $parent.detach().trigger('closed.bs.alert').remove()
      }
  
      $.support.transition && $parent.hasClass('fade') ?
        $parent
          .one('bsTransitionEnd', removeElement)
          .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
        removeElement()
    }
  
  
    // ALERT PLUGIN DEFINITION
    // =======================
  
    function Plugin(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)
      })
    }
  
    var old = $.fn.alert
  
    $.fn.alert             = Plugin
    $.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)
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: button.js v3.3.2
   * http://getbootstrap.com/javascript/#buttons
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // BUTTON PUBLIC CLASS DEFINITION
    // ==============================
  
    var Button = function (element, options) {
      this.$element  = $(element)
      this.options   = $.extend({}, Button.DEFAULTS, options)
      this.isLoading = false
    }
  
    Button.VERSION  = '3.3.2'
  
    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 == null) $el.data('resetText', $el[val]())
  
      // push to event loop to allow forms to submit
      setTimeout($.proxy(function () {
        $el[val](data[state] == null ? this.options[state] : data[state])
  
        if (state == 'loadingText') {
          this.isLoading = true
          $el.addClass(d).attr(d, d)
        } else if (this.isLoading) {
          this.isLoading = false
          $el.removeClass(d).removeAttr(d)
        }
      }, this), 0)
    }
  
    Button.prototype.toggle = function () {
      var changed = true
      var $parent = this.$element.closest('[data-toggle="buttons"]')
  
      if ($parent.length) {
        var $input = this.$element.find('input')
        if ($input.prop('type') == 'radio') {
          if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
          else $parent.find('.active').removeClass('active')
        }
        if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
      } else {
        this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
      }
  
      if (changed) this.$element.toggleClass('active')
    }
  
  
    // BUTTON PLUGIN DEFINITION
    // ========================
  
    function Plugin(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)
      })
    }
  
    var old = $.fn.button
  
    $.fn.button             = Plugin
    $.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')
        Plugin.call($btn, 'toggle')
        e.preventDefault()
      })
      .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
        $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
      })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: carousel.js v3.3.2
   * http://getbootstrap.com/javascript/#carousel
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // CAROUSEL CLASS DEFINITION
    // =========================
  
    var Carousel = function (element, options) {
      this.$element    = $(element)
      this.$indicators = this.$element.find('.carousel-indicators')
      this.options     = options
      this.paused      =
      this.sliding     =
      this.interval    =
      this.$active     =
      this.$items      = null
  
      this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
  
      this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
        .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
        .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
    }
  
    Carousel.VERSION  = '3.3.2'
  
    Carousel.TRANSITION_DURATION = 600
  
    Carousel.DEFAULTS = {
      interval: 5000,
      pause: 'hover',
      wrap: true,
      keyboard: true
    }
  
    Carousel.prototype.keydown = function (e) {
      if (/input|textarea/i.test(e.target.tagName)) return
      switch (e.which) {
        case 37: this.prev(); break
        case 39: this.next(); break
        default: return
      }
  
      e.preventDefault()
    }
  
    Carousel.prototype.cycle = function (e) {
      e || (this.paused = false)
  
      this.interval && clearInterval(this.interval)
  
      this.options.interval
        && !this.paused
        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
  
      return this
    }
  
    Carousel.prototype.getItemIndex = function (item) {
      this.$items = item.parent().children('.item')
      return this.$items.index(item || this.$active)
    }
  
    Carousel.prototype.getItemForDirection = function (direction, active) {
      var activeIndex = this.getItemIndex(active)
      var willWrap = (direction == 'prev' && activeIndex === 0)
                  || (direction == 'next' && activeIndex == (this.$items.length - 1))
      if (willWrap && !this.options.wrap) return active
      var delta = direction == 'prev' ? -1 : 1
      var itemIndex = (activeIndex + delta) % this.$items.length
      return this.$items.eq(itemIndex)
    }
  
    Carousel.prototype.to = function (pos) {
      var that        = this
      var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
  
      if (pos > (this.$items.length - 1) || pos < 0) return
  
      if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
      if (activeIndex == pos) return this.pause().cycle()
  
      return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
    }
  
    Carousel.prototype.pause = function (e) {
      e || (this.paused = true)
  
      if (this.$element.find('.next, .prev').length && $.support.transition) {
        this.$element.trigger($.support.transition.end)
        this.cycle(true)
      }
  
      this.interval = clearInterval(this.interval)
  
      return this
    }
  
    Carousel.prototype.next = function () {
      if (this.sliding) return
      return this.slide('next')
    }
  
    Carousel.prototype.prev = function () {
      if (this.sliding) return
      return this.slide('prev')
    }
  
    Carousel.prototype.slide = function (type, next) {
      var $active   = this.$element.find('.item.active')
      var $next     = next || this.getItemForDirection(type, $active)
      var isCycling = this.interval
      var direction = type == 'next' ? 'left' : 'right'
      var that      = this
  
      if ($next.hasClass('active')) return (this.sliding = false)
  
      var relatedTarget = $next[0]
      var slideEvent = $.Event('slide.bs.carousel', {
        relatedTarget: relatedTarget,
        direction: direction
      })
      this.$element.trigger(slideEvent)
      if (slideEvent.isDefaultPrevented()) return
  
      this.sliding = true
  
      isCycling && this.pause()
  
      if (this.$indicators.length) {
        this.$indicators.find('.active').removeClass('active')
        var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
        $nextIndicator && $nextIndicator.addClass('active')
      }
  
      var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
      if ($.support.transition && this.$element.hasClass('slide')) {
        $next.addClass(type)
        $next[0].offsetWidth // force reflow
        $active.addClass(direction)
        $next.addClass(direction)
        $active
          .one('bsTransitionEnd', function () {
            $next.removeClass([type, direction].join(' ')).addClass('active')
            $active.removeClass(['active', direction].join(' '))
            that.sliding = false
            setTimeout(function () {
              that.$element.trigger(slidEvent)
            }, 0)
          })
          .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
      } else {
        $active.removeClass('active')
        $next.addClass('active')
        this.sliding = false
        this.$element.trigger(slidEvent)
      }
  
      isCycling && this.cycle()
  
      return this
    }
  
  
    // CAROUSEL PLUGIN DEFINITION
    // ==========================
  
    function Plugin(option) {
      return this.each(function () {
        var $this   = $(this)
        var data    = $this.data('bs.carousel')
        var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
        var action  = typeof option == 'string' ? option : options.slide
  
        if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
        if (typeof option == 'number') data.to(option)
        else if (action) data[action]()
        else if (options.interval) data.pause().cycle()
      })
    }
  
    var old = $.fn.carousel
  
    $.fn.carousel             = Plugin
    $.fn.carousel.Constructor = Carousel
  
  
    // CAROUSEL NO CONFLICT
    // ====================
  
    $.fn.carousel.noConflict = function () {
      $.fn.carousel = old
      return this
    }
  
  
    // CAROUSEL DATA-API
    // =================
  
    var clickHandler = function (e) {
      var href
      var $this   = $(this)
      var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
      if (!$target.hasClass('carousel')) return
      var options = $.extend({}, $target.data(), $this.data())
      var slideIndex = $this.attr('data-slide-to')
      if (slideIndex) options.interval = false
  
      Plugin.call($target, options)
  
      if (slideIndex) {
        $target.data('bs.carousel').to(slideIndex)
      }
  
      e.preventDefault()
    }
  
    $(document)
      .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
      .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
  
    $(window).on('load', function () {
      $('[data-ride="carousel"]').each(function () {
        var $carousel = $(this)
        Plugin.call($carousel, $carousel.data())
      })
    })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: collapse.js v3.3.2
   * http://getbootstrap.com/javascript/#collapse
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // COLLAPSE PUBLIC CLASS DEFINITION
    // ================================
  
    var Collapse = function (element, options) {
      this.$element      = $(element)
      this.options       = $.extend({}, Collapse.DEFAULTS, options)
      this.$trigger      = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
      this.transitioning = null
  
      if (this.options.parent) {
        this.$parent = this.getParent()
      } else {
        this.addAriaAndCollapsedClass(this.$element, this.$trigger)
      }
  
      if (this.options.toggle) this.toggle()
    }
  
    Collapse.VERSION  = '3.3.2'
  
    Collapse.TRANSITION_DURATION = 350
  
    Collapse.DEFAULTS = {
      toggle: true,
      trigger: '[data-toggle="collapse"]'
    }
  
    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 activesData
      var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
  
      if (actives && actives.length) {
        activesData = actives.data('bs.collapse')
        if (activesData && activesData.transitioning) return
      }
  
      var startEvent = $.Event('show.bs.collapse')
      this.$element.trigger(startEvent)
      if (startEvent.isDefaultPrevented()) return
  
      if (actives && actives.length) {
        Plugin.call(actives, 'hide')
        activesData || actives.data('bs.collapse', null)
      }
  
      var dimension = this.dimension()
  
      this.$element
        .removeClass('collapse')
        .addClass('collapsing')[dimension](0)
        .attr('aria-expanded', true)
  
      this.$trigger
        .removeClass('collapsed')
        .attr('aria-expanded', true)
  
      this.transitioning = 1
  
      var complete = function () {
        this.$element
          .removeClass('collapsing')
          .addClass('collapse in')[dimension]('')
        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('bsTransitionEnd', $.proxy(complete, this))
        .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[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 in')
        .attr('aria-expanded', false)
  
      this.$trigger
        .addClass('collapsed')
        .attr('aria-expanded', false)
  
      this.transitioning = 1
  
      var complete = function () {
        this.transitioning = 0
        this.$element
          .removeClass('collapsing')
          .addClass('collapse')
          .trigger('hidden.bs.collapse')
      }
  
      if (!$.support.transition) return complete.call(this)
  
      this.$element
        [dimension](0)
        .one('bsTransitionEnd', $.proxy(complete, this))
        .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
    }
  
    Collapse.prototype.toggle = function () {
      this[this.$element.hasClass('in') ? 'hide' : 'show']()
    }
  
    Collapse.prototype.getParent = function () {
      return $(this.options.parent)
        .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
        .each($.proxy(function (i, element) {
          var $element = $(element)
          this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
        }, this))
        .end()
    }
  
    Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
      var isOpen = $element.hasClass('in')
  
      $element.attr('aria-expanded', isOpen)
      $trigger
        .toggleClass('collapsed', !isOpen)
        .attr('aria-expanded', isOpen)
    }
  
    function getTargetFromTrigger($trigger) {
      var href
      var target = $trigger.attr('data-target')
        || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
  
      return $(target)
    }
  
  
    // COLLAPSE PLUGIN DEFINITION
    // ==========================
  
    function Plugin(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 && options.toggle && option == 'show') options.toggle = false
        if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
        if (typeof option == 'string') data[option]()
      })
    }
  
    var old = $.fn.collapse
  
    $.fn.collapse             = Plugin
    $.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)
  
      if (!$this.attr('data-target')) e.preventDefault()
  
      var $target = getTargetFromTrigger($this)
      var data    = $target.data('bs.collapse')
      var option  = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
  
      Plugin.call($target, option)
    })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: dropdown.js v3.3.2
   * http://getbootstrap.com/javascript/#dropdowns
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // DROPDOWN CLASS DEFINITION
    // =========================
  
    var backdrop = '.dropdown-backdrop'
    var toggle   = '[data-toggle="dropdown"]'
    var Dropdown = function (element) {
      $(element).on('click.bs.dropdown', this.toggle)
    }
  
    Dropdown.VERSION = '3.3.2'
  
    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 use a backdrop because click events don't delegate
          $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
        }
  
        var relatedTarget = { relatedTarget: this }
        $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
  
        if (e.isDefaultPrevented()) return
  
        $this
          .trigger('focus')
          .attr('aria-expanded', 'true')
  
        $parent
          .toggleClass('open')
          .trigger('shown.bs.dropdown', relatedTarget)
      }
  
      return false
    }
  
    Dropdown.prototype.keydown = function (e) {
      if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) 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 && e.which != 27) || (isActive && e.which == 27)) {
        if (e.which == 27) $parent.find(toggle).trigger('focus')
        return $this.trigger('click')
      }
  
      var desc = ' li:not(.divider):visible a'
      var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
  
      if (!$items.length) return
  
      var index = $items.index(e.target)
  
      if (e.which == 38 && index > 0)                 index--                        // up
      if (e.which == 40 && index < $items.length - 1) index++                        // down
      if (!~index)                                      index = 0
  
      $items.eq(index).trigger('focus')
    }
  
    function clearMenus(e) {
      if (e && e.which === 3) return
      $(backdrop).remove()
      $(toggle).each(function () {
        var $this         = $(this)
        var $parent       = getParent($this)
        var relatedTarget = { relatedTarget: this }
  
        if (!$parent.hasClass('open')) return
  
        $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
  
        if (e.isDefaultPrevented()) return
  
        $this.attr('aria-expanded', 'false')
        $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
      })
    }
  
    function getParent($this) {
      var selector = $this.attr('data-target')
  
      if (!selector) {
        selector = $this.attr('href')
        selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
      }
  
      var $parent = selector && $(selector)
  
      return $parent && $parent.length ? $parent : $this.parent()
    }
  
  
    // DROPDOWN PLUGIN DEFINITION
    // ==========================
  
    function Plugin(option) {
      return this.each(function () {
        var $this = $(this)
        var data  = $this.data('bs.dropdown')
  
        if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
        if (typeof option == 'string') data[option].call($this)
      })
    }
  
    var old = $.fn.dropdown
  
    $.fn.dropdown             = Plugin
    $.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, Dropdown.prototype.keydown)
      .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
      .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: modal.js v3.3.2
   * http://getbootstrap.com/javascript/#modals
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // MODAL CLASS DEFINITION
    // ======================
  
    var Modal = function (element, options) {
      this.options        = options
      this.$body          = $(document.body)
      this.$element       = $(element)
      this.$backdrop      =
      this.isShown        = null
      this.scrollbarWidth = 0
  
      if (this.options.remote) {
        this.$element
          .find('.modal-content')
          .load(this.options.remote, $.proxy(function () {
            this.$element.trigger('loaded.bs.modal')
          }, this))
      }
    }
  
    Modal.VERSION  = '3.3.2'
  
    Modal.TRANSITION_DURATION = 300
    Modal.BACKDROP_TRANSITION_DURATION = 150
  
    Modal.DEFAULTS = {
      backdrop: true,
      keyboard: true,
      show: true
    }
  
    Modal.prototype.toggle = function (_relatedTarget) {
      return this.isShown ? this.hide() : this.show(_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.checkScrollbar()
      this.setScrollbar()
      this.$body.addClass('modal-open')
  
      this.escape()
      this.resize()
  
      this.$element.on('click.dismiss.bs.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(that.$body) // don't move modals dom position
        }
  
        that.$element
          .show()
          .scrollTop(0)
  
        if (that.options.backdrop) that.adjustBackdrop()
        that.adjustDialog()
  
        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('bsTransitionEnd', function () {
              that.$element.trigger('focus').trigger(e)
            })
            .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
          that.$element.trigger('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()
      this.resize()
  
      $(document).off('focusin.bs.modal')
  
      this.$element
        .removeClass('in')
        .attr('aria-hidden', true)
        .off('click.dismiss.bs.modal')
  
      $.support.transition && this.$element.hasClass('fade') ?
        this.$element
          .one('bsTransitionEnd', $.proxy(this.hideModal, this))
          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
        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.trigger('focus')
          }
        }, this))
    }
  
    Modal.prototype.escape = function () {
      if (this.isShown && this.options.keyboard) {
        this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
          e.which == 27 && this.hide()
        }, this))
      } else if (!this.isShown) {
        this.$element.off('keydown.dismiss.bs.modal')
      }
    }
  
    Modal.prototype.resize = function () {
      if (this.isShown) {
        $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
      } else {
        $(window).off('resize.bs.modal')
      }
    }
  
    Modal.prototype.hideModal = function () {
      var that = this
      this.$element.hide()
      this.backdrop(function () {
        that.$body.removeClass('modal-open')
        that.resetAdjustments()
        that.resetScrollbar()
        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 + '" />')
          .prependTo(this.$element)
          .on('click.dismiss.bs.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('bsTransitionEnd', callback)
            .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
          callback()
  
      } else if (!this.isShown && this.$backdrop) {
        this.$backdrop.removeClass('in')
  
        var callbackRemove = function () {
          that.removeBackdrop()
          callback && callback()
        }
        $.support.transition && this.$element.hasClass('fade') ?
          this.$backdrop
            .one('bsTransitionEnd', callbackRemove)
            .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
          callbackRemove()
  
      } else if (callback) {
        callback()
      }
    }
  
    // these following methods are used to handle overflowing modals
  
    Modal.prototype.handleUpdate = function () {
      if (this.options.backdrop) this.adjustBackdrop()
      this.adjustDialog()
    }
  
    Modal.prototype.adjustBackdrop = function () {
      this.$backdrop
        .css('height', 0)
        .css('height', this.$element[0].scrollHeight)
    }
  
    Modal.prototype.adjustDialog = function () {
      var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
  
      this.$element.css({
        paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
        paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
      })
    }
  
    Modal.prototype.resetAdjustments = function () {
      this.$element.css({
        paddingLeft: '',
        paddingRight: ''
      })
    }
  
    Modal.prototype.checkScrollbar = function () {
      this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
      this.scrollbarWidth = this.measureScrollbar()
    }
  
    Modal.prototype.setScrollbar = function () {
      var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
      if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
    }
  
    Modal.prototype.resetScrollbar = function () {
      this.$body.css('padding-right', '')
    }
  
    Modal.prototype.measureScrollbar = function () { // thx walsh
      var scrollDiv = document.createElement('div')
      scrollDiv.className = 'modal-scrollbar-measure'
      this.$body.append(scrollDiv)
      var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
      this.$body[0].removeChild(scrollDiv)
      return scrollbarWidth
    }
  
  
    // MODAL PLUGIN DEFINITION
    // =======================
  
    function Plugin(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)
      })
    }
  
    var old = $.fn.modal
  
    $.fn.modal             = Plugin
    $.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('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
  
      if ($this.is('a')) e.preventDefault()
  
      $target.one('show.bs.modal', function (showEvent) {
        if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
        $target.one('hidden.bs.modal', function () {
          $this.is(':visible') && $this.trigger('focus')
        })
      })
      Plugin.call($target, option, this)
    })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: tooltip.js v3.3.2
   * http://getbootstrap.com/javascript/#tooltip
   * Inspired by the original jQuery.tipsy by Jason Frame
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/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.VERSION  = '3.3.2'
  
    Tooltip.TRANSITION_DURATION = 150
  
    Tooltip.DEFAULTS = {
      animation: true,
      placement: 'top',
      selector: false,
      template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
      trigger: 'hover focus',
      title: '',
      delay: 0,
      html: false,
      container: false,
      viewport: {
        selector: 'body',
        padding: 0
      }
    }
  
    Tooltip.prototype.init = function (type, element, options) {
      this.enabled   = true
      this.type      = type
      this.$element  = $(element)
      this.options   = this.getOptions(options)
      this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
  
      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' : 'focusin'
          var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
  
          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).data('bs.' + this.type)
  
      if (self && self.$tip && self.$tip.is(':visible')) {
        self.hoverState = 'in'
        return
      }
  
      if (!self) {
        self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
        $(obj.currentTarget).data('bs.' + this.type, self)
      }
  
      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).data('bs.' + this.type)
  
      if (!self) {
        self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
        $(obj.currentTarget).data('bs.' + this.type, self)
      }
  
      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)
  
        var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
        if (e.isDefaultPrevented() || !inDom) return
        var that = this
  
        var $tip = this.tip()
  
        var tipId = this.getUID(this.type)
  
        this.setContent()
        $tip.attr('id', tipId)
        this.$element.attr('aria-describedby', tipId)
  
        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)
          .data('bs.' + this.type, this)
  
        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 orgPlacement = placement
          var $container   = this.options.container ? $(this.options.container) : this.$element.parent()
          var containerDim = this.getPosition($container)
  
          placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top'    :
                      placement == 'top'    && pos.top    - actualHeight < containerDim.top    ? 'bottom' :
                      placement == 'right'  && pos.right  + actualWidth  > containerDim.width  ? 'left'   :
                      placement == 'left'   && pos.left   - actualWidth  < containerDim.left   ? 'right'  :
                      placement
  
          $tip
            .removeClass(orgPlacement)
            .addClass(placement)
        }
  
        var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
  
        this.applyPlacement(calculatedOffset, placement)
  
        var complete = function () {
          var prevHoverState = that.hoverState
          that.$element.trigger('shown.bs.' + that.type)
          that.hoverState = null
  
          if (prevHoverState == 'out') that.leave(that)
        }
  
        $.support.transition && this.$tip.hasClass('fade') ?
          $tip
            .one('bsTransitionEnd', complete)
            .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
          complete()
      }
    }
  
    Tooltip.prototype.applyPlacement = function (offset, placement) {
      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
  
      // $.fn.offset doesn't round pixel values
      // so we use setOffset directly with our own function B-0
      $.offset.setOffset($tip[0], $.extend({
        using: function (props) {
          $tip.css({
            top: Math.round(props.top),
            left: Math.round(props.left)
          })
        }
      }, offset), 0)
  
      $tip.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) {
        offset.top = offset.top + height - actualHeight
      }
  
      var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
  
      if (delta.left) offset.left += delta.left
      else offset.top += delta.top
  
      var isVertical          = /top|bottom/.test(placement)
      var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
      var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
  
      $tip.offset(offset)
      this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
    }
  
    Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
      this.arrow()
        .css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
        .css(isHorizontal ? 'top' : 'left', '')
    }
  
    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 (callback) {
      var that = this
      var $tip = this.tip()
      var e    = $.Event('hide.bs.' + this.type)
  
      function complete() {
        if (that.hoverState != 'in') $tip.detach()
        that.$element
          .removeAttr('aria-describedby')
          .trigger('hidden.bs.' + that.type)
        callback && callback()
      }
  
      this.$element.trigger(e)
  
      if (e.isDefaultPrevented()) return
  
      $tip.removeClass('in')
  
      $.support.transition && this.$tip.hasClass('fade') ?
        $tip
          .one('bsTransitionEnd', complete)
          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
        complete()
  
      this.hoverState = null
  
      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 ($element) {
      $element   = $element || this.$element
  
      var el     = $element[0]
      var isBody = el.tagName == 'BODY'
  
      var elRect    = el.getBoundingClientRect()
      if (elRect.width == null) {
        // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
        elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
      }
      var elOffset  = isBody ? { top: 0, left: 0 } : $element.offset()
      var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
      var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
  
      return $.extend({}, elRect, scroll, outerDims, elOffset)
    }
  
    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.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
      var delta = { top: 0, left: 0 }
      if (!this.$viewport) return delta
  
      var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
      var viewportDimensions = this.getPosition(this.$viewport)
  
      if (/right|left/.test(placement)) {
        var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
        var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
        if (topEdgeOffset < viewportDimensions.top) { // top overflow
          delta.top = viewportDimensions.top - topEdgeOffset
        } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
          delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
        }
      } else {
        var leftEdgeOffset  = pos.left - viewportPadding
        var rightEdgeOffset = pos.left + viewportPadding + actualWidth
        if (leftEdgeOffset < viewportDimensions.left) { // left overflow
          delta.left = viewportDimensions.left - leftEdgeOffset
        } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
          delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
        }
      }
  
      return delta
    }
  
    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.getUID = function (prefix) {
      do prefix += ~~(Math.random() * 1000000)
      while (document.getElementById(prefix))
      return prefix
    }
  
    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.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 = this
      if (e) {
        self = $(e.currentTarget).data('bs.' + this.type)
        if (!self) {
          self = new this.constructor(e.currentTarget, this.getDelegateOptions())
          $(e.currentTarget).data('bs.' + this.type, self)
        }
      }
  
      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
    }
  
    Tooltip.prototype.destroy = function () {
      var that = this
      clearTimeout(this.timeout)
      this.hide(function () {
        that.$element.off('.' + that.type).removeData('bs.' + that.type)
      })
    }
  
  
    // TOOLTIP PLUGIN DEFINITION
    // =========================
  
    function Plugin(option) {
      return this.each(function () {
        var $this   = $(this)
        var data    = $this.data('bs.tooltip')
        var options = typeof option == 'object' && option
  
        if (!data && option == 'destroy') return
        if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
        if (typeof option == 'string') data[option]()
      })
    }
  
    var old = $.fn.tooltip
  
    $.fn.tooltip             = Plugin
    $.fn.tooltip.Constructor = Tooltip
  
  
    // TOOLTIP NO CONFLICT
    // ===================
  
    $.fn.tooltip.noConflict = function () {
      $.fn.tooltip = old
      return this
    }
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: popover.js v3.3.2
   * http://getbootstrap.com/javascript/#popovers
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/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.VERSION  = '3.3.2'
  
    Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
      placement: 'right',
      trigger: 'click',
      content: '',
      template: '<div class="popover" role="tooltip"><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').children().detach().end()[ // we use append for html objects to maintain js events
        this.options.html ? (typeof content == 'string' ? 'html' : 'append') : '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
    // =========================
  
    function Plugin(option) {
      return this.each(function () {
        var $this   = $(this)
        var data    = $this.data('bs.popover')
        var options = typeof option == 'object' && option
  
        if (!data && option == 'destroy') return
        if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
        if (typeof option == 'string') data[option]()
      })
    }
  
    var old = $.fn.popover
  
    $.fn.popover             = Plugin
    $.fn.popover.Constructor = Popover
  
  
    // POPOVER NO CONFLICT
    // ===================
  
    $.fn.popover.noConflict = function () {
      $.fn.popover = old
      return this
    }
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: scrollspy.js v3.3.2
   * http://getbootstrap.com/javascript/#scrollspy
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // SCROLLSPY CLASS DEFINITION
    // ==========================
  
    function ScrollSpy(element, options) {
      var process  = $.proxy(this.process, this)
  
      this.$body          = $('body')
      this.$scrollElement = $(element).is('body') ? $(window) : $(element)
      this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
      this.selector       = (this.options.target || '') + ' .nav li > a'
      this.offsets        = []
      this.targets        = []
      this.activeTarget   = null
      this.scrollHeight   = 0
  
      this.$scrollElement.on('scroll.bs.scrollspy', process)
      this.refresh()
      this.process()
    }
  
    ScrollSpy.VERSION  = '3.3.2'
  
    ScrollSpy.DEFAULTS = {
      offset: 10
    }
  
    ScrollSpy.prototype.getScrollHeight = function () {
      return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
    }
  
    ScrollSpy.prototype.refresh = function () {
      var offsetMethod = 'offset'
      var offsetBase   = 0
  
      if (!$.isWindow(this.$scrollElement[0])) {
        offsetMethod = 'position'
        offsetBase   = this.$scrollElement.scrollTop()
      }
  
      this.offsets = []
      this.targets = []
      this.scrollHeight = this.getScrollHeight()
  
      var self     = this
  
      this.$body
        .find(this.selector)
        .map(function () {
          var $el   = $(this)
          var href  = $el.data('target') || $el.attr('href')
          var $href = /^#./.test(href) && $(href)
  
          return ($href
            && $href.length
            && $href.is(':visible')
            && [[$href[offsetMethod]().top + offsetBase, href]]) || null
        })
        .sort(function (a, b) { return a[0] - b[0] })
        .each(function () {
          self.offsets.push(this[0])
          self.targets.push(this[1])
        })
    }
  
    ScrollSpy.prototype.process = function () {
      var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
      var scrollHeight = this.getScrollHeight()
      var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
      var offsets      = this.offsets
      var targets      = this.targets
      var activeTarget = this.activeTarget
      var i
  
      if (this.scrollHeight != scrollHeight) {
        this.refresh()
      }
  
      if (scrollTop >= maxScroll) {
        return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
      }
  
      if (activeTarget && scrollTop < offsets[0]) {
        this.activeTarget = null
        return this.clear()
      }
  
      for (i = offsets.length; i--;) {
        activeTarget != targets[i]
          && scrollTop >= offsets[i]
          && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
          && this.activate(targets[i])
      }
    }
  
    ScrollSpy.prototype.activate = function (target) {
      this.activeTarget = target
  
      this.clear()
  
      var selector = this.selector +
          '[data-target="' + target + '"],' +
          this.selector + '[href="' + target + '"]'
  
      var active = $(selector)
        .parents('li')
        .addClass('active')
  
      if (active.parent('.dropdown-menu').length) {
        active = active
          .closest('li.dropdown')
          .addClass('active')
      }
  
      active.trigger('activate.bs.scrollspy')
    }
  
    ScrollSpy.prototype.clear = function () {
      $(this.selector)
        .parentsUntil(this.options.target, '.active')
        .removeClass('active')
    }
  
  
    // SCROLLSPY PLUGIN DEFINITION
    // ===========================
  
    function Plugin(option) {
      return this.each(function () {
        var $this   = $(this)
        var data    = $this.data('bs.scrollspy')
        var options = typeof option == 'object' && option
  
        if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
        if (typeof option == 'string') data[option]()
      })
    }
  
    var old = $.fn.scrollspy
  
    $.fn.scrollspy             = Plugin
    $.fn.scrollspy.Constructor = ScrollSpy
  
  
    // SCROLLSPY NO CONFLICT
    // =====================
  
    $.fn.scrollspy.noConflict = function () {
      $.fn.scrollspy = old
      return this
    }
  
  
    // SCROLLSPY DATA-API
    // ==================
  
    $(window).on('load.bs.scrollspy.data-api', function () {
      $('[data-spy="scroll"]').each(function () {
        var $spy = $(this)
        Plugin.call($spy, $spy.data())
      })
    })
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: tab.js v3.3.2
   * http://getbootstrap.com/javascript/#tabs
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // TAB CLASS DEFINITION
    // ====================
  
    var Tab = function (element) {
      this.element = $(element)
    }
  
    Tab.VERSION = '3.3.2'
  
    Tab.TRANSITION_DURATION = 150
  
    Tab.prototype.show = function () {
      var $this    = this.element
      var $ul      = $this.closest('ul:not(.dropdown-menu)')
      var selector = $this.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')
      var hideEvent = $.Event('hide.bs.tab', {
        relatedTarget: $this[0]
      })
      var showEvent = $.Event('show.bs.tab', {
        relatedTarget: $previous[0]
      })
  
      $previous.trigger(hideEvent)
      $this.trigger(showEvent)
  
      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
  
      var $target = $(selector)
  
      this.activate($this.closest('li'), $ul)
      this.activate($target, $target.parent(), function () {
        $previous.trigger({
          type: 'hidden.bs.tab',
          relatedTarget: $this[0]
        })
        $this.trigger({
          type: 'shown.bs.tab',
          relatedTarget: $previous[0]
        })
      })
    }
  
    Tab.prototype.activate = function (element, container, callback) {
      var $active    = container.find('> .active')
      var transition = callback
        && $.support.transition
        && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
  
      function next() {
        $active
          .removeClass('active')
          .find('> .dropdown-menu > .active')
            .removeClass('active')
          .end()
          .find('[data-toggle="tab"]')
            .attr('aria-expanded', false)
  
        element
          .addClass('active')
          .find('[data-toggle="tab"]')
            .attr('aria-expanded', true)
  
        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')
            .end()
            .find('[data-toggle="tab"]')
              .attr('aria-expanded', true)
        }
  
        callback && callback()
      }
  
      $active.length && transition ?
        $active
          .one('bsTransitionEnd', next)
          .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
        next()
  
      $active.removeClass('in')
    }
  
  
    // TAB PLUGIN DEFINITION
    // =====================
  
    function Plugin(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]()
      })
    }
  
    var old = $.fn.tab
  
    $.fn.tab             = Plugin
    $.fn.tab.Constructor = Tab
  
  
    // TAB NO CONFLICT
    // ===============
  
    $.fn.tab.noConflict = function () {
      $.fn.tab = old
      return this
    }
  
  
    // TAB DATA-API
    // ============
  
    var clickHandler = function (e) {
      e.preventDefault()
      Plugin.call($(this), 'show')
    }
  
    $(document)
      .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
      .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
  
  }(jQuery);
  
  /* ========================================================================
   * Bootstrap: affix.js v3.3.2
   * http://getbootstrap.com/javascript/#affix
   * ========================================================================
   * Copyright 2011-2015 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  
  +function ($) {
    'use strict';
  
    // AFFIX CLASS DEFINITION
    // ======================
  
    var Affix = function (element, options) {
      this.options = $.extend({}, Affix.DEFAULTS, options)
  
      this.$target = $(this.options.target)
        .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
        .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
  
      this.$element     = $(element)
      this.affixed      =
      this.unpin        =
      this.pinnedOffset = null
  
      this.checkPosition()
    }
  
    Affix.VERSION  = '3.3.2'
  
    Affix.RESET    = 'affix affix-top affix-bottom'
  
    Affix.DEFAULTS = {
      offset: 0,
      target: window
    }
  
    Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
      var scrollTop    = this.$target.scrollTop()
      var position     = this.$element.offset()
      var targetHeight = this.$target.height()
  
      if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
  
      if (this.affixed == 'bottom') {
        if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
        return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
      }
  
      var initializing   = this.affixed == null
      var colliderTop    = initializing ? scrollTop : position.top
      var colliderHeight = initializing ? targetHeight : height
  
      if (offsetTop != null && scrollTop <= offsetTop) return 'top'
      if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
  
      return false
    }
  
    Affix.prototype.getPinnedOffset = function () {
      if (this.pinnedOffset) return this.pinnedOffset
      this.$element.removeClass(Affix.RESET).addClass('affix')
      var scrollTop = this.$target.scrollTop()
      var position  = this.$element.offset()
      return (this.pinnedOffset = position.top - scrollTop)
    }
  
    Affix.prototype.checkPositionWithEventLoop = function () {
      setTimeout($.proxy(this.checkPosition, this), 1)
    }
  
    Affix.prototype.checkPosition = function () {
      if (!this.$element.is(':visible')) return
  
      var height       = this.$element.height()
      var offset       = this.options.offset
      var offsetTop    = offset.top
      var offsetBottom = offset.bottom
      var scrollHeight = $('body').height()
  
      if (typeof offset != 'object')         offsetBottom = offsetTop = offset
      if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
      if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
  
      var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
  
      if (this.affixed != affix) {
        if (this.unpin != null) this.$element.css('top', '')
  
        var affixType = 'affix' + (affix ? '-' + affix : '')
        var e         = $.Event(affixType + '.bs.affix')
  
        this.$element.trigger(e)
  
        if (e.isDefaultPrevented()) return
  
        this.affixed = affix
        this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
  
        this.$element
          .removeClass(Affix.RESET)
          .addClass(affixType)
          .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
      }
  
      if (affix == 'bottom') {
        this.$element.offset({
          top: scrollHeight - height - offsetBottom
        })
      }
    }
  
  
    // AFFIX PLUGIN DEFINITION
    // =======================
  
    function Plugin(option) {
      return this.each(function () {
        var $this   = $(this)
        var data    = $this.data('bs.affix')
        var options = typeof option == 'object' && option
  
        if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
        if (typeof option == 'string') data[option]()
      })
    }
  
    var old = $.fn.affix
  
    $.fn.affix             = Plugin
    $.fn.affix.Constructor = Affix
  
  
    // AFFIX NO CONFLICT
    // =================
  
    $.fn.affix.noConflict = function () {
      $.fn.affix = old
      return this
    }
  
  
    // AFFIX DATA-API
    // ==============
  
    $(window).on('load', function () {
      $('[data-spy="affix"]').each(function () {
        var $spy = $(this)
        var data = $spy.data()
  
        data.offset = data.offset || {}
  
        if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
        if (data.offsetTop    != null) data.offset.top    = data.offsetTop
  
        Plugin.call($spy, data)
      })
    })
  
  }(jQuery);
  
  
  
  /*!
   * classie - class helper functions
   * from bonzo https://github.com/ded/bonzo
   * 
   * classie.has( elem, 'my-class' ) -> true/false
   * classie.add( elem, 'my-new-class' )
   * classie.remove( elem, 'my-unwanted-class' )
   * classie.toggle( elem, 'my-class' )
   */
  
  /*jshint browser: true, strict: true, undef: true */
  /*global define: false */
  
  ( function( window ) {
  
  'use strict';
  
  // class helper functions from bonzo https://github.com/ded/bonzo
  
  function classReg( className ) {
    return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
  }
  
  // classList support for class management
  // altho to be fair, the api sucks because it won't accept multiple classes at once
  var hasClass, addClass, removeClass;
  
  if ( 'classList' in document.documentElement ) {
    hasClass = function( elem, c ) {
      return elem.classList.contains( c );
    };
    addClass = function( elem, c ) {
      elem.classList.add( c );
    };
    removeClass = function( elem, c ) {
      elem.classList.remove( c );
    };
  }
  else {
    hasClass = function( elem, c ) {
      return classReg( c ).test( elem.className );
    };
    addClass = function( elem, c ) {
      if ( !hasClass( elem, c ) ) {
        elem.className = elem.className + ' ' + c;
      }
    };
    removeClass = function( elem, c ) {
      elem.className = elem.className.replace( classReg( c ), ' ' );
    };
  }
  
  function toggleClass( elem, c ) {
    var fn = hasClass( elem, c ) ? removeClass : addClass;
    fn( elem, c );
  }
  
  var classie = {
    // full names
    hasClass: hasClass,
    addClass: addClass,
    removeClass: removeClass,
    toggleClass: toggleClass,
    // short names
    has: hasClass,
    add: addClass,
    remove: removeClass,
    toggle: toggleClass
  };
  
  // transport
  if ( typeof define === 'function' && define.amd ) {
    // AMD
    define( classie );
  } else {
    // browser global
    window.classie = classie;
  }
  
  })( window );
  /*
  Plugin Name: 	Count To
  Written by: 	Matt Huggins - https://github.com/mhuggins/jquery-countTo
  */
  
  (function ($) {
  	$.fn.countTo = function (options) {
  		options = options || {};
  
  		return $(this).each(function () {
  			// set options for current element
  			var settings = $.extend({}, $.fn.countTo.defaults, {
  				from:            $(this).data('from'),
  				to:              $(this).data('to'),
  				speed:           $(this).data('speed'),
  				refreshInterval: $(this).data('refresh-interval'),
  				decimals:        $(this).data('decimals')
  			}, options);
  
  			// how many times to update the value, and how much to increment the value on each update
  			var loops = Math.ceil(settings.speed / settings.refreshInterval),
  				increment = (settings.to - settings.from) / loops;
  
  			// references & variables that will change with each update
  			var self = this,
  				$self = $(this),
  				loopCount = 0,
  				value = settings.from,
  				data = $self.data('countTo') || {};
  
  			$self.data('countTo', data);
  
  			// if an existing interval can be found, clear it first
  			if (data.interval) {
  				clearInterval(data.interval);
  			}
  			data.interval = setInterval(updateTimer, settings.refreshInterval);
  
  			// initialize the element with the starting value
  			render(value);
  
  			function updateTimer() {
  				value += increment;
  				loopCount++;
  
  				render(value);
  
  				if (typeof(settings.onUpdate) == 'function') {
  					settings.onUpdate.call(self, value);
  				}
  
  				if (loopCount >= loops) {
  					// remove the interval
  					$self.removeData('countTo');
  					clearInterval(data.interval);
  					value = settings.to;
  
  					if (typeof(settings.onComplete) == 'function') {
  						settings.onComplete.call(self, value);
  					}
  				}
  			}
  
  			function render(value) {
  				var formattedValue = settings.formatter.call(self, value, settings);
  				$self.html(formattedValue);
  			}
  		});
  	};
  
  	$.fn.countTo.defaults = {
  		from: 0,               // the number the element should start at
  		to: 0,                 // the number the element should end at
  		speed: 1000,           // how long it should take to count between the target numbers
  		refreshInterval: 100,  // how often the element should be updated
  		decimals: 0,           // the number of decimal places to show
  		formatter: formatter,  // handler for formatting the value before rendering
  		onUpdate: null,        // callback method for every time the element is updated
  		onComplete: null       // callback method for when the element finishes updating
  	};
  
  	function formatter(value, settings) {
  		return value.toFixed(settings.decimals);
  	}
  }(jQuery));
  /*
   * jQuery.appear
   * https://github.com/bas2k/jquery.appear/
   * http://code.google.com/p/jquery-appear/
   *
   * Copyright (c) 2009 Michael Hixson
   * Copyright (c) 2012 Alexander Brovikov
   * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
   */
  (function($) {
  	$.fn.appear = function(fn, options) {
  
  		var settings = $.extend({
  
  			//arbitrary data to pass to fn
  			data: undefined,
  
  			//call fn only on the first appear?
  			one: true,
  
  			// X & Y accuracy
  			accX: 0,
  			accY: 0
  
  		}, options);
  
  		return this.each(function() {
  
  			var t = $(this);
  
  			//whether the element is currently visible
  			t.appeared = false;
  
  			if (!fn) {
  
  				//trigger the custom event
  				t.trigger('appear', settings.data);
  				return;
  			}
  
  			var w = $(window);
  
  			//fires the appear event when appropriate
  			var check = function() {
  
  				//is the element hidden?
  				if (!t.is(':visible')) {
  
  					//it became hidden
  					t.appeared = false;
  					return;
  				}
  
  				//is the element inside the visible window?
  				var a = w.scrollLeft();
  				var b = w.scrollTop();
  				var o = t.offset();
  				var x = o.left;
  				var y = o.top;
  
  				var ax = settings.accX;
  				var ay = settings.accY;
  				var th = t.height();
  				var wh = w.height();
  				var tw = t.width();
  				var ww = w.width();
  
  				if (y + th + ay >= b &&
  					y <= b + wh + ay &&
  					x + tw + ax >= a &&
  					x <= a + ww + ax) {
  
  					//trigger the custom event
  					if (!t.appeared) t.trigger('appear', settings.data);
  
  				} else {
  
  					//it scrolled out of view
  					t.appeared = false;
  				}
  			};
  
  			//create a modified fn with some additional logic
  			var modifiedFn = function() {
  
  				//mark the element as visible
  				t.appeared = true;
  
  				//is this supposed to happen only once?
  				if (settings.one) {
  
  					//remove the check
  					w.unbind('scroll', check);
  					var i = $.inArray(check, $.fn.appear.checks);
  					if (i >= 0) $.fn.appear.checks.splice(i, 1);
  				}
  
  				//trigger the original fn
  				fn.apply(this, arguments);
  			};
  
  			//bind the modified fn to the element
  			if (settings.one) t.one('appear', settings.data, modifiedFn);
  			else t.bind('appear', settings.data, modifiedFn);
  
  			//check whenever the window scrolls
  			w.scroll(check);
  
  			//check whenever the dom changes
  			$.fn.appear.checks.push(check);
  
  			//check now
  			(check)();
  		});
  	};
  
  	//keep a queue of appearance checks
  	$.extend($.fn.appear, {
  
  		checks: [],
  		timeout: null,
  
  		//process the queue
  		checkAll: function() {
  			var length = $.fn.appear.checks.length;
  			if (length > 0) while (length--) ($.fn.appear.checks[length])();
  		},
  
  		//check the queue asynchronously
  		run: function() {
  			if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
  			$.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
  		}
  	});
  
  	//run checks when these methods are called
  	$.each(['append', 'prepend', 'after', 'before', 'attr',
  		'removeAttr', 'addClass', 'removeClass', 'toggleClass',
  		'remove', 'css', 'show', 'hide'], function(i, n) {
  		var old = $.fn[n];
  		if (old) {
  			$.fn[n] = function() {
  				var r = old.apply(this, arguments);
  				$.fn.appear.run();
  				return r;
  			}
  		}
  	});
  
  })(jQuery);/*!
   * jQuery Cycle Plugin (with Transition Definitions)
   * Examples and documentation at: http://jquery.malsup.com/cycle/
   * Copyright (c) 2007-2010 M. Alsup
   * Version: 2.9998 (27-OCT-2011)
   * Dual licensed under the MIT and GPL licenses.
   * http://jquery.malsup.com/license.html
   * Requires: jQuery v1.3.2 or later
   */
  ;(function($, undefined) {
  
  var ver = '2.9998';
  
  // if $.support is not defined (pre jQuery 1.3) add what I need
  if ($.support == undefined) {
  	$.support = {
  		opacity: !($.browser.msie)
  	};
  }
  
  function debug(s) {
  	$.fn.cycle.debug && log(s);
  }		
  function log() {
  	window.console && console.log && console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
  }
  $.expr[':'].paused = function(el) {
  	return el.cyclePause;
  }
  
  
  // the options arg can be...
  //   a number  - indicates an immediate transition should occur to the given slide index
  //   a string  - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
  //   an object - properties to control the slideshow
  //
  // the arg2 arg can be...
  //   the name of an fx (only used in conjunction with a numeric value for 'options')
  //   the value true (only used in first arg == 'resume') and indicates
  //	 that the resume should occur immediately (not wait for next timeout)
  
  $.fn.cycle = function(options, arg2) {
  	var o = { s: this.selector, c: this.context };
  
  	// in 1.3+ we can fix mistakes with the ready state
  	if (this.length === 0 && options != 'stop') {
  		if (!$.isReady && o.s) {
  			log('DOM not ready, queuing slideshow');
  			$(function() {
  				$(o.s,o.c).cycle(options,arg2);
  			});
  			return this;
  		}
  		// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
  		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
  		return this;
  	}
  
  	// iterate the matched nodeset
  	return this.each(function() {
  		var opts = handleArguments(this, options, arg2);
  		if (opts === false)
  			return;
  
  		opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
  		
  		// stop existing slideshow for this container (if there is one)
  		if (this.cycleTimeout)
  			clearTimeout(this.cycleTimeout);
  		this.cycleTimeout = this.cyclePause = 0;
  
  		var $cont = $(this);
  		var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
  		var els = $slides.get();
  
  		var opts2 = buildOptions($cont, $slides, els, opts, o);
  		if (opts2 === false)
  			return;
  
  		if (els.length < 2) {
  			log('terminating; too few slides: ' + els.length);
  			return;
  		}
  
  		var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
  
  		// if it's an auto slideshow, kick it off
  		if (startTime) {
  			startTime += (opts2.delay || 0);
  			if (startTime < 10)
  				startTime = 10;
  			debug('first timeout: ' + startTime);
  			this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime);
  		}
  	});
  };
  
  function triggerPause(cont, byHover, onPager) {
  	var opts = $(cont).data('cycle.opts');
  	var paused = !!cont.cyclePause;
  	if (paused && opts.paused)
  		opts.paused(cont, opts, byHover, onPager);
  	else if (!paused && opts.resumed)
  		opts.resumed(cont, opts, byHover, onPager);
  }
  
  // process the args that were passed to the plugin fn
  function handleArguments(cont, options, arg2) {
  	if (cont.cycleStop == undefined)
  		cont.cycleStop = 0;
  	if (options === undefined || options === null)
  		options = {};
  	if (options.constructor == String) {
  		switch(options) {
  		case 'destroy':
  		case 'stop':
  			var opts = $(cont).data('cycle.opts');
  			if (!opts)
  				return false;
  			cont.cycleStop++; // callbacks look for change
  			if (cont.cycleTimeout)
  				clearTimeout(cont.cycleTimeout);
  			cont.cycleTimeout = 0;
  			opts.elements && $(opts.elements).stop();
  			$(cont).removeData('cycle.opts');
  			if (options == 'destroy')
  				destroy(opts);
  			return false;
  		case 'toggle':
  			cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
  			checkInstantResume(cont.cyclePause, arg2, cont);
  			triggerPause(cont);
  			return false;
  		case 'pause':
  			cont.cyclePause = 1;
  			triggerPause(cont);
  			return false;
  		case 'resume':
  			cont.cyclePause = 0;
  			checkInstantResume(false, arg2, cont);
  			triggerPause(cont);
  			return false;
  		case 'prev':
  		case 'next':
  			var opts = $(cont).data('cycle.opts');
  			if (!opts) {
  				log('options not found, "prev/next" ignored');
  				return false;
  			}
  			$.fn.cycle[options](opts);
  			return false;
  		default:
  			options = { fx: options };
  		};
  		return options;
  	}
  	else if (options.constructor == Number) {
  		// go to the requested slide
  		var num = options;
  		options = $(cont).data('cycle.opts');
  		if (!options) {
  			log('options not found, can not advance slide');
  			return false;
  		}
  		if (num < 0 || num >= options.elements.length) {
  			log('invalid slide index: ' + num);
  			return false;
  		}
  		options.nextSlide = num;
  		if (cont.cycleTimeout) {
  			clearTimeout(cont.cycleTimeout);
  			cont.cycleTimeout = 0;
  		}
  		if (typeof arg2 == 'string')
  			options.oneTimeFx = arg2;
  		go(options.elements, options, 1, num >= options.currSlide);
  		return false;
  	}
  	return options;
  	
  	function checkInstantResume(isPaused, arg2, cont) {
  		if (!isPaused && arg2 === true) { // resume now!
  			var options = $(cont).data('cycle.opts');
  			if (!options) {
  				log('options not found, can not resume');
  				return false;
  			}
  			if (cont.cycleTimeout) {
  				clearTimeout(cont.cycleTimeout);
  				cont.cycleTimeout = 0;
  			}
  			go(options.elements, options, 1, !options.backwards);
  		}
  	}
  };
  
  function removeFilter(el, opts) {
  	if (!$.support.opacity && opts.cleartype && el.style.filter) {
  		try { el.style.removeAttribute('filter'); }
  		catch(smother) {} // handle old opera versions
  	}
  };
  
  // unbind event handlers
  function destroy(opts) {
  	if (opts.next)
  		$(opts.next).unbind(opts.prevNextEvent);
  	if (opts.prev)
  		$(opts.prev).unbind(opts.prevNextEvent);
  	
  	if (opts.pager || opts.pagerAnchorBuilder)
  		$.each(opts.pagerAnchors || [], function() {
  			this.unbind().remove();
  		});
  	opts.pagerAnchors = null;
  	if (opts.destroy) // callback
  		opts.destroy(opts);
  };
  
  // one-time initialization
  function buildOptions($cont, $slides, els, options, o) {
  	var startingSlideSpecified;
  	// support metadata plugin (v1.0 and v2.0)
  	var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
  	var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
  	if (meta)
  		opts = $.extend(opts, meta);
  	if (opts.autostop)
  		opts.countdown = opts.autostopCount || els.length;
  
  	var cont = $cont[0];
  	$cont.data('cycle.opts', opts);
  	opts.$cont = $cont;
  	opts.stopCount = cont.cycleStop;
  	opts.elements = els;
  	opts.before = opts.before ? [opts.before] : [];
  	opts.after = opts.after ? [opts.after] : [];
  
  	// push some after callbacks
  	if (!$.support.opacity && opts.cleartype)
  		opts.after.push(function() { removeFilter(this, opts); });
  	if (opts.continuous)
  		opts.after.push(function() { go(els,opts,0,!opts.backwards); });
  
  	saveOriginalOpts(opts);
  
  	// clearType corrections
  	if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
  		clearTypeFix($slides);
  
  	// container requires non-static position so that slides can be position within
  	if ($cont.css('position') == 'static')
  		$cont.css('position', 'relative');
  	if (opts.width)
  		$cont.width(opts.width);
  	if (opts.height && opts.height != 'auto')
  		$cont.height(opts.height);
  
  	if (opts.startingSlide != undefined) {
  		opts.startingSlide = parseInt(opts.startingSlide,10);
  		if (opts.startingSlide >= els.length || opts.startSlide < 0)
  			opts.startingSlide = 0; // catch bogus input
  		else 
  			startingSlideSpecified = true;
  	}
  	else if (opts.backwards)
  		opts.startingSlide = els.length - 1;
  	else
  		opts.startingSlide = 0;
  
  	// if random, mix up the slide array
  	if (opts.random) {
  		opts.randomMap = [];
  		for (var i = 0; i < els.length; i++)
  			opts.randomMap.push(i);
  		opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  		if (startingSlideSpecified) {
  			// try to find the specified starting slide and if found set start slide index in the map accordingly
  			for ( var cnt = 0; cnt < els.length; cnt++ ) {
  				if ( opts.startingSlide == opts.randomMap[cnt] ) {
  					opts.randomIndex = cnt;
  				}
  			}
  		}
  		else {
  			opts.randomIndex = 1;
  			opts.startingSlide = opts.randomMap[1];
  		}
  	}
  	else if (opts.startingSlide >= els.length)
  		opts.startingSlide = 0; // catch bogus input
  	opts.currSlide = opts.startingSlide || 0;
  	var first = opts.startingSlide;
  
  	// set position and zIndex on all the slides
  	$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
  		var z;
  		if (opts.backwards)
  			z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
  		else
  			z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
  		$(this).css('z-index', z)
  	});
  
  	// make sure first slide is visible
  	$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
  	removeFilter(els[first], opts);
  
  	// stretch slides
  	if (opts.fit) {
  		if (!opts.aspect) {
  	        if (opts.width)
  	            $slides.width(opts.width);
  	        if (opts.height && opts.height != 'auto')
  	            $slides.height(opts.height);
  		} else {
  			$slides.each(function(){
  				var $slide = $(this);
  				var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
  				if( opts.width && $slide.width() != opts.width ) {
  					$slide.width( opts.width );
  					$slide.height( opts.width / ratio );
  				}
  
  				if( opts.height && $slide.height() < opts.height ) {
  					$slide.height( opts.height );
  					$slide.width( opts.height * ratio );
  				}
  			});
  		}
  	}
  
  	if (opts.center && ((!opts.fit) || opts.aspect)) {
  		$slides.each(function(){
  			var $slide = $(this);
  			$slide.css({
  				"margin-left": opts.width ?
  					((opts.width - $slide.width()) / 2) + "px" :
  					0,
  				"margin-top": opts.height ?
  					((opts.height - $slide.height()) / 2) + "px" :
  					0
  			});
  		});
  	}
  
  	if (opts.center && !opts.fit && !opts.slideResize) {
  	  	$slides.each(function(){
  	    	var $slide = $(this);
  	    	$slide.css({
  	      		"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
  	      		"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
  	    	});
  	  	});
  	}
  		
  	// stretch container
  	var reshape = opts.containerResize && !$cont.innerHeight();
  	if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
  		var maxw = 0, maxh = 0;
  		for(var j=0; j < els.length; j++) {
  			var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
  			if (!w) w = e.offsetWidth || e.width || $e.attr('width');
  			if (!h) h = e.offsetHeight || e.height || $e.attr('height');
  			maxw = w > maxw ? w : maxw;
  			maxh = h > maxh ? h : maxh;
  		}
  		if (maxw > 0 && maxh > 0)
  			$cont.css({width:maxw+'px',height:maxh+'px'});
  	}
  
  	var pauseFlag = false;  // https://github.com/malsup/cycle/issues/44
  	if (opts.pause)
  		$cont.hover(
  			function(){
  				pauseFlag = true;
  				this.cyclePause++;
  				triggerPause(cont, true);
  			},
  			function(){
  				pauseFlag && this.cyclePause--;
  				triggerPause(cont, true);
  			}
  		);
  
  	if (supportMultiTransitions(opts) === false)
  		return false;
  
  	// apparently a lot of people use image slideshows without height/width attributes on the images.
  	// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
  	var requeue = false;
  	options.requeueAttempts = options.requeueAttempts || 0;
  	$slides.each(function() {
  		// try to get height/width of each slide
  		var $el = $(this);
  		this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
  		this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
  
  		if ( $el.is('img') ) {
  			// sigh..  sniffing, hacking, shrugging...  this crappy hack tries to account for what browsers do when
  			// an image is being downloaded and the markup did not include sizing info (height/width attributes);
  			// there seems to be some "default" sizes used in this situation
  			var loadingIE	= ($.browser.msie  && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
  			var loadingFF	= ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
  			var loadingOp	= ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
  			var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
  			// don't requeue for images that are still loading but have a valid size
  			if (loadingIE || loadingFF || loadingOp || loadingOther) {
  				if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
  					log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
  					setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
  					requeue = true;
  					return false; // break each loop
  				}
  				else {
  					log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
  				}
  			}
  		}
  		return true;
  	});
  
  	if (requeue)
  		return false;
  
  	opts.cssBefore = opts.cssBefore || {};
  	opts.cssAfter = opts.cssAfter || {};
  	opts.cssFirst = opts.cssFirst || {};
  	opts.animIn = opts.animIn || {};
  	opts.animOut = opts.animOut || {};
  
  	$slides.not(':eq('+first+')').css(opts.cssBefore);
  	$($slides[first]).css(opts.cssFirst);
  
  	if (opts.timeout) {
  		opts.timeout = parseInt(opts.timeout,10);
  		// ensure that timeout and speed settings are sane
  		if (opts.speed.constructor == String)
  			opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
  		if (!opts.sync)
  			opts.speed = opts.speed / 2;
  		
  		var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
  		while((opts.timeout - opts.speed) < buffer) // sanitize timeout
  			opts.timeout += opts.speed;
  	}
  	if (opts.easing)
  		opts.easeIn = opts.easeOut = opts.easing;
  	if (!opts.speedIn)
  		opts.speedIn = opts.speed;
  	if (!opts.speedOut)
  		opts.speedOut = opts.speed;
  
  	opts.slideCount = els.length;
  	opts.currSlide = opts.lastSlide = first;
  	if (opts.random) {
  		if (++opts.randomIndex == els.length)
  			opts.randomIndex = 0;
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else if (opts.backwards)
  		opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1;
  	else
  		opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
  
  	// run transition init fn
  	if (!opts.multiFx) {
  		var init = $.fn.cycle.transitions[opts.fx];
  		if ($.isFunction(init))
  			init($cont, $slides, opts);
  		else if (opts.fx != 'custom' && !opts.multiFx) {
  			log('unknown transition: ' + opts.fx,'; slideshow terminating');
  			return false;
  		}
  	}
  
  	// fire artificial events
  	var e0 = $slides[first];
  	if (!opts.skipInitializationCallbacks) {
  		if (opts.before.length)
  			opts.before[0].apply(e0, [e0, e0, opts, true]);
  		if (opts.after.length)
  			opts.after[0].apply(e0, [e0, e0, opts, true]);
  	}
  	if (opts.next)
  		$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});
  	if (opts.prev)
  		$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});
  	if (opts.pager || opts.pagerAnchorBuilder)
  		buildPager(els,opts);
  
  	exposeAddSlide(opts, els);
  
  	return opts;
  };
  
  // save off original opts so we can restore after clearing state
  function saveOriginalOpts(opts) {
  	opts.original = { before: [], after: [] };
  	opts.original.cssBefore = $.extend({}, opts.cssBefore);
  	opts.original.cssAfter  = $.extend({}, opts.cssAfter);
  	opts.original.animIn	= $.extend({}, opts.animIn);
  	opts.original.animOut   = $.extend({}, opts.animOut);
  	$.each(opts.before, function() { opts.original.before.push(this); });
  	$.each(opts.after,  function() { opts.original.after.push(this); });
  };
  
  function supportMultiTransitions(opts) {
  	var i, tx, txs = $.fn.cycle.transitions;
  	// look for multiple effects
  	if (opts.fx.indexOf(',') > 0) {
  		opts.multiFx = true;
  		opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
  		// discard any bogus effect names
  		for (i=0; i < opts.fxs.length; i++) {
  			var fx = opts.fxs[i];
  			tx = txs[fx];
  			if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
  				log('discarding unknown transition: ',fx);
  				opts.fxs.splice(i,1);
  				i--;
  			}
  		}
  		// if we have an empty list then we threw everything away!
  		if (!opts.fxs.length) {
  			log('No valid transitions named; slideshow terminating.');
  			return false;
  		}
  	}
  	else if (opts.fx == 'all') {  // auto-gen the list of transitions
  		opts.multiFx = true;
  		opts.fxs = [];
  		for (p in txs) {
  			tx = txs[p];
  			if (txs.hasOwnProperty(p) && $.isFunction(tx))
  				opts.fxs.push(p);
  		}
  	}
  	if (opts.multiFx && opts.randomizeEffects) {
  		// munge the fxs array to make effect selection random
  		var r1 = Math.floor(Math.random() * 20) + 30;
  		for (i = 0; i < r1; i++) {
  			var r2 = Math.floor(Math.random() * opts.fxs.length);
  			opts.fxs.push(opts.fxs.splice(r2,1)[0]);
  		}
  		debug('randomized fx sequence: ',opts.fxs);
  	}
  	return true;
  };
  
  // provide a mechanism for adding slides after the slideshow has started
  function exposeAddSlide(opts, els) {
  	opts.addSlide = function(newSlide, prepend) {
  		var $s = $(newSlide), s = $s[0];
  		if (!opts.autostopCount)
  			opts.countdown++;
  		els[prepend?'unshift':'push'](s);
  		if (opts.els)
  			opts.els[prepend?'unshift':'push'](s); // shuffle needs this
  		opts.slideCount = els.length;
  
  		// add the slide to the random map and resort
  		if (opts.random) {
  			opts.randomMap.push(opts.slideCount-1);
  			opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  		}
  
  		$s.css('position','absolute');
  		$s[prepend?'prependTo':'appendTo'](opts.$cont);
  
  		if (prepend) {
  			opts.currSlide++;
  			opts.nextSlide++;
  		}
  
  		if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
  			clearTypeFix($s);
  
  		if (opts.fit && opts.width)
  			$s.width(opts.width);
  		if (opts.fit && opts.height && opts.height != 'auto')
  			$s.height(opts.height);
  		s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
  		s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
  
  		$s.css(opts.cssBefore);
  
  		if (opts.pager || opts.pagerAnchorBuilder)
  			$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
  
  		if ($.isFunction(opts.onAddSlide))
  			opts.onAddSlide($s);
  		else
  			$s.hide(); // default behavior
  	};
  }
  
  // reset internal state; we do this on every pass in order to support multiple effects
  $.fn.cycle.resetState = function(opts, fx) {
  	fx = fx || opts.fx;
  	opts.before = []; opts.after = [];
  	opts.cssBefore = $.extend({}, opts.original.cssBefore);
  	opts.cssAfter  = $.extend({}, opts.original.cssAfter);
  	opts.animIn	= $.extend({}, opts.original.animIn);
  	opts.animOut   = $.extend({}, opts.original.animOut);
  	opts.fxFn = null;
  	$.each(opts.original.before, function() { opts.before.push(this); });
  	$.each(opts.original.after,  function() { opts.after.push(this); });
  
  	// re-init
  	var init = $.fn.cycle.transitions[fx];
  	if ($.isFunction(init))
  		init(opts.$cont, $(opts.elements), opts);
  };
  
  // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
  function go(els, opts, manual, fwd) {
  	// opts.busy is true if we're in the middle of an animation
  	if (manual && opts.busy && opts.manualTrump) {
  		// let manual transitions requests trump active ones
  		debug('manualTrump in go(), stopping active transition');
  		$(els).stop(true,true);
  		opts.busy = 0;
  	}
  	// don't begin another timeout-based transition if there is one active
  	if (opts.busy) {
  		debug('transition active, ignoring new tx request');
  		return;
  	}
  
  	var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
  
  	// stop cycling if we have an outstanding stop request
  	if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
  		return;
  
  	// check to see if we should stop cycling based on autostop options
  	if (!manual && !p.cyclePause && !opts.bounce &&
  		((opts.autostop && (--opts.countdown <= 0)) ||
  		(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
  		if (opts.end)
  			opts.end(opts);
  		return;
  	}
  
  	// if slideshow is paused, only transition on a manual trigger
  	var changed = false;
  	if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
  		changed = true;
  		var fx = opts.fx;
  		// keep trying to get the slide size if we don't have it yet
  		curr.cycleH = curr.cycleH || $(curr).height();
  		curr.cycleW = curr.cycleW || $(curr).width();
  		next.cycleH = next.cycleH || $(next).height();
  		next.cycleW = next.cycleW || $(next).width();
  
  		// support multiple transition types
  		if (opts.multiFx) {
  			if (fwd && (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length))
  				opts.lastFx = 0;
  			else if (!fwd && (opts.lastFx == undefined || --opts.lastFx < 0))
  				opts.lastFx = opts.fxs.length - 1;
  			fx = opts.fxs[opts.lastFx];
  		}
  
  		// one-time fx overrides apply to:  $('div').cycle(3,'zoom');
  		if (opts.oneTimeFx) {
  			fx = opts.oneTimeFx;
  			opts.oneTimeFx = null;
  		}
  
  		$.fn.cycle.resetState(opts, fx);
  
  		// run the before callbacks
  		if (opts.before.length)
  			$.each(opts.before, function(i,o) {
  				if (p.cycleStop != opts.stopCount) return;
  				o.apply(next, [curr, next, opts, fwd]);
  			});
  
  		// stage the after callacks
  		var after = function() {
  			opts.busy = 0;
  			$.each(opts.after, function(i,o) {
  				if (p.cycleStop != opts.stopCount) return;
  				o.apply(next, [curr, next, opts, fwd]);
  			});
  			if (!p.cycleStop) {
  				// queue next transition
  				queueNext();
  			}
  		};
  
  		debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
  		
  		// get ready to perform the transition
  		opts.busy = 1;
  		if (opts.fxFn) // fx function provided?
  			opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  		else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
  			$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  		else
  			$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  	}
  	else {
  		queueNext();
  	}
  
  	if (changed || opts.nextSlide == opts.currSlide) {
  		// calculate the next slide
  		opts.lastSlide = opts.currSlide;
  		if (opts.random) {
  			opts.currSlide = opts.nextSlide;
  			if (++opts.randomIndex == els.length) {
  				opts.randomIndex = 0;
  				opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  			}
  			opts.nextSlide = opts.randomMap[opts.randomIndex];
  			if (opts.nextSlide == opts.currSlide)
  				opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
  		}
  		else if (opts.backwards) {
  			var roll = (opts.nextSlide - 1) < 0;
  			if (roll && opts.bounce) {
  				opts.backwards = !opts.backwards;
  				opts.nextSlide = 1;
  				opts.currSlide = 0;
  			}
  			else {
  				opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
  				opts.currSlide = roll ? 0 : opts.nextSlide+1;
  			}
  		}
  		else { // sequence
  			var roll = (opts.nextSlide + 1) == els.length;
  			if (roll && opts.bounce) {
  				opts.backwards = !opts.backwards;
  				opts.nextSlide = els.length-2;
  				opts.currSlide = els.length-1;
  			}
  			else {
  				opts.nextSlide = roll ? 0 : opts.nextSlide+1;
  				opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
  			}
  		}
  	}
  	if (changed && opts.pager)
  		opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
  	
  	function queueNext() {
  		// stage the next transition
  		var ms = 0, timeout = opts.timeout;
  		if (opts.timeout && !opts.continuous) {
  			ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
           if (opts.fx == 'shuffle')
              ms -= opts.speedOut;
        }
  		else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
  			ms = 10;
  		if (ms > 0)
  			p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms);
  	}
  };
  
  // invoked after transition
  $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
     $(pager).each(function() {
         $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
     });
  };
  
  // calculate timeout value for current transition
  function getTimeout(curr, next, opts, fwd) {
  	if (opts.timeoutFn) {
  		// call user provided calc fn
  		var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
  		while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
  			t += opts.speed;
  		debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
  		if (t !== false)
  			return t;
  	}
  	return opts.timeout;
  };
  
  // expose next/prev function, caller must pass in state
  $.fn.cycle.next = function(opts) { advance(opts,1); };
  $.fn.cycle.prev = function(opts) { advance(opts,0);};
  
  // advance slide forward or back
  function advance(opts, moveForward) {
  	var val = moveForward ? 1 : -1;
  	var els = opts.elements;
  	var p = opts.$cont[0], timeout = p.cycleTimeout;
  	if (timeout) {
  		clearTimeout(timeout);
  		p.cycleTimeout = 0;
  	}
  	if (opts.random && val < 0) {
  		// move back to the previously display slide
  		opts.randomIndex--;
  		if (--opts.randomIndex == -2)
  			opts.randomIndex = els.length-2;
  		else if (opts.randomIndex == -1)
  			opts.randomIndex = els.length-1;
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else if (opts.random) {
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else {
  		opts.nextSlide = opts.currSlide + val;
  		if (opts.nextSlide < 0) {
  			if (opts.nowrap) return false;
  			opts.nextSlide = els.length - 1;
  		}
  		else if (opts.nextSlide >= els.length) {
  			if (opts.nowrap) return false;
  			opts.nextSlide = 0;
  		}
  	}
  
  	var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
  	if ($.isFunction(cb))
  		cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
  	go(els, opts, 1, moveForward);
  	return false;
  };
  
  function buildPager(els, opts) {
  	var $p = $(opts.pager);
  	$.each(els, function(i,o) {
  		$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
  	});
  	opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
  };
  
  $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
  	var a;
  	if ($.isFunction(opts.pagerAnchorBuilder)) {
  		a = opts.pagerAnchorBuilder(i,el);
  		debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
  	}
  	else
  		a = '<a href="#">'+(i+1)+'</a>';
  		
  	if (!a)
  		return;
  	var $a = $(a);
  	// don't reparent if anchor is in the dom
  	if ($a.parents('body').length === 0) {
  		var arr = [];
  		if ($p.length > 1) {
  			$p.each(function() {
  				var $clone = $a.clone(true);
  				$(this).append($clone);
  				arr.push($clone[0]);
  			});
  			$a = $(arr);
  		}
  		else {
  			$a.appendTo($p);
  		}
  	}
  
  	opts.pagerAnchors =  opts.pagerAnchors || [];
  	opts.pagerAnchors.push($a);
  	
  	var pagerFn = function(e) {
  		e.preventDefault();
  		opts.nextSlide = i;
  		var p = opts.$cont[0], timeout = p.cycleTimeout;
  		if (timeout) {
  			clearTimeout(timeout);
  			p.cycleTimeout = 0;
  		}
  		var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
  		if ($.isFunction(cb))
  			cb(opts.nextSlide, els[opts.nextSlide]);
  		go(els,opts,1,opts.currSlide < i); // trigger the trans
  //		return false; // <== allow bubble
  	}
  	
  	if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
  		$a.hover(pagerFn, function(){/* no-op */} );
  	}
  	else {
  		$a.bind(opts.pagerEvent, pagerFn);
  	}
  	
  	if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
  		$a.bind('click.cycle', function(){return false;}); // suppress click
  	
  	var cont = opts.$cont[0];
  	var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
  	if (opts.pauseOnPagerHover) {
  		$a.hover(
  			function() { 
  				pauseFlag = true;
  				cont.cyclePause++; 
  				triggerPause(cont,true,true);
  			}, function() { 
  				pauseFlag && cont.cyclePause--; 
  				triggerPause(cont,true,true);
  			} 
  		);
  	}
  };
  
  // helper fn to calculate the number of slides between the current and the next
  $.fn.cycle.hopsFromLast = function(opts, fwd) {
  	var hops, l = opts.lastSlide, c = opts.currSlide;
  	if (fwd)
  		hops = c > l ? c - l : opts.slideCount - l;
  	else
  		hops = c < l ? l - c : l + opts.slideCount - c;
  	return hops;
  };
  
  // fix clearType problems in ie6 by setting an explicit bg color
  // (otherwise text slides look horrible during a fade transition)
  function clearTypeFix($slides) {
  	debug('applying clearType background-color hack');
  	function hex(s) {
  		s = parseInt(s,10).toString(16);
  		return s.length < 2 ? '0'+s : s;
  	};
  	function getBg(e) {
  		for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
  			var v = $.css(e,'background-color');
  			if (v && v.indexOf('rgb') >= 0 ) {
  				var rgb = v.match(/\d+/g);
  				return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
  			}
  			if (v && v != 'transparent')
  				return v;
  		}
  		return '#ffffff';
  	};
  	$slides.each(function() { $(this).css('background-color', getBg(this)); });
  };
  
  // reset common props before the next transition
  $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
  	$(opts.elements).not(curr).hide();
  	if (typeof opts.cssBefore.opacity == 'undefined')
  		opts.cssBefore.opacity = 1;
  	opts.cssBefore.display = 'block';
  	if (opts.slideResize && w !== false && next.cycleW > 0)
  		opts.cssBefore.width = next.cycleW;
  	if (opts.slideResize && h !== false && next.cycleH > 0)
  		opts.cssBefore.height = next.cycleH;
  	opts.cssAfter = opts.cssAfter || {};
  	opts.cssAfter.display = 'none';
  	$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
  	$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
  };
  
  // the actual fn for effecting a transition
  $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
  	var $l = $(curr), $n = $(next);
  	var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
  	$n.css(opts.cssBefore);
  	if (speedOverride) {
  		if (typeof speedOverride == 'number')
  			speedIn = speedOut = speedOverride;
  		else
  			speedIn = speedOut = 1;
  		easeIn = easeOut = null;
  	}
  	var fn = function() {
  		$n.animate(opts.animIn, speedIn, easeIn, function() {
  			cb();
  		});
  	};
  	$l.animate(opts.animOut, speedOut, easeOut, function() {
  		$l.css(opts.cssAfter);
  		if (!opts.sync) 
  			fn();
  	});
  	if (opts.sync) fn();
  };
  
  // transition definitions - only fade is defined here, transition pack defines the rest
  $.fn.cycle.transitions = {
  	fade: function($cont, $slides, opts) {
  		$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
  		opts.before.push(function(curr,next,opts) {
  			$.fn.cycle.commonReset(curr,next,opts);
  			opts.cssBefore.opacity = 0;
  		});
  		opts.animIn	   = { opacity: 1 };
  		opts.animOut   = { opacity: 0 };
  		opts.cssBefore = { top: 0, left: 0 };
  	}
  };
  
  $.fn.cycle.ver = function() { return ver; };
  
  // override these globally if you like (they are all optional)
  $.fn.cycle.defaults = {
  	activePagerClass: 'activeSlide', // class name used for the active pager link
  	after:		   null,  // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
  	allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
  	animIn:		   null,  // properties that define how the slide animates in
  	animOut:	   null,  // properties that define how the slide animates out
  	aspect:		   false,  // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
  	autostop:	   0,	  // true to end slideshow after X transitions (where X == slide count)
  	autostopCount: 0,	  // number of transitions (optionally used with autostop to define X)
  	backwards:     false, // true to start slideshow at last slide and move backwards through the stack
  	before:		   null,  // transition callback (scope set to element to be shown):	 function(currSlideElement, nextSlideElement, options, forwardFlag)
  	center: 	   null,  // set to true to have cycle add top/left margin to each slide (use with width and height options)
  	cleartype:	   !$.support.opacity,  // true if clearType corrections should be applied (for IE)
  	cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
  	containerResize: 1,	  // resize container to fit largest slide
  	continuous:	   0,	  // true to start next transition immediately after current one completes
  	cssAfter:	   null,  // properties that defined the state of the slide after transitioning out
  	cssBefore:	   null,  // properties that define the initial state of the slide before transitioning in
  	delay:		   0,	  // additional delay (in ms) for first transition (hint: can be negative)
  	easeIn:		   null,  // easing for "in" transition
  	easeOut:	   null,  // easing for "out" transition
  	easing:		   null,  // easing method for both in and out transitions
  	end:		   null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
  	fastOnEvent:   0,	  // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
  	fit:		   0,	  // force slides to fit container
  	fx:			  'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
  	fxFn:		   null,  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
  	height:		  'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
  	manualTrump:   true,  // causes manual transition to stop an active transition instead of being ignored
  	metaAttr:     'cycle',// data- attribute that holds the option data for the slideshow
  	next:		   null,  // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
  	nowrap:		   0,	  // true to prevent slideshow from wrapping
  	onPagerEvent:  null,  // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
  	onPrevNextEvent: null,// callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
  	pager:		   null,  // element, jQuery object, or jQuery selector string for the element to use as pager container
  	pagerAnchorBuilder: null, // callback fn for building anchor links:  function(index, DOMelement)
  	pagerEvent:	  'click.cycle', // name of event which drives the pager navigation
  	pause:		   0,	  // true to enable "pause on hover"
  	pauseOnPagerHover: 0, // true to pause when hovering over pager link
  	prev:		   null,  // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
  	prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
  	random:		   0,	  // true for random, false for sequence (not applicable to shuffle fx)
  	randomizeEffects: 1,  // valid when multiple effects are used; true to make the effect sequence random
  	requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
  	requeueTimeout: 250,  // ms delay for requeue
  	rev:		   0,	  // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
  	shuffle:	   null,  // coords for shuffle animation, ex: { top:15, left: 200 }
  	skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
  	slideExpr:	   null,  // expression for selecting slides (if something other than all children is required)
  	slideResize:   1,     // force slide width/height to fixed size before every transition
  	speed:		   1000,  // speed of the transition (any valid fx speed value)
  	speedIn:	   null,  // speed of the 'in' transition
  	speedOut:	   null,  // speed of the 'out' transition
  	startingSlide: 0,	  // zero-based index of the first slide to be displayed
  	sync:		   1,	  // true if in/out transitions should occur simultaneously
  	timeout:	   4000,  // milliseconds between slide transitions (0 to disable auto advance)
  	timeoutFn:     null,  // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
  	updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
  	width:         null   // container width (if the 'fit' option is true, the slides will be set to this width as well)
  };
  
  })(jQuery);
  
  
  /*!
   * jQuery Cycle Plugin Transition Definitions
   * This script is a plugin for the jQuery Cycle Plugin
   * Examples and documentation at: http://malsup.com/jquery/cycle/
   * Copyright (c) 2007-2010 M. Alsup
   * Version:	 2.73
   * Dual licensed under the MIT and GPL licenses:
   * http://www.opensource.org/licenses/mit-license.php
   * http://www.gnu.org/licenses/gpl.html
   */
  (function($) {
  
  //
  // These functions define slide initialization and properties for the named
  // transitions. To save file size feel free to remove any of these that you
  // don't need.
  //
  $.fn.cycle.transitions.none = function($cont, $slides, opts) {
  	opts.fxFn = function(curr,next,opts,after){
  		$(next).show();
  		$(curr).hide();
  		after();
  	};
  };
  
  // not a cross-fade, fadeout only fades out the top slide
  $.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
  	$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
  	opts.before.push(function(curr,next,opts,w,h,rev) {
  		$(curr).css('zIndex',opts.slideCount + (!rev === true ? 1 : 0));
  		$(next).css('zIndex',opts.slideCount + (!rev === true ? 0 : 1));
  	});
  	opts.animIn.opacity = 1;
  	opts.animOut.opacity = 0;
  	opts.cssBefore.opacity = 1;
  	opts.cssBefore.display = 'block';
  	opts.cssAfter.zIndex = 0;
  };
  
  // scrollUp/Down/Left/Right
  $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var h = $cont.height();
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = 0;
  	opts.cssFirst.top = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = -h;
  };
  $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var h = $cont.height();
  	opts.cssFirst.top = 0;
  	opts.cssBefore.top = -h;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = h;
  };
  $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var w = $cont.width();
  	opts.cssFirst.left = 0;
  	opts.cssBefore.left = w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = 0-w;
  };
  $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var w = $cont.width();
  	opts.cssFirst.left = 0;
  	opts.cssBefore.left = -w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = w;
  };
  $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden').width();
  	opts.before.push(function(curr, next, opts, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
  		opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
  	});
  	opts.cssFirst.left = 0;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.top = 0;
  };
  $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push(function(curr, next, opts, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
  		opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.left = 0;
  };
  
  // slideX/slideY
  $.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$(opts.elements).not(curr).hide();
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.animIn.width = next.cycleW;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  	opts.animIn.width = 'show';
  	opts.animOut.width = 0;
  };
  $.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$(opts.elements).not(curr).hide();
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.animIn.height = next.cycleH;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.height = 0;
  	opts.animIn.height = 'show';
  	opts.animOut.height = 0;
  };
  
  // shuffle
  $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
  	var i, w = $cont.css('overflow', 'visible').width();
  	$slides.css({left: 0, top: 0});
  	opts.before.push(function(curr,next,opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  	});
  	// only adjust speed once!
  	if (!opts.speedAdjusted) {
  		opts.speed = opts.speed / 2; // shuffle has 2 transitions
  		opts.speedAdjusted = true;
  	}
  	opts.random = 0;
  	opts.shuffle = opts.shuffle || {left:-w, top:15};
  	opts.els = [];
  	for (i=0; i < $slides.length; i++)
  		opts.els.push($slides[i]);
  
  	for (i=0; i < opts.currSlide; i++)
  		opts.els.push(opts.els.shift());
  
  	// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
  	opts.fxFn = function(curr, next, opts, cb, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		var $el = fwd ? $(curr) : $(next);
  		$(next).css(opts.cssBefore);
  		var count = opts.slideCount;
  		$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
  			var hops = $.fn.cycle.hopsFromLast(opts, fwd);
  			for (var k=0; k < hops; k++)
  				fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
  			if (fwd) {
  				for (var i=0, len=opts.els.length; i < len; i++)
  					$(opts.els[i]).css('z-index', len-i+count);
  			}
  			else {
  				var z = $(curr).css('z-index');
  				$el.css('z-index', parseInt(z,10)+1+count);
  			}
  			$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
  				$(fwd ? this : curr).hide();
  				if (cb) cb();
  			});
  		});
  	};
  	$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
  };
  
  // turnUp/Down/Left/Right
  $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.cssBefore.top = next.cycleH;
  		opts.animIn.height = next.cycleH;
  		opts.animOut.width = next.cycleW;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.cssBefore.height = 0;
  	opts.animIn.top = 0;
  	opts.animOut.height = 0;
  };
  $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.height = 0;
  	opts.animOut.height = 0;
  };
  $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.cssBefore.left = next.cycleW;
  		opts.animIn.width = next.cycleW;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  	opts.animIn.left = 0;
  	opts.animOut.width = 0;
  };
  $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.animIn.width = next.cycleW;
  		opts.animOut.left = curr.cycleW;
  	});
  	$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
  	opts.animIn.left = 0;
  	opts.animOut.width = 0;
  };
  
  // zoom
  $.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,false,true);
  		opts.cssBefore.top = next.cycleH/2;
  		opts.cssBefore.left = next.cycleW/2;
  		$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
  		$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
  	});
  	opts.cssFirst.top = 0;
  	opts.cssFirst.left = 0;
  	opts.cssBefore.width = 0;
  	opts.cssBefore.height = 0;
  };
  
  // fadeZoom
  $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,false);
  		opts.cssBefore.left = next.cycleW/2;
  		opts.cssBefore.top = next.cycleH/2;
  		$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
  	});
  	opts.cssBefore.width = 0;
  	opts.cssBefore.height = 0;
  	opts.animOut.opacity = 0;
  };
  
  // blindX
  $.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','hidden').width();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.width = next.cycleW;
  		opts.animOut.left   = curr.cycleW;
  	});
  	opts.cssBefore.left = w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = w;
  };
  // blindY
  $.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
  	var h = $cont.css('overflow','hidden').height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = h;
  };
  // blindZ
  $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
  	var h = $cont.css('overflow','hidden').height();
  	var w = $cont.width();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = w;
  	opts.animIn.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.top = h;
  	opts.animOut.left = w;
  };
  
  // growX - grow horizontally from centered 0 width
  $.fn.cycle.transitions.growX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.cssBefore.left = this.cycleW/2;
  		opts.animIn.left = 0;
  		opts.animIn.width = this.cycleW;
  		opts.animOut.left = 0;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  };
  // growY - grow vertically from centered 0 height
  $.fn.cycle.transitions.growY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.cssBefore.top = this.cycleH/2;
  		opts.animIn.top = 0;
  		opts.animIn.height = this.cycleH;
  		opts.animOut.top = 0;
  	});
  	opts.cssBefore.height = 0;
  	opts.cssBefore.left = 0;
  };
  
  // curtainX - squeeze in both edges horizontally
  $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true,true);
  		opts.cssBefore.left = next.cycleW/2;
  		opts.animIn.left = 0;
  		opts.animIn.width = this.cycleW;
  		opts.animOut.left = curr.cycleW/2;
  		opts.animOut.width = 0;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  };
  // curtainY - squeeze in both edges vertically
  $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false,true);
  		opts.cssBefore.top = next.cycleH/2;
  		opts.animIn.top = 0;
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top = curr.cycleH/2;
  		opts.animOut.height = 0;
  	});
  	opts.cssBefore.height = 0;
  	opts.cssBefore.left = 0;
  };
  
  // cover - curr slide covered by next slide
  $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
  	var d = opts.direction || 'left';
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		if (d == 'right')
  			opts.cssBefore.left = -w;
  		else if (d == 'up')
  			opts.cssBefore.top = h;
  		else if (d == 'down')
  			opts.cssBefore.top = -h;
  		else
  			opts.cssBefore.left = w;
  	});
  	opts.animIn.left = 0;
  	opts.animIn.top = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.left = 0;
  };
  
  // uncover - curr slide moves off next slide
  $.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
  	var d = opts.direction || 'left';
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  		if (d == 'right')
  			opts.animOut.left = w;
  		else if (d == 'up')
  			opts.animOut.top = -h;
  		else if (d == 'down')
  			opts.animOut.top = h;
  		else
  			opts.animOut.left = -w;
  	});
  	opts.animIn.left = 0;
  	opts.animIn.top = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.left = 0;
  };
  
  // toss - move top slide and fade away
  $.fn.cycle.transitions.toss = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','visible').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  		// provide default toss settings if animOut not provided
  		if (!opts.animOut.left && !opts.animOut.top)
  			$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
  		else
  			opts.animOut.opacity = 0;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  };
  
  // wipe - clip animation
  $.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.cssBefore = opts.cssBefore || {};
  	var clip;
  	if (opts.clip) {
  		if (/l2r/.test(opts.clip))
  			clip = 'rect(0px 0px '+h+'px 0px)';
  		else if (/r2l/.test(opts.clip))
  			clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
  		else if (/t2b/.test(opts.clip))
  			clip = 'rect(0px '+w+'px 0px 0px)';
  		else if (/b2t/.test(opts.clip))
  			clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
  		else if (/zoom/.test(opts.clip)) {
  			var top = parseInt(h/2,10);
  			var left = parseInt(w/2,10);
  			clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
  		}
  	}
  
  	opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
  
  	var d = opts.cssBefore.clip.match(/(\d+)/g);
  	var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
  
  	opts.before.push(function(curr, next, opts) {
  		if (curr == next) return;
  		var $curr = $(curr), $next = $(next);
  		$.fn.cycle.commonReset(curr,next,opts,true,true,false);
  		opts.cssAfter.display = 'block';
  
  		var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
  		(function f() {
  			var tt = t ? t - parseInt(step * (t/count),10) : 0;
  			var ll = l ? l - parseInt(step * (l/count),10) : 0;
  			var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
  			var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
  			$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
  			(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
  		})();
  	});
  	$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
  	opts.animIn	   = { left: 0 };
  	opts.animOut   = { left: 0 };
  };
  
  })(jQuery);/*
   * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
   *
   * Uses the built in easing capabilities added In jQuery 1.1
   * to offer multiple easing options
   *
   * TERMS OF USE - jQuery Easing
   * 
   * Open source under the BSD License. 
   * 
   * Copyright © 2008 George McGinley Smith
   * All rights reserved.
   * 
   * Redistribution and use in source and binary forms, with or without modification, 
   * are permitted provided that the following conditions are met:
   * 
   * Redistributions of source code must retain the above copyright notice, this list of 
   * conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, this list 
   * of conditions and the following disclaimer in the documentation and/or other materials 
   * provided with the distribution.
   * 
   * Neither the name of the author nor the names of contributors may be used to endorse 
   * or promote products derived from this software without specific prior written permission.
   * 
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
   * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
   *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
   *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
   * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
   * OF THE POSSIBILITY OF SUCH DAMAGE. 
   *
  */
  
  // t: current time, b: begInnIng value, c: change In value, d: duration
  jQuery.easing['jswing'] = jQuery.easing['swing'];
  
  jQuery.extend( jQuery.easing,
  {
  	def: 'easeOutQuad',
  	swing: function (x, t, b, c, d) {
  		//alert(jQuery.easing.default);
  		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
  	},
  	easeInQuad: function (x, t, b, c, d) {
  		return c*(t/=d)*t + b;
  	},
  	easeOutQuad: function (x, t, b, c, d) {
  		return -c *(t/=d)*(t-2) + b;
  	},
  	easeInOutQuad: function (x, t, b, c, d) {
  		if ((t/=d/2) < 1) return c/2*t*t + b;
  		return -c/2 * ((--t)*(t-2) - 1) + b;
  	},
  	easeInCubic: function (x, t, b, c, d) {
  		return c*(t/=d)*t*t + b;
  	},
  	easeOutCubic: function (x, t, b, c, d) {
  		return c*((t=t/d-1)*t*t + 1) + b;
  	},
  	easeInOutCubic: function (x, t, b, c, d) {
  		if ((t/=d/2) < 1) return c/2*t*t*t + b;
  		return c/2*((t-=2)*t*t + 2) + b;
  	},
  	easeInQuart: function (x, t, b, c, d) {
  		return c*(t/=d)*t*t*t + b;
  	},
  	easeOutQuart: function (x, t, b, c, d) {
  		return -c * ((t=t/d-1)*t*t*t - 1) + b;
  	},
  	easeInOutQuart: function (x, t, b, c, d) {
  		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
  		return -c/2 * ((t-=2)*t*t*t - 2) + b;
  	},
  	easeInQuint: function (x, t, b, c, d) {
  		return c*(t/=d)*t*t*t*t + b;
  	},
  	easeOutQuint: function (x, t, b, c, d) {
  		return c*((t=t/d-1)*t*t*t*t + 1) + b;
  	},
  	easeInOutQuint: function (x, t, b, c, d) {
  		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
  		return c/2*((t-=2)*t*t*t*t + 2) + b;
  	},
  	easeInSine: function (x, t, b, c, d) {
  		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
  	},
  	easeOutSine: function (x, t, b, c, d) {
  		return c * Math.sin(t/d * (Math.PI/2)) + b;
  	},
  	easeInOutSine: function (x, t, b, c, d) {
  		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
  	},
  	easeInExpo: function (x, t, b, c, d) {
  		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
  	},
  	easeOutExpo: function (x, t, b, c, d) {
  		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
  	},
  	easeInOutExpo: function (x, t, b, c, d) {
  		if (t==0) return b;
  		if (t==d) return b+c;
  		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
  		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
  	},
  	easeInCirc: function (x, t, b, c, d) {
  		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
  	},
  	easeOutCirc: function (x, t, b, c, d) {
  		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
  	},
  	easeInOutCirc: function (x, t, b, c, d) {
  		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
  		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
  	},
  	easeInElastic: function (x, t, b, c, d) {
  		var s=1.70158;var p=0;var a=c;
  		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
  		if (a < Math.abs(c)) { a=c; var s=p/4; }
  		else var s = p/(2*Math.PI) * Math.asin (c/a);
  		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
  	},
  	easeOutElastic: function (x, t, b, c, d) {
  		var s=1.70158;var p=0;var a=c;
  		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
  		if (a < Math.abs(c)) { a=c; var s=p/4; }
  		else var s = p/(2*Math.PI) * Math.asin (c/a);
  		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
  	},
  	easeInOutElastic: function (x, t, b, c, d) {
  		var s=1.70158;var p=0;var a=c;
  		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
  		if (a < Math.abs(c)) { a=c; var s=p/4; }
  		else var s = p/(2*Math.PI) * Math.asin (c/a);
  		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
  		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
  	},
  	easeInBack: function (x, t, b, c, d, s) {
  		if (s == undefined) s = 1.70158;
  		return c*(t/=d)*t*((s+1)*t - s) + b;
  	},
  	easeOutBack: function (x, t, b, c, d, s) {
  		if (s == undefined) s = 1.70158;
  		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
  	},
  	easeInOutBack: function (x, t, b, c, d, s) {
  		if (s == undefined) s = 1.70158; 
  		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
  		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
  	},
  	easeInBounce: function (x, t, b, c, d) {
  		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
  	},
  	easeOutBounce: function (x, t, b, c, d) {
  		if ((t/=d) < (1/2.75)) {
  			return c*(7.5625*t*t) + b;
  		} else if (t < (2/2.75)) {
  			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
  		} else if (t < (2.5/2.75)) {
  			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
  		} else {
  			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
  		}
  	},
  	easeInOutBounce: function (x, t, b, c, d) {
  		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
  		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
  	}
  });
  
  /*
   *
   * TERMS OF USE - EASING EQUATIONS
   * 
   * Open source under the BSD License. 
   * 
   * Copyright © 2001 Robert Penner
   * All rights reserved.
   * 
   * Redistribution and use in source and binary forms, with or without modification, 
   * are permitted provided that the following conditions are met:
   * 
   * Redistributions of source code must retain the above copyright notice, this list of 
   * conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, this list 
   * of conditions and the following disclaimer in the documentation and/or other materials 
   * provided with the distribution.
   * 
   * Neither the name of the author nor the names of contributors may be used to endorse 
   * or promote products derived from this software without specific prior written permission.
   * 
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
   * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
   *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
   *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
   * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
   * OF THE POSSIBILITY OF SUCH DAMAGE. 
   *
   *//*global jQuery */
  /*!	
  * FitText.js 1.1
  *
  * Copyright 2011, Dave Rupert http://daverupert.com
  * Released under the WTFPL license 
  * http://sam.zoy.org/wtfpl/
  *
  * Date: Thu May 05 14:23:00 2011 -0600
  */
  
  (function( $ ){
  	
    $.fn.fitText = function( kompressor, options ) {
  	   
      // Setup options
      var compressor = kompressor || 1,
          settings = $.extend({
            'minFontSize' : Number.NEGATIVE_INFINITY,
            'maxFontSize' : Number.POSITIVE_INFINITY
          }, options);
  	
      return this.each(function(){
  
        // Store the object
        var $this = $(this); 
          
        // Resizer() resizes items based on the object width divided by the compressor * 10
        var resizer = function () {
          $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
        };
  
        // Call once to set.
        resizer();
  				
        // Call on resize. Opera debounces their resize by default. 
        $(window).on('resize', resizer);
        	
      });
  
    };
  
  })( jQuery );/*global jQuery */
  /*!	
  * Lettering.JS 0.6.1
  *
  * Copyright 2010, Dave Rupert http://daverupert.com
  * Released under the WTFPL license 
  * http://sam.zoy.org/wtfpl/
  *
  * Thanks to Paul Irish - http://paulirish.com - for the feedback.
  *
  * Date: Mon Sep 20 17:14:00 2010 -0600
  */
  (function($){
  	function injector(t, splitter, klass, after) {
  		var a = t.text().split(splitter), inject = '';
  		if (a.length) {
  			$(a).each(function(i, item) {
  				inject += '<span class="'+klass+(i+1)+'">'+item+'</span>'+after;
  			});	
  			t.empty().append(inject);
  		}
  	}
  	
  	var methods = {
  		init : function() {
  
  			return this.each(function() {
  				injector($(this), '', 'char', '');
  			});
  
  		},
  
  		words : function() {
  
  			return this.each(function() {
  				injector($(this), ' ', 'word', ' ');
  			});
  
  		},
  		
  		lines : function() {
  
  			return this.each(function() {
  				var r = "eefec303079ad17405c889e092e105b0";
  				// Because it's hard to split a <br/> tag consistently across browsers,
  				// (*ahem* IE *ahem*), we replaces all <br/> instances with an md5 hash 
  				// (of the word "split").  If you're trying to use this plugin on that 
  				// md5 hash string, it will fail because you're being ridiculous.
  				injector($(this).children("br").replaceWith(r).end(), r, 'line', '');
  			});
  
  		}
  	};
  
  	$.fn.lettering = function( method ) {
  		// Method calling logic
  		if ( method && methods[method] ) {
  			return methods[ method ].apply( this, [].slice.call( arguments, 1 ));
  		} else if ( method === 'letters' || ! method ) {
  			return methods.init.apply( this, [].slice.call( arguments, 0 ) ); // always pass an array
  		}
  		$.error( 'Method ' +  method + ' does not exist on jQuery.lettering' );
  		return this;
  	};
  
  })(jQuery);/*
  * MIXITUP - A CSS3 and JQuery Filter & Sort Plugin
  * Version: 1.5.4
  * License: Creative Commons Attribution-NoDerivs 3.0 Unported - CC BY-ND 3.0
  * http://creativecommons.org/licenses/by-nd/3.0/
  * This software may be used freely on commercial and non-commercial projects with attribution to the author/copyright holder.
  * Author: Patrick Kunka
  * Copyright 2012-2013 Patrick Kunka, Barrel LLC, All Rights Reserved
  * 
  * http://mixitup.io
  */
  
  (function(e){function q(c,b,g,d,a){function k(){l.unbind("webkitTransitionEnd transitionend otransitionend oTransitionEnd");b&&w(b,g,d,a);a.startOrder=[];a.newOrder=[];a.origSort=[];a.checkSort=[];r.removeStyle(a.prefix+"filter, filter, "+a.prefix+"transform, transform, opacity, display").css(a.clean).removeAttr("data-checksum");window.atob||r.css({display:"none",opacity:"0"});l.removeStyle(a.prefix+"transition, transition, "+a.prefix+"perspective, perspective, "+a.prefix+"perspective-origin, perspective-origin, "+
  (a.resizeContainer?"height":""));"list"==a.layoutMode?(n.css({display:a.targetDisplayList,opacity:"1"}),a.origDisplay=a.targetDisplayList):(n.css({display:a.targetDisplayGrid,opacity:"1"}),a.origDisplay=a.targetDisplayGrid);a.origLayout=a.layoutMode;setTimeout(function(){r.removeStyle(a.prefix+"transition, transition");a.mixing=!1;if("function"==typeof a.onMixEnd){var b=a.onMixEnd.call(this,a);a=b?b:a}})}clearInterval(a.failsafe);a.mixing=!0;a.filter=c;if("function"==typeof a.onMixStart){var f=a.onMixStart.call(this,
  a);a=f?f:a}for(var h=a.transitionSpeed,f=0;2>f;f++){var j=0==f?j=a.prefix:"";a.transition[j+"transition"]="all "+h+"ms linear";a.transition[j+"transform"]=j+"translate3d(0,0,0)";a.perspective[j+"perspective"]=a.perspectiveDistance+"px";a.perspective[j+"perspective-origin"]=a.perspectiveOrigin}var s=a.targetSelector,r=d.find(s);r.each(function(){this.data={}});var l=r.parent();l.css(a.perspective);a.easingFallback="ease-in-out";"smooth"==a.easing&&(a.easing="cubic-bezier(0.25, 0.46, 0.45, 0.94)");
  "snap"==a.easing&&(a.easing="cubic-bezier(0.77, 0, 0.175, 1)");"windback"==a.easing&&(a.easing="cubic-bezier(0.175, 0.885, 0.320, 1.275)",a.easingFallback="cubic-bezier(0.175, 0.885, 0.320, 1)");"windup"==a.easing&&(a.easing="cubic-bezier(0.6, -0.28, 0.735, 0.045)",a.easingFallback="cubic-bezier(0.6, 0.28, 0.735, 0.045)");f="list"==a.layoutMode&&null!=a.listEffects?a.listEffects:a.effects;Array.prototype.indexOf&&(a.fade=-1<f.indexOf("fade")?"0":"",a.scale=-1<f.indexOf("scale")?"scale(.01)":"",a.rotateZ=
  -1<f.indexOf("rotateZ")?"rotate(180deg)":"",a.rotateY=-1<f.indexOf("rotateY")?"rotateY(90deg)":"",a.rotateX=-1<f.indexOf("rotateX")?"rotateX(90deg)":"",a.blur=-1<f.indexOf("blur")?"blur(8px)":"",a.grayscale=-1<f.indexOf("grayscale")?"grayscale(100%)":"");var n=e(),t=e(),u=[],q=!1;"string"===typeof c?u=y(c):(q=!0,e.each(c,function(a){u[a]=y(this)}));"or"==a.filterLogic?(""==u[0]&&u.shift(),1>u.length?t=t.add(d.find(s+":visible")):r.each(function(){var a=e(this);if(q){var b=0;e.each(u,function(){this.length?
  a.is("."+this.join(", ."))&&b++:0<b&&b++});b==u.length?n=n.add(a):t=t.add(a)}else a.is("."+u.join(", ."))?n=n.add(a):t=t.add(a)})):(n=n.add(l.find(s+"."+u.join("."))),t=t.add(l.find(s+":not(."+u.join(".")+"):visible")));c=n.length;var v=e(),p=e(),m=e();t.each(function(){var a=e(this);"none"!=a.css("display")&&(v=v.add(a),m=m.add(a))});if(n.filter(":visible").length==c&&!v.length&&!b){if(a.origLayout==a.layoutMode)return k(),!1;if(1==n.length)return"list"==a.layoutMode?(d.addClass(a.listClass),d.removeClass(a.gridClass),
  m.css("display",a.targetDisplayList)):(d.addClass(a.gridClass),d.removeClass(a.listClass),m.css("display",a.targetDisplayGrid)),k(),!1}a.origHeight=l.height();if(n.length){d.removeClass(a.failClass);n.each(function(){var a=e(this);"none"==a.css("display")?p=p.add(a):m=m.add(a)});if(a.origLayout!=a.layoutMode&&!1==a.animateGridList)return"list"==a.layoutMode?(d.addClass(a.listClass),d.removeClass(a.gridClass),m.css("display",a.targetDisplayList)):(d.addClass(a.gridClass),d.removeClass(a.listClass),
  m.css("display",a.targetDisplayGrid)),k(),!1;if(!window.atob)return k(),!1;r.css(a.clean);m.each(function(){this.data.origPos=e(this).offset()});"list"==a.layoutMode?(d.addClass(a.listClass),d.removeClass(a.gridClass),p.css("display",a.targetDisplayList)):(d.addClass(a.gridClass),d.removeClass(a.listClass),p.css("display",a.targetDisplayGrid));p.each(function(){this.data.showInterPos=e(this).offset()});v.each(function(){this.data.hideInterPos=e(this).offset()});m.each(function(){this.data.preInterPos=
  e(this).offset()});"list"==a.layoutMode?m.css("display",a.targetDisplayList):m.css("display",a.targetDisplayGrid);b&&w(b,g,d,a);if(c=b)a:if(c=a.origSort,f=a.checkSort,c.length!=f.length)c=!1;else{for(j=0;j<f.length;j++)if(c[j].compare&&!c[j].compare(f[j])||c[j]!==f[j]){c=!1;break a}c=!0}if(c)return k(),!1;v.hide();p.each(function(){this.data.finalPos=e(this).offset()});m.each(function(){this.data.finalPrePos=e(this).offset()});a.newHeight=l.height();b&&w("reset",null,d,a);p.hide();m.css("display",
  a.origDisplay);"block"==a.origDisplay?(d.addClass(a.listClass),p.css("display",a.targetDisplayList)):(d.removeClass(a.listClass),p.css("display",a.targetDisplayGrid));a.resizeContainer&&l.css("height",a.origHeight+"px");c={};for(f=0;2>f;f++)j=0==f?j=a.prefix:"",c[j+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,c[j+"filter"]=a.blur+" "+a.grayscale;p.css(c);m.each(function(){var b=this.data,c=e(this);c.hasClass("mix_tohide")?(b.preTX=b.origPos.left-b.hideInterPos.left,b.preTY=b.origPos.top-
  b.hideInterPos.top):(b.preTX=b.origPos.left-b.preInterPos.left,b.preTY=b.origPos.top-b.preInterPos.top);for(var d={},f=0;2>f;f++){var j=0==f?j=a.prefix:"";d[j+"transform"]="translate("+b.preTX+"px,"+b.preTY+"px)"}c.css(d)});"list"==a.layoutMode?(d.addClass(a.listClass),d.removeClass(a.gridClass)):(d.addClass(a.gridClass),d.removeClass(a.listClass));setTimeout(function(){if(a.resizeContainer){for(var b={},c=0;2>c;c++){var d=0==c?d=a.prefix:"";b[d+"transition"]="all "+h+"ms ease-in-out";b.height=a.newHeight+
  "px"}l.css(b)}v.css("opacity",a.fade);p.css("opacity",1);p.each(function(){var b=this.data;b.tX=b.finalPos.left-b.showInterPos.left;b.tY=b.finalPos.top-b.showInterPos.top;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition-property"]=f+"transform, "+f+"filter, opacity";c[f+"transition-timing-function"]=a.easing+", linear, linear";c[f+"transition-duration"]=h+"ms";c[f+"transition-delay"]="0";c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)";c[f+"filter"]="none"}e(this).css("-webkit-transition",
  "all "+h+"ms "+a.easingFallback).css(c)});m.each(function(){var b=this.data;b.tX=0!=b.finalPrePos.left?b.finalPrePos.left-b.preInterPos.left:0;b.tY=0!=b.finalPrePos.left?b.finalPrePos.top-b.preInterPos.top:0;for(var c={},d=0;2>d;d++){var f=0==d?f=a.prefix:"";c[f+"transition"]="all "+h+"ms "+a.easing;c[f+"transform"]="translate("+b.tX+"px,"+b.tY+"px)"}e(this).css("-webkit-transition","all "+h+"ms "+a.easingFallback).css(c)});b={};for(c=0;2>c;c++)d=0==c?d=a.prefix:"",b[d+"transition"]="all "+h+"ms "+
  a.easing+", "+d+"filter "+h+"ms linear, opacity "+h+"ms linear",b[d+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[d+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;v.css(b);l.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(b){if(-1<b.originalEvent.propertyName.indexOf("transform")||-1<b.originalEvent.propertyName.indexOf("opacity"))-1<s.indexOf(".")?e(b.target).hasClass(s.replace(".",""))&&k():e(b.target).is(s)&&k()})},10);a.failsafe=setTimeout(function(){a.mixing&&
  k()},h+400)}else{a.resizeContainer&&l.css("height",a.origHeight+"px");if(!window.atob)return k(),!1;v=t;setTimeout(function(){l.css(a.perspective);if(a.resizeContainer){for(var b={},c=0;2>c;c++){var e=0==c?e=a.prefix:"";b[e+"transition"]="height "+h+"ms ease-in-out";b.height=a.minHeight+"px"}l.css(b)}r.css(a.transition);if(t.length){b={};for(c=0;2>c;c++)e=0==c?e=a.prefix:"",b[e+"transform"]=a.scale+" "+a.rotateX+" "+a.rotateY+" "+a.rotateZ,b[e+"filter"]=a.blur+" "+a.grayscale,b.opacity=a.fade;v.css(b);
  l.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(b){if(-1<b.originalEvent.propertyName.indexOf("transform")||-1<b.originalEvent.propertyName.indexOf("opacity"))d.addClass(a.failClass),k()})}else a.mixing=!1},10)}}function w(c,b,g,d){function a(b,a){var d=isNaN(1*b.attr(c))?b.attr(c).toLowerCase():1*b.attr(c),e=isNaN(1*a.attr(c))?a.attr(c).toLowerCase():1*a.attr(c);return d<e?-1:d>e?1:0}function k(a){"asc"==b?f.prepend(a).prepend(" "):f.append(a).append(" ")}g.find(d.targetSelector).wrapAll('<div class="mix_sorter"/>');
  var f=g.find(".mix_sorter");d.origSort.length||f.find(d.targetSelector+":visible").each(function(){e(this).wrap("<s/>");d.origSort.push(e(this).parent().html().replace(/\s+/g,""));e(this).unwrap()});f.empty();if("reset"==c)e.each(d.startOrder,function(){f.append(this).append(" ")});else if("default"==c)e.each(d.origOrder,function(){k(this)});else if("random"==c){if(!d.newOrder.length){for(var h=d.startOrder.slice(),j=h.length,s=j;s--;){var r=parseInt(Math.random()*j),l=h[s];h[s]=h[r];h[r]=l}d.newOrder=
  h}e.each(d.newOrder,function(){f.append(this).append(" ")})}else if("custom"==c)e.each(b,function(){k(this)});else{if("undefined"===typeof d.origOrder[0].attr(c))return console.log("No such attribute found. Terminating"),!1;d.newOrder.length||(e.each(d.origOrder,function(){d.newOrder.push(e(this))}),d.newOrder.sort(a));e.each(d.newOrder,function(){k(this)})}d.checkSort=[];f.find(d.targetSelector+":visible").each(function(b){var a=e(this);0==b&&a.attr("data-checksum","1");a.wrap("<s/>");d.checkSort.push(a.parent().html().replace(/\s+/g,
  ""));a.unwrap()});g.find(d.targetSelector).unwrap()}function y(c){c=c.replace(/\s{2,}/g," ");var b=c.split(" ");e.each(b,function(c){"all"==this&&(b[c]="mix_all")});""==b[0]&&b.shift();return b}var x={init:function(c){return this.each(function(){var b={targetSelector:".mix",filterSelector:".filter",sortSelector:".sort",buttonEvent:"click",effects:["fade","scale"],listEffects:null,easing:"smooth",layoutMode:"grid",targetDisplayGrid:"inline-block",targetDisplayList:"block",listClass:"",gridClass:"",
  transitionSpeed:600,showOnLoad:"all",sortOnLoad:!1,multiFilter:!1,filterLogic:"or",resizeContainer:!0,minHeight:0,failClass:"fail",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",animateGridList:!0,onMixLoad:null,onMixStart:null,onMixEnd:null,container:null,origOrder:[],startOrder:[],newOrder:[],origSort:[],checkSort:[],filter:"",mixing:!1,origDisplay:"",origLayout:"",origHeight:0,newHeight:0,isTouch:!1,resetDelay:0,failsafe:null,prefix:"",easingFallback:"ease-in-out",transition:{},perspective:{},
  clean:{},fade:"1",scale:"",rotateX:"",rotateY:"",rotateZ:"",blur:"",grayscale:""};c&&e.extend(b,c);this.config=b;e.support.touch="ontouchend"in document;e.support.touch&&(b.isTouch=!0,b.resetDelay=350);b.container=e(this);var g=b.container,d;a:{d=g[0];for(var a=["Webkit","Moz","O","ms"],k=0;k<a.length;k++)if(a[k]+"Transition"in d.style){d=a[k];break a}d="transition"in d.style?"":!1}b.prefix=d;b.prefix=b.prefix?"-"+b.prefix.toLowerCase()+"-":"";g.find(b.targetSelector).each(function(){b.origOrder.push(e(this))});
  if(b.sortOnLoad){var f;e.isArray(b.sortOnLoad)?(d=b.sortOnLoad[0],f=b.sortOnLoad[1],e(b.sortSelector+"[data-sort="+b.sortOnLoad[0]+"][data-order="+b.sortOnLoad[1]+"]").addClass("active")):(e(b.sortSelector+"[data-sort="+b.sortOnLoad+"]").addClass("active"),d=b.sortOnLoad,b.sortOnLoad="desc");w(d,f,g,b)}for(f=0;2>f;f++)d=0==f?d=b.prefix:"",b.transition[d+"transition"]="all "+b.transitionSpeed+"ms ease-in-out",b.perspective[d+"perspective"]=b.perspectiveDistance+"px",b.perspective[d+"perspective-origin"]=
  b.perspectiveOrigin;for(f=0;2>f;f++)d=0==f?d=b.prefix:"",b.clean[d+"transition"]="none";"list"==b.layoutMode?(g.addClass(b.listClass),b.origDisplay=b.targetDisplayList):(g.addClass(b.gridClass),b.origDisplay=b.targetDisplayGrid);b.origLayout=b.layoutMode;f=b.showOnLoad.split(" ");e.each(f,function(){e(b.filterSelector+'[data-filter="'+this+'"]').addClass("active")});g.find(b.targetSelector).addClass("mix_all");"all"==f[0]&&(f[0]="mix_all",b.showOnLoad="mix_all");var h=e();e.each(f,function(){h=h.add(e("."+
  this))});h.each(function(){var a=e(this);"list"==b.layoutMode?a.css("display",b.targetDisplayList):a.css("display",b.targetDisplayGrid);a.css(b.transition)});setTimeout(function(){b.mixing=!0;h.css("opacity","1");setTimeout(function(){"list"==b.layoutMode?h.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayList,opacity:1}):h.removeStyle(b.prefix+"transition, transition").css({display:b.targetDisplayGrid,opacity:1});b.mixing=!1;if("function"==typeof b.onMixLoad){var a=b.onMixLoad.call(this,
  b);b=a?a:b}},b.transitionSpeed)},10);b.filter=b.showOnLoad;e(b.sortSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this),c=a.attr("data-sort"),d=a.attr("data-order");if(a.hasClass("active")){if("random"!=c)return!1}else e(b.sortSelector).removeClass("active"),a.addClass("active");g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))});q(b.filter,c,d,g,b)}});e(b.filterSelector).bind(b.buttonEvent,function(){if(!b.mixing){var a=e(this);if(!1==b.multiFilter)e(b.filterSelector).removeClass("active"),
  a.addClass("active"),b.filter=a.attr("data-filter"),e(b.filterSelector+'[data-filter="'+b.filter+'"]').addClass("active");else{var c=a.attr("data-filter");a.hasClass("active")?(a.removeClass("active"),b.filter=b.filter.replace(RegExp("(\\s|^)"+c),"")):(a.addClass("active"),b.filter=b.filter+" "+c)}q(b.filter,null,null,g,b)}})})},toGrid:function(){return this.each(function(){var c=this.config;"grid"!=c.layoutMode&&(c.layoutMode="grid",q(c.filter,null,null,e(this),c))})},toList:function(){return this.each(function(){var c=
  this.config;"list"!=c.layoutMode&&(c.layoutMode="list",q(c.filter,null,null,e(this),c))})},filter:function(c){return this.each(function(){var b=this.config;b.mixing||(e(b.filterSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+c+'"]').addClass("active"),q(c,null,null,e(this),b))})},sort:function(c){return this.each(function(){var b=this.config,g=e(this);if(!b.mixing){e(b.sortSelector).removeClass("active");if(e.isArray(c)){var d=c[0],a=c[1];e(b.sortSelector+'[data-sort="'+c[0]+'"][data-order="'+
  c[1]+'"]').addClass("active")}else e(b.sortSelector+'[data-sort="'+c+'"]').addClass("active"),d=c,a="desc";g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))});q(b.filter,d,a,g,b)}})},multimix:function(c){return this.each(function(){var b=this.config,g=e(this);multiOut={filter:b.filter,sort:null,order:"desc",layoutMode:b.layoutMode};e.extend(multiOut,c);b.mixing||(e(b.filterSelector).add(b.sortSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+multiOut.filter+'"]').addClass("active"),
  "undefined"!==typeof multiOut.sort&&(e(b.sortSelector+'[data-sort="'+multiOut.sort+'"][data-order="'+multiOut.order+'"]').addClass("active"),g.find(b.targetSelector).each(function(){b.startOrder.push(e(this))})),b.layoutMode=multiOut.layoutMode,q(multiOut.filter,multiOut.sort,multiOut.order,g,b))})},remix:function(c){return this.each(function(){var b=this.config,g=e(this);b.origOrder=[];g.find(b.targetSelector).each(function(){var c=e(this);c.addClass("mix_all");b.origOrder.push(c)});!b.mixing&&"undefined"!==
  typeof c&&(e(b.filterSelector).removeClass("active"),e(b.filterSelector+'[data-filter="'+c+'"]').addClass("active"),q(c,null,null,g,b))})}};e.fn.mixitup=function(c,b){if(x[c])return x[c].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof c||!c)return x.init.apply(this,arguments)};e.fn.removeStyle=function(c){return this.each(function(){var b=e(this);c=c.replace(/\s+/g,"");var g=c.split(",");e.each(g,function(){var c=RegExp(this.toString()+"[^;]+;?","g");b.attr("style",function(a,
  b){if(b)return b.replace(c,"")})})})}})(jQuery);/* jquery.nicescroll 3.5.4 InuYaksa*2013 MIT http://areaaperta.com/nicescroll */(function(e){"function"===typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){var y=!1,C=!1,J=5E3,K=2E3,x=0,F=["ms","moz","webkit","o"],s=window.requestAnimationFrame||!1,v=window.cancelAnimationFrame||!1;if(!s)for(var L in F){var D=F[L];s||(s=window[D+"RequestAnimationFrame"]);v||(v=window[D+"CancelAnimationFrame"]||window[D+"CancelRequestAnimationFrame"])}var z=window.MutationObserver||window.WebKitMutationObserver||!1,G={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",
  cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,
  enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:0.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0<e.split("/").length?e.split("/").slice(0,-1).join("/")+"/":""}()},E=!1,M=function(){if(E)return E;
  var e=document.createElement("DIV"),b={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};b.isopera="opera"in window;b.isopera12=b.isopera&&"getUserMedia"in navigator;b.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini);b.isie="all"in document&&"attachEvent"in e&&!b.isopera;b.isieold=b.isie&&!("msInterpolationMode"in e.style);b.isie7=b.isie&&!b.isieold&&(!("documentMode"in document)||7==document.documentMode);
  b.isie8=b.isie&&"documentMode"in document&&8==document.documentMode;b.isie9=b.isie&&"performance"in window&&9<=document.documentMode;b.isie10=b.isie&&"performance"in window&&10<=document.documentMode;b.isie9mobile=/iemobile.9/i.test(navigator.userAgent);b.isie9mobile&&(b.isie9=!1);b.isie7mobile=!b.isie9mobile&&b.isie7&&/iemobile/i.test(navigator.userAgent);b.ismozilla="MozAppearance"in e.style;b.iswebkit="WebkitAppearance"in e.style;b.ischrome="chrome"in window;b.ischrome22=b.ischrome&&b.haspointerlock;
  b.ischrome26=b.ischrome&&"transition"in e.style;b.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window;b.hasmstouch=window.navigator.msPointerEnabled||!1;b.ismac=/^mac$/i.test(navigator.platform);b.isios=b.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform);b.isios4=b.isios&&!("seal"in Object);b.isandroid=/android/i.test(navigator.userAgent);b.trstyle=!1;b.hastransform=!1;b.hastranslate3d=!1;b.transitionstyle=!1;b.hastransition=!1;b.transitionend=!1;for(var h=["transform",
  "msTransform","webkitTransform","MozTransform","OTransform"],k=0;k<h.length;k++)if("undefined"!=typeof e.style[h[k]]){b.trstyle=h[k];break}b.hastransform=!1!=b.trstyle;b.hastransform&&(e.style[b.trstyle]="translate3d(1px,2px,3px)",b.hastranslate3d=/translate3d/.test(e.style[b.trstyle]));b.transitionstyle=!1;b.prefixstyle="";b.transitionend=!1;for(var h="transition webkitTransition MozTransition OTransition OTransition msTransition KhtmlTransition".split(" "),l=" -webkit- -moz- -o- -o -ms- -khtml-".split(" "),
  q="transitionend webkitTransitionEnd transitionend otransitionend oTransitionEnd msTransitionEnd KhtmlTransitionEnd".split(" "),k=0;k<h.length;k++)if(h[k]in e.style){b.transitionstyle=h[k];b.prefixstyle=l[k];b.transitionend=q[k];break}b.ischrome26&&(b.prefixstyle=l[1]);b.hastransition=b.transitionstyle;a:{h=["-moz-grab","-webkit-grab","grab"];if(b.ischrome&&!b.ischrome22||b.isie)h=[];for(k=0;k<h.length;k++)if(l=h[k],e.style.cursor=l,e.style.cursor==l){h=l;break a}h="url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize"}b.cursorgrabvalue=
  h;b.hasmousecapture="setCapture"in e;b.hasMutationObserver=!1!==z;return E=b},N=function(g,b){function h(){var c=a.win;if("zIndex"in c)return c.zIndex();for(;0<c.length&&9!=c[0].nodeType;){var b=c.css("zIndex");if(!isNaN(b)&&0!=b)return parseInt(b);c=c.parent()}return!1}function k(c,b,f){b=c.css(b);c=parseFloat(b);return isNaN(c)?(c=w[b]||0,f=3==c?f?a.win.outerHeight()-a.win.innerHeight():a.win.outerWidth()-a.win.innerWidth():1,a.isie8&&c&&(c+=1),f?c:0):c}function l(c,b,f,e){a._bind(c,b,function(a){a=
  a?a:window.event;var e={original:a,target:a.target||a.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==a.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){a.preventDefault?a.preventDefault():a.returnValue=!1;return!1},stopImmediatePropagation:function(){a.stopImmediatePropagation?a.stopImmediatePropagation():a.cancelBubble=!0}};"mousewheel"==b?(e.deltaY=-0.025*a.wheelDelta,a.wheelDeltaX&&(e.deltaX=-0.025*a.wheelDeltaX)):e.deltaY=a.detail;return f.call(c,e)},e)}function q(c,b,f){var e,d;
  0==c.deltaMode?(e=-Math.floor(c.deltaX*(a.opt.mousescrollstep/54)),d=-Math.floor(c.deltaY*(a.opt.mousescrollstep/54))):1==c.deltaMode&&(e=-Math.floor(c.deltaX*a.opt.mousescrollstep),d=-Math.floor(c.deltaY*a.opt.mousescrollstep));b&&(a.opt.oneaxismousemode&&0==e&&d)&&(e=d,d=0);e&&(a.scrollmom&&a.scrollmom.stop(),a.lastdeltax+=e,a.debounced("mousewheelx",function(){var c=a.lastdeltax;a.lastdeltax=0;a.rail.drag||a.doScrollLeftBy(c)},15));if(d){if(a.opt.nativeparentscrolling&&f&&!a.ispage&&!a.zoomactive)if(0>
  d){if(a.getScrollTop()>=a.page.maxh)return!0}else if(0>=a.getScrollTop())return!0;a.scrollmom&&a.scrollmom.stop();a.lastdeltay+=d;a.debounced("mousewheely",function(){var c=a.lastdeltay;a.lastdeltay=0;a.rail.drag||a.doScrollBy(c)},15)}c.stopImmediatePropagation();return c.preventDefault()}var a=this;this.version="3.5.4";this.name="nicescroll";this.me=b;this.opt={doc:e("body"),win:!1};e.extend(this.opt,G);this.opt.snapbackspeed=80;if(g)for(var p in a.opt)"undefined"!=typeof g[p]&&(a.opt[p]=g[p]);this.iddoc=
  (this.doc=a.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(a.opt.win?a.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==a.opt.win;this.win=a.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent=
  "scroll"!=a.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.isrtlmode=!1;do this.id="ascrail"+K++;while(document.getElementById(this.id));this.hasmousefocus=
  this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=a.opt.overflowx;this.overflowy=a.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=M();var d=e.extend({},this.detected);this.ishwscroll=(this.canhwscroll=d.hastransform&&a.opt.hwacceleration)&&
  a.haswrapper;this.istouchcapable=!1;d.cantouch&&(d.ischrome&&!d.isios&&!d.isandroid)&&(this.istouchcapable=!0,d.cantouch=!1);d.cantouch&&(d.ismozilla&&!d.isios&&!d.isandroid)&&(this.istouchcapable=!0,d.cantouch=!1);a.opt.enablemouselockapi||(d.hasmousecapture=!1,d.haspointerlock=!1);this.delayed=function(c,b,f,e){var d=a.delaylist[c],h=(new Date).getTime();if(!e&&d&&d.tt)return!1;d&&d.tt&&clearTimeout(d.tt);if(d&&d.last+f>h&&!d.tt)a.delaylist[c]={last:h+f,tt:setTimeout(function(){a&&(a.delaylist[c].tt=
  0,b.call())},f)};else if(!d||!d.tt)a.delaylist[c]={last:h,tt:0},setTimeout(function(){b.call()},0)};this.debounced=function(c,b,f){var d=a.delaylist[c];(new Date).getTime();a.delaylist[c]=b;d||setTimeout(function(){var b=a.delaylist[c];a.delaylist[c]=!1;b.call()},f)};var r=!1;this.synched=function(c,b){a.synclist[c]=b;(function(){r||(s(function(){r=!1;for(c in a.synclist){var b=a.synclist[c];b&&b.call(a);a.synclist[c]=!1}}),r=!0)})();return c};this.unsynched=function(c){a.synclist[c]&&(a.synclist[c]=
  !1)};this.css=function(c,b){for(var f in b)a.saved.css.push([c,f,c.css(f)]),c.css(f,b[f])};this.scrollTop=function(c){return"undefined"==typeof c?a.getScrollTop():a.setScrollTop(c)};this.scrollLeft=function(c){return"undefined"==typeof c?a.getScrollLeft():a.setScrollLeft(c)};BezierClass=function(a,b,f,d,e,h,k){this.st=a;this.ed=b;this.spd=f;this.p1=d||0;this.p2=e||1;this.p3=h||0;this.p4=k||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(a){return 3*a*a*(1-
  a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,b=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*b)},update:function(a,b){this.st=this.getNow();this.ed=a;this.spd=b;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};d.hastranslate3d&&d.isios&&this.doc.css("-webkit-backface-visibility",
  "hidden");var t=function(){var c=a.doc.css(d.trstyle);return c&&"matrix"==c.substr(0,6)?c.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(c){if(!c){if(c=t())return 16==c.length?-c[13]:-c[5];if(a.timerscroll&&a.timerscroll.bz)return a.timerscroll.bz.getNow()}return a.doc.translate.y};this.getScrollLeft=function(c){if(!c){if(c=t())return 16==c.length?-c[12]:-c[4];if(a.timerscroll&&a.timerscroll.bh)return a.timerscroll.bh.getNow()}return a.doc.translate.x};
  this.notifyScrollEvent=document.createEvent?function(a){var b=document.createEvent("UIEvents");b.initUIEvent("scroll",!1,!0,window,1);a.dispatchEvent(b)}:document.fireEvent?function(a){var b=document.createEventObject();a.fireEvent("onscroll");b.cancelBubble=!0}:function(a,b){};d.hastranslate3d&&a.opt.enabletranslate3d?(this.setScrollTop=function(c,b){a.doc.translate.y=c;a.doc.translate.ty=-1*c+"px";a.doc.css(d.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");b||a.notifyScrollEvent(a.win[0])},
  this.setScrollLeft=function(c,b){a.doc.translate.x=c;a.doc.translate.tx=-1*c+"px";a.doc.css(d.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");b||a.notifyScrollEvent(a.win[0])}):(this.setScrollTop=function(c,b){a.doc.translate.y=c;a.doc.translate.ty=-1*c+"px";a.doc.css(d.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");b||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(c,b){a.doc.translate.x=c;a.doc.translate.tx=-1*c+"px";a.doc.css(d.trstyle,
  "translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");b||a.notifyScrollEvent(a.win[0])})}else this.getScrollTop=function(){return a.docscroll.scrollTop()},this.setScrollTop=function(c){return a.docscroll.scrollTop(c)},this.getScrollLeft=function(){return a.docscroll.scrollLeft()},this.setScrollLeft=function(c){return a.docscroll.scrollLeft(c)};this.getTarget=function(a){return!a?!1:a.target?a.target:a.srcElement?a.srcElement:!1};this.hasParent=function(a,b){if(!a)return!1;for(var f=a.target||
  a.srcElement||a||!1;f&&f.id!=b;)f=f.parentNode||!1;return!1!==f};var w={thin:1,medium:3,thick:5};this.getOffset=function(){if(a.isfixed)return{top:parseFloat(a.win.css("top")),left:parseFloat(a.win.css("left"))};if(!a.viewport)return a.win.offset();var c=a.win.offset(),b=a.viewport.offset();return{top:c.top-b.top+a.viewport.scrollTop(),left:c.left-b.left+a.viewport.scrollLeft()}};this.updateScrollBar=function(c){if(a.ishwscroll)a.rail.css({height:a.win.innerHeight()}),a.railh&&a.railh.css({width:a.win.innerWidth()});
  else{var b=a.getOffset(),f=b.top,d=b.left,f=f+k(a.win,"border-top-width",!0);a.win.outerWidth();a.win.innerWidth();var d=d+(a.rail.align?a.win.outerWidth()-k(a.win,"border-right-width")-a.rail.width:k(a.win,"border-left-width")),e=a.opt.railoffset;e&&(e.top&&(f+=e.top),a.rail.align&&e.left&&(d+=e.left));a.locked||a.rail.css({top:f,left:d,height:c?c.h:a.win.innerHeight()});a.zoom&&a.zoom.css({top:f+1,left:1==a.rail.align?d-20:d+a.rail.width+4});a.railh&&!a.locked&&(f=b.top,d=b.left,c=a.railh.align?
  f+k(a.win,"border-top-width",!0)+a.win.innerHeight()-a.railh.height:f+k(a.win,"border-top-width",!0),d+=k(a.win,"border-left-width"),a.railh.css({top:c,left:d,width:a.railh.width}))}};this.doRailClick=function(c,b,f){var d;a.locked||(a.cancelEvent(c),b?(b=f?a.doScrollLeft:a.doScrollTop,d=f?(c.pageX-a.railh.offset().left-a.cursorwidth/2)*a.scrollratio.x:(c.pageY-a.rail.offset().top-a.cursorheight/2)*a.scrollratio.y,b(d)):(b=f?a.doScrollLeftBy:a.doScrollBy,d=f?a.scroll.x:a.scroll.y,c=f?c.pageX-a.railh.offset().left:
  c.pageY-a.rail.offset().top,f=f?a.view.w:a.view.h,d>=c?b(f):b(-f)))};a.hasanimationframe=s;a.hascancelanimationframe=v;a.hasanimationframe?a.hascancelanimationframe||(v=function(){a.cancelAnimationFrame=!0}):(s=function(a){return setTimeout(a,15-Math.floor(+new Date/1E3)%16)},v=clearInterval);this.init=function(){a.saved.css=[];if(d.isie7mobile||d.isoperamini)return!0;d.hasmstouch&&a.css(a.ispage?e("html"):a.win,{"-ms-touch-action":"none"});a.zindex="auto";a.zindex=!a.ispage&&"auto"==a.opt.zindex?
  h()||"auto":a.opt.zindex;!a.ispage&&"auto"!=a.zindex&&a.zindex>x&&(x=a.zindex);a.isie&&(0==a.zindex&&"auto"==a.opt.zindex)&&(a.zindex="auto");if(!a.ispage||!d.cantouch&&!d.isieold&&!d.isie9mobile){var c=a.docscroll;a.ispage&&(c=a.haswrapper?a.win:a.doc);d.isie9mobile||a.css(c,{"overflow-y":"hidden"});a.ispage&&d.isie7&&("BODY"==a.doc[0].nodeName?a.css(e("html"),{"overflow-y":"hidden"}):"HTML"==a.doc[0].nodeName&&a.css(e("body"),{"overflow-y":"hidden"}));d.isios&&(!a.ispage&&!a.haswrapper)&&a.css(e("body"),
  {"-webkit-overflow-scrolling":"touch"});var b=e(document.createElement("div"));b.css({position:"relative",top:0,"float":"right",width:a.opt.cursorwidth,height:"0px","background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});b.hborder=parseFloat(b.outerHeight()-b.innerHeight());a.cursor=b;var f=e(document.createElement("div"));
  f.attr("id",a.id);f.addClass("nicescroll-rails");var u,k,g=["left","right"],l;for(l in g)k=g[l],(u=a.opt.railpadding[k])?f.css("padding-"+k,u+"px"):a.opt.railpadding[k]=0;f.append(b);f.width=Math.max(parseFloat(a.opt.cursorwidth),b.outerWidth())+a.opt.railpadding.left+a.opt.railpadding.right;f.css({width:f.width+"px",zIndex:a.zindex,background:a.opt.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==a.opt.railalign?0:1;a.rail=f;b=a.rail.drag=!1;a.opt.boxzoom&&(!a.ispage&&
  !d.isieold)&&(b=document.createElement("div"),a.bind(b,"click",a.doZoom),a.zoom=e(b),a.zoom.css({cursor:"pointer","z-index":a.zindex,backgroundImage:"url("+a.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),a.opt.dblclickzoom&&a.bind(a.win,"dblclick",a.doZoom),d.cantouch&&a.opt.gesturezoom&&(a.ongesturezoom=function(c){1.5<c.scale&&a.doZoomIn(c);0.8>c.scale&&a.doZoomOut(c);return a.cancelEvent(c)},a.bind(a.win,"gestureend",a.ongesturezoom)));a.railh=!1;if(a.opt.horizrailenabled){a.css(c,
  {"overflow-x":"hidden"});b=e(document.createElement("div"));b.css({position:"relative",top:0,height:a.opt.cursorwidth,width:"0px","background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});b.wborder=parseFloat(b.outerWidth()-b.innerWidth());a.cursorh=b;var m=e(document.createElement("div"));m.attr("id",a.id+"-hr");m.addClass("nicescroll-rails");
  m.height=Math.max(parseFloat(a.opt.cursorwidth),b.outerHeight());m.css({height:m.height+"px",zIndex:a.zindex,background:a.opt.background});m.append(b);m.visibility=!0;m.scrollable=!0;m.align="top"==a.opt.railvalign?0:1;a.railh=m;a.railh.drag=!1}a.ispage?(f.css({position:"fixed",top:"0px",height:"100%"}),f.align?f.css({right:"0px"}):f.css({left:"0px"}),a.body.append(f),a.railh&&(m.css({position:"fixed",left:"0px",width:"100%"}),m.align?m.css({bottom:"0px"}):m.css({top:"0px"}),a.body.append(m))):(a.ishwscroll?
  ("static"==a.win.css("position")&&a.css(a.win,{position:"relative"}),c="HTML"==a.win[0].nodeName?a.body:a.win,a.zoom&&(a.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),c.append(a.zoom)),f.css({position:"absolute",top:0}),f.align?f.css({right:0}):f.css({left:0}),c.append(f),m&&(m.css({position:"absolute",left:0,bottom:0}),m.align?m.css({bottom:0}):m.css({top:0}),c.append(m))):(a.isfixed="fixed"==a.win.css("position"),c=a.isfixed?"fixed":"absolute",a.isfixed||(a.viewport=a.getViewport(a.win[0])),
  a.viewport&&(a.body=a.viewport,!1==/fixed|relative|absolute/.test(a.viewport.css("position"))&&a.css(a.viewport,{position:"relative"})),f.css({position:c}),a.zoom&&a.zoom.css({position:c}),a.updateScrollBar(),a.body.append(f),a.zoom&&a.body.append(a.zoom),a.railh&&(m.css({position:c}),a.body.append(m))),d.isios&&a.css(a.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),d.isie&&a.opt.disableoutline&&a.win.attr("hideFocus","true"),d.iswebkit&&a.opt.disableoutline&&
  a.win.css({outline:"none"}));!1===a.opt.autohidemode?(a.autohidedom=!1,a.rail.css({opacity:a.opt.cursoropacitymax}),a.railh&&a.railh.css({opacity:a.opt.cursoropacitymax})):!0===a.opt.autohidemode||"leave"===a.opt.autohidemode?(a.autohidedom=e().add(a.rail),d.isie8&&(a.autohidedom=a.autohidedom.add(a.cursor)),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh)),a.railh&&d.isie8&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"scroll"==a.opt.autohidemode?(a.autohidedom=e().add(a.rail),a.railh&&(a.autohidedom=
  a.autohidedom.add(a.railh))):"cursor"==a.opt.autohidemode?(a.autohidedom=e().add(a.cursor),a.railh&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"hidden"==a.opt.autohidemode&&(a.autohidedom=!1,a.hide(),a.locked=!1);if(d.isie9mobile)a.scrollmom=new H(a),a.onmangotouch=function(c){c=a.getScrollTop();var b=a.getScrollLeft();if(c==a.scrollmom.lastscrolly&&b==a.scrollmom.lastscrollx)return!0;var f=c-a.mangotouch.sy,d=b-a.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(f,2)))){var n=0>
  f?-1:1,e=0>d?-1:1,h=+new Date;a.mangotouch.lazy&&clearTimeout(a.mangotouch.lazy);80<h-a.mangotouch.tm||a.mangotouch.dry!=n||a.mangotouch.drx!=e?(a.scrollmom.stop(),a.scrollmom.reset(b,c),a.mangotouch.sy=c,a.mangotouch.ly=c,a.mangotouch.sx=b,a.mangotouch.lx=b,a.mangotouch.dry=n,a.mangotouch.drx=e,a.mangotouch.tm=h):(a.scrollmom.stop(),a.scrollmom.update(a.mangotouch.sx-d,a.mangotouch.sy-f),a.mangotouch.tm=h,f=Math.max(Math.abs(a.mangotouch.ly-c),Math.abs(a.mangotouch.lx-b)),a.mangotouch.ly=c,a.mangotouch.lx=
  b,2<f&&(a.mangotouch.lazy=setTimeout(function(){a.mangotouch.lazy=!1;a.mangotouch.dry=0;a.mangotouch.drx=0;a.mangotouch.tm=0;a.scrollmom.doMomentum(30)},100)))}},f=a.getScrollTop(),m=a.getScrollLeft(),a.mangotouch={sy:f,ly:f,dry:0,sx:m,lx:m,drx:0,lazy:!1,tm:0},a.bind(a.docscroll,"scroll",a.onmangotouch);else{if(d.cantouch||a.istouchcapable||a.opt.touchbehavior||d.hasmstouch){a.scrollmom=new H(a);a.ontouchstart=function(c){if(c.pointerType&&2!=c.pointerType)return!1;a.hasmoving=!1;if(!a.locked){if(d.hasmstouch)for(var b=
  c.target?c.target:!1;b;){var f=e(b).getNiceScroll();if(0<f.length&&f[0].me==a.me)break;if(0<f.length)return!1;if("DIV"==b.nodeName&&b.id==a.id)break;b=b.parentNode?b.parentNode:!1}a.cancelScroll();if((b=a.getTarget(c))&&/INPUT/i.test(b.nodeName)&&/range/i.test(b.type))return a.stopPropagation(c);!("clientX"in c)&&"changedTouches"in c&&(c.clientX=c.changedTouches[0].clientX,c.clientY=c.changedTouches[0].clientY);a.forcescreen&&(f=c,c={original:c.original?c.original:c},c.clientX=f.screenX,c.clientY=
  f.screenY);a.rail.drag={x:c.clientX,y:c.clientY,sx:a.scroll.x,sy:a.scroll.y,st:a.getScrollTop(),sl:a.getScrollLeft(),pt:2,dl:!1};if(a.ispage||!a.opt.directionlockdeadzone)a.rail.drag.dl="f";else{var f=e(window).width(),n=e(window).height(),h=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),k=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),n=Math.max(0,k-n),f=Math.max(0,h-f);a.rail.drag.ck=!a.rail.scrollable&&a.railh.scrollable?0<n?"v":!1:a.rail.scrollable&&
  !a.railh.scrollable?0<f?"h":!1:!1;a.rail.drag.ck||(a.rail.drag.dl="f")}a.opt.touchbehavior&&(a.isiframe&&d.isie)&&(f=a.win.position(),a.rail.drag.x+=f.left,a.rail.drag.y+=f.top);a.hasmoving=!1;a.lastmouseup=!1;a.scrollmom.reset(c.clientX,c.clientY);if(!d.cantouch&&!this.istouchcapable&&!d.hasmstouch){if(!b||!/INPUT|SELECT|TEXTAREA/i.test(b.nodeName))return!a.ispage&&d.hasmousecapture&&b.setCapture(),a.opt.touchbehavior?(b.onclick&&!b._onclick&&(b._onclick=b.onclick,b.onclick=function(c){if(a.hasmoving)return!1;
  b._onclick.call(this,c)}),a.cancelEvent(c)):a.stopPropagation(c);/SUBMIT|CANCEL|BUTTON/i.test(e(b).attr("type"))&&(pc={tg:b,click:!1},a.preventclick=pc)}}};a.ontouchend=function(c){if(c.pointerType&&2!=c.pointerType)return!1;if(a.rail.drag&&2==a.rail.drag.pt&&(a.scrollmom.doMomentum(),a.rail.drag=!1,a.hasmoving&&(a.lastmouseup=!0,a.hideCursor(),d.hasmousecapture&&document.releaseCapture(),!d.cantouch)))return a.cancelEvent(c)};var q=a.opt.touchbehavior&&a.isiframe&&!d.hasmousecapture;a.ontouchmove=
  function(c,b){if(c.pointerType&&2!=c.pointerType)return!1;if(a.rail.drag&&2==a.rail.drag.pt){if(d.cantouch&&"undefined"==typeof c.original)return!0;a.hasmoving=!0;a.preventclick&&!a.preventclick.click&&(a.preventclick.click=a.preventclick.tg.onclick||!1,a.preventclick.tg.onclick=a.onpreventclick);c=e.extend({original:c},c);"changedTouches"in c&&(c.clientX=c.changedTouches[0].clientX,c.clientY=c.changedTouches[0].clientY);if(a.forcescreen){var f=c;c={original:c.original?c.original:c};c.clientX=f.screenX;
  c.clientY=f.screenY}f=ofy=0;if(q&&!b){var n=a.win.position(),f=-n.left;ofy=-n.top}var h=c.clientY+ofy,n=h-a.rail.drag.y,k=c.clientX+f,u=k-a.rail.drag.x,g=a.rail.drag.st-n;a.ishwscroll&&a.opt.bouncescroll?0>g?g=Math.round(g/2):g>a.page.maxh&&(g=a.page.maxh+Math.round((g-a.page.maxh)/2)):(0>g&&(h=g=0),g>a.page.maxh&&(g=a.page.maxh,h=0));if(a.railh&&a.railh.scrollable){var l=a.rail.drag.sl-u;a.ishwscroll&&a.opt.bouncescroll?0>l?l=Math.round(l/2):l>a.page.maxw&&(l=a.page.maxw+Math.round((l-a.page.maxw)/
  2)):(0>l&&(k=l=0),l>a.page.maxw&&(l=a.page.maxw,k=0))}f=!1;if(a.rail.drag.dl)f=!0,"v"==a.rail.drag.dl?l=a.rail.drag.sl:"h"==a.rail.drag.dl&&(g=a.rail.drag.st);else{var n=Math.abs(n),u=Math.abs(u),m=a.opt.directionlockdeadzone;if("v"==a.rail.drag.ck){if(n>m&&u<=0.3*n)return a.rail.drag=!1,!0;u>m&&(a.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==a.rail.drag.ck){if(u>m&&n<=0.3*u)return a.rail.drag=!1,!0;n>m&&(a.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}a.synched("touchmove",
  function(){a.rail.drag&&2==a.rail.drag.pt&&(a.prepareTransition&&a.prepareTransition(0),a.rail.scrollable&&a.setScrollTop(g),a.scrollmom.update(k,h),a.railh&&a.railh.scrollable?(a.setScrollLeft(l),a.showCursor(g,l)):a.showCursor(g),d.isie10&&document.selection.clear())});d.ischrome&&a.istouchcapable&&(f=!1);if(f)return a.cancelEvent(c)}}}a.onmousedown=function(c,b){if(!(a.rail.drag&&1!=a.rail.drag.pt)){if(a.locked)return a.cancelEvent(c);a.cancelScroll();a.rail.drag={x:c.clientX,y:c.clientY,sx:a.scroll.x,
  sy:a.scroll.y,pt:1,hr:!!b};var f=a.getTarget(c);!a.ispage&&d.hasmousecapture&&f.setCapture();a.isiframe&&!d.hasmousecapture&&(a.saved.csspointerevents=a.doc.css("pointer-events"),a.css(a.doc,{"pointer-events":"none"}));a.hasmoving=!1;return a.cancelEvent(c)}};a.onmouseup=function(c){if(a.rail.drag&&(d.hasmousecapture&&document.releaseCapture(),a.isiframe&&!d.hasmousecapture&&a.doc.css("pointer-events",a.saved.csspointerevents),1==a.rail.drag.pt))return a.rail.drag=!1,a.hasmoving&&a.triggerScrollEnd(),
  a.cancelEvent(c)};a.onmousemove=function(c){if(a.rail.drag&&1==a.rail.drag.pt){if(d.ischrome&&0==c.which)return a.onmouseup(c);a.cursorfreezed=!0;a.hasmoving=!0;if(a.rail.drag.hr){a.scroll.x=a.rail.drag.sx+(c.clientX-a.rail.drag.x);0>a.scroll.x&&(a.scroll.x=0);var b=a.scrollvaluemaxw;a.scroll.x>b&&(a.scroll.x=b)}else a.scroll.y=a.rail.drag.sy+(c.clientY-a.rail.drag.y),0>a.scroll.y&&(a.scroll.y=0),b=a.scrollvaluemax,a.scroll.y>b&&(a.scroll.y=b);a.synched("mousemove",function(){a.rail.drag&&1==a.rail.drag.pt&&
  (a.showCursor(),a.rail.drag.hr?a.doScrollLeft(Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollTop(Math.round(a.scroll.y*a.scrollratio.y),a.opt.cursordragspeed))});return a.cancelEvent(c)}};if(d.cantouch||a.opt.touchbehavior)a.onpreventclick=function(c){if(a.preventclick)return a.preventclick.tg.onclick=a.preventclick.click,a.preventclick=!1,a.cancelEvent(c)},a.bind(a.win,"mousedown",a.ontouchstart),a.onclick=d.isios?!1:function(c){return a.lastmouseup?(a.lastmouseup=!1,a.cancelEvent(c)):
  !0},a.opt.grabcursorenabled&&d.cursorgrabvalue&&(a.css(a.ispage?a.doc:a.win,{cursor:d.cursorgrabvalue}),a.css(a.rail,{cursor:d.cursorgrabvalue}));else{var p=function(c){if(a.selectiondrag){if(c){var b=a.win.outerHeight();c=c.pageY-a.selectiondrag.top;0<c&&c<b&&(c=0);c>=b&&(c-=b);a.selectiondrag.df=c}0!=a.selectiondrag.df&&(a.doScrollBy(2*-Math.floor(a.selectiondrag.df/6)),a.debounced("doselectionscroll",function(){p()},50))}};a.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:
  "selection"in document?function(){return"None"!=document.selection.type}:function(){return!1};a.onselectionstart=function(c){a.ispage||(a.selectiondrag=a.win.offset())};a.onselectionend=function(c){a.selectiondrag=!1};a.onselectiondrag=function(c){a.selectiondrag&&a.hasTextSelected()&&a.debounced("selectionscroll",function(){p(c)},250)}}d.hasmstouch&&(a.css(a.rail,{"-ms-touch-action":"none"}),a.css(a.cursor,{"-ms-touch-action":"none"}),a.bind(a.win,"MSPointerDown",a.ontouchstart),a.bind(document,
  "MSPointerUp",a.ontouchend),a.bind(document,"MSPointerMove",a.ontouchmove),a.bind(a.cursor,"MSGestureHold",function(a){a.preventDefault()}),a.bind(a.cursor,"contextmenu",function(a){a.preventDefault()}));this.istouchcapable&&(a.bind(a.win,"touchstart",a.ontouchstart),a.bind(document,"touchend",a.ontouchend),a.bind(document,"touchcancel",a.ontouchend),a.bind(document,"touchmove",a.ontouchmove));a.bind(a.cursor,"mousedown",a.onmousedown);a.bind(a.cursor,"mouseup",a.onmouseup);a.railh&&(a.bind(a.cursorh,
  "mousedown",function(c){a.onmousedown(c,!0)}),a.bind(a.cursorh,"mouseup",a.onmouseup));if(a.opt.cursordragontouch||!d.cantouch&&!a.opt.touchbehavior)a.rail.css({cursor:"default"}),a.railh&&a.railh.css({cursor:"default"}),a.jqbind(a.rail,"mouseenter",function(){if(!a.win.is(":visible"))return!1;a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.rail,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.rail,"click",function(c){a.doRailClick(c,
  !1,!1)}),a.bind(a.rail,"dblclick",function(c){a.doRailClick(c,!0,!1)}),a.bind(a.cursor,"click",function(c){a.cancelEvent(c)}),a.bind(a.cursor,"dblclick",function(c){a.cancelEvent(c)})),a.railh&&(a.jqbind(a.railh,"mouseenter",function(){if(!a.win.is(":visible"))return!1;a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.railh,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.railh,"click",function(c){a.doRailClick(c,!1,!0)}),a.bind(a.railh,
  "dblclick",function(c){a.doRailClick(c,!0,!0)}),a.bind(a.cursorh,"click",function(c){a.cancelEvent(c)}),a.bind(a.cursorh,"dblclick",function(c){a.cancelEvent(c)})));!d.cantouch&&!a.opt.touchbehavior?(a.bind(d.hasmousecapture?a.win:document,"mouseup",a.onmouseup),a.bind(document,"mousemove",a.onmousemove),a.onclick&&a.bind(document,"click",a.onclick),!a.ispage&&a.opt.enablescrollonselection&&(a.bind(a.win[0],"mousedown",a.onselectionstart),a.bind(document,"mouseup",a.onselectionend),a.bind(a.cursor,
  "mouseup",a.onselectionend),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onselectionend),a.bind(document,"mousemove",a.onselectiondrag)),a.zoom&&(a.jqbind(a.zoom,"mouseenter",function(){a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.zoom,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}))):(a.bind(d.hasmousecapture?a.win:document,"mouseup",a.ontouchend),a.bind(document,"mousemove",a.ontouchmove),a.onclick&&a.bind(document,"click",a.onclick),a.opt.cursordragontouch&&
  (a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mousemove",a.onmousemove),a.cursorh&&a.bind(a.cursorh,"mousedown",function(c){a.onmousedown(c,!0)}),a.cursorh&&a.bind(a.cursorh,"mousemove",a.onmousemove)));a.opt.enablemousewheel&&(a.isiframe||a.bind(d.isie&&a.ispage?document:a.win,"mousewheel",a.onmousewheel),a.bind(a.rail,"mousewheel",a.onmousewheel),a.railh&&a.bind(a.railh,"mousewheel",a.onmousewheelhr));!a.ispage&&(!d.cantouch&&!/HTML|^BODY/.test(a.win[0].nodeName))&&(a.win.attr("tabindex")||
  a.win.attr({tabindex:J++}),a.jqbind(a.win,"focus",function(c){y=a.getTarget(c).id||!0;a.hasfocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"blur",function(c){y=!1;a.hasfocus=!1}),a.jqbind(a.win,"mouseenter",function(c){C=a.getTarget(c).id||!0;a.hasmousefocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"mouseleave",function(){C=!1;a.hasmousefocus=!1;a.rail.drag||a.hideCursor()}))}a.onkeypress=function(c){if(a.locked&&0==a.page.maxh)return!0;c=c?c:window.e;var b=a.getTarget(c);
  if(b&&/INPUT|TEXTAREA|SELECT|OPTION/.test(b.nodeName)&&(!b.getAttribute("type")&&!b.type||!/submit|button|cancel/i.tp)||e(b).attr("contenteditable"))return!0;if(a.hasfocus||a.hasmousefocus&&!y||a.ispage&&!y&&!C){b=c.keyCode;if(a.locked&&27!=b)return a.cancelEvent(c);var f=c.ctrlKey||!1,n=c.shiftKey||!1,d=!1;switch(b){case 38:case 63233:a.doScrollBy(72);d=!0;break;case 40:case 63235:a.doScrollBy(-72);d=!0;break;case 37:case 63232:a.railh&&(f?a.doScrollLeft(0):a.doScrollLeftBy(72),d=!0);break;case 39:case 63234:a.railh&&
  (f?a.doScrollLeft(a.page.maxw):a.doScrollLeftBy(-72),d=!0);break;case 33:case 63276:a.doScrollBy(a.view.h);d=!0;break;case 34:case 63277:a.doScrollBy(-a.view.h);d=!0;break;case 36:case 63273:a.railh&&f?a.doScrollPos(0,0):a.doScrollTo(0);d=!0;break;case 35:case 63275:a.railh&&f?a.doScrollPos(a.page.maxw,a.page.maxh):a.doScrollTo(a.page.maxh);d=!0;break;case 32:a.opt.spacebarenabled&&(n?a.doScrollBy(a.view.h):a.doScrollBy(-a.view.h),d=!0);break;case 27:a.zoomactive&&(a.doZoom(),d=!0)}if(d)return a.cancelEvent(c)}};
  a.opt.enablekeyboard&&a.bind(document,d.isopera&&!d.isopera12?"keypress":"keydown",a.onkeypress);a.bind(document,"keydown",function(c){c.ctrlKey&&(a.wheelprevented=!0)});a.bind(document,"keyup",function(c){c.ctrlKey||(a.wheelprevented=!1)});a.bind(window,"resize",a.lazyResize);a.bind(window,"orientationchange",a.lazyResize);a.bind(window,"load",a.lazyResize);if(d.ischrome&&!a.ispage&&!a.haswrapper){var r=a.win.attr("style"),f=parseFloat(a.win.css("width"))+1;a.win.css("width",f);a.synched("chromefix",
  function(){a.win.attr("style",r)})}a.onAttributeChange=function(c){a.lazyResize(250)};!a.ispage&&!a.haswrapper&&(!1!==z?(a.observer=new z(function(c){c.forEach(a.onAttributeChange)}),a.observer.observe(a.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),a.observerremover=new z(function(c){c.forEach(function(c){if(0<c.removedNodes.length)for(var b in c.removedNodes)if(c.removedNodes[b]==a.win[0])return a.remove()})}),a.observerremover.observe(a.win[0].parentNode,{childList:!0,characterData:!1,
  attributes:!1,subtree:!1})):(a.bind(a.win,d.isie&&!d.isie9?"propertychange":"DOMAttrModified",a.onAttributeChange),d.isie9&&a.win[0].attachEvent("onpropertychange",a.onAttributeChange),a.bind(a.win,"DOMNodeRemoved",function(c){c.target==a.win[0]&&a.remove()})));!a.ispage&&a.opt.boxzoom&&a.bind(window,"resize",a.resizeZoom);a.istextarea&&a.bind(a.win,"mouseup",a.lazyResize);a.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var I=function(c){a.iframexd=!1;try{var b="contentDocument"in this?this.contentDocument:
  this.contentWindow.document}catch(f){a.iframexd=!0,b=!1}if(a.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;a.forcescreen=!0;a.isiframe&&(a.iframe={doc:e(b),html:a.doc.contents().find("html")[0],body:a.doc.contents().find("body")[0]},a.getContentSize=function(){return{w:Math.max(a.iframe.html.scrollWidth,a.iframe.body.scrollWidth),h:Math.max(a.iframe.html.scrollHeight,a.iframe.body.scrollHeight)}},a.docscroll=e(a.iframe.body));!d.isios&&(a.opt.iframeautoresize&&
  !a.isiframe)&&(a.win.scrollTop(0),a.doc.height(""),c=Math.max(b.getElementsByTagName("html")[0].scrollHeight,b.body.scrollHeight),a.doc.height(c));a.lazyResize(30);d.isie7&&a.css(e(a.iframe.html),{"overflow-y":"hidden"});a.css(e(a.iframe.body),{"overflow-y":"hidden"});d.isios&&a.haswrapper&&a.css(e(b.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?a.bind(this.contentWindow,"scroll",a.onscroll):a.bind(b,"scroll",a.onscroll);a.opt.enablemousewheel&&a.bind(b,"mousewheel",a.onmousewheel);
  a.opt.enablekeyboard&&a.bind(b,d.isopera?"keypress":"keydown",a.onkeypress);if(d.cantouch||a.opt.touchbehavior)a.bind(b,"mousedown",a.ontouchstart),a.bind(b,"mousemove",function(c){a.ontouchmove(c,!0)}),a.opt.grabcursorenabled&&d.cursorgrabvalue&&a.css(e(b.body),{cursor:d.cursorgrabvalue});a.bind(b,"mouseup",a.ontouchend);a.zoom&&(a.opt.dblclickzoom&&a.bind(b,"dblclick",a.doZoom),a.ongesturezoom&&a.bind(b,"gestureend",a.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&
  setTimeout(function(){I.call(a.doc[0],!1)},500);a.bind(this.doc,"load",I)}};this.showCursor=function(c,b){a.cursortimeout&&(clearTimeout(a.cursortimeout),a.cursortimeout=0);if(a.rail){a.autohidedom&&(a.autohidedom.stop().css({opacity:a.opt.cursoropacitymax}),a.cursoractive=!0);if(!a.rail.drag||1!=a.rail.drag.pt)"undefined"!=typeof c&&!1!==c&&(a.scroll.y=Math.round(1*c/a.scrollratio.y)),"undefined"!=typeof b&&(a.scroll.x=Math.round(1*b/a.scrollratio.x));a.cursor.css({height:a.cursorheight,top:a.scroll.y});
  a.cursorh&&(!a.rail.align&&a.rail.visibility?a.cursorh.css({width:a.cursorwidth,left:a.scroll.x+a.rail.width}):a.cursorh.css({width:a.cursorwidth,left:a.scroll.x}),a.cursoractive=!0);a.zoom&&a.zoom.stop().css({opacity:a.opt.cursoropacitymax})}};this.hideCursor=function(c){!a.cursortimeout&&(a.rail&&a.autohidedom&&!(a.hasmousefocus&&"leave"==a.opt.autohidemode))&&(a.cursortimeout=setTimeout(function(){if(!a.rail.active||!a.showonmouseevent)a.autohidedom.stop().animate({opacity:a.opt.cursoropacitymin}),
  a.zoom&&a.zoom.stop().animate({opacity:a.opt.cursoropacitymin}),a.cursoractive=!1;a.cursortimeout=0},c||a.opt.hidecursordelay))};this.noticeCursor=function(c,b,f){a.showCursor(b,f);a.rail.active||a.hideCursor(c)};this.getContentSize=a.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:a.haswrapper?function(){return{w:a.doc.outerWidth()+parseInt(a.win.css("paddingLeft"))+
  parseInt(a.win.css("paddingRight")),h:a.doc.outerHeight()+parseInt(a.win.css("paddingTop"))+parseInt(a.win.css("paddingBottom"))}}:function(){return{w:a.docscroll[0].scrollWidth,h:a.docscroll[0].scrollHeight}};this.onResize=function(c,b){if(!a||!a.win)return!1;if(!a.haswrapper&&!a.ispage){if("none"==a.win.css("display"))return a.visibility&&a.hideRail().hideRailHr(),!1;!a.hidden&&!a.visibility&&a.showRail().showRailHr()}var f=a.page.maxh,d=a.page.maxw,e=a.view.w;a.view={w:a.ispage?a.win.width():parseInt(a.win[0].clientWidth),
  h:a.ispage?a.win.height():parseInt(a.win[0].clientHeight)};a.page=b?b:a.getContentSize();a.page.maxh=Math.max(0,a.page.h-a.view.h);a.page.maxw=Math.max(0,a.page.w-a.view.w);if(a.page.maxh==f&&a.page.maxw==d&&a.view.w==e){if(a.ispage)return a;f=a.win.offset();if(a.lastposition&&(d=a.lastposition,d.top==f.top&&d.left==f.left))return a;a.lastposition=f}0==a.page.maxh?(a.hideRail(),a.scrollvaluemax=0,a.scroll.y=0,a.scrollratio.y=0,a.cursorheight=0,a.setScrollTop(0),a.rail.scrollable=!1):a.rail.scrollable=
  !0;0==a.page.maxw?(a.hideRailHr(),a.scrollvaluemaxw=0,a.scroll.x=0,a.scrollratio.x=0,a.cursorwidth=0,a.setScrollLeft(0),a.railh.scrollable=!1):a.railh.scrollable=!0;a.locked=0==a.page.maxh&&0==a.page.maxw;if(a.locked)return a.ispage||a.updateScrollBar(a.view),!1;!a.hidden&&!a.visibility?a.showRail().showRailHr():!a.hidden&&!a.railh.visibility&&a.showRailHr();a.istextarea&&(a.win.css("resize")&&"none"!=a.win.css("resize"))&&(a.view.h-=20);a.cursorheight=Math.min(a.view.h,Math.round(a.view.h*(a.view.h/
  a.page.h)));a.cursorheight=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorheight);a.cursorwidth=Math.min(a.view.w,Math.round(a.view.w*(a.view.w/a.page.w)));a.cursorwidth=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorwidth);a.scrollvaluemax=a.view.h-a.cursorheight-a.cursor.hborder;a.railh&&(a.railh.width=0<a.page.maxh?a.view.w-a.rail.width:a.view.w,a.scrollvaluemaxw=a.railh.width-a.cursorwidth-a.cursorh.wborder);a.ispage||
  a.updateScrollBar(a.view);a.scrollratio={x:a.page.maxw/a.scrollvaluemaxw,y:a.page.maxh/a.scrollvaluemax};a.getScrollTop()>a.page.maxh?a.doScrollTop(a.page.maxh):(a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y)),a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)),a.cursoractive&&a.noticeCursor());a.scroll.y&&0==a.getScrollTop()&&a.doScrollTo(Math.floor(a.scroll.y*a.scrollratio.y));return a};this.resize=a.onResize;this.lazyResize=function(c){c=isNaN(c)?30:c;a.delayed("resize",a.resize,
  c);return a};this._bind=function(c,b,f,d){a.events.push({e:c,n:b,f:f,b:d,q:!1});c.addEventListener?c.addEventListener(b,f,d||!1):c.attachEvent?c.attachEvent("on"+b,f):c["on"+b]=f};this.jqbind=function(c,b,f){a.events.push({e:c,n:b,f:f,q:!0});e(c).bind(b,f)};this.bind=function(c,b,f,e){var h="jquery"in c?c[0]:c;"mousewheel"==b?"onwheel"in a.win?a._bind(h,"wheel",f,e||!1):(c="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",l(h,c,f,e||!1),"DOMMouseScroll"==c&&l(h,"MozMousePixelScroll",
  f,e||!1)):h.addEventListener?(d.cantouch&&/mouseup|mousedown|mousemove/.test(b)&&a._bind(h,"mousedown"==b?"touchstart":"mouseup"==b?"touchend":"touchmove",function(a){if(a.touches){if(2>a.touches.length){var c=a.touches.length?a.touches[0]:a;c.original=a;f.call(this,c)}}else a.changedTouches&&(c=a.changedTouches[0],c.original=a,f.call(this,c))},e||!1),a._bind(h,b,f,e||!1),d.cantouch&&"mouseup"==b&&a._bind(h,"touchcancel",f,e||!1)):a._bind(h,b,function(c){if((c=c||window.event||!1)&&c.srcElement)c.target=
  c.srcElement;"pageY"in c||(c.pageX=c.clientX+document.documentElement.scrollLeft,c.pageY=c.clientY+document.documentElement.scrollTop);return!1===f.call(h,c)||!1===e?a.cancelEvent(c):!0})};this._unbind=function(a,b,f,d){a.removeEventListener?a.removeEventListener(b,f,d):a.detachEvent?a.detachEvent("on"+b,f):a["on"+b]=!1};this.unbindAll=function(){for(var c=0;c<a.events.length;c++){var b=a.events[c];b.q?b.e.unbind(b.n,b.f):a._unbind(b.e,b.n,b.f,b.b)}};this.cancelEvent=function(a){a=a.original?a.original:
  a?a:window.event||!1;if(!a)return!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();a.preventManipulation&&a.preventManipulation();a.cancelBubble=!0;a.cancel=!0;return a.returnValue=!1};this.stopPropagation=function(a){a=a.original?a.original:a?a:window.event||!1;if(!a)return!1;if(a.stopPropagation)return a.stopPropagation();a.cancelBubble&&(a.cancelBubble=!0);return!1};this.showRail=function(){if(0!=a.page.maxh&&(a.ispage||"none"!=a.win.css("display")))a.visibility=!0,
  a.rail.visibility=!0,a.rail.css("display","block");return a};this.showRailHr=function(){if(!a.railh)return a;if(0!=a.page.maxw&&(a.ispage||"none"!=a.win.css("display")))a.railh.visibility=!0,a.railh.css("display","block");return a};this.hideRail=function(){a.visibility=!1;a.rail.visibility=!1;a.rail.css("display","none");return a};this.hideRailHr=function(){if(!a.railh)return a;a.railh.visibility=!1;a.railh.css("display","none");return a};this.show=function(){a.hidden=!1;a.locked=!1;return a.showRail().showRailHr()};
  this.hide=function(){a.hidden=!0;a.locked=!0;return a.hideRail().hideRailHr()};this.toggle=function(){return a.hidden?a.show():a.hide()};this.remove=function(){a.stop();a.cursortimeout&&clearTimeout(a.cursortimeout);a.doZoomOut();a.unbindAll();d.isie9&&a.win[0].detachEvent("onpropertychange",a.onAttributeChange);!1!==a.observer&&a.observer.disconnect();!1!==a.observerremover&&a.observerremover.disconnect();a.events=null;a.cursor&&a.cursor.remove();a.cursorh&&a.cursorh.remove();a.rail&&a.rail.remove();
  a.railh&&a.railh.remove();a.zoom&&a.zoom.remove();for(var c=0;c<a.saved.css.length;c++){var b=a.saved.css[c];b[0].css(b[1],"undefined"==typeof b[2]?"":b[2])}a.saved=!1;a.me.data("__nicescroll","");var f=e.nicescroll;f.each(function(c){if(this&&this.id===a.id){delete f[c];for(var b=++c;b<f.length;b++,c++)f[c]=f[b];f.length--;f.length&&delete f[f.length]}});for(var h in a)a[h]=null,delete a[h];a=null};this.scrollstart=function(c){this.onscrollstart=c;return a};this.scrollend=function(c){this.onscrollend=
  c;return a};this.scrollcancel=function(c){this.onscrollcancel=c;return a};this.zoomin=function(c){this.onzoomin=c;return a};this.zoomout=function(c){this.onzoomout=c;return a};this.isScrollable=function(a){a=a.target?a.target:a;if("OPTION"==a.nodeName)return!0;for(;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var b=e(a),b=b.css("overflowY")||b.css("overflowX")||b.css("overflow")||"";if(/scroll|auto/.test(b))return a.clientHeight!=a.scrollHeight;a=a.parentNode?a.parentNode:!1}return!1};this.getViewport=
  function(a){for(a=a&&a.parentNode?a.parentNode:!1;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var b=e(a);if(/fixed|absolute/.test(b.css("position")))return b;var f=b.css("overflowY")||b.css("overflowX")||b.css("overflow")||"";if(/scroll|auto/.test(f)&&a.clientHeight!=a.scrollHeight||0<b.getNiceScroll().length)return b;a=a.parentNode?a.parentNode:!1}return a?e(a):!1};this.triggerScrollEnd=function(){if(a.onscrollend){var c=a.getScrollLeft(),b=a.getScrollTop();a.onscrollend.call(a,{type:"scrollend",
  current:{x:c,y:b},end:{x:c,y:b}})}};this.onmousewheel=function(c){if(!a.wheelprevented){if(a.locked)return a.debounced("checkunlock",a.resize,250),!0;if(a.rail.drag)return a.cancelEvent(c);"auto"==a.opt.oneaxismousemode&&0!=c.deltaX&&(a.opt.oneaxismousemode=!1);if(a.opt.oneaxismousemode&&0==c.deltaX&&!a.rail.scrollable)return a.railh&&a.railh.scrollable?a.onmousewheelhr(c):!0;var b=+new Date,f=!1;a.opt.preservenativescrolling&&a.checkarea+600<b&&(a.nativescrollingarea=a.isScrollable(c),f=!0);a.checkarea=
  b;if(a.nativescrollingarea)return!0;if(c=q(c,!1,f))a.checkarea=0;return c}};this.onmousewheelhr=function(c){if(!a.wheelprevented){if(a.locked||!a.railh.scrollable)return!0;if(a.rail.drag)return a.cancelEvent(c);var b=+new Date,f=!1;a.opt.preservenativescrolling&&a.checkarea+600<b&&(a.nativescrollingarea=a.isScrollable(c),f=!0);a.checkarea=b;return a.nativescrollingarea?!0:a.locked?a.cancelEvent(c):q(c,!0,f)}};this.stop=function(){a.cancelScroll();a.scrollmon&&a.scrollmon.stop();a.cursorfreezed=!1;
  a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.noticeCursor();return a};this.getTransitionSpeed=function(b){var d=Math.round(10*a.opt.scrollspeed);b=Math.min(d,Math.round(b/20*a.opt.scrollspeed));return 20<b?b:0};a.opt.smoothscroll?a.ishwscroll&&d.hastransition&&a.opt.usetransition?(this.prepareTransition=function(b,e){var f=e?20<b?b:0:a.getTransitionSpeed(b),h=f?d.prefixstyle+"transform "+f+"ms ease-out":"";if(!a.lasttransitionstyle||a.lasttransitionstyle!=h)a.lasttransitionstyle=
  h,a.doc.css(d.transitionstyle,h);return f},this.doScrollLeft=function(b,d){var f=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,e,f){var h=a.getScrollTop(),g=a.getScrollLeft();(0>(a.newscrolly-h)*(e-h)||0>(a.newscrollx-g)*(b-g))&&a.cancelScroll();!1==a.opt.bouncescroll&&(0>e?e=0:e>a.page.maxh&&(e=a.page.maxh),0>b?b=0:b>a.page.maxw&&(b=a.page.maxw));
  if(a.scrollrunning&&b==a.newscrollx&&e==a.newscrolly)return!1;a.newscrolly=e;a.newscrollx=b;a.newscrollspeed=f||!1;if(a.timer)return!1;a.timer=setTimeout(function(){var f=a.getScrollTop(),h=a.getScrollLeft(),g,k;g=b-h;k=e-f;g=Math.round(Math.sqrt(Math.pow(g,2)+Math.pow(k,2)));g=a.newscrollspeed&&1<a.newscrollspeed?a.newscrollspeed:a.getTransitionSpeed(g);a.newscrollspeed&&1>=a.newscrollspeed&&(g*=a.newscrollspeed);a.prepareTransition(g,!0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);
  0<g&&(!a.scrollrunning&&a.onscrollstart&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:h,y:f},request:{x:b,y:e},end:{x:a.newscrollx,y:a.newscrolly},speed:g}),d.transitionend?a.scrollendtrapped||(a.scrollendtrapped=!0,a.bind(a.doc,d.transitionend,a.onScrollTransitionEnd,!1)):(a.scrollendtrapped&&clearTimeout(a.scrollendtrapped),a.scrollendtrapped=setTimeout(a.onScrollTransitionEnd,g)),a.timerscroll={bz:new BezierClass(f,a.newscrolly,g,0,0,0.58,1),bh:new BezierClass(h,a.newscrollx,g,0,0,0.58,
  1)},a.cursorfreezed||(a.timerscroll.tm=setInterval(function(){a.showCursor(a.getScrollTop(),a.getScrollLeft())},60)));a.synched("doScroll-set",function(){a.timer=0;a.scrollendtrapped&&(a.scrollrunning=!0);a.setScrollTop(a.newscrolly);a.setScrollLeft(a.newscrollx);if(!a.scrollendtrapped)a.onScrollTransitionEnd()})},50)},this.cancelScroll=function(){if(!a.scrollendtrapped)return!0;var b=a.getScrollTop(),e=a.getScrollLeft();a.scrollrunning=!1;d.transitionend||clearTimeout(d.transitionend);a.scrollendtrapped=
  !1;a._unbind(a.doc,d.transitionend,a.onScrollTransitionEnd);a.prepareTransition(0);a.setScrollTop(b);a.railh&&a.setScrollLeft(e);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;a.cursorfreezed=!1;a.showCursor(b,e);return a},this.onScrollTransitionEnd=function(){a.scrollendtrapped&&a._unbind(a.doc,d.transitionend,a.onScrollTransitionEnd);a.scrollendtrapped=!1;a.prepareTransition(0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;var b=
  a.getScrollTop(),e=a.getScrollLeft();a.setScrollTop(b);a.railh&&a.setScrollLeft(e);a.noticeCursor(!1,b,e);a.cursorfreezed=!1;0>b?b=0:b>a.page.maxh&&(b=a.page.maxh);0>e?e=0:e>a.page.maxw&&(e=a.page.maxw);if(b!=a.newscrolly||e!=a.newscrollx)return a.doScrollPos(e,b,a.opt.snapbackspeed);a.onscrollend&&a.scrollrunning&&a.triggerScrollEnd();a.scrollrunning=!1}):(this.doScrollLeft=function(b,d){var f=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=
  a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,d,f){function e(){if(a.cancelAnimationFrame)return!0;a.scrollrunning=!0;if(p=1-p)return a.timer=s(e)||1;var b=0,c=sy=a.getScrollTop();if(a.dst.ay){var c=a.bzscroll?a.dst.py+a.bzscroll.getNow()*a.dst.ay:a.newscrolly,f=c-sy;if(0>f&&c<a.newscrolly||0<f&&c>a.newscrolly)c=a.newscrolly;a.setScrollTop(c);c==a.newscrolly&&(b=1)}else b=1;var d=sx=a.getScrollLeft();if(a.dst.ax){d=a.bzscroll?a.dst.px+a.bzscroll.getNow()*
  a.dst.ax:a.newscrollx;f=d-sx;if(0>f&&d<a.newscrollx||0<f&&d>a.newscrollx)d=a.newscrollx;a.setScrollLeft(d);d==a.newscrollx&&(b+=1)}else b+=1;2==b?(a.timer=0,a.cursorfreezed=!1,a.bzscroll=!1,a.scrollrunning=!1,0>c?c=0:c>a.page.maxh&&(c=a.page.maxh),0>d?d=0:d>a.page.maxw&&(d=a.page.maxw),d!=a.newscrollx||c!=a.newscrolly?a.doScrollPos(d,c):a.onscrollend&&a.triggerScrollEnd()):a.timer=s(e)||1}d="undefined"==typeof d||!1===d?a.getScrollTop(!0):d;if(a.timer&&a.newscrolly==d&&a.newscrollx==b)return!0;a.timer&&
  v(a.timer);a.timer=0;var h=a.getScrollTop(),g=a.getScrollLeft();(0>(a.newscrolly-h)*(d-h)||0>(a.newscrollx-g)*(b-g))&&a.cancelScroll();a.newscrolly=d;a.newscrollx=b;if(!a.bouncescroll||!a.rail.visibility)0>a.newscrolly?a.newscrolly=0:a.newscrolly>a.page.maxh&&(a.newscrolly=a.page.maxh);if(!a.bouncescroll||!a.railh.visibility)0>a.newscrollx?a.newscrollx=0:a.newscrollx>a.page.maxw&&(a.newscrollx=a.page.maxw);a.dst={};a.dst.x=b-g;a.dst.y=d-h;a.dst.px=g;a.dst.py=h;var k=Math.round(Math.sqrt(Math.pow(a.dst.x,
  2)+Math.pow(a.dst.y,2)));a.dst.ax=a.dst.x/k;a.dst.ay=a.dst.y/k;var l=0,q=k;0==a.dst.x?(l=h,q=d,a.dst.ay=1,a.dst.py=0):0==a.dst.y&&(l=g,q=b,a.dst.ax=1,a.dst.px=0);k=a.getTransitionSpeed(k);f&&1>=f&&(k*=f);a.bzscroll=0<k?a.bzscroll?a.bzscroll.update(q,k):new BezierClass(l,q,k,0,1,0,1):!1;if(!a.timer){(h==a.page.maxh&&d>=a.page.maxh||g==a.page.maxw&&b>=a.page.maxw)&&a.checkContentSize();var p=1;a.cancelAnimationFrame=!1;a.timer=1;a.onscrollstart&&!a.scrollrunning&&a.onscrollstart.call(a,{type:"scrollstart",
  current:{x:g,y:h},request:{x:b,y:d},end:{x:a.newscrollx,y:a.newscrolly},speed:k});e();(h==a.page.maxh&&d>=h||g==a.page.maxw&&b>=g)&&a.checkContentSize();a.noticeCursor()}},this.cancelScroll=function(){a.timer&&v(a.timer);a.timer=0;a.bzscroll=!1;a.scrollrunning=!1;return a}):(this.doScrollLeft=function(b,d){var f=a.getScrollTop();a.doScrollPos(b,f,d)},this.doScrollTop=function(b,d){var f=a.getScrollLeft();a.doScrollPos(f,b,d)},this.doScrollPos=function(b,d,f){var e=b>a.page.maxw?a.page.maxw:b;0>e&&
  (e=0);var h=d>a.page.maxh?a.page.maxh:d;0>h&&(h=0);a.synched("scroll",function(){a.setScrollTop(h);a.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(b,d){var f=0,f=d?Math.floor((a.scroll.y-b)*a.scrollratio.y):(a.timer?a.newscrolly:a.getScrollTop(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.h/2);f<-e?f=-e:f>a.page.maxh+e&&(f=a.page.maxh+e)}a.cursorfreezed=!1;py=a.getScrollTop(!0);if(0>f&&0>=py)return a.noticeCursor();if(f>a.page.maxh&&py>=a.page.maxh)return a.checkContentSize(),
  a.noticeCursor();a.doScrollTop(f)};this.doScrollLeftBy=function(b,d){var f=0,f=d?Math.floor((a.scroll.x-b)*a.scrollratio.x):(a.timer?a.newscrollx:a.getScrollLeft(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.w/2);f<-e?f=-e:f>a.page.maxw+e&&(f=a.page.maxw+e)}a.cursorfreezed=!1;px=a.getScrollLeft(!0);if(0>f&&0>=px||f>a.page.maxw&&px>=a.page.maxw)return a.noticeCursor();a.doScrollLeft(f)};this.doScrollTo=function(b,d){d&&Math.round(b*a.scrollratio.y);a.cursorfreezed=!1;a.doScrollTop(b)};this.checkContentSize=
  function(){var b=a.getContentSize();(b.h!=a.page.h||b.w!=a.page.w)&&a.resize(!1,b)};a.onscroll=function(b){a.rail.drag||a.cursorfreezed||a.synched("scroll",function(){a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.railh&&(a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)));a.noticeCursor()})};a.bind(a.docscroll,"scroll",a.onscroll);this.doZoomIn=function(b){if(!a.zoomactive){a.zoomactive=!0;a.zoomrestore={style:{}};var h="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),
  f=a.win[0].style,g;for(g in h){var k=h[g];a.zoomrestore.style[k]="undefined"!=typeof f[k]?f[k]:""}a.zoomrestore.style.width=a.win.css("width");a.zoomrestore.style.height=a.win.css("height");a.zoomrestore.padding={w:a.win.outerWidth()-a.win.width(),h:a.win.outerHeight()-a.win.height()};d.isios4&&(a.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0));a.win.css({position:d.isios4?"absolute":"fixed",top:0,left:0,"z-index":x+100,margin:"0px"});h=a.win.css("backgroundColor");(""==h||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(h))&&
  a.win.css("backgroundColor","#fff");a.rail.css({"z-index":x+101});a.zoom.css({"z-index":x+102});a.zoom.css("backgroundPosition","0px -18px");a.resizeZoom();a.onzoomin&&a.onzoomin.call(a);return a.cancelEvent(b)}};this.doZoomOut=function(b){if(a.zoomactive)return a.zoomactive=!1,a.win.css("margin",""),a.win.css(a.zoomrestore.style),d.isios4&&e(window).scrollTop(a.zoomrestore.scrollTop),a.rail.css({"z-index":a.zindex}),a.zoom.css({"z-index":a.zindex}),a.zoomrestore=!1,a.zoom.css("backgroundPosition",
  "0px 0px"),a.onResize(),a.onzoomout&&a.onzoomout.call(a),a.cancelEvent(b)};this.doZoom=function(b){return a.zoomactive?a.doZoomOut(b):a.doZoomIn(b)};this.resizeZoom=function(){if(a.zoomactive){var b=a.getScrollTop();a.win.css({width:e(window).width()-a.zoomrestore.padding.w+"px",height:e(window).height()-a.zoomrestore.padding.h+"px"});a.onResize();a.setScrollTop(Math.min(a.page.maxh,b))}};this.init();e.nicescroll.push(this)},H=function(e){var b=this;this.nc=e;this.steptime=this.lasttime=this.speedy=
  this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,g){b.stop();var l=b.time();b.steptime=0;b.lasttime=l;b.speedx=0;b.speedy=0;b.lastx=e;b.lasty=g;b.lastscrollx=-1;b.lastscrolly=-1};this.update=function(e,g){var l=b.time();b.steptime=l-b.lasttime;b.lasttime=l;var l=g-b.lasty,q=e-b.lastx,a=b.nc.getScrollTop(),p=b.nc.getScrollLeft(),a=a+
  l,p=p+q;b.snapx=0>p||p>b.nc.page.maxw;b.snapy=0>a||a>b.nc.page.maxh;b.speedx=q;b.speedy=l;b.lastx=e;b.lasty=g};this.stop=function(){b.nc.unsynched("domomentum2d");b.timer&&clearTimeout(b.timer);b.timer=0;b.lastscrollx=-1;b.lastscrolly=-1};this.doSnapy=function(e,g){var l=!1;0>g?(g=0,l=!0):g>b.nc.page.maxh&&(g=b.nc.page.maxh,l=!0);0>e?(e=0,l=!0):e>b.nc.page.maxw&&(e=b.nc.page.maxw,l=!0);l?b.nc.doScrollPos(e,g,b.nc.opt.snapbackspeed):b.nc.triggerScrollEnd()};this.doMomentum=function(e){var g=b.time(),
  l=e?g+e:b.lasttime;e=b.nc.getScrollLeft();var q=b.nc.getScrollTop(),a=b.nc.page.maxh,p=b.nc.page.maxw;b.speedx=0<p?Math.min(60,b.speedx):0;b.speedy=0<a?Math.min(60,b.speedy):0;l=l&&60>=g-l;if(0>q||q>a||0>e||e>p)l=!1;e=b.speedx&&l?b.speedx:!1;if(b.speedy&&l&&b.speedy||e){var d=Math.max(16,b.steptime);50<d&&(e=d/50,b.speedx*=e,b.speedy*=e,d=50);b.demulxy=0;b.lastscrollx=b.nc.getScrollLeft();b.chkx=b.lastscrollx;b.lastscrolly=b.nc.getScrollTop();b.chky=b.lastscrolly;var r=b.lastscrollx,t=b.lastscrolly,
  s=function(){var c=600<b.time()-g?0.04:0.02;if(b.speedx&&(r=Math.floor(b.lastscrollx-b.speedx*(1-b.demulxy)),b.lastscrollx=r,0>r||r>p))c=0.1;if(b.speedy&&(t=Math.floor(b.lastscrolly-b.speedy*(1-b.demulxy)),b.lastscrolly=t,0>t||t>a))c=0.1;b.demulxy=Math.min(1,b.demulxy+c);b.nc.synched("domomentum2d",function(){b.speedx&&(b.nc.getScrollLeft()!=b.chkx&&b.stop(),b.chkx=r,b.nc.setScrollLeft(r));b.speedy&&(b.nc.getScrollTop()!=b.chky&&b.stop(),b.chky=t,b.nc.setScrollTop(t));b.timer||(b.nc.hideCursor(),
  b.doSnapy(r,t))});1>b.demulxy?b.timer=setTimeout(s,d):(b.stop(),b.nc.hideCursor(),b.doSnapy(r,t))};s()}else b.doSnapy(b.nc.getScrollLeft(),b.nc.getScrollTop())}},w=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(g,b,h){return(b=e.data(g,"__nicescroll")||!1)&&b.ishwscroll?b.getScrollTop():w.call(g)},set:function(g,b){var h=e.data(g,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollTop(parseInt(b)):w.call(g,b);return this}};e.fn.scrollTop=function(g){if("undefined"==typeof g){var b=this[0]?e.data(this[0],
  "__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollTop():w.call(this)}return this.each(function(){var b=e.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollTop(parseInt(g)):w.call(e(this),g)})};var A=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(g,b,h){return(b=e.data(g,"__nicescroll")||!1)&&b.ishwscroll?b.getScrollLeft():A.call(g)},set:function(g,b){var h=e.data(g,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollLeft(parseInt(b)):A.call(g,b);return this}};e.fn.scrollLeft=function(g){if("undefined"==
  typeof g){var b=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return b&&b.ishwscroll?b.getScrollLeft():A.call(this)}return this.each(function(){var b=e.data(this,"__nicescroll")||!1;b&&b.ishwscroll?b.setScrollLeft(parseInt(g)):A.call(e(this),g)})};var B=function(g){var b=this;this.length=0;this.name="nicescrollarray";this.each=function(e){for(var g=0,a=0;g<b.length;g++)e.call(b[g],a++);return b};this.push=function(e){b[b.length]=e;b.length++};this.eq=function(e){return b[e]};if(g)for(var h=0;h<g.length;h++){var k=
  e.data(g[h],"__nicescroll")||!1;k&&(this[this.length]=k,this.length++)}return this};(function(e,b,h){for(var k=0;k<b.length;k++)h(e,b[k])})(B.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(e,b){e[b]=function(){var e=arguments;return this.each(function(){this[b].apply(this,e)})}});e.fn.getNiceScroll=function(g){return"undefined"==typeof g?new B(this):this[g]&&e.data(this[g],"__nicescroll")||!1};e.extend(e.expr[":"],{nicescroll:function(g){return e.data(g,"__nicescroll")?
  !0:!1}});e.fn.niceScroll=function(g,b){"undefined"==typeof b&&("object"==typeof g&&!("jquery"in g))&&(b=g,g=!1);var h=new B;"undefined"==typeof b&&(b={});g&&(b.doc=e(g),b.win=e(this));var k=!("doc"in b);!k&&!("win"in b)&&(b.win=e(this));this.each(function(){var g=e(this).data("__nicescroll")||!1;g||(b.doc=k?e(this):b.doc,g=new N(b,e(this)),e(this).data("__nicescroll",g));h.push(g)});return 1==h.length?h[0]:h};window.NiceScroll={getjQuery:function(){return e}};e.nicescroll||(e.nicescroll=new B,e.nicescroll.options=
  G)});
  /*! Stellar.js v0.6.2 | Copyright 2014, Mark Dalgleish | http://markdalgleish.com/projects/stellar.js | http://markdalgleish.mit-license.org */
  !function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="stellar",g={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},h={scroll:{getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)},getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)}},position:{getLeft:function(a){return-1*parseInt(a.css("left"),10)},getTop:function(a){return-1*parseInt(a.css("top"),10)}},margin:{getLeft:function(a){return-1*parseInt(a.css("margin-left"),10)},getTop:function(a){return-1*parseInt(a.css("margin-top"),10)}},transform:{getLeft:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[4],10):0},getTop:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[5],10):0}}},i={position:{setLeft:function(a,b){a.css("left",b)},setTop:function(a,b){a.css("top",b)}},transform:{setPosition:function(a,b,c,d,e){a[0].style[k]="translate3d("+(b-c)+"px, "+(d-e)+"px, 0)"}}},j=function(){var b,c=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,d=a("script")[0].style,e="";for(b in d)if(c.test(b)){e=b.match(c)[0];break}return"WebkitOpacity"in d&&(e="Webkit"),"KhtmlOpacity"in d&&(e="Khtml"),function(a){return e+(e.length>0?a.charAt(0).toUpperCase()+a.slice(1):a)}}(),k=j("transform"),l=a("<div />",{style:"background:#fff"}).css("background-position-x")!==d,m=l?function(a,b,c){a.css({"background-position-x":b,"background-position-y":c})}:function(a,b,c){a.css("background-position",b+" "+c)},n=l?function(a){return[a.css("background-position-x"),a.css("background-position-y")]}:function(a){return a.css("background-position").split(" ")},o=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)};e.prototype={init:function(){this.options.name=f+"_"+Math.floor(1e9*Math.random()),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),"scroll"===this.options.scrollProperty?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===c.body&&(this.element=b),this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b||"scroll"===this.options.scrollProperty?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this,b=h[a.options.scrollProperty];this._getScrollLeft=function(){return b.getLeft(a.$scrollElement)},this._getScrollTop=function(){return b.getTop(a.$scrollElement)}},_defineSetters:function(){var b=this,c=h[b.options.scrollProperty],d=i[b.options.positionProperty],e=c.setLeft,f=c.setTop;this._setScrollLeft="function"==typeof e?function(a){e(b.$scrollElement,a)}:a.noop,this._setScrollTop="function"==typeof f?function(a){f(b.$scrollElement,a)}:a.noop,this._setPosition=d.setPosition||function(a,c,e,f,g){b.options.horizontalScrolling&&d.setLeft(a,c,e),b.options.verticalScrolling&&d.setTop(a,f,g)}},_handleWindowLoadAndResize:function(){var c=this,d=a(b);c.options.responsive&&d.bind("load."+this.name,function(){c.refresh()}),d.bind("resize."+this.name,function(){c._detectViewport(),c.options.responsive&&c.refresh()})},refresh:function(c){var d=this,e=d._getScrollLeft(),f=d._getScrollTop();c&&c.firstLoad||this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),c&&c.firstLoad&&/WebKit/.test(navigator.userAgent)&&a(b).load(function(){var a=d._getScrollLeft(),b=d._getScrollTop();d._setScrollLeft(a+1),d._setScrollTop(b+1),d._setScrollLeft(a),d._setScrollTop(b)}),this._setScrollLeft(e),this._setScrollTop(f)},_detectViewport:function(){var a=this.$viewportElement.offset(),b=null!==a&&a!==d;this.viewportWidth=this.$viewportElement.width(),this.viewportHeight=this.$viewportElement.height(),this.viewportOffsetTop=b?a.top:0,this.viewportOffsetLeft=b?a.left:0},_findParticles:function(){{var b=this;this._getScrollLeft(),this._getScrollTop()}if(this.particles!==d)for(var c=this.particles.length-1;c>=0;c--)this.particles[c].$element.data("stellar-elementIsActive",d);this.particles=[],this.options.parallaxElements&&this.$element.find("[data-stellar-ratio]").each(function(){var c,e,f,g,h,i,j,k,l,m=a(this),n=0,o=0,p=0,q=0;if(m.data("stellar-elementIsActive")){if(m.data("stellar-elementIsActive")!==this)return}else m.data("stellar-elementIsActive",this);b.options.showElement(m),m.data("stellar-startingLeft")?(m.css("left",m.data("stellar-startingLeft")),m.css("top",m.data("stellar-startingTop"))):(m.data("stellar-startingLeft",m.css("left")),m.data("stellar-startingTop",m.css("top"))),f=m.position().left,g=m.position().top,h="auto"===m.css("margin-left")?0:parseInt(m.css("margin-left"),10),i="auto"===m.css("margin-top")?0:parseInt(m.css("margin-top"),10),k=m.offset().left-h,l=m.offset().top-i,m.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(n=p,o=q,j=b,!1):(p+=b.position().left,void(q+=b.position().top))}),c=m.data("stellar-horizontal-offset")!==d?m.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,e=m.data("stellar-vertical-offset")!==d?m.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:m,$offsetParent:j,isFixed:"fixed"===m.css("position"),horizontalOffset:c,verticalOffset:e,startingPositionLeft:f,startingPositionTop:g,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:n,parentOffsetTop:o,stellarRatio:m.data("stellar-ratio")!==d?m.data("stellar-ratio"):1,width:m.outerWidth(!0),height:m.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b,c=this,e=this._getScrollLeft(),f=this._getScrollTop();this.backgrounds=[],this.options.parallaxBackgrounds&&(b=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(b=b.add(this.$element)),b.each(function(){var b,g,h,i,j,k,l,o=a(this),p=n(o),q=0,r=0,s=0,t=0;if(o.data("stellar-backgroundIsActive")){if(o.data("stellar-backgroundIsActive")!==this)return}else o.data("stellar-backgroundIsActive",this);o.data("stellar-backgroundStartingLeft")?m(o,o.data("stellar-backgroundStartingLeft"),o.data("stellar-backgroundStartingTop")):(o.data("stellar-backgroundStartingLeft",p[0]),o.data("stellar-backgroundStartingTop",p[1])),h="auto"===o.css("margin-left")?0:parseInt(o.css("margin-left"),10),i="auto"===o.css("margin-top")?0:parseInt(o.css("margin-top"),10),j=o.offset().left-h-e,k=o.offset().top-i-f,o.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(q=s,r=t,l=b,!1):(s+=b.position().left,void(t+=b.position().top))}),b=o.data("stellar-horizontal-offset")!==d?o.data("stellar-horizontal-offset"):l!==d&&l.data("stellar-horizontal-offset")!==d?l.data("stellar-horizontal-offset"):c.horizontalOffset,g=o.data("stellar-vertical-offset")!==d?o.data("stellar-vertical-offset"):l!==d&&l.data("stellar-vertical-offset")!==d?l.data("stellar-vertical-offset"):c.verticalOffset,c.backgrounds.push({$element:o,$offsetParent:l,isFixed:"fixed"===o.css("background-attachment"),horizontalOffset:b,verticalOffset:g,startingValueLeft:p[0],startingValueTop:p[1],startingBackgroundPositionLeft:isNaN(parseInt(p[0],10))?0:parseInt(p[0],10),startingBackgroundPositionTop:isNaN(parseInt(p[1],10))?0:parseInt(p[1],10),startingPositionLeft:o.position().left,startingPositionTop:o.position().top,startingOffsetLeft:j,startingOffsetTop:k,parentOffsetLeft:q,parentOffsetTop:r,stellarRatio:o.data("stellar-background-ratio")===d?1:o.data("stellar-background-ratio")})}))},_reset:function(){var a,b,c,d,e;for(e=this.particles.length-1;e>=0;e--)a=this.particles[e],b=a.$element.data("stellar-startingLeft"),c=a.$element.data("stellar-startingTop"),this._setPosition(a.$element,b,b,c,c),this.options.showElement(a.$element),a.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(e=this.backgrounds.length-1;e>=0;e--)d=this.backgrounds[e],d.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),m(d.$element,d.startingValueLeft,d.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=a.noop,a(b).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var c=this,d=a(b);d.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),"function"==typeof this.options.horizontalOffset?(this.horizontalOffset=this.options.horizontalOffset(),d.bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,"function"==typeof this.options.verticalOffset?(this.verticalOffset=this.options.verticalOffset(),d.bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a,b,c,d,e,f,g,h,i,j,k=this._getScrollLeft(),l=this._getScrollTop(),n=!0,o=!0;if(this.currentScrollLeft!==k||this.currentScrollTop!==l||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=k,this.currentScrollTop=l,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,j=this.particles.length-1;j>=0;j--)a=this.particles[j],b=a.isFixed?1:0,this.options.horizontalScrolling?(f=(k+a.horizontalOffset+this.viewportOffsetLeft+a.startingPositionLeft-a.startingOffsetLeft+a.parentOffsetLeft)*-(a.stellarRatio+b-1)+a.startingPositionLeft,h=f-a.startingPositionLeft+a.startingOffsetLeft):(f=a.startingPositionLeft,h=a.startingOffsetLeft),this.options.verticalScrolling?(g=(l+a.verticalOffset+this.viewportOffsetTop+a.startingPositionTop-a.startingOffsetTop+a.parentOffsetTop)*-(a.stellarRatio+b-1)+a.startingPositionTop,i=g-a.startingPositionTop+a.startingOffsetTop):(g=a.startingPositionTop,i=a.startingOffsetTop),this.options.hideDistantElements&&(o=!this.options.horizontalScrolling||h+a.width>(a.isFixed?0:k)&&h<(a.isFixed?0:k)+this.viewportWidth+this.viewportOffsetLeft,n=!this.options.verticalScrolling||i+a.height>(a.isFixed?0:l)&&i<(a.isFixed?0:l)+this.viewportHeight+this.viewportOffsetTop),o&&n?(a.isHidden&&(this.options.showElement(a.$element),a.isHidden=!1),this._setPosition(a.$element,f,a.startingPositionLeft,g,a.startingPositionTop)):a.isHidden||(this.options.hideElement(a.$element),a.isHidden=!0);for(j=this.backgrounds.length-1;j>=0;j--)c=this.backgrounds[j],b=c.isFixed?0:1,d=this.options.horizontalScrolling?(k+c.horizontalOffset-this.viewportOffsetLeft-c.startingOffsetLeft+c.parentOffsetLeft-c.startingBackgroundPositionLeft)*(b-c.stellarRatio)+"px":c.startingValueLeft,e=this.options.verticalScrolling?(l+c.verticalOffset-this.viewportOffsetTop-c.startingOffsetTop+c.parentOffsetTop-c.startingBackgroundPositionTop)*(b-c.stellarRatio)+"px":c.startingValueTop,m(c.$element,d,e)}},_handleScrollEvent:function(){var a=this,b=!1,c=function(){a._repositionElements(),b=!1},d=function(){b||(o(c),b=!0)};this.$scrollElement.bind("scroll."+this.name,d),d()},_startAnimationLoop:function(){var a=this;this._animationLoop=function(){o(a._animationLoop),a._repositionElements()},this._animationLoop()}},a.fn[f]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1)),"destroy"===b&&a.data(this,"plugin_"+f,null)}):void 0},a[f]=function(){var c=a(b);return c.stellar.apply(c,Array.prototype.slice.call(arguments,0))},a[f].scrollProperty=h,a[f].positionProperty=i,b.Stellar=e}(jQuery,this,document);/*
   * textillate.js
   * http://jschr.github.com/textillate
   * MIT licensed
   *
   * Copyright (C) 2012-2013 Jordan Schroter
   */
  
  (function ($) {
    "use strict"; 
  
    function isInEffect (effect) {
      return /In/.test(effect) || $.inArray(effect, $.fn.textillate.defaults.inEffects) >= 0;
    };
  
    function isOutEffect (effect) {
      return /Out/.test(effect) || $.inArray(effect, $.fn.textillate.defaults.outEffects) >= 0;
    };
  
  
    function stringToBoolean(str) {
      if (str !== "true" && str !== "false") return str;
      return (str === "true");
    };
  	  
    // custom get data api method
    function getData (node) {
      var attrs = node.attributes || []
        , data = {};
  
      if (!attrs.length) return data;
  
      $.each(attrs, function (i, attr) {
        var nodeName = attr.nodeName.replace(/delayscale/, 'delayScale');
        if (/^data-in-*/.test(nodeName)) {
          data.in = data.in || {};
          data.in[nodeName.replace(/data-in-/, '')] = stringToBoolean(attr.nodeValue);
        } else if (/^data-out-*/.test(nodeName)) {
          data.out = data.out || {};
          data.out[nodeName.replace(/data-out-/, '')] =stringToBoolean(attr.nodeValue);
        } else if (/^data-*/.test(nodeName)) {
          data[nodeName.replace(/data-/, '')] = stringToBoolean(attr.nodeValue);
        }
      })
  
      return data;
    }
  
    function shuffle (o) {
        for (var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
        return o;
    }
  
    function animate ($c, effect, cb) {
      $c.addClass('animated ' + effect)
        .css('visibility', 'visible')
        .show();
  
      $c.one('animationend webkitAnimationEnd oAnimationEnd', function () {
          $c.removeClass('animated ' + effect);
          cb && cb();
      });
    }
  
    function animateChars ($chars, options, cb) {
      var that = this
        , count = $chars.length;
  
      if (!count) {
        cb && cb();
        return;
      } 
  
      if (options.shuffle) $chars = shuffle($chars);
      if (options.reverse) $chars = $chars.toArray().reverse();
  
      $.each($chars, function (i, c) {
        var $char = $(c);
        
        function complete () {
          if (isInEffect(options.effect)) {
            $char.css('visibility', 'visible');
          } else if (isOutEffect(options.effect)) {
            $char.css('visibility', 'hidden');
          }
          count -= 1;
          if (!count && cb) cb();
        }
  
        var delay = options.sync ? options.delay : options.delay * i * options.delayScale;
  
        $char.text() ? 
          setTimeout(function () { animate($char, options.effect, complete) }, delay) :
          complete();
      });
    };
  
    var Textillate = function (element, options) {
      var base = this
        , $element = $(element);
  
      base.init = function () {
        base.$texts = $element.find(options.selector);
        
        if (!base.$texts.length) {
          base.$texts = $('<ul class="texts"><li>' + $element.html() + '</li></ul>');
          $element.html(base.$texts);
        }
  
        base.$texts.hide();
  
        base.$current = $('<span>')
          .text(base.$texts.find(':first-child').html())
          .prependTo($element);
  
        if (isInEffect(options.in.effect)) {
          base.$current.css('visibility', 'hidden');
        } else if (isOutEffect(options.out.effect)) {
          base.$current.css('visibility', 'visible');
        }
  
        base.setOptions(options);
  
        base.timeoutRun = null;
  
        setTimeout(function () {
          base.options.autoStart && base.start();
        }, base.options.initialDelay)
      };
  
      base.setOptions = function (options) {
        base.options = options;
      };
  
      base.triggerEvent = function (name) {
        var e = $.Event(name + '.tlt');
        $element.trigger(e, base);
        return e;
      };
  
      base.in = function (index, cb) {
        index = index || 0;
         
        var $elem = base.$texts.find(':nth-child(' + (index + 1) + ')')
          , options = $.extend(true, {}, base.options, $elem.length ? getData($elem[0]) : {})
          , $chars;
  
        $elem.addClass('current');
  
        base.triggerEvent('inAnimationBegin');
  
        base.$current
          .text($elem.html())
          .lettering('words');
  
        base.$current.find('[class^="word"]')
            .css({ 
              'display': 'inline-block',
              // fix for poor ios performance
              '-webkit-transform': 'translate3d(0,0,0)',
                 '-moz-transform': 'translate3d(0,0,0)',
                   '-o-transform': 'translate3d(0,0,0)',
                      'transform': 'translate3d(0,0,0)'
            })
            .each(function () { $(this).lettering() });
  
        $chars = base.$current
          .find('[class^="char"]')
          .css('display', 'inline-block');
  
        if (isInEffect(options.in.effect)) {
          $chars.css('visibility', 'hidden');
        } else if (isOutEffect(options.in.effect)) {
          $chars.css('visibility', 'visible');
        }
  
        base.currentIndex = index;
  
        animateChars($chars, options.in, function () {
          base.triggerEvent('inAnimationEnd');
          if (options.in.callback) options.in.callback();
          if (cb) cb(base);
        });
      };
  
      base.out = function (cb) {
        var $elem = base.$texts.find(':nth-child(' + (base.currentIndex + 1) + ')')
          , $chars = base.$current.find('[class^="char"]')
          , options = $.extend(true, {}, base.options, $elem.length ? getData($elem[0]) : {})
  
        base.triggerEvent('outAnimationBegin');
  
        animateChars($chars, options.out, function () {
          $elem.removeClass('current');
          base.triggerEvent('outAnimationEnd');
          if (options.out.callback) options.out.callback();
          if (cb) cb(base);
        });
      };
  
      base.start = function (index) {
        base.triggerEvent('start');
  
        (function run (index) {
          base.in(index, function () {
            var length = base.$texts.children().length;
  
            index += 1;
            
            if (!base.options.loop && index >= length) {
              if (base.options.callback) base.options.callback();
              base.triggerEvent('end');
            } else {
              index = index % length;
  
              base.timeoutRun = setTimeout(function () {
                base.out(function () {
                  run(index)
                });
              }, base.options.minDisplayTime);
            }
          });
        }(index || 0));
      };
  
      base.stop = function () {
        if (base.timeoutRun) {
          clearInterval(base.timeoutRun);
          base.timeoutRun = null;
        }
      };
  
      base.init();
    }
  
    $.fn.textillate = function (settings, args) {
      return this.each(function () {
        var $this = $(this)
          , data = $this.data('textillate')
          , options = $.extend(true, {}, $.fn.textillate.defaults, getData(this), typeof settings == 'object' && settings);
  
        if (!data) { 
          $this.data('textillate', (data = new Textillate(this, options)));
        } else if (typeof settings == 'string') {
          data[settings].apply(data, [].concat(args));
        } else {
          data.setOptions.call(data, options);
        }
      })
    };
    
    $.fn.textillate.defaults = {
      selector: '.texts',
      loop: false,
      minDisplayTime: 2000,
      initialDelay: 0,
      in: {
        effect: 'fadeInLeftBig',
        delayScale: 1.5,
        delay: 50,
        sync: false,
        reverse: false,
        shuffle: false,
        callback: function () {}
      },
      out: {
        effect: 'hinge',
        delayScale: 1.5,
        delay: 50,
        sync: false,
        reverse: false,
        shuffle: false,
        callback: function () {}
      },
      autoStart: true,
      inEffects: [],
      outEffects: [ 'hinge' ],
      callback: function () {}
    };
  
  }(jQuery));
  /**
   * modalEffects.js v1.0.0
   * http://www.codrops.com
   *
   * Licensed under the MIT license.
   * http://www.opensource.org/licenses/mit-license.php
   * 
   * Copyright 2013, Codrops
   * http://www.codrops.com
   */
  var ModalEffects = (function() {
  
  	function init() {
  
  		var overlay = document.querySelector( '.md-overlay' );
  
  		[].slice.call( document.querySelectorAll( '.md-trigger' ) ).forEach( function( el, i ) {
  
  			var modal = document.querySelector( '#' + el.getAttribute( 'data-modal' ) ),
  				close = modal.querySelector( '.md-close' );
  
  			function removeModal( hasPerspective ) {
  				classie.remove( modal, 'md-show' );
  
  				if( hasPerspective ) {
  					classie.remove( document.documentElement, 'md-perspective' );
  				}
  			}
  
  			function removeModalHandler() {
  				removeModal( classie.has( el, 'md-setperspective' ) ); 
  			}
  
  			el.addEventListener( 'click', function( ev ) {
  				classie.add( modal, 'md-show' );
  				overlay.removeEventListener( 'click', removeModalHandler );
  				overlay.addEventListener( 'click', removeModalHandler );
  
  				if( classie.has( el, 'md-setperspective' ) ) {
  					setTimeout( function() {
  						classie.add( document.documentElement, 'md-perspective' );
  					}, 25 );
  				}
  			});
  
  			close.addEventListener( 'click', function( ev ) {
  				ev.stopPropagation();
  				removeModalHandler();
  			});
  
  		} );
  
  	}
  
  	init();
  
  })();/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
   * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
   */
  ;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.flexboxlegacy=function(){return I("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?: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,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.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:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};/*
  Plugin Name: 	BrowserSelector
  Written by: 	Crivos - (http://www.crivos.com)
  Version: 		0.1
  */
  
  (function($) {
  	$.extend({
  
  		browserSelector: function() {
  
  			var u = navigator.userAgent,
  				ua = u.toLowerCase(),
  				is = function (t) {
  					return ua.indexOf(t) > -1;
  				},
  				g = 'gecko',
  				w = 'webkit',
  				s = 'safari',
  				o = 'opera',
  				h = document.documentElement,
  				b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js'];
  
  			c = b.join(' ');
  			h.className += ' ' + c;
  
  		}
  
  	});
  })(jQuery);
  
  /*
  Plugin Name: 	smoothScroll for jQuery.
  Written by: 	Crivos - (http://www.crivos.com)
  Version: 		0.1
  
  Based on:
  
  	SmoothScroll v1.2.1
  	Licensed under the terms of the MIT license.
  
  	People involved
  	 - Balazs Galambosi (maintainer)
  	 - Patrick Brunner  (original idea)
  	 - Michael Herf     (Pulse Algorithm)
  
  */
  (function($) {
  	$.extend({
  
  		smoothScroll: function() {
  
  			// Scroll Variables (tweakable)
  			var defaultOptions = {
  
  				// Scrolling Core
  				frameRate        : 150, // [Hz]
  				animationTime    : 700, // [px]
  				stepSize         : 80, // [px]
  
  				// Pulse (less tweakable)
  				// ratio of "tail" to "acceleration"
  				pulseAlgorithm   : true,
  				pulseScale       : 8,
  				pulseNormalize   : 1,
  
  				// Acceleration
  				accelerationDelta : 20,  // 20
  				accelerationMax   : 1,   // 1
  
  				// Keyboard Settings
  				keyboardSupport   : true,  // option
  				arrowScroll       : 50,     // [px]
  
  				// Other
  				touchpadSupport   : true,
  				fixedBackground   : true,
  				excluded          : ""
  			};
  
  			var options = defaultOptions;
  
  			// Other Variables
  			var isExcluded = false;
  			var isFrame = false;
  			var direction = { x: 0, y: 0 };
  			var initDone  = false;
  			var root = document.documentElement;
  			var activeElement;
  			var observer;
  			var deltaBuffer = [ 120, 120, 120 ];
  
  			var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32,
  						pageup: 33, pagedown: 34, end: 35, home: 36 };
  
  
  			/***********************************************
  			 * INITIALIZE
  			 ***********************************************/
  
  			/**
  			 * Tests if smooth scrolling is allowed. Shuts down everything if not.
  			 */
  			function initTest() {
  
  				var disableKeyboard = false;
  
  				// disable keys for google reader (spacebar conflict)
  				if (document.URL.indexOf("google.com/reader/view") > -1) {
  					disableKeyboard = true;
  				}
  
  				// disable everything if the page is blacklisted
  				if (options.excluded) {
  					var domains = options.excluded.split(/[,\n] ?/);
  					domains.push("mail.google.com"); // exclude Gmail for now
  					for (var i = domains.length; i--;) {
  						if (document.URL.indexOf(domains[i]) > -1) {
  							observer && observer.disconnect();
  							removeEvent("mousewheel", wheel);
  							disableKeyboard = true;
  							isExcluded = true;
  							break;
  						}
  					}
  				}
  
  				// disable keyboard support if anything above requested it
  				if (disableKeyboard) {
  					removeEvent("keydown", keydown);
  				}
  
  				if (options.keyboardSupport && !disableKeyboard) {
  					addEvent("keydown", keydown);
  				}
  			}
  
  			/**
  			 * Sets up scrolls array, determines if frames are involved.
  			 */
  			function init() {
  
  				if (!document.body) return;
  
  				var body = document.body;
  				var html = document.documentElement;
  				var windowHeight = window.innerHeight;
  				var scrollHeight = body.scrollHeight;
  
  				// check compat mode for root element
  				root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
  				activeElement = body;
  
  				initTest();
  				initDone = true;
  
  				// Checks if this script is running in a frame
  				if (top != self) {
  					isFrame = true;
  				}
  
  				/**
  				 * This fixes a bug where the areas left and right to
  				 * the content does not trigger the onmousewheel event
  				 * on some pages. e.g.: html, body { height: 100% }
  				 */
  				else if (scrollHeight > windowHeight &&
  						(body.offsetHeight <= windowHeight ||
  						 html.offsetHeight <= windowHeight)) {
  
  					// DOMChange (throttle): fix height
  					var pending = false;
  					var refresh = function () {
  						if (!pending && html.scrollHeight != document.height) {
  							pending = true; // add a new pending action
  							setTimeout(function () {
  								html.style.height = document.height + 'px';
  								pending = false;
  							}, 500); // act rarely to stay fast
  						}
  					};
  					html.style.height = 'auto';
  					setTimeout(refresh, 10);
  
  					var config = {
  						attributes: true,
  						childList: true,
  						characterData: false
  					};
  
  					observer = new MutationObserver(refresh);
  					observer.observe(body, config);
  
  					// clearfix
  					if (root.offsetHeight <= windowHeight) {
  						var underlay = document.createElement("div");
  						underlay.style.clear = "both";
  						body.appendChild(underlay);
  					}
  				}
  
  				// gmail performance fix
  				if (document.URL.indexOf("mail.google.com") > -1) {
  					var s = document.createElement("style");
  					s.innerHTML = ".iu { visibility: hidden }";
  					(document.getElementsByTagName("head")[0] || html).appendChild(s);
  				}
  				// facebook better home timeline performance
  				// all the HTML resized images make rendering CPU intensive
  				else if (document.URL.indexOf("www.facebook.com") > -1) {
  					var home_stream = document.getElementById("home_stream");
  					home_stream && (home_stream.style.webkitTransform = "translateZ(0)");
  				}
  				// disable fixed background
  				if (!options.fixedBackground && !isExcluded) {
  					body.style.backgroundAttachment = "scroll";
  					html.style.backgroundAttachment = "scroll";
  				}
  			}
  
  
  			/************************************************
  			 * SCROLLING
  			 ************************************************/
  
  			var que = [];
  			var pending = false;
  			var lastScroll = +new Date;
  
  			/**
  			 * Pushes scroll actions to the scrolling queue.
  			 */
  			function scrollArray(elem, left, top, delay) {
  
  				delay || (delay = 1000);
  				directionCheck(left, top);
  
  				if (options.accelerationMax != 1) {
  					var now = +new Date;
  					var elapsed = now - lastScroll;
  					if (elapsed < options.accelerationDelta) {
  						var factor = (1 + (30 / elapsed)) / 2;
  						if (factor > 1) {
  							factor = Math.min(factor, options.accelerationMax);
  							left *= factor;
  							top  *= factor;
  						}
  					}
  					lastScroll = +new Date;
  				}
  
  				// push a scroll command
  				que.push({
  					x: left,
  					y: top,
  					lastX: (left < 0) ? 0.99 : -0.99,
  					lastY: (top  < 0) ? 0.99 : -0.99,
  					start: +new Date
  				});
  
  				// don't act if there's a pending queue
  				if (pending) {
  					return;
  				}
  
  				var scrollWindow = (elem === document.body);
  
  				var step = function (time) {
  
  					var now = +new Date;
  					var scrollX = 0;
  					var scrollY = 0;
  
  					for (var i = 0; i < que.length; i++) {
  
  						var item = que[i];
  						var elapsed  = now - item.start;
  						var finished = (elapsed >= options.animationTime);
  
  						// scroll position: [0, 1]
  						var position = (finished) ? 1 : elapsed / options.animationTime;
  
  						// easing [optional]
  						if (options.pulseAlgorithm) {
  							position = pulse(position);
  						}
  
  						// only need the difference
  						var x = (item.x * position - item.lastX) >> 0;
  						var y = (item.y * position - item.lastY) >> 0;
  
  						// add this to the total scrolling
  						scrollX += x;
  						scrollY += y;
  
  						// update last values
  						item.lastX += x;
  						item.lastY += y;
  
  						// delete and step back if it's over
  						if (finished) {
  							que.splice(i, 1); i--;
  						}
  					}
  
  					// scroll left and top
  					if (scrollWindow) {
  						window.scrollBy(scrollX, scrollY);
  					}
  					else {
  						if (scrollX) elem.scrollLeft += scrollX;
  						if (scrollY) elem.scrollTop  += scrollY;
  					}
  
  					// clean up if there's nothing left to do
  					if (!left && !top) {
  						que = [];
  					}
  
  					if (que.length) {
  						requestFrame(step, elem, (delay / options.frameRate + 1));
  					} else {
  						pending = false;
  					}
  				};
  
  				// start a new queue of actions
  				requestFrame(step, elem, 0);
  				pending = true;
  			}
  
  
  			/***********************************************
  			 * EVENTS
  			 ***********************************************/
  
  			/**
  			 * Mouse wheel handler.
  			 * @param {Object} event
  			 */
  			function wheel(event) {
  
  				if (!initDone) {
  					init();
  				}
  
  				var target = event.target;
  				var overflowing = overflowingAncestor(target);
  
  				// use default if there's no overflowing
  				// element or default action is prevented
  				if (!overflowing || event.defaultPrevented ||
  					isNodeName(activeElement, "embed") ||
  				   (isNodeName(target, "embed") && /\.pdf/i.test(target.src))) {
  					return true;
  				}
  
  				var deltaX = event.wheelDeltaX || 0;
  				var deltaY = event.wheelDeltaY || 0;
  
  				// use wheelDelta if deltaX/Y is not available
  				if (!deltaX && !deltaY) {
  					deltaY = event.wheelDelta || 0;
  				}
  
  				// check if it's a touchpad scroll that should be ignored
  				if (!options.touchpadSupport && isTouchpad(deltaY)) {
  					return true;
  				}
  
  				// scale by step size
  				// delta is 120 most of the time
  				// synaptics seems to send 1 sometimes
  				if (Math.abs(deltaX) > 1.2) {
  					deltaX *= options.stepSize / 120;
  				}
  				if (Math.abs(deltaY) > 1.2) {
  					deltaY *= options.stepSize / 120;
  				}
  
  				scrollArray(overflowing, -deltaX, -deltaY);
  				event.preventDefault();
  			}
  
  			/**
  			 * Keydown event handler.
  			 * @param {Object} event
  			 */
  			function keydown(event) {
  
  				var target   = event.target;
  				var modifier = event.ctrlKey || event.altKey || event.metaKey ||
  							  (event.shiftKey && event.keyCode !== key.spacebar);
  
  				// do nothing if user is editing text
  				// or using a modifier key (except shift)
  				// or in a dropdown
  				if ( /input|textarea|select|embed/i.test(target.nodeName) ||
  					 target.isContentEditable ||
  					 event.defaultPrevented   ||
  					 modifier ) {
  				  return true;
  				}
  				// spacebar should trigger button press
  				if (isNodeName(target, "button") &&
  					event.keyCode === key.spacebar) {
  				  return true;
  				}
  
  				var shift, x = 0, y = 0;
  				var elem = overflowingAncestor(activeElement);
  				var clientHeight = elem.clientHeight;
  
  				if (elem == document.body) {
  					clientHeight = window.innerHeight;
  				}
  
  				switch (event.keyCode) {
  					case key.up:
  						y = -options.arrowScroll;
  						break;
  					case key.down:
  						y = options.arrowScroll;
  						break;
  					case key.spacebar: // (+ shift)
  						shift = event.shiftKey ? 1 : -1;
  						y = -shift * clientHeight * 0.9;
  						break;
  					case key.pageup:
  						y = -clientHeight * 0.9;
  						break;
  					case key.pagedown:
  						y = clientHeight * 0.9;
  						break;
  					case key.home:
  						y = -elem.scrollTop;
  						break;
  					case key.end:
  						var damt = elem.scrollHeight - elem.scrollTop - clientHeight;
  						y = (damt > 0) ? damt+10 : 0;
  						break;
  					case key.left:
  						x = -options.arrowScroll;
  						break;
  					case key.right:
  						x = options.arrowScroll;
  						break;
  					default:
  						return true; // a key we don't care about
  				}
  
  				scrollArray(elem, x, y);
  				event.preventDefault();
  			}
  
  			/**
  			 * Mousedown event only for updating activeElement
  			 */
  			function mousedown(event) {
  				activeElement = event.target;
  			}
  
  
  			/***********************************************
  			 * OVERFLOW
  			 ***********************************************/
  
  			var cache = {}; // cleared out every once in while
  			setInterval(function () { cache = {}; }, 10 * 1000);
  
  			var uniqueID = (function () {
  				var i = 0;
  				return function (el) {
  					return el.uniqueID || (el.uniqueID = i++);
  				};
  			})();
  
  			function setCache(elems, overflowing) {
  				for (var i = elems.length; i--;)
  					cache[uniqueID(elems[i])] = overflowing;
  				return overflowing;
  			}
  
  			function overflowingAncestor(el) {
  				var elems = [];
  				var rootScrollHeight = root.scrollHeight;
  				do {
  					var cached = cache[uniqueID(el)];
  					if (cached) {
  						return setCache(elems, cached);
  					}
  					elems.push(el);
  					if (rootScrollHeight === el.scrollHeight) {
  						if (!isFrame || root.clientHeight + 10 < rootScrollHeight) {
  							return setCache(elems, document.body); // scrolling root in WebKit
  						}
  					} else if (el.clientHeight + 10 < el.scrollHeight) {
  						overflow = getComputedStyle(el, "").getPropertyValue("overflow-y");
  						if (overflow === "scroll" || overflow === "auto") {
  							return setCache(elems, el);
  						}
  					}
  				} while (el = el.parentNode);
  			}
  
  
  			/***********************************************
  			 * HELPERS
  			 ***********************************************/
  
  			function addEvent(type, fn, bubble) {
  				window.addEventListener(type, fn, (bubble||false));
  			}
  
  			function removeEvent(type, fn, bubble) {
  				window.removeEventListener(type, fn, (bubble||false));
  			}
  
  			function isNodeName(el, tag) {
  				return (el.nodeName||"").toLowerCase() === tag.toLowerCase();
  			}
  
  			function directionCheck(x, y) {
  				x = (x > 0) ? 1 : -1;
  				y = (y > 0) ? 1 : -1;
  				if (direction.x !== x || direction.y !== y) {
  					direction.x = x;
  					direction.y = y;
  					que = [];
  					lastScroll = 0;
  				}
  			}
  
  			var deltaBufferTimer;
  
  			function isTouchpad(deltaY) {
  				if (!deltaY) return;
  				deltaY = Math.abs(deltaY)
  				deltaBuffer.push(deltaY);
  				deltaBuffer.shift();
  				clearTimeout(deltaBufferTimer);
  				var allEquals    = (deltaBuffer[0] == deltaBuffer[1] &&
  									deltaBuffer[1] == deltaBuffer[2]);
  				var allDivisable = (isDivisible(deltaBuffer[0], 120) &&
  									isDivisible(deltaBuffer[1], 120) &&
  									isDivisible(deltaBuffer[2], 120));
  				return !(allEquals || allDivisable);
  			}
  
  			function isDivisible(n, divisor) {
  				return (Math.floor(n / divisor) == n / divisor);
  			}
  
  			var requestFrame = (function () {
  				  return  window.requestAnimationFrame       ||
  						  window.webkitRequestAnimationFrame ||
  						  function (callback, element, delay) {
  							  window.setTimeout(callback, delay || (1000/60));
  						  };
  			})();
  
  			var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
  
  
  			/***********************************************
  			 * PULSE
  			 ***********************************************/
  
  			/**
  			 * Viscous fluid with a pulse for part and decay for the rest.
  			 * - Applies a fixed force over an interval (a damped acceleration), and
  			 * - Lets the exponential bleed away the velocity over a longer interval
  			 * - Michael Herf, http://stereopsis.com/stopping/
  			 */
  			function pulse_(x) {
  				var val, start, expx;
  				// test
  				x = x * options.pulseScale;
  				if (x < 1) { // acceleartion
  					val = x - (1 - Math.exp(-x));
  				} else {     // tail
  					// the previous animation ended here:
  					start = Math.exp(-1);
  					// simple viscous drag
  					x -= 1;
  					expx = 1 - Math.exp(-x);
  					val = start + (expx * (1 - start));
  				}
  				return val * options.pulseNormalize;
  			}
  
  			function pulse(x) {
  				if (x >= 1) return 1;
  				if (x <= 0) return 0;
  
  				if (options.pulseNormalize == 1) {
  					options.pulseNormalize /= pulse_(1);
  				}
  				return pulse_(x);
  			}
  
  			addEvent("mousedown", mousedown);
  			addEvent("mousewheel", wheel);
  			addEvent("load", init);
  
  		}
  
  	});
  })(jQuery);
  
  /*! WOW - v0.1.9 - 2014-05-10
  * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in a)d=a[c],null!=d&&(b[c]=d);return b},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a}(),b=this.WeakMap||(b=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),this.WOW=function(){function d(a){null==a&&(a={}),this.scrollCallback=c(this.scrollCallback,this),this.scrollHandler=c(this.scrollHandler,this),this.start=c(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new b}return d.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0},d.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():document.addEventListener("DOMContentLoaded",this.start)},d.prototype.start=function(){var a,b,c,d;if(this.boxes=this.element.getElementsByClassName(this.config.boxClass),this.boxes.length){if(this.disabled())return this.resetStyle();for(d=this.boxes,b=0,c=d.length;c>b;b++)a=d[b],this.applyStyle(a,!0);return window.addEventListener("scroll",this.scrollHandler,!1),window.addEventListener("resize",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}},d.prototype.stop=function(){return window.removeEventListener("scroll",this.scrollHandler,!1),window.removeEventListener("resize",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},d.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},d.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},d.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),d.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.setAttribute("style","visibility: visible;"));return e},d.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},d.prototype.vendors=["moz","webkit"],d.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},d.prototype.vendorCSS=function(a,b){var c,d,e,f,g,h;for(d=window.getComputedStyle(a),c=d.getPropertyCSSValue(b),h=this.vendors,f=0,g=h.length;g>f;f++)e=h[f],c=c||d.getPropertyCSSValue("-"+e+"-"+b);return c},d.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=window.getComputedStyle(a).getPropertyValue("animation-name")}return"none"===b?"":b},d.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},d.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},d.prototype.scrollHandler=function(){return this.scrolled=!0},d.prototype.scrollCallback=function(){var a;return this.scrolled&&(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),!this.boxes.length)?this.stop():void 0},d.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},d.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+this.element.clientHeight-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},d.prototype.util=function(){return this._util||(this._util=new a)},d.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},d}()}).call(this);