text: // SmoothScroll v0.9.9
  // Licensed under the terms of the MIT license.
  // People involved
  // - Balazs Galambosi: maintainer (CHANGELOG.txt)
  // - Patrick Brunner (patrickb1991@gmail.com)
  // - Michael Herf: ssc_pulse Algorithm
  
  function ssc_init() {
    if (!document.body) return;
    var e = document.body;
    var t = document.documentElement;
    var n = window.innerHeight;
    var r = e.scrollHeight;
    ssc_root = document.compatMode.indexOf("CSS") >= 0 ? t : e;
    ssc_activeElement = e;
    ssc_initdone = true;
    if (top != self) {
      ssc_frame = true
    } else if (r > n && (e.offsetHeight <= n || t.offsetHeight <= n)) {
      ssc_root.style.height = "auto";
      if (ssc_root.offsetHeight <= n) {
        var i = document.createElement("div");
        i.style.clear = "both";
        e.appendChild(i)
      }
    }
    if (!ssc_fixedback) {
      e.style.backgroundAttachment = "scroll";
      t.style.backgroundAttachment = "scroll"
    }
    if (ssc_keyboardsupport) {
      ssc_addEvent("keydown", ssc_keydown)
    }
  }
  
  function ssc_scrollArray(e, t, n, r) {
    r || (r = 1e3);
    ssc_directionCheck(t, n);
    ssc_que.push({
      x: t,
      y: n,
      lastX: t < 0 ? .99 : -.99,
      lastY: n < 0 ? .99 : -.99,
      start: +(new Date)
    });
    if (ssc_pending) {
      return
    }
    var i = function() {
      var s = +(new Date);
      var o = 0;
      var u = 0;
      for (var a = 0; a < ssc_que.length; a++) {
        var f = ssc_que[a];
        var l = s - f.start;
        var c = l >= ssc_animtime;
        var h = c ? 1 : l / ssc_animtime;
        if (ssc_pulseAlgorithm) {
          h = ssc_pulse(h)
        }
        var p = f.x * h - f.lastX >> 0;
        var d = f.y * h - f.lastY >> 0;
        o += p;
        u += d;
        f.lastX += p;
        f.lastY += d;
        if (c) {
          ssc_que.splice(a, 1);
          a--
        }
      }
      if (t) {
        var v = e.scrollLeft;
        e.scrollLeft += o;
        if (o && e.scrollLeft === v) {
          t = 0
        }
      }
      if (n) {
        var m = e.scrollTop;
        e.scrollTop += u;
        if (u && e.scrollTop === m) {
          n = 0
        }
      }
      if (!t && !n) {
        ssc_que = []
      }
      if (ssc_que.length) {
        setTimeout(i, r / ssc_framerate + 1)
      } else {
        ssc_pending = false
      }
    };
    setTimeout(i, 0);
    ssc_pending = true
  }
  
  function ssc_wheel(e) {
    if (!ssc_initdone) {
      ssc_init()
    }
    var t = e.target;
    var n = ssc_overflowingAncestor(t);
    if (!n || e.defaultPrevented || ssc_isNodeName(ssc_activeElement, "embed") || ssc_isNodeName(t, "embed") && /\.pdf/i.test(t.src)) {
      return true
    }
    var r = e.wheelDeltaX || 0;
    var i = e.wheelDeltaY || 0;
    if (!r && !i) {
      i = e.wheelDelta || 0
    }
    if (Math.abs(r) > 1.2) {
      r *= ssc_stepsize / 120
    }
    if (Math.abs(i) > 1.2) {
      i *= ssc_stepsize / 120
    }
    ssc_scrollArray(n, -r, -i);
    e.preventDefault()
  }
  
  function ssc_keydown(e) {
    var t = e.target;
    var n = e.ctrlKey || e.altKey || e.metaKey;
    if (/input|textarea|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) {
      return true
    }
    if (ssc_isNodeName(t, "button") && e.keyCode === ssc_key.spacebar) {
      return true
    }
    var r, i = 0,
        s = 0;
    var o = ssc_overflowingAncestor(ssc_activeElement);
    var u = o.clientHeight;
    if (o == document.body) {
      u = window.innerHeight
    }
    switch (e.keyCode) {
    case ssc_key.up:
      s = -ssc_arrowscroll;
      break;
    case ssc_key.down:
      s = ssc_arrowscroll;
      break;
    case ssc_key.spacebar:
      r = e.shiftKey ? 1 : -1;
      s = -r * u * .9;
      break;
    case ssc_key.pageup:
      s = -u * .9;
      break;
    case ssc_key.pagedown:
      s = u * .9;
      break;
    case ssc_key.home:
      s = -o.scrollTop;
      break;
    case ssc_key.end:
      var a = o.scrollHeight - o.scrollTop - u;
      s = a > 0 ? a + 10 : 0;
      break;
    case ssc_key.left:
      i = -ssc_arrowscroll;
      break;
    case ssc_key.right:
      i = ssc_arrowscroll;
      break;
    default:
      return true
    }
    ssc_scrollArray(o, i, s);
    e.preventDefault()
  }
  
  function ssc_mousedown(e) {
    ssc_activeElement = e.target
  }
  
  function ssc_setCache(e, t) {
    for (var n = e.length; n--;) ssc_cache[ssc_uniqueID(e[n])] = t;
    return t
  }
  
  function ssc_overflowingAncestor(e) {
    var t = [];
    var n = ssc_root.scrollHeight;
    do {
      var r = ssc_cache[ssc_uniqueID(e)];
      if (r) {
        return ssc_setCache(t, r)
      }
      t.push(e);
      if (n === e.scrollHeight) {
        if (!ssc_frame || ssc_root.clientHeight + 10 < n) {
          return ssc_setCache(t, document.body)
        }
      } else if (e.clientHeight + 10 < e.scrollHeight) {
        overflow = getComputedStyle(e, "").getPropertyValue("overflow");
        if (overflow === "scroll" || overflow === "auto") {
          return ssc_setCache(t, e)
        }
      }
    } while (e = e.parentNode)
  }
  
  function ssc_addEvent(e, t, n) {
    window.addEventListener(e, t, n || false)
  }
  
  function ssc_removeEvent(e, t, n) {
    window.removeEventListener(e, t, n || false)
  }
  
  function ssc_isNodeName(e, t) {
    return e.nodeName.toLowerCase() === t.toLowerCase()
  }
  
  function ssc_directionCheck(e, t) {
    e = e > 0 ? 1 : -1;
    t = t > 0 ? 1 : -1;
    if (ssc_direction.x !== e || ssc_direction.y !== t) {
      ssc_direction.x = e;
      ssc_direction.y = t;
      ssc_que = []
    }
  }
  
  function ssc_pulse_(e) {
    var t, n, r;
    e = e * ssc_pulseScale;
    if (e < 1) {
      t = e - (1 - Math.exp(-e))
    } else {
      n = Math.exp(-1);
      e -= 1;
      r = 1 - Math.exp(-e);
      t = n + r * (1 - n)
    }
    return t * ssc_pulseNormalize
  }
  
  function ssc_pulse(e) {
    if (e >= 1) return 1;
    if (e <= 0) return 0;
    if (ssc_pulseNormalize == 1) {
      ssc_pulseNormalize /= ssc_pulse_(1)
    }
    return ssc_pulse_(e)
  }
  
  var ssc_framerate = 150;
  var ssc_animtime = 500;
  var ssc_stepsize = 150;
  var ssc_pulseAlgorithm = true;
  var ssc_pulseScale = 6;
  var ssc_pulseNormalize = 1;
  var ssc_keyboardsupport = true;
  var ssc_arrowscroll = 50;
  var ssc_frame = false;
  var ssc_direction = {
    x: 0,
    y: 0
  };
  
  var ssc_initdone = false;
  var ssc_fixedback = true;
  var ssc_root = document.documentElement;
  var ssc_activeElement;
  var ssc_key = {
    left: 37,
    up: 38,
    right: 39,
    down: 40,
    spacebar: 32,
    pageup: 33,
    pagedown: 34,
    end: 35,
    home: 36
  };
  
  var ssc_que = [];
  var ssc_pending = false;
  var ssc_cache = {};
  
  setInterval(function() {
    ssc_cache = {}
  }, 10 * 1e3);
  
  var ssc_uniqueID = function() {
    var e = 0;
    return function(t) {
      return t.ssc_uniqueID || (t.ssc_uniqueID = e++)
    }
  }();
  
  var ischrome = /chrome/.test(navigator.userAgent.toLowerCase());
  
  if (ischrome) {
    ssc_addEvent("mousedown", ssc_mousedown);
    ssc_addEvent("mousewheel", ssc_wheel);
    ssc_addEvent("load", ssc_init)
  }
  
  
  
  /*
  * Nivo Lightbox v1.2.0
  * http://dev7studios.com/nivo-lightbox
  *
  * Copyright 2013, Dev7studios
  * Free to use and abuse under the MIT license.
  * http://www.opensource.org/licenses/mit-license.php
  */
  (function(e,t,n,r){function o(t,n){this.el=t;this.$el=e(this.el);this.options=e.extend({},s,n);this._defaults=s;this._name=i;this.init()}var i="nivoLightbox",s={effect:"fade",theme:"default",keyboardNav:true,clickOverlayToClose:true,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(e){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(e){},onNext:function(e){},errorMessage:"The requested content cannot be loaded. Please try again later."};o.prototype={init:function(){var t=this;if(!e("html").hasClass("nivo-lightbox-notouch"))e("html").addClass("nivo-lightbox-notouch");if("ontouchstart"in n)e("html").removeClass("nivo-lightbox-notouch");this.$el.on("click",function(e){t.showLightbox(e)});if(this.options.keyboardNav){e("body").off("keyup").on("keyup",function(n){var r=n.keyCode?n.keyCode:n.which;if(r==27)t.destructLightbox();if(r==37)e(".nivo-lightbox-prev").trigger("click");if(r==39)e(".nivo-lightbox-next").trigger("click")})}this.options.onInit.call(this)},showLightbox:function(t){var n=this,r=this.$el;var i=this.checkContent(r);if(!i)return;t.preventDefault();this.options.beforeShowLightbox.call(this);var s=this.constructLightbox();if(!s)return;var o=s.find(".nivo-lightbox-content");if(!o)return;e("body").addClass("nivo-lightbox-body-effect-"+this.options.effect);this.processContent(o,r);if(this.$el.attr("data-lightbox-gallery")){var u=e('[data-lightbox-gallery="'+this.$el.attr("data-lightbox-gallery")+'"]');e(".nivo-lightbox-nav").show();e(".nivo-lightbox-prev").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i-1);if(!e(r).length)r=u.last();n.processContent(o,r);n.options.onPrev.call(this,[r])});e(".nivo-lightbox-next").off("click").on("click",function(t){t.preventDefault();var i=u.index(r);r=u.eq(i+1);if(!e(r).length)r=u.first();n.processContent(o,r);n.options.onNext.call(this,[r])})}setTimeout(function(){s.addClass("nivo-lightbox-open");n.options.afterShowLightbox.call(this,[s])},1)},checkContent:function(e){var t=this,n=e.attr("href"),r=n.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);if(n.match(/\.(jpeg|jpg|gif|png)$/i)!==null){return true}else if(r){return true}else if(e.attr("data-lightbox-type")=="ajax"){return true}else if(n.substring(0,1)=="#"&&e.attr("data-lightbox-type")=="inline"){return true}else if(e.attr("data-lightbox-type")=="iframe"){return true}return false},processContent:function(n,r){var i=this,s=r.attr("href"),o=s.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);n.html("").addClass("nivo-lightbox-loading");if(this.isHidpi()&&r.attr("data-lightbox-hidpi")){s=r.attr("data-lightbox-hidpi")}if(s.match(/\.(jpeg|jpg|gif|png)$/i)!==null){var u=e("<img>",{src:s});u.one("load",function(){var r=e('<div class="nivo-lightbox-image" />');r.append(u);n.html(r).removeClass("nivo-lightbox-loading");r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"});e(t).resize(function(){r.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"})})}).each(function(){if(this.complete)e(this).load()});u.error(function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")})}else if(o){var a="",f="nivo-lightbox-video";if(o[1]=="youtube"){a="http://www.youtube.com/embed/"+o[4];f="nivo-lightbox-youtube"}if(o[1]=="youtu"){a="http://www.youtube.com/embed/"+o[3];f="nivo-lightbox-youtube"}if(o[1]=="vimeo"){a="http://player.vimeo.com/video/"+o[3];f="nivo-lightbox-vimeo"}if(a){var l=e("<iframe>",{src:a,"class":f,frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(l);l.load(function(){n.removeClass("nivo-lightbox-loading")})}}else if(r.attr("data-lightbox-type")=="ajax"){e.ajax({url:s,cache:false,success:function(r){var i=e('<div class="nivo-lightbox-ajax" />');i.append(r);n.html(i).removeClass("nivo-lightbox-loading");if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}e(t).resize(function(){if(i.outerHeight()<n.height()){i.css({position:"relative",top:"50%","margin-top":-(i.outerHeight()/2)+"px"})}})},error:function(){var t=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(t).removeClass("nivo-lightbox-loading")}})}else if(s.substring(0,1)=="#"&&r.attr("data-lightbox-type")=="inline"){if(e(s).length){var c=e('<div class="nivo-lightbox-inline" />');c.append(e(s).clone().show());n.html(c).removeClass("nivo-lightbox-loading");if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}e(t).resize(function(){if(c.outerHeight()<n.height()){c.css({position:"relative",top:"50%","margin-top":-(c.outerHeight()/2)+"px"})}})}else{var h=e('<div class="nivo-lightbox-error"><p>'+i.options.errorMessage+"</p></div>");n.html(h).removeClass("nivo-lightbox-loading")}}else if(r.attr("data-lightbox-type")=="iframe"){var p=e("<iframe>",{src:s,"class":"nivo-lightbox-item",frameborder:0,vspace:0,hspace:0,scrolling:"auto"});n.html(p);p.load(function(){n.removeClass("nivo-lightbox-loading")})}else{return false}if(r.attr("title")){var d=e("<span>",{"class":"nivo-lightbox-title"});d.text(r.attr("title"));e(".nivo-lightbox-title-wrap").html(d)}else{e(".nivo-lightbox-title-wrap").html("")}},constructLightbox:function(){if(e(".nivo-lightbox-overlay").length)return e(".nivo-lightbox-overlay");var t=e("<div>",{"class":"nivo-lightbox-overlay nivo-lightbox-theme-"+this.options.theme+" nivo-lightbox-effect-"+this.options.effect});var n=e("<div>",{"class":"nivo-lightbox-wrap"});var r=e("<div>",{"class":"nivo-lightbox-content"});var i=e('<a href="#" class="nivo-lightbox-nav nivo-lightbox-prev">Previous</a><a href="#" class="nivo-lightbox-nav nivo-lightbox-next">Next</a>');var s=e('<a href="#" class="nivo-lightbox-close" title="Close">Close</a>');var o=e("<div>",{"class":"nivo-lightbox-title-wrap"});var u=0;if(u)t.addClass("nivo-lightbox-ie");n.append(r);n.append(o);t.append(n);t.append(i);t.append(s);e("body").append(t);var a=this;if(a.options.clickOverlayToClose){t.on("click",function(t){if(t.target===this||e(t.target).hasClass("nivo-lightbox-content")||e(t.target).hasClass("nivo-lightbox-image")){a.destructLightbox()}})}s.on("click",function(e){e.preventDefault();a.destructLightbox()});return t},destructLightbox:function(){var t=this;this.options.beforeHideLightbox.call(this);e(".nivo-lightbox-overlay").removeClass("nivo-lightbox-open");e(".nivo-lightbox-nav").hide();e("body").removeClass("nivo-lightbox-body-effect-"+t.options.effect);var n=0;if(n){e(".nivo-lightbox-overlay iframe").attr("src"," ");e(".nivo-lightbox-overlay iframe").remove()}e(".nivo-lightbox-prev").off("click");e(".nivo-lightbox-next").off("click");e(".nivo-lightbox-content").empty();this.options.afterHideLightbox.call(this)},isHidpi:function(){var e="(-webkit-min-device-pixel-ratio: 1.5),                              (min--moz-device-pixel-ratio: 1.5),                              (-o-min-device-pixel-ratio: 3/2),                              (min-resolution: 1.5dppx)";if(t.devicePixelRatio>1)return true;if(t.matchMedia&&t.matchMedia(e).matches)return true;return false}};e.fn[i]=function(t){return this.each(function(){if(!e.data(this,i)){e.data(this,i,new o(this,t))}})}})(jQuery,window,document)