text: /*
   * jQuery FlexSlider v2.2.0
   * Copyright 2012 WooThemes
   * Contributing Author: Tyler Smith
   */
  ;
  (function ($) {
  
    //FlexSlider: Object Instance
    $.flexslider = function(el, options) {
      var slider = $(el);
  
      // making variables public
      slider.vars = $.extend({}, $.flexslider.defaults, options);
  
      var namespace = slider.vars.namespace,
          msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
          touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
          // depricating this idea, as devices are being released with both of these events
          //eventType = (touch) ? "touchend" : "click",
          eventType = "click touchend MSPointerUp",
          watchedEvent = "",
          watchedEventClearTimer,
          vertical = slider.vars.direction === "vertical",
          reverse = slider.vars.reverse,
          carousel = (slider.vars.itemWidth > 0),
          fade = slider.vars.animation === "fade",
          asNav = slider.vars.asNavFor !== "",
          methods = {},
          focused = true;
  
      // Store a reference to the slider object
      $.data(el, "flexslider", slider);
  
      // Private slider methods
      methods = {
        init: function() {
          slider.animating = false;
          // Get current slide and make sure it is a number
          slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0) );
          if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0;
          slider.animatingTo = slider.currentSlide;
          slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
          slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
          slider.slides = $(slider.vars.selector, slider);
          slider.container = $(slider.containerSelector, slider);
          slider.count = slider.slides.length;
          // SYNC:
          slider.syncExists = $(slider.vars.sync).length > 0;
          // SLIDE:
          if (slider.vars.animation === "slide") slider.vars.animation = "swing";
          slider.prop = (vertical) ? "top" : "marginLeft";
          slider.args = {};
          // SLIDESHOW:
          slider.manualPause = false;
          slider.stopped = false;
          //PAUSE WHEN INVISIBLE
          slider.started = false;
          slider.startTimeout = null;
          // TOUCH/USECSS:
          slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
            var obj = document.createElement('div'),
                props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
            for (var i in props) {
              if ( obj.style[ props[i] ] !== undefined ) {
                slider.pfx = props[i].replace('Perspective','').toLowerCase();
                slider.prop = "-" + slider.pfx + "-transform";
                return true;
              }
            }
            return false;
          }());
          // CONTROLSCONTAINER:
          if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
          // MANUAL:
          if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
  
          // RANDOMIZE:
          if (slider.vars.randomize) {
            slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
            slider.container.empty().append(slider.slides);
          }
  
          slider.doMath();
  
          // INIT
          slider.setup("init");
  
          // CONTROLNAV:
          if (slider.vars.controlNav) methods.controlNav.setup();
  
          // DIRECTIONNAV:
          if (slider.vars.directionNav) methods.directionNav.setup();
  
          // KEYBOARD:
          if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
            $(document).bind('keyup', function(event) {
              var keycode = event.keyCode;
              if (!slider.animating && (keycode === 39 || keycode === 37)) {
                var target = (keycode === 39) ? slider.getTarget('next') :
                             (keycode === 37) ? slider.getTarget('prev') : false;
                slider.flexAnimate(target, slider.vars.pauseOnAction);
              }
            });
          }
          // MOUSEWHEEL:
          if (slider.vars.mousewheel) {
            slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
              event.preventDefault();
              var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
              slider.flexAnimate(target, slider.vars.pauseOnAction);
            });
          }
  
          // PAUSEPLAY
          if (slider.vars.pausePlay) methods.pausePlay.setup();
  
          //PAUSE WHEN INVISIBLE
          if (slider.vars.slideshow && slider.vars.pauseInvisible) methods.pauseInvisible.init();
  
          // SLIDSESHOW
          if (slider.vars.slideshow) {
            if (slider.vars.pauseOnHover) {
              slider.hover(function() {
                if (!slider.manualPlay && !slider.manualPause) slider.pause();
              }, function() {
                if (!slider.manualPause && !slider.manualPlay && !slider.stopped) slider.play();
              });
            }
            // initialize animation
            //If we're visible, or we don't use PageVisibility API
            if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
              (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
            }
          }
  
          // ASNAV:
          if (asNav) methods.asNav.setup();
  
          // TOUCH
          if (touch && slider.vars.touch) methods.touch();
  
          // FADE&&SMOOTHHEIGHT || SLIDE:
          if (!fade || (fade && slider.vars.smoothHeight)) $(window).bind("resize orientationchange focus", methods.resize);
  
          slider.find("img").attr("draggable", "false");
  
          // API: start() Callback
          setTimeout(function(){
            slider.vars.start(slider);
          }, 200);
        },
        asNav: {
          setup: function() {
            slider.asNav = true;
            slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
            slider.currentItem = slider.currentSlide;
            slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
            if(!msGesture){
                slider.slides.click(function(e){
                  e.preventDefault();
                  var $slide = $(this),
                      target = $slide.index();
                  var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
                  if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
                    slider.flexAnimate(slider.getTarget("prev"), true);
                  } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
                    slider.direction = (slider.currentItem < target) ? "next" : "prev";
                    slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                  }
                });
            }else{
                el._slider = slider;
                slider.slides.each(function (){
                    var that = this;
                    that._gesture = new MSGesture();
                    that._gesture.target = that;
                    that.addEventListener("MSPointerDown", function (e){
                        e.preventDefault();
                        if(e.currentTarget._gesture)
                            e.currentTarget._gesture.addPointer(e.pointerId);
                    }, false);
                    that.addEventListener("MSGestureTap", function (e){
                        e.preventDefault();
                        var $slide = $(this),
                            target = $slide.index();
                        if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
                            slider.direction = (slider.currentItem < target) ? "next" : "prev";
                            slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                        }
                    });
                });
            }
          }
        },
        controlNav: {
          setup: function() {
            if (!slider.manualControls) {
              methods.controlNav.setupPaging();
            } else { // MANUALCONTROLS:
              methods.controlNav.setupManual();
            }
          },
          setupPaging: function() {
            var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
                j = 1,
                item,
                slide;
  
            slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
  
            if (slider.pagingCount > 1) {
              for (var i = 0; i < slider.pagingCount; i++) {
                slide = slider.slides.eq(i);
                item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
                if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
                  var captn = slide.attr( 'data-thumbcaption' );
                  if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>';
                }
                slider.controlNavScaffold.append('<li>' + item + '</li>');
                j++;
              }
            }
  
            // CONTROLSCONTAINER:
            (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
            methods.controlNav.set();
  
            methods.controlNav.active();
  
            slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
              event.preventDefault();
  
              if (watchedEvent === "" || watchedEvent === event.type) {
                var $this = $(this),
                    target = slider.controlNav.index($this);
  
                if (!$this.hasClass(namespace + 'active')) {
                  slider.direction = (target > slider.currentSlide) ? "next" : "prev";
                  slider.flexAnimate(target, slider.vars.pauseOnAction);
                }
              }
  
              // setup flags to prevent event duplication
              if (watchedEvent === "") {
                watchedEvent = event.type;
              }
              methods.setToClearWatchedEvent();
  
            });
          },
          setupManual: function() {
            slider.controlNav = slider.manualControls;
            methods.controlNav.active();
  
            slider.controlNav.bind(eventType, function(event) {
              event.preventDefault();
  
              if (watchedEvent === "" || watchedEvent === event.type) {
                var $this = $(this),
                    target = slider.controlNav.index($this);
  
                if (!$this.hasClass(namespace + 'active')) {
                  (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
                  slider.flexAnimate(target, slider.vars.pauseOnAction);
                }
              }
  
              // setup flags to prevent event duplication
              if (watchedEvent === "") {
                watchedEvent = event.type;
              }
              methods.setToClearWatchedEvent();
            });
          },
          set: function() {
            var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
            slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
          },
          active: function() {
            slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
          },
          update: function(action, pos) {
            if (slider.pagingCount > 1 && action === "add") {
              slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
            } else if (slider.pagingCount === 1) {
              slider.controlNavScaffold.find('li').remove();
            } else {
              slider.controlNav.eq(pos).closest('li').remove();
            }
            methods.controlNav.set();
            (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
          }
        },
        directionNav: {
          setup: function() {
            var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
  
            // CONTROLSCONTAINER:
            if (slider.controlsContainer) {
              $(slider.controlsContainer).append(directionNavScaffold);
              slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
            } else {
              slider.append(directionNavScaffold);
              slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
            }
  
            methods.directionNav.update();
  
            slider.directionNav.bind(eventType, function(event) {
              event.preventDefault();
              var target;
  
              if (watchedEvent === "" || watchedEvent === event.type) {
                target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
                slider.flexAnimate(target, slider.vars.pauseOnAction);
              }
  
              // setup flags to prevent event duplication
              if (watchedEvent === "") {
                watchedEvent = event.type;
              }
              methods.setToClearWatchedEvent();
            });
          },
          update: function() {
            var disabledClass = namespace + 'disabled';
            if (slider.pagingCount === 1) {
              slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
            } else if (!slider.vars.animationLoop) {
              if (slider.animatingTo === 0) {
                slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
              } else if (slider.animatingTo === slider.last) {
                slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
              } else {
                slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
              }
            } else {
              slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
            }
          }
        },
        pausePlay: {
          setup: function() {
            var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
  
            // CONTROLSCONTAINER:
            if (slider.controlsContainer) {
              slider.controlsContainer.append(pausePlayScaffold);
              slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
            } else {
              slider.append(pausePlayScaffold);
              slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
            }
  
            methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
  
            slider.pausePlay.bind(eventType, function(event) {
              event.preventDefault();
  
              if (watchedEvent === "" || watchedEvent === event.type) {
                if ($(this).hasClass(namespace + 'pause')) {
                  slider.manualPause = true;
                  slider.manualPlay = false;
                  slider.pause();
                } else {
                  slider.manualPause = false;
                  slider.manualPlay = true;
                  slider.play();
                }
              }
  
              // setup flags to prevent event duplication
              if (watchedEvent === "") {
                watchedEvent = event.type;
              }
              methods.setToClearWatchedEvent();
            });
          },
          update: function(state) {
            (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
          }
        },
        touch: function() {
          var startX,
            startY,
            offset,
            cwidth,
            dx,
            startT,
            scrolling = false,
            localX = 0,
            localY = 0,
            accDx = 0;
  
          if(!msGesture){
              el.addEventListener('touchstart', onTouchStart, false);
  
              function onTouchStart(e) {
                if (slider.animating) {
                  e.preventDefault();
                } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
                  slider.pause();
                  // CAROUSEL:
                  cwidth = (vertical) ? slider.h : slider. w;
                  startT = Number(new Date());
                  // CAROUSEL:
  
                  // Local vars for X and Y points.
                  localX = e.touches[0].pageX;
                  localY = e.touches[0].pageY;
  
                  offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                           (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                           (carousel && slider.currentSlide === slider.last) ? slider.limit :
                           (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                           (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                  startX = (vertical) ? localY : localX;
                  startY = (vertical) ? localX : localY;
  
                  el.addEventListener('touchmove', onTouchMove, false);
                  el.addEventListener('touchend', onTouchEnd, false);
                }
              }
  
              function onTouchMove(e) {
                // Local vars for X and Y points.
  
                localX = e.touches[0].pageX;
                localY = e.touches[0].pageY;
  
                dx = (vertical) ? startX - localY : startX - localX;
                scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
  
                var fxms = 500;
  
                if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
                  e.preventDefault();
                  if (!fade && slider.transitions) {
                    if (!slider.vars.animationLoop) {
                      dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
                    }
                    slider.setProps(offset + dx, "setTouch");
                  }
                }
              }
  
              function onTouchEnd(e) {
                // finish the touch by undoing the touch session
                el.removeEventListener('touchmove', onTouchMove, false);
  
                if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                  var updateDx = (reverse) ? -dx : dx,
                      target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
  
                  if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
                    slider.flexAnimate(target, slider.vars.pauseOnAction);
                  } else {
                    if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
                  }
                }
                el.removeEventListener('touchend', onTouchEnd, false);
  
                startX = null;
                startY = null;
                dx = null;
                offset = null;
              }
          }else{
              el.style.msTouchAction = "none";
              el._gesture = new MSGesture();
              el._gesture.target = el;
              el.addEventListener("MSPointerDown", onMSPointerDown, false);
              el._slider = slider;
              el.addEventListener("MSGestureChange", onMSGestureChange, false);
              el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
  
              function onMSPointerDown(e){
                  e.stopPropagation();
                  if (slider.animating) {
                      e.preventDefault();
                  }else{
                      slider.pause();
                      el._gesture.addPointer(e.pointerId);
                      accDx = 0;
                      cwidth = (vertical) ? slider.h : slider. w;
                      startT = Number(new Date());
                      // CAROUSEL:
  
                      offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                          (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                              (carousel && slider.currentSlide === slider.last) ? slider.limit :
                                  (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                                      (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                  }
              }
  
              function onMSGestureChange(e) {
                  e.stopPropagation();
                  var slider = e.target._slider;
                  if(!slider){
                      return;
                  }
                  var transX = -e.translationX,
                      transY = -e.translationY;
  
                  //Accumulate translations.
                  accDx = accDx + ((vertical) ? transY : transX);
                  dx = accDx;
                  scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
  
                  if(e.detail === e.MSGESTURE_FLAG_INERTIA){
                      setImmediate(function (){
                          el._gesture.stop();
                      });
  
                      return;
                  }
  
                  if (!scrolling || Number(new Date()) - startT > 500) {
                      e.preventDefault();
                      if (!fade && slider.transitions) {
                          if (!slider.vars.animationLoop) {
                              dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
                          }
                          slider.setProps(offset + dx, "setTouch");
                      }
                  }
              }
  
              function onMSGestureEnd(e) {
                  e.stopPropagation();
                  var slider = e.target._slider;
                  if(!slider){
                      return;
                  }
                  if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                      var updateDx = (reverse) ? -dx : dx,
                          target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
  
                      if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
                          slider.flexAnimate(target, slider.vars.pauseOnAction);
                      } else {
                          if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
                      }
                  }
  
                  startX = null;
                  startY = null;
                  dx = null;
                  offset = null;
                  accDx = 0;
              }
          }
        },
        resize: function() {
          if (!slider.animating && slider.is(':visible')) {
            if (!carousel) slider.doMath();
  
            if (fade) {
              // SMOOTH HEIGHT:
              methods.smoothHeight();
            } else if (carousel) { //CAROUSEL:
              slider.slides.width(slider.computedW);
              slider.update(slider.pagingCount);
              slider.setProps();
            }
            else if (vertical) { //VERTICAL:
              slider.viewport.height(slider.h);
              slider.setProps(slider.h, "setTotal");
            } else {
              // SMOOTH HEIGHT:
              if (slider.vars.smoothHeight) methods.smoothHeight();
              slider.newSlides.width(slider.computedW);
              slider.setProps(slider.computedW, "setTotal");
            }
          }
        },
        smoothHeight: function(dur) {
          if (!vertical || fade) {
            var $obj = (fade) ? slider : slider.viewport;
            (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
          }
        },
        sync: function(action) {
          var $obj = $(slider.vars.sync).data("flexslider"),
              target = slider.animatingTo;
  
          switch (action) {
            case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
            case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
            case "pause": $obj.pause(); break;
          }
        },
        pauseInvisible: {
          visProp: null,
          init: function() {
            var prefixes = ['webkit','moz','ms','o'];
  
            if ('hidden' in document) return 'hidden';
            for (var i = 0; i < prefixes.length; i++) {
              if ((prefixes[i] + 'Hidden') in document) 
              methods.pauseInvisible.visProp = prefixes[i] + 'Hidden';
            }
            if (methods.pauseInvisible.visProp) {
              var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
              document.addEventListener(evtname, function() {
                if (methods.pauseInvisible.isHidden()) {
                  if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
                  else slider.pause(); //Or just pause
                }
                else {
                  if(slider.started) slider.play(); //Initiated before, just play
                  else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it
                }
              });
            }       
          },
          isHidden: function() {
            return document[methods.pauseInvisible.visProp] || false;
          }
        },
        setToClearWatchedEvent: function() {
          clearTimeout(watchedEventClearTimer);
          watchedEventClearTimer = setTimeout(function() {
            watchedEvent = "";
          }, 3000);
        }
      }
  
      // public methods
      slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
        if (!slider.vars.animationLoop && target !== slider.currentSlide) {
          slider.direction = (target > slider.currentSlide) ? "next" : "prev";
        }
  
        if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
  
        if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
          if (asNav && withSync) {
            var master = $(slider.vars.asNavFor).data('flexslider');
            slider.atEnd = target === 0 || target === slider.count - 1;
            master.flexAnimate(target, true, false, true, fromNav);
            slider.direction = (slider.currentItem < target) ? "next" : "prev";
            master.direction = slider.direction;
  
            if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
              slider.currentItem = target;
              slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
              target = Math.floor(target/slider.visible);
            } else {
              slider.currentItem = target;
              slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
              return false;
            }
          }
  
          slider.animating = true;
          slider.animatingTo = target;
  
          // SLIDESHOW:
          if (pause) slider.pause();
  
          // API: before() animation Callback
          slider.vars.before(slider);
  
          // SYNC:
          if (slider.syncExists && !fromNav) methods.sync("animate");
  
          // CONTROLNAV
          if (slider.vars.controlNav) methods.controlNav.active();
  
          // !CAROUSEL:
          // CANDIDATE: slide active class (for add/remove slide)
          if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
  
          // INFINITE LOOP:
          // CANDIDATE: atEnd
          slider.atEnd = target === 0 || target === slider.last;
  
          // DIRECTIONNAV:
          if (slider.vars.directionNav) methods.directionNav.update();
  
          if (target === slider.last) {
            // API: end() of cycle Callback
            slider.vars.end(slider);
            // SLIDESHOW && !INFINITE LOOP:
            if (!slider.vars.animationLoop) slider.pause();
          }
  
          // SLIDE:
          if (!fade) {
            var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
                margin, slideString, calcNext;
  
            // INFINITE LOOP / REVERSE:
            if (carousel) {
              //margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
              margin = slider.vars.itemMargin;
              calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
              slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
            } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
              slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
            } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
              slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
            } else {
              slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
            }
            slider.setProps(slideString, "", slider.vars.animationSpeed);
            if (slider.transitions) {
              if (!slider.vars.animationLoop || !slider.atEnd) {
                slider.animating = false;
                slider.currentSlide = slider.animatingTo;
              }
              slider.container.unbind("webkitTransitionEnd transitionend");
              slider.container.bind("webkitTransitionEnd transitionend", function() {
                slider.wrapup(dimension);
              });
            } else {
              slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
                slider.wrapup(dimension);
              });
            }
          } else { // FADE:
            if (!touch) {
              //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
              //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
  
              slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
              slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
  
            } else {
              slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
              slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
              slider.wrapup(dimension);
            }
          }
          // SMOOTH HEIGHT:
          if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed);
        }
      }
      slider.wrapup = function(dimension) {
        // SLIDE:
        if (!fade && !carousel) {
          if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
            slider.setProps(dimension, "jumpEnd");
          } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
            slider.setProps(dimension, "jumpStart");
          }
        }
        slider.animating = false;
        slider.currentSlide = slider.animatingTo;
        // API: after() animation Callback
        slider.vars.after(slider);
      }
  
      // SLIDESHOW:
      slider.animateSlides = function() {
        if (!slider.animating && focused ) slider.flexAnimate(slider.getTarget("next"));
      }
      // SLIDESHOW:
      slider.pause = function() {
        clearInterval(slider.animatedSlides);
        slider.animatedSlides = null;
        slider.playing = false;
        // PAUSEPLAY:
        if (slider.vars.pausePlay) methods.pausePlay.update("play");
        // SYNC:
        if (slider.syncExists) methods.sync("pause");
      }
      // SLIDESHOW:
      slider.play = function() {
        if (slider.playing) clearInterval(slider.animatedSlides);
        slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
        slider.started = slider.playing = true;
        // PAUSEPLAY:
        if (slider.vars.pausePlay) methods.pausePlay.update("pause");
        // SYNC:
        if (slider.syncExists) methods.sync("play");
      }
      // STOP:
      slider.stop = function () {
        slider.pause();
        slider.stopped = true;
      }
      slider.canAdvance = function(target, fromNav) {
        // ASNAV:
        var last = (asNav) ? slider.pagingCount - 1 : slider.last;
        return (fromNav) ? true :
               (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
               (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
               (target === slider.currentSlide && !asNav) ? false :
               (slider.vars.animationLoop) ? true :
               (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
               (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
               true;
      }
      slider.getTarget = function(dir) {
        slider.direction = dir;
        if (dir === "next") {
          return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
        } else {
          return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
        }
      }
  
      // SLIDE:
      slider.setProps = function(pos, special, dur) {
        var target = (function() {
          var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
              posCalc = (function() {
                if (carousel) {
                  return (special === "setTouch") ? pos :
                         (reverse && slider.animatingTo === slider.last) ? 0 :
                         (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                         (slider.animatingTo === slider.last) ? slider.limit : posCheck;
                } else {
                  switch (special) {
                    case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
                    case "setTouch": return (reverse) ? pos : pos;
                    case "jumpEnd": return (reverse) ? pos : slider.count * pos;
                    case "jumpStart": return (reverse) ? slider.count * pos : pos;
                    default: return pos;
                  }
                }
              }());
  
              return (posCalc * -1) + "px";
            }());
  
        if (slider.transitions) {
          target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
          dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
          slider.container.css("-" + slider.pfx + "-transition-duration", dur);
        }
  
        slider.args[slider.prop] = target;
        if (slider.transitions || dur === undefined) slider.container.css(slider.args);
      }
  
      slider.setup = function(type) {
        // SLIDE:
        if (!fade) {
          var sliderOffset, arr;
  
          if (type === "init") {
            slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
            // INFINITE LOOP:
            slider.cloneCount = 0;
            slider.cloneOffset = 0;
            // REVERSE:
            if (reverse) {
              arr = $.makeArray(slider.slides).reverse();
              slider.slides = $(arr);
              slider.container.empty().append(slider.slides);
            }
          }
          // INFINITE LOOP && !CAROUSEL:
          if (slider.vars.animationLoop && !carousel) {
            slider.cloneCount = 2;
            slider.cloneOffset = 1;
            // clear out old clones
            if (type !== "init") slider.container.find('.clone').remove();
            slider.container.append(slider.slides.first().clone().addClass('clone').attr('aria-hidden', 'true')).prepend(slider.slides.last().clone().addClass('clone').attr('aria-hidden', 'true'));
          }
          slider.newSlides = $(slider.vars.selector, slider);
  
          sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
          // VERTICAL:
          if (vertical && !carousel) {
            slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
            setTimeout(function(){
              slider.newSlides.css({"display": "block"});
              slider.doMath();
              slider.viewport.height(slider.h);
              slider.setProps(sliderOffset * slider.h, "init");
            }, (type === "init") ? 100 : 0);
          } else {
            slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
            slider.setProps(sliderOffset * slider.computedW, "init");
            setTimeout(function(){
              slider.doMath();
              slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
              // SMOOTH HEIGHT:
              if (slider.vars.smoothHeight) methods.smoothHeight();
            }, (type === "init") ? 100 : 0);
          }
        } else { // FADE:
          slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
          if (type === "init") {
            if (!touch) {
              //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
            } else {
              slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
            }
          }
          // SMOOTH HEIGHT:
          if (slider.vars.smoothHeight) methods.smoothHeight();
        }
        // !CAROUSEL:
        // CANDIDATE: active slide
        if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
      }
  
  
      slider.doMath = function() {
        var slide = slider.slides.first(),
            slideMargin = slider.vars.itemMargin,
            minItems = slider.vars.minItems,
            maxItems = slider.vars.maxItems;
  
        slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
        slider.h = slide.height();
        slider.boxPadding = slide.outerWidth() - slide.width();
  
        // CAROUSEL:
        if (carousel) {
          slider.itemT = slider.vars.itemWidth + slideMargin;
          slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
          slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
          slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
                         (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
                         (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
  
          slider.visible = Math.floor(slider.w/(slider.itemW));
          slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
          slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
          slider.last =  slider.pagingCount - 1;
          slider.limit = (slider.pagingCount === 1) ? 0 :
                         (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
        } else {
          slider.itemW = slider.w;
          slider.pagingCount = slider.count;
          slider.last = slider.count - 1;
        }
        slider.computedW = slider.itemW - slider.boxPadding;
      }
  
  
      slider.update = function(pos, action) {
        slider.doMath();
  
        // update currentSlide and slider.animatingTo if necessary
        if (!carousel) {
          if (pos < slider.currentSlide) {
            slider.currentSlide += 1;
          } else if (pos <= slider.currentSlide && pos !== 0) {
            slider.currentSlide -= 1;
          }
          slider.animatingTo = slider.currentSlide;
        }
  
        // update controlNav
        if (slider.vars.controlNav && !slider.manualControls) {
          if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
            methods.controlNav.update("add");
          } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
            if (carousel && slider.currentSlide > slider.last) {
              slider.currentSlide -= 1;
              slider.animatingTo -= 1;
            }
            methods.controlNav.update("remove", slider.last);
          }
        }
        // update directionNav
        if (slider.vars.directionNav) methods.directionNav.update();
  
      }
  
      slider.addSlide = function(obj, pos) {
        var $obj = $(obj);
  
        slider.count += 1;
        slider.last = slider.count - 1;
  
        // append new slide
        if (vertical && reverse) {
          (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
        } else {
          (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
        }
  
        // update currentSlide, animatingTo, controlNav, and directionNav
        slider.update(pos, "add");
  
        // update slider.slides
        slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
        // re-setup the slider to accomdate new slide
        slider.setup();
  
        //FlexSlider: added() Callback
        slider.vars.added(slider);
      }
      slider.removeSlide = function(obj) {
        var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
  
        // update count
        slider.count -= 1;
        slider.last = slider.count - 1;
  
        // remove slide
        if (isNaN(obj)) {
          $(obj, slider.slides).remove();
        } else {
          (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
        }
  
        // update currentSlide, animatingTo, controlNav, and directionNav
        slider.doMath();
        slider.update(pos, "remove");
  
        // update slider.slides
        slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
        // re-setup the slider to accomdate new slide
        slider.setup();
  
        // FlexSlider: removed() Callback
        slider.vars.removed(slider);
      }
  
      //FlexSlider: Initialize
      methods.init();
    }
  
    // Ensure the slider isn't focussed if the window loses focus.
    $( window ).blur( function ( e ) {
      focused = false;
    }).focus( function ( e ) {
      focused = true;
    });
  
    //FlexSlider: Default Settings
    $.flexslider.defaults = {
      namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
      selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
      animation: "fade",              //String: Select your animation type, "fade" or "slide"
      easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
      direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
      reverse: false,                 //{NEW} Boolean: Reverse the animation direction
      animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
      smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
      startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
      slideshow: true,                //Boolean: Animate slider automatically
      slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
      animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
      initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
      randomize: false,               //Boolean: Randomize slide order
      thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
  
      // Usability features
      pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
      pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
      pauseInvisible: true,   		//{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
      useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
      touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
      video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
  
      // Primary Controls
      controlNav: true,               //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
      directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
      prevText: "Previous",           //String: Set the text for the "previous" directionNav item
      nextText: "Next",               //String: Set the text for the "next" directionNav item
  
      // Secondary Navigation
      keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
      multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
      mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
      pausePlay: false,               //Boolean: Create pause/play dynamic element
      pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
      playText: "Play",               //String: Set the text for the "play" pausePlay item
  
      // Special properties
      controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
      manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
      sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
      asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
  
      // Carousel Options
      itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
      itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
      minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
      maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
      move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
      allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
  
      // Callback API
      start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
      before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
      after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
      end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
      added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
      removed: function(){}           //{NEW} Callback: function(slider) - Fires after a slide is removed
    }
  
  
    //FlexSlider: Plugin Function
    $.fn.flexslider = function(options) {
      if (options === undefined) options = {};
  
      if (typeof options === "object") {
        return this.each(function() {
          var $this = $(this),
              selector = (options.selector) ? options.selector : ".slides > li",
              $slides = $this.find(selector);
  
        if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
            $slides.fadeIn(400);
            if (options.start) options.start($this);
          } else if ($this.data('flexslider') === undefined) {
            new $.flexslider(this, options);
          }
        });
      } else {
        // Helper strings to quickly perform functions on the slider
        var $slider = $(this).data('flexslider');
        switch (options) {
          case "play": $slider.play(); break;
          case "pause": $slider.pause(); break;
          case "stop": $slider.stop(); break;
          case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
          case "prev":
          case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
          default: if (typeof options === "number") $slider.flexAnimate(options, true);
        }
      }
    }
  })(jQuery);
  
  /**
  * jquery.matchHeight.js v0.5.2
  * http://brm.io/jquery-match-height/
  * License: MIT
  */
  
  ;(function($) {
      /*
      *  internal
      */
  
      var _previousResizeWidth = -1,
          _updateTimeout = -1;
  
      /*
      *  _rows
      *  utility function returns array of jQuery selections representing each row
      *  (as displayed after float wrapping applied by browser)
      */
  
      var _rows = function(elements) {
          var tolerance = 1,
              $elements = $(elements),
              lastTop = null,
              rows = [];
  
          // group elements by their top position
          $elements.each(function(){
              var $that = $(this),
                  top = $that.offset().top - _parse($that.css('margin-top')),
                  lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
  
              if (lastRow === null) {
                  // first item on the row, so just push it
                  rows.push($that);
              } else {
                  // if the row top is the same, add to the row group
                  if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
                      rows[rows.length - 1] = lastRow.add($that);
                  } else {
                      // otherwise start a new row group
                      rows.push($that);
                  }
              }
  
              // keep track of the last row top
              lastTop = top;
          });
  
          return rows;
      };
  
      /*
      *  _parse
      *  value parse utility function
      */
  
      var _parse = function(value) {
          // parse value and convert NaN to 0
          return parseFloat(value) || 0;
      };
  
      /*
      *  _parseOptions
      *  handle plugin options
      */
  
      var _parseOptions = function(options) {
          var opts = {
              byRow: true,
              remove: false,
              property: 'height'
          };
  
          if (typeof options === 'object') {
              return $.extend(opts, options);
          }
  
          if (typeof options === 'boolean') {
              opts.byRow = options;
          } else if (options === 'remove') {
              opts.remove = true;
          }
  
          return opts;
      };
  
      /*
      *  matchHeight
      *  plugin definition
      */
  
      var matchHeight = $.fn.matchHeight = function(options) {
          var opts = _parseOptions(options);
  
          // handle remove
          if (opts.remove) {
              var that = this;
  
              // remove fixed height from all selected elements
              this.css(opts.property, '');
  
              // remove selected elements from all groups
              $.each(matchHeight._groups, function(key, group) {
                  group.elements = group.elements.not(that);
              });
  
              // TODO: cleanup empty groups
  
              return this;
          }
  
          if (this.length <= 1)
              return this;
  
          // keep track of this group so we can re-apply later on load and resize events
          matchHeight._groups.push({
              elements: this,
              options: opts
          });
  
          // match each element's height to the tallest element in the selection
          matchHeight._apply(this, opts);
  
          return this;
      };
  
      /*
      *  plugin global options
      */
  
      matchHeight._groups = [];
      matchHeight._throttle = 80;
      matchHeight._maintainScroll = false;
      matchHeight._beforeUpdate = null;
      matchHeight._afterUpdate = null;
  
      /*
      *  matchHeight._apply
      *  apply matchHeight to given elements
      */
  
      matchHeight._apply = function(elements, options) {
          var opts = _parseOptions(options),
              $elements = $(elements),
              rows = [$elements];
  
          // take note of scroll position
          var scrollTop = $(window).scrollTop(),
              htmlHeight = $('html').outerHeight(true);
  
          // get hidden parents
          var $hiddenParents = $elements.parents().filter(':hidden');
  
          // cache the original inline style
          $hiddenParents.each(function() {
              var $that = $(this);
              $that.data('style-cache', $that.attr('style'));
          });
  
          // temporarily must force hidden parents visible
          $hiddenParents.css('display', 'block');
  
          // get rows if using byRow, otherwise assume one row
          if (opts.byRow) {
  
              // must first force an arbitrary equal height so floating elements break evenly
              $elements.each(function() {
                  var $that = $(this),
                      display = $that.css('display') === 'inline-block' ? 'inline-block' : 'block';
  
                  // cache the original inline style
                  $that.data('style-cache', $that.attr('style'));
  
                  $that.css({
                      'display': display,
                      'padding-top': '0',
                      'padding-bottom': '0',
                      'margin-top': '0',
                      'margin-bottom': '0',
                      'border-top-width': '0',
                      'border-bottom-width': '0',
                      'height': '100px'
                  });
              });
  
              // get the array of rows (based on element top position)
              rows = _rows($elements);
  
              // revert original inline styles
              $elements.each(function() {
                  var $that = $(this);
                  $that.attr('style', $that.data('style-cache') || '');
              });
          }
  
          $.each(rows, function(key, row) {
              var $row = $(row),
                  maxHeight = 0;
  
              // skip apply to rows with only one item
              if (opts.byRow && $row.length <= 1) {
                  $row.css(opts.property, '');
                  return;
              }
  
              // iterate the row and find the max height
              $row.each(function(){
                  var $that = $(this),
                      display = $that.css('display') === 'inline-block' ? 'inline-block' : 'block';
  
                  // ensure we get the correct actual height (and not a previously set height value)
                  var css = { 'display': display };
                  css[opts.property] = '';
                  $that.css(css);
  
                  // find the max height (including padding, but not margin)
                  if ($that.outerHeight(false) > maxHeight)
                      maxHeight = $that.outerHeight(false);
  
                  // revert display block
                  $that.css('display', '');
              });
  
              // iterate the row and apply the height to all elements
              $row.each(function(){
                  var $that = $(this),
                      verticalPadding = 0;
  
                  // handle padding and border correctly (required when not using border-box)
                  if ($that.css('box-sizing') !== 'border-box') {
                      verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
                      verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
                  }
  
                  // set the height (accounting for padding and border)
                  $that.css(opts.property, maxHeight - verticalPadding);
              });
          });
  
          // revert hidden parents
          $hiddenParents.each(function() {
              var $that = $(this);
              $that.attr('style', $that.data('style-cache') || null);
          });
  
          // restore scroll position if enabled
          if (matchHeight._maintainScroll)
              $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
  
          return this;
      };
  
      /*
      *  matchHeight._applyDataApi
      *  applies matchHeight to all elements with a data-match-height attribute
      */
  
      matchHeight._applyDataApi = function() {
          var groups = {};
  
          // generate groups by their groupId set by elements using data-match-height
          $('[data-match-height], [data-mh]').each(function() {
              var $this = $(this),
                  groupId = $this.attr('data-match-height') || $this.attr('data-mh');
              if (groupId in groups) {
                  groups[groupId] = groups[groupId].add($this);
              } else {
                  groups[groupId] = $this;
              }
          });
  
          // apply matchHeight to each group
          $.each(groups, function() {
              this.matchHeight(true);
          });
      };
  
      /*
      *  matchHeight._update
      *  updates matchHeight on all current groups with their correct options
      */
  
      var _update = function(event) {
          if (matchHeight._beforeUpdate)
              matchHeight._beforeUpdate(event, matchHeight._groups);
  
          $.each(matchHeight._groups, function() {
              matchHeight._apply(this.elements, this.options);
          });
  
          if (matchHeight._afterUpdate)
              matchHeight._afterUpdate(event, matchHeight._groups);
      };
  
      matchHeight._update = function(throttle, event) {
          // prevent update if fired from a resize event
          // where the viewport width hasn't actually changed
          // fixes an event looping bug in IE8
          if (event && event.type === 'resize') {
              var windowWidth = $(window).width();
              if (windowWidth === _previousResizeWidth)
                  return;
              _previousResizeWidth = windowWidth;
          }
  
          // throttle updates
          if (!throttle) {
              _update(event);
          } else if (_updateTimeout === -1) {
              _updateTimeout = setTimeout(function() {
                  _update(event);
                  _updateTimeout = -1;
              }, matchHeight._throttle);
          }
      };
  
      /*
      *  bind events
      */
  
      // apply on DOM ready event
      $(matchHeight._applyDataApi);
  
      // update heights on load and resize events
      $(window).bind('load', function(event) {
          matchHeight._update(false, event);
      });
  
      // throttled update heights on resize events
      $(window).bind('resize orientationchange', function(event) {
          matchHeight._update(true, event);
      });
  
  })(jQuery);
  /* global twentyseventeenScreenReaderText */
  (function( $ ) {
  
  	// Variables and DOM Caching.
  	var $body = $( 'body' ),
  		$customHeader = $body.find( '.custom-header' ),
  		$branding = $customHeader.find( '.site-branding' ),
  		$navigation = $body.find( '.navigation-top' ),
  		$navWrap = $navigation.find( '.wrap' ),
  		$navMenuItem = $navigation.find( '.menu-item' ),
  		$menuToggle = $navigation.find( '.menu-toggle' ),
  		$menuScrollDown = $body.find( '.menu-scroll-down' ),
  		$sidebar = $body.find( '#secondary' ),
  		$entryContent = $body.find( '.entry-content' ),
  		$formatQuote = $body.find( '.format-quote blockquote' ),
  		isFrontPage = $body.hasClass( 'twentyseventeen-front-page' ) || $body.hasClass( 'home blog' ),
  		navigationFixedClass = 'site-navigation-fixed',
  		navigationHeight,
  		navigationOuterHeight,
  		navPadding,
  		navMenuItemHeight,
  		idealNavHeight,
  		navIsNotTooTall,
  		headerOffset,
  		menuTop = 0,
  		resizeTimer;
  
  	// Ensure the sticky navigation doesn't cover current focused links.
  	$( 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]', '.site-content-contain' ).filter( ':visible' ).focus( function() {
  		if ( $navigation.hasClass( 'site-navigation-fixed' ) ) {
  			var windowScrollTop = $( window ).scrollTop(),
  				fixedNavHeight = $navigation.height(),
  				itemScrollTop = $( this ).offset().top,
  				offsetDiff = itemScrollTop - windowScrollTop;
  
  			// Account for Admin bar.
  			if ( $( '#wpadminbar' ).length ) {
  				offsetDiff -= $( '#wpadminbar' ).height();
  			}
  
  			if ( offsetDiff < fixedNavHeight ) {
  				$( window ).scrollTo( itemScrollTop - ( fixedNavHeight + 50 ), 0 );
  			}
  		}
  	});
  
  	// Set properties of navigation.
  	function setNavProps() {
  		navigationHeight      = $navigation.height();
  		navigationOuterHeight = $navigation.outerHeight();
  		navPadding            = parseFloat( $navWrap.css( 'padding-top' ) ) * 2;
  		navMenuItemHeight     = $navMenuItem.outerHeight() * 2;
  		idealNavHeight        = navPadding + navMenuItemHeight;
  		navIsNotTooTall       = navigationHeight <= idealNavHeight;
  	}
  
  	// Make navigation 'stick'.
  	function adjustScrollClass() {
  
  		// Make sure we're not on a mobile screen.
  		if ( 'none' === $menuToggle.css( 'display' ) ) {
  
  			// Make sure the nav isn't taller than two rows.
  			if ( navIsNotTooTall ) {
  
  				// When there's a custom header image or video, the header offset includes the height of the navigation.
  				if ( isFrontPage && ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'has-header-video' ) ) ) {
  					headerOffset = $customHeader.innerHeight() - navigationOuterHeight;
  				} else {
  					headerOffset = $customHeader.innerHeight();
  				}
  
  				// If the scroll is more than the custom header, set the fixed class.
  				if ( $( window ).scrollTop() >= headerOffset ) {
  					$navigation.addClass( navigationFixedClass );
  				} else {
  					$navigation.removeClass( navigationFixedClass );
  				}
  
  			} else {
  
  				// Remove 'fixed' class if nav is taller than two rows.
  				$navigation.removeClass( navigationFixedClass );
  			}
  		}
  	}
  
  	// Set margins of branding in header.
  	function adjustHeaderHeight() {
  		if ( 'none' === $menuToggle.css( 'display' ) ) {
  
  			// The margin should be applied to different elements on front-page or home vs interior pages.
  			if ( isFrontPage ) {
  				$branding.css( 'margin-bottom', navigationOuterHeight );
  			} else {
  				$customHeader.css( 'margin-bottom', navigationOuterHeight );
  			}
  
  		} else {
  			$customHeader.css( 'margin-bottom', '0' );
  			$branding.css( 'margin-bottom', '0' );
  		}
  	}
  
  	// Set icon for quotes.
  	function setQuotesIcon() {
  		$( twentyseventeenScreenReaderText.quote ).prependTo( $formatQuote );
  	}
  
  	// Add 'below-entry-meta' class to elements.
  	function belowEntryMetaClass( param ) {
  		var sidebarPos, sidebarPosBottom;
  
  		if ( ! $body.hasClass( 'has-sidebar' ) || (
  			$body.hasClass( 'search' ) ||
  			$body.hasClass( 'single-attachment' ) ||
  			$body.hasClass( 'error404' ) ||
  			$body.hasClass( 'twentyseventeen-front-page' )
  		) ) {
  			return;
  		}
  
  		sidebarPos       = $sidebar.offset();
  		sidebarPosBottom = sidebarPos.top + ( $sidebar.height() + 28 );
  
  		$entryContent.find( param ).each( function() {
  			var $element = $( this ),
  				elementPos = $element.offset(),
  				elementPosTop = elementPos.top;
  
  			// Add 'below-entry-meta' to elements below the entry meta.
  			if ( elementPosTop > sidebarPosBottom ) {
  				$element.addClass( 'below-entry-meta' );
  			} else {
  				$element.removeClass( 'below-entry-meta' );
  			}
  		});
  	}
  
  	/*
  	 * Test if inline SVGs are supported.
  	 * @link https://github.com/Modernizr/Modernizr/
  	 */
  	function supportsInlineSVG() {
  		var div = document.createElement( 'div' );
  		div.innerHTML = '<svg/>';
  		return 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI );
  	}
  
  	/**
  	 * Test if an iOS device.
  	*/
  	function checkiOS() {
  		return /iPad|iPhone|iPod/.test(navigator.userAgent) && ! window.MSStream;
  	}
  
  	/*
  	 * Test if background-attachment: fixed is supported.
  	 * @link http://stackoverflow.com/questions/14115080/detect-support-for-background-attachment-fixed
  	 */
  	function supportsFixedBackground() {
  		var el = document.createElement('div'),
  			isSupported;
  
  		try {
  			if ( ! ( 'backgroundAttachment' in el.style ) || checkiOS() ) {
  				return false;
  			}
  			el.style.backgroundAttachment = 'fixed';
  			isSupported = ( 'fixed' === el.style.backgroundAttachment );
  			return isSupported;
  		}
  		catch (e) {
  			return false;
  		}
  	}
  
  	// Fire on document ready.
  	$( document ).ready( function() {
  
  		// If navigation menu is present on page, setNavProps and adjustScrollClass.
  		if ( $navigation.length ) {
  			setNavProps();
  			adjustScrollClass();
  		}
  
  		// If 'Scroll Down' arrow in present on page, calculate scroll offset and bind an event handler to the click event.
  		if ( $menuScrollDown.length ) {
  
  			if ( $( 'body' ).hasClass( 'admin-bar' ) ) {
  				menuTop -= 32;
  			}
  			if ( $( 'body' ).hasClass( 'blog' ) ) {
  				menuTop -= 30; // The div for latest posts has no space above content, add some to account for this.
  			}
  			if ( ! $navigation.length ) {
  				navigationOuterHeight = 0;
  			}
  
  			$menuScrollDown.click( function( e ) {
  				e.preventDefault();
  				$( window ).scrollTo( '#primary', {
  					duration: 600,
  					offset: { top: menuTop - navigationOuterHeight }
  				});
  			});
  		}
  
  		adjustHeaderHeight();
  		setQuotesIcon();
  		if ( true === supportsInlineSVG() ) {
  			document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' );
  		}
  
  		if ( true === supportsFixedBackground() ) {
  			document.documentElement.className += ' background-fixed';
  		}
  	});
  
  	// If navigation menu is present on page, adjust it on scroll and screen resize.
  	if ( $navigation.length ) {
  
  		// On scroll, we want to stick/unstick the navigation.
  		$( window ).on( 'scroll', function() {
  			adjustScrollClass();
  			adjustHeaderHeight();
  		});
  
  		// Also want to make sure the navigation is where it should be on resize.
  		$( window ).resize( function() {
  			setNavProps();
  			setTimeout( adjustScrollClass, 500 );
  		});
  	}
  
  	$( window ).resize( function() {
  		clearTimeout( resizeTimer );
  		resizeTimer = setTimeout( function() {
  			belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' );
  		}, 300 );
  		setTimeout( adjustHeaderHeight, 1000 );
  	});
  
  	// Add header video class after the video is loaded.
  	$( document ).on( 'wp-custom-header-video-loaded', function() {
  		$body.addClass( 'has-header-video' );
  	});
  
  })( jQuery );
  
  /**
  * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
  */
  ;(function(window, document) {
  /*jshint evil:true */
    /** version */
    var version = '3.7.3';
  
    /** Preset options */
    var options = window.html5 || {};
  
    /** Used to skip problem elements */
    var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
  
    /** Not all elements can be cloned in IE **/
    var saveClones = /^(?: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;
  
    /** Detect whether the browser supports default html5 styles */
    var supportsHtml5Styles;
  
    /** Name of the expando, to work with multiple documents or to re-shiv one document */
    var expando = '_html5shiv';
  
    /** The id for the the documents expando */
    var expanID = 0;
  
    /** Cached data for each document */
    var expandoData = {};
  
    /** Detect whether the browser supports unknown elements */
    var supportsUnknownElements;
  
    (function() {
      try {
          var a = document.createElement('a');
          a.innerHTML = '<xyz></xyz>';
          //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
          supportsHtml5Styles = ('hidden' in a);
  
          supportsUnknownElements = a.childNodes.length == 1 || (function() {
            // assign a false positive if unable to shiv
            (document.createElement)('a');
            var frag = document.createDocumentFragment();
            return (
              typeof frag.cloneNode == 'undefined' ||
              typeof frag.createDocumentFragment == 'undefined' ||
              typeof frag.createElement == 'undefined'
            );
          }());
      } catch(e) {
        // assign a false positive if detection fails => unable to shiv
        supportsHtml5Styles = true;
        supportsUnknownElements = true;
      }
  
    }());
  
    /*--------------------------------------------------------------------------*/
  
    /**
     * Creates a style sheet with the given CSS text and adds it to the document.
     * @private
     * @param {Document} ownerDocument The document.
     * @param {String} cssText The CSS text.
     * @returns {StyleSheet} The style element.
     */
    function addStyleSheet(ownerDocument, cssText) {
      var p = ownerDocument.createElement('p'),
          parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
  
      p.innerHTML = 'x<style>' + cssText + '</style>';
      return parent.insertBefore(p.lastChild, parent.firstChild);
    }
  
    /**
     * Returns the value of `html5.elements` as an array.
     * @private
     * @returns {Array} An array of shived element node names.
     */
    function getElements() {
      var elements = html5.elements;
      return typeof elements == 'string' ? elements.split(' ') : elements;
    }
  
    /**
     * Extends the built-in list of html5 elements
     * @memberOf html5
     * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
     * @param {Document} ownerDocument The context document.
     */
    function addElements(newElements, ownerDocument) {
      var elements = html5.elements;
      if(typeof elements != 'string'){
        elements = elements.join(' ');
      }
      if(typeof newElements != 'string'){
        newElements = newElements.join(' ');
      }
      html5.elements = elements +' '+ newElements;
      shivDocument(ownerDocument);
    }
  
     /**
     * Returns the data associated to the given document
     * @private
     * @param {Document} ownerDocument The document.
     * @returns {Object} An object of data.
     */
    function getExpandoData(ownerDocument) {
      var data = expandoData[ownerDocument[expando]];
      if (!data) {
          data = {};
          expanID++;
          ownerDocument[expando] = expanID;
          expandoData[expanID] = data;
      }
      return data;
    }
  
    /**
     * returns a shived element for the given nodeName and document
     * @memberOf html5
     * @param {String} nodeName name of the element
     * @param {Document|DocumentFragment} ownerDocument The context document.
     * @returns {Object} The shived element.
     */
    function createElement(nodeName, ownerDocument, data){
      if (!ownerDocument) {
          ownerDocument = document;
      }
      if(supportsUnknownElements){
          return ownerDocument.createElement(nodeName);
      }
      if (!data) {
          data = getExpandoData(ownerDocument);
      }
      var node;
  
      if (data.cache[nodeName]) {
          node = data.cache[nodeName].cloneNode();
      } else if (saveClones.test(nodeName)) {
          node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
      } else {
          node = data.createElem(nodeName);
      }
  
      // Avoid adding some elements to fragments in IE < 9 because
      // * Attributes like `name` or `type` cannot be set/changed once an element
      //   is inserted into a document/fragment
      // * Link elements with `src` attributes that are inaccessible, as with
      //   a 403 response, will cause the tab/window to crash
      // * Script elements appended to fragments will execute when their `src`
      //   or `text` property is set
      return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
    }
  
    /**
     * returns a shived DocumentFragment for the given document
     * @memberOf html5
     * @param {Document} ownerDocument The context document.
     * @returns {Object} The shived DocumentFragment.
     */
    function createDocumentFragment(ownerDocument, data){
      if (!ownerDocument) {
          ownerDocument = document;
      }
      if(supportsUnknownElements){
          return ownerDocument.createDocumentFragment();
      }
      data = data || getExpandoData(ownerDocument);
      var clone = data.frag.cloneNode(),
          i = 0,
          elems = getElements(),
          l = elems.length;
      for(;i<l;i++){
          clone.createElement(elems[i]);
      }
      return clone;
    }
  
    /**
     * Shivs the `createElement` and `createDocumentFragment` methods of the document.
     * @private
     * @param {Document|DocumentFragment} ownerDocument The document.
     * @param {Object} data of the document.
     */
    function shivMethods(ownerDocument, data) {
      if (!data.cache) {
          data.cache = {};
          data.createElem = ownerDocument.createElement;
          data.createFrag = ownerDocument.createDocumentFragment;
          data.frag = data.createFrag();
      }
  
  
      ownerDocument.createElement = function(nodeName) {
        //abort shiv
        if (!html5.shivMethods) {
            return data.createElem(nodeName);
        }
        return createElement(nodeName, ownerDocument, data);
      };
  
      ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
        'var n=f.cloneNode(),c=n.createElement;' +
        'h.shivMethods&&(' +
          // unroll the `createElement` calls
          getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
            data.createElem(nodeName);
            data.frag.createElement(nodeName);
            return 'c("' + nodeName + '")';
          }) +
        ');return n}'
      )(html5, data.frag);
    }
  
    /*--------------------------------------------------------------------------*/
  
    /**
     * Shivs the given document.
     * @memberOf html5
     * @param {Document} ownerDocument The document to shiv.
     * @returns {Document} The shived document.
     */
    function shivDocument(ownerDocument) {
      if (!ownerDocument) {
          ownerDocument = document;
      }
      var data = getExpandoData(ownerDocument);
  
      if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
        data.hasCSS = !!addStyleSheet(ownerDocument,
          // corrects block display not defined in IE6/7/8/9
          'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
          // adds styling not present in IE6/7/8/9
          'mark{background:#FF0;color:#000}' +
          // hides non-rendered elements
          'template{display:none}'
        );
      }
      if (!supportsUnknownElements) {
        shivMethods(ownerDocument, data);
      }
      return ownerDocument;
    }
  
    /*--------------------------------------------------------------------------*/
  
    /**
     * The `html5` object is exposed so that more elements can be shived and
     * existing shiving can be detected on iframes.
     * @type Object
     * @example
     *
     * // options can be changed before the script is included
     * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
     */
    var html5 = {
  
      /**
       * An array or space separated string of node names of the elements to shiv.
       * @memberOf html5
       * @type Array|String
       */
      'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
  
      /**
       * current version of html5shiv
       */
      'version': version,
  
      /**
       * A flag to indicate that the HTML5 style sheet should be inserted.
       * @memberOf html5
       * @type Boolean
       */
      'shivCSS': (options.shivCSS !== false),
  
      /**
       * Is equal to true if a browser supports creating unknown/HTML5 elements
       * @memberOf html5
       * @type boolean
       */
      'supportsUnknownElements': supportsUnknownElements,
  
      /**
       * A flag to indicate that the document's `createElement` and `createDocumentFragment`
       * methods should be overwritten.
       * @memberOf html5
       * @type Boolean
       */
      'shivMethods': (options.shivMethods !== false),
  
      /**
       * A string to describe the type of `html5` object ("default" or "default print").
       * @memberOf html5
       * @type String
       */
      'type': 'default',
  
      // shivs the document according to the specified `html5` object options
      'shivDocument': shivDocument,
  
      //creates a shived element
      createElement: createElement,
  
      //creates a shived documentFragment
      createDocumentFragment: createDocumentFragment,
  
      //extends list of elements
      addElements: addElements
    };
  
    /*--------------------------------------------------------------------------*/
  
    // expose html5
    window.html5 = html5;
  
    // shiv the document
    shivDocument(document);
  
    if(typeof module == 'object' && module.exports){
      module.exports = html5;
    }
  
  }(typeof window !== "undefined" ? window : this, document));
  /*!
   * jQuery.scrollTo
   * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
   * Licensed under MIT
   * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
   * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
   * @author Ariel Flesler
   * @version 2.1.2
   */
  ;(function(factory) {
  	'use strict';
  	if (typeof define === 'function' && define.amd) {
  		// AMD
  		define( ['jquery'], factory );
  	} else if (typeof module !== 'undefined' && module.exports) {
  		// CommonJS
  		module.exports = factory( require( 'jquery' ) );
  	} else {
  		// Global
  		factory( jQuery );
  	}
  })(function($) {
  	'use strict';
  
  	var $scrollTo = $.scrollTo = function(target, duration, settings) {
  		return $( window ).scrollTo( target, duration, settings );
  	};
  
  	$scrollTo.defaults = {
  		axis:'xy',
  		duration: 0,
  		limit:true
  	};
  
  	function isWin(elem) {
  		return ! elem.nodeName ||
  			$.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) !== -1;
  	}
  
  	$.fn.scrollTo = function(target, duration, settings) {
  		if (typeof duration === 'object') {
  			settings = duration;
  			duration = 0;
  		}
  		if (typeof settings === 'function') {
  			settings = { onAfter:settings };
  		}
  		if (target === 'max') {
  			target = 9e9;
  		}
  
  		settings = $.extend( {}, $scrollTo.defaults, settings );
  		// Speed is still recognized for backwards compatibility
  		duration = duration || settings.duration;
  		// Make sure the settings are given right
  		var queue = settings.queue && settings.axis.length > 1;
  		if (queue) {
  			// Let's keep the overall duration
  			duration /= 2;
  		}
  		settings.offset = both( settings.offset );
  		settings.over = both( settings.over );
  
  		return this.each(function() {
  			// Null target yields nothing, just like jQuery does
  			if (target === null) { return; }
  
  			var win = isWin( this ),
  				elem = win ? this.contentWindow || window : this,
  				$elem = $( elem ),
  				targ = target,
  				attr = {},
  				toff;
  
  			switch (typeof targ) {
  				// A number will pass the regex
  				case 'number':
  				case 'string':
  					if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test( targ )) {
  						targ = both( targ );
  						// We are done
  						break;
  					}
  					// Relative/Absolute selector
  					targ = win ? $( targ ) : $( targ, elem );
  					/* falls through */
  				case 'object':
  					if (targ.length === 0) { return; }
  					// DOMElement / jQuery
  					if (targ.is || targ.style) {
  						// Get the real position of the target
  						toff = (targ = $( targ )).offset();
  					}
  			}
  
  			var offset = $.isFunction( settings.offset ) && settings.offset( elem, targ ) || settings.offset;
  
  			$.each(settings.axis.split( '' ), function(i, axis) {
  				var Pos	= axis === 'x' ? 'Left' : 'Top',
  					pos = Pos.toLowerCase(),
  					key = 'scroll' + Pos,
  					prev = $elem[key](),
  					max = $scrollTo.max( elem, axis );
  
  				if (toff) {// jQuery / DOMElement
  					attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
  
  					// If it's a dom element, reduce the margin
  					if (settings.margin) {
  						attr[key] -= parseInt( targ.css( 'margin' + Pos ), 10 ) || 0;
  						attr[key] -= parseInt( targ.css( 'border' + Pos + 'Width' ), 10 ) || 0;
  					}
  
  					attr[key] += offset[pos] || 0;
  
  					if (settings.over[pos]) {
  						// Scroll to a fraction of its width/height
  						attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
  					}
  				} else {
  					var val = targ[pos];
  					// Handle percentage values
  					attr[key] = val.slice && val.slice( -1 ) === '%' ?
  						parseFloat( val ) / 100 * max
  						: val;
  				}
  
  				// Number or 'number'
  				if (settings.limit && /^\d+$/.test( attr[key] )) {
  					// Check the limits
  					attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max );
  				}
  
  				// Don't waste time animating, if there's no need.
  				if ( ! i && settings.axis.length > 1) {
  					if (prev === attr[key]) {
  						// No animation needed
  						attr = {};
  					} else if (queue) {
  						// Intermediate animation
  						animate( settings.onAfterFirst );
  						// Don't animate this axis again in the next iteration.
  						attr = {};
  					}
  				}
  			});
  
  			animate( settings.onAfter );
  
  			function animate(callback) {
  				var opts = $.extend({}, settings, {
  					// The queue setting conflicts with animate()
  					// Force it to always be true
  					queue: true,
  					duration: duration,
  					complete: callback && function() {
  						callback.call( elem, targ, settings );
  					}
  				});
  				$elem.animate( attr, opts );
  			}
  		});
  	};
  
  	// Max scrolling position, works on quirks mode
  	// It only fails (not too badly) on IE, quirks mode.
  	$scrollTo.max = function(elem, axis) {
  		var Dim = axis === 'x' ? 'Width' : 'Height',
  			scroll = 'scroll' + Dim;
  
  		if ( ! isWin( elem )) {
  			return elem[scroll] - $( elem )[Dim.toLowerCase()](); }
  
  		var size = 'client' + Dim,
  			doc = elem.ownerDocument || elem.document,
  			html = doc.documentElement,
  			body = doc.body;
  
  		return Math.max( html[scroll], body[scroll] ) - Math.min( html[size], body[size] );
  	};
  
  	function both(val) {
  		return $.isFunction( val ) || $.isPlainObject( val ) ? val : { top:val, left:val };
  	}
  
  	// Add special hooks so that window scroll properties can be animated
  	$.Tween.propHooks.scrollLeft = $.Tween.propHooks.scrollTop = {
  		get: function(t) {
  			return $( t.elem )[t.prop]();
  		},
  		set: function(t) {
  			var curr = this.get( t );
  			// If interrupt is true and user scrolled, stop animating
  			if (t.options.interrupt && t._last && t._last !== curr) {
  				return $( t.elem ).stop();
  			}
  			var next = Math.round( t.now );
  			// Don't waste CPU
  			// Browsers don't render floating point scroll
  			if (curr !== next) {
  				$( t.elem )[t.prop](next);
  				t._last = this.get( t );
  			}
  		}
  	};
  
  	// AMD requirement
  	return $scrollTo;
  });
  
  /*!
  	Colorbox v1.4.33 - 2013-10-31
  	jQuery lightbox and modal window plugin
  	(c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox
  	license: http://www.opensource.org/licenses/mit-license.php
  */
  (function ($, document, window) {
  	var
  	// Default settings object.
  	// See http://jacklmoore.com/colorbox for details.
  	defaults = {
  		// data sources
  		html: false,
  		photo: false,
  		iframe: false,
  		inline: false,
  
  		// behavior and appearance
  		transition: "elastic",
  		speed: 300,
  		fadeOut: 300,
  		width: false,
  		initialWidth: "600",
  		innerWidth: false,
  		maxWidth: false,
  		height: false,
  		initialHeight: "450",
  		innerHeight: false,
  		maxHeight: false,
  		scalePhotos: true,
  		scrolling: true,
  		href: false,
  		title: false,
  		rel: false,
  		opacity: 0.9,
  		preloading: true,
  		className: false,
  		overlayClose: true,
  		escKey: true,
  		arrowKey: true,
  		top: false,
  		bottom: false,
  		left: false,
  		right: false,
  		fixed: false,
  		data: undefined,
  		closeButton: true,
  		fastIframe: true,
  		open: false,
  		reposition: true,
  		loop: true,
  		slideshow: false,
  		slideshowAuto: true,
  		slideshowSpeed: 2500,
  		slideshowStart: "start slideshow",
  		slideshowStop: "stop slideshow",
  		photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,
  
  		// alternate image paths for high-res displays
  		retinaImage: false,
  		retinaUrl: false,
  		retinaSuffix: '@2x.$1',
  
  		// internationalization
  		current: "Company {current} of {total}",
  		previous: "previous",
  		next: "next",
  		close: "close",
  		xhrError: "This content failed to load.",
  		imgError: "This image failed to load.",
  
  		// accessbility
  		returnFocus: true,
  		trapFocus: true,
  
  		// callbacks
  		onOpen: false,
  		onLoad: false,
  		onComplete: false,
  		onCleanup: false,
  		onClosed: false
  	},
  	
  	// Abstracting the HTML and event identifiers for easy rebranding
  	colorbox = 'colorbox',
  	prefix = 'cbox',
  	boxElement = prefix + 'Element',
  	
  	// Events
  	event_open = prefix + '_open',
  	event_load = prefix + '_load',
  	event_complete = prefix + '_complete',
  	event_cleanup = prefix + '_cleanup',
  	event_closed = prefix + '_closed',
  	event_purge = prefix + '_purge',
  
  	// Cached jQuery Object Variables
  	$overlay,
  	$box,
  	$wrap,
  	$content,
  	$topBorder,
  	$leftBorder,
  	$rightBorder,
  	$bottomBorder,
  	$related,
  	$window,
  	$loaded,
  	$loadingBay,
  	$loadingOverlay,
  	$title,
  	$current,
  	$slideshow,
  	$next,
  	$prev,
  	$close,
  	$groupControls,
  	$events = $('<a/>'), // $([]) would be prefered, but there is an issue with jQuery 1.4.2
  	
  	// Variables for cached values or use across multiple functions
  	settings,
  	interfaceHeight,
  	interfaceWidth,
  	loadedHeight,
  	loadedWidth,
  	element,
  	index,
  	photo,
  	open,
  	active,
  	closing,
  	loadingTimer,
  	publicMethod,
  	div = "div",
  	className,
  	requests = 0,
  	previousCSS = {},
  	init;
  
  	// ****************
  	// HELPER FUNCTIONS
  	// ****************
  	
  	// Convenience function for creating new jQuery objects
  	function $tag(tag, id, css) {
  		var element = document.createElement(tag);
  
  		if (id) {
  			element.id = prefix + id;
  		}
  
  		if (css) {
  			element.style.cssText = css;
  		}
  
  		return $(element);
  	}
  	
  	// Get the window height using innerHeight when available to avoid an issue with iOS
  	// http://bugs.jquery.com/ticket/6724
  	function winheight() {
  		return window.innerHeight ? window.innerHeight : $(window).height();
  	}
  
  	// Determine the next and previous members in a group.
  	function getIndex(increment) {
  		var
  		max = $related.length,
  		newIndex = (index + increment) % max;
  		
  		return (newIndex < 0) ? max + newIndex : newIndex;
  	}
  
  	// Convert '%' and 'px' values to integers
  	function setSize(size, dimension) {
  		return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
  	}
  	
  	// Checks an href to see if it is a photo.
  	// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
  	function isImage(settings, url) {
  		return settings.photo || settings.photoRegex.test(url);
  	}
  
  	function retinaUrl(settings, url) {
  		return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
  	}
  
  	function trapFocus(e) {
  		if ('contains' in $box[0] && !$box[0].contains(e.target)) {
  			e.stopPropagation();
  			$box.focus();
  		}
  	}
  
  	// Assigns function results to their respective properties
  	function makeSettings() {
  		var i,
  			data = $.data(element, colorbox);
  		
  		if (data == null) {
  			settings = $.extend({}, defaults);
  			if (console && console.log) {
  				console.log('Error: cboxElement missing settings object');
  			}
  		} else {
  			settings = $.extend({}, data);
  		}
  		
  		for (i in settings) {
  			if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
  				settings[i] = settings[i].call(element);
  			}
  		}
  		
  		settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
  		settings.href = settings.href || $(element).attr('href');
  		settings.title = settings.title || element.title;
  		
  		if (typeof settings.href === "string") {
  			settings.href = $.trim(settings.href);
  		}
  	}
  
  	function trigger(event, callback) {
  		// for external use
  		$(document).trigger(event);
  
  		// for internal use
  		$events.triggerHandler(event);
  
  		if ($.isFunction(callback)) {
  			callback.call(element);
  		}
  	}
  
  
  	var slideshow = (function(){
  		var active,
  			className = prefix + "Slideshow_",
  			click = "click." + prefix,
  			timeOut;
  
  		function clear () {
  			clearTimeout(timeOut);
  		}
  
  		function set() {
  			if (settings.loop || $related[index + 1]) {
  				clear();
  				timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
  			}
  		}
  
  		function start() {
  			$slideshow
  				.html(settings.slideshowStop)
  				.unbind(click)
  				.one(click, stop);
  
  			$events
  				.bind(event_complete, set)
  				.bind(event_load, clear);
  
  			$box.removeClass(className + "off").addClass(className + "on");
  		}
  
  		function stop() {
  			clear();
  			
  			$events
  				.unbind(event_complete, set)
  				.unbind(event_load, clear);
  
  			$slideshow
  				.html(settings.slideshowStart)
  				.unbind(click)
  				.one(click, function () {
  					publicMethod.next();
  					start();
  				});
  
  			$box.removeClass(className + "on").addClass(className + "off");
  		}
  
  		function reset() {
  			active = false;
  			$slideshow.hide();
  			clear();
  			$events
  				.unbind(event_complete, set)
  				.unbind(event_load, clear);
  			$box.removeClass(className + "off " + className + "on");
  		}
  
  		return function(){
  			if (active) {
  				if (!settings.slideshow) {
  					$events.unbind(event_cleanup, reset);
  					reset();
  				}
  			} else {
  				if (settings.slideshow && $related[1]) {
  					active = true;
  					$events.one(event_cleanup, reset);
  					if (settings.slideshowAuto) {
  						start();
  					} else {
  						stop();
  					}
  					$slideshow.show();
  				}
  			}
  		};
  
  	}());
  
  
  	function launch(target) {
  		if (!closing) {
  			
  			element = target;
  			
  			makeSettings();
  			
  			$related = $(element);
  			
  			index = 0;
  			
  			if (settings.rel !== 'nofollow') {
  				$related = $('.' + boxElement).filter(function () {
  					var data = $.data(this, colorbox),
  						relRelated;
  
  					if (data) {
  						relRelated =  $(this).data('rel') || data.rel || this.rel;
  					}
  					
  					return (relRelated === settings.rel);
  				});
  				index = $related.index(element);
  				
  				// Check direct calls to Colorbox.
  				if (index === -1) {
  					$related = $related.add(element);
  					index = $related.length - 1;
  				}
  			}
  			
  			$overlay.css({
  				opacity: parseFloat(settings.opacity),
  				cursor: settings.overlayClose ? "pointer" : "auto",
  				visibility: 'visible'
  			}).show();
  			
  
  			if (className) {
  				$box.add($overlay).removeClass(className);
  			}
  			if (settings.className) {
  				$box.add($overlay).addClass(settings.className);
  			}
  			className = settings.className;
  
  			if (settings.closeButton) {
  				$close.html(settings.close).appendTo($content);
  			} else {
  				$close.appendTo('<div/>');
  			}
  
  			if (!open) {
  				open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
  				
  				// Show colorbox so the sizes can be calculated in older versions of jQuery
  				$box.css({visibility:'hidden', display:'block'});
  				
  				$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden');
  				$content.css({width:'', height:''}).append($loaded);
  
  				// Cache values needed for size calculations
  				interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
  				interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
  				loadedHeight = $loaded.outerHeight(true);
  				loadedWidth = $loaded.outerWidth(true);
  
  				// Opens inital empty Colorbox prior to content being loaded.
  				settings.w = setSize(settings.initialWidth, 'x');
  				settings.h = setSize(settings.initialHeight, 'y');
  				$loaded.css({width:'', height:settings.h});
  				publicMethod.position();
  
  				trigger(event_open, settings.onOpen);
  				
  				$groupControls.add($title).hide();
  
  				$box.focus();
  				
  				if (settings.trapFocus) {
  					// Confine focus to the modal
  					// Uses event capturing that is not supported in IE8-
  					if (document.addEventListener) {
  
  						document.addEventListener('focus', trapFocus, true);
  						
  						$events.one(event_closed, function () {
  							document.removeEventListener('focus', trapFocus, true);
  						});
  					}
  				}
  
  				// Return focus on closing
  				if (settings.returnFocus) {
  					$events.one(event_closed, function () {
  						$(element).focus();
  					});
  				}
  			}
  			load();
  		}
  	}
  
  	// Colorbox's markup needs to be added to the DOM prior to being called
  	// so that the browser will go ahead and load the CSS background images.
  	function appendHTML() {
  		if (!$box && document.body) {
  			init = false;
  			$window = $(window);
  			$box = $tag(div).attr({
  				id: colorbox,
  				'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
  				role: 'dialog',
  				tabindex: '-1'
  			}).hide();
  			$overlay = $tag(div, "Overlay").hide();
  			$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
  			$wrap = $tag(div, "Wrapper");
  			$content = $tag(div, "Content").append(
  				$title = $tag(div, "Title"),
  				$current = $tag(div, "Current"),
  				$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
  				$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
  				$slideshow = $tag('button', "Slideshow"),
  				$loadingOverlay
  			);
  
  			$close = $('<button type="button"/>').attr({id:prefix+'Close'});
  			
  			$wrap.append( // The 3x3 Grid that makes up Colorbox
  				$tag(div).append(
  					$tag(div, "TopLeft"),
  					$topBorder = $tag(div, "TopCenter"),
  					$tag(div, "TopRight")
  				),
  				$tag(div, false, 'clear:left').append(
  					$leftBorder = $tag(div, "MiddleLeft"),
  					$content,
  					$rightBorder = $tag(div, "MiddleRight")
  				),
  				$tag(div, false, 'clear:left').append(
  					$tag(div, "BottomLeft"),
  					$bottomBorder = $tag(div, "BottomCenter"),
  					$tag(div, "BottomRight")
  				)
  			).find('div div').css({'float': 'left'});
  			
  			$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
  			
  			$groupControls = $next.add($prev).add($current).add($slideshow);
  
  			$(document.body).append($overlay, $box.append($wrap, $loadingBay));
  		}
  	}
  
  	// Add Colorbox's event bindings
  	function addBindings() {
  		function clickHandler(e) {
  			// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
  			// See: http://jacklmoore.com/notes/click-events/
  			if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
  				e.preventDefault();
  				launch(this);
  			}
  		}
  
  		if ($box) {
  			if (!init) {
  				init = true;
  
  				// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
  				$next.click(function () {
  					publicMethod.next();
  				});
  				$prev.click(function () {
  					publicMethod.prev();
  				});
  				$close.click(function () {
  					publicMethod.close();
  				});
  				$overlay.click(function () {
  					if (settings.overlayClose) {
  						publicMethod.close();
  					}
  				});
  				
  				// Key Bindings
  				$(document).bind('keydown.' + prefix, function (e) {
  					var key = e.keyCode;
  					if (open && settings.escKey && key === 27) {
  						e.preventDefault();
  						publicMethod.close();
  					}
  					if (open && settings.arrowKey && $related[1] && !e.altKey) {
  						if (key === 37) {
  							e.preventDefault();
  							$prev.click();
  						} else if (key === 39) {
  							e.preventDefault();
  							$next.click();
  						}
  					}
  				});
  
  				if ($.isFunction($.fn.on)) {
  					// For jQuery 1.7+
  					$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
  				} else {
  					// For jQuery 1.3.x -> 1.6.x
  					// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
  					// This is not here for jQuery 1.9, it's here for legacy users.
  					$('.'+boxElement).live('click.'+prefix, clickHandler);
  				}
  			}
  			return true;
  		}
  		return false;
  	}
  
  	// Don't do anything if Colorbox already exists.
  	if ($.colorbox) {
  		return;
  	}
  
  	// Append the HTML when the DOM loads
  	$(appendHTML);
  
  
  	// ****************
  	// PUBLIC FUNCTIONS
  	// Usage format: $.colorbox.close();
  	// Usage from within an iframe: parent.jQuery.colorbox.close();
  	// ****************
  	
  	publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
  		var $this = this;
  		
  		options = options || {};
  		
  		appendHTML();
  
  		if (addBindings()) {
  			if ($.isFunction($this)) { // assume a call to $.colorbox
  				$this = $('<a/>');
  				options.open = true;
  			} else if (!$this[0]) { // colorbox being applied to empty collection
  				return $this;
  			}
  			
  			if (callback) {
  				options.onComplete = callback;
  			}
  			
  			$this.each(function () {
  				$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
  			}).addClass(boxElement);
  			
  			if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
  				launch($this[0]);
  			}
  		}
  		
  		return $this;
  	};
  
  	publicMethod.position = function (speed, loadedCallback) {
  		var
  		css,
  		top = 0,
  		left = 0,
  		offset = $box.offset(),
  		scrollTop,
  		scrollLeft;
  		
  		$window.unbind('resize.' + prefix);
  
  		// remove the modal so that it doesn't influence the document width/height
  		$box.css({top: -9e4, left: -9e4});
  
  		scrollTop = $window.scrollTop();
  		scrollLeft = $window.scrollLeft();
  
  		if (settings.fixed) {
  			offset.top -= scrollTop;
  			offset.left -= scrollLeft;
  			$box.css({position: 'fixed'});
  		} else {
  			top = scrollTop;
  			left = scrollLeft;
  			$box.css({position: 'absolute'});
  		}
  
  		// keeps the top and left positions within the browser's viewport.
  		if (settings.right !== false) {
  			left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
  		} else if (settings.left !== false) {
  			left += setSize(settings.left, 'x');
  		} else {
  			left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
  		}
  		
  		if (settings.bottom !== false) {
  			top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
  		} else if (settings.top !== false) {
  			top += setSize(settings.top, 'y');
  		} else {
  			top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
  		}
  
  		$box.css({top: offset.top, left: offset.left, visibility:'visible'});
  		
  		// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
  		// but it has to be shrank down around the size of div#colorbox when it's done.  If not,
  		// it can invoke an obscure IE bug when using iframes.
  		$wrap[0].style.width = $wrap[0].style.height = "9999px";
  		
  		function modalDimensions() {
  			$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
  			$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
  		}
  
  		css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
  
  		// setting the speed to 0 if the content hasn't changed size or position
  		if (speed) {
  			var tempSpeed = 0;
  			$.each(css, function(i){
  				if (css[i] !== previousCSS[i]) {
  					tempSpeed = speed;
  					return;
  				}
  			});
  			speed = tempSpeed;
  		}
  
  		previousCSS = css;
  
  		if (!speed) {
  			$box.css(css);
  		}
  
  		$box.dequeue().animate(css, {
  			duration: speed || 0,
  			complete: function () {
  				modalDimensions();
  				
  				active = false;
  				
  				// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
  				$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
  				$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
  				
  				if (settings.reposition) {
  					setTimeout(function () {  // small delay before binding onresize due to an IE8 bug.
  						$window.bind('resize.' + prefix, publicMethod.position);
  					}, 1);
  				}
  
  				if (loadedCallback) {
  					loadedCallback();
  				}
  			},
  			step: modalDimensions
  		});
  	};
  
  	publicMethod.resize = function (options) {
  		var scrolltop;
  		
  		if (open) {
  			options = options || {};
  			
  			if (options.width) {
  				settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
  			}
  
  			if (options.innerWidth) {
  				settings.w = setSize(options.innerWidth, 'x');
  			}
  
  			$loaded.css({width: settings.w});
  			
  			if (options.height) {
  				settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
  			}
  
  			if (options.innerHeight) {
  				settings.h = setSize(options.innerHeight, 'y');
  			}
  
  			if (!options.innerHeight && !options.height) {
  				scrolltop = $loaded.scrollTop();
  				$loaded.css({height: "auto"});
  				settings.h = $loaded.height();
  			}
  
  			$loaded.css({height: settings.h});
  
  			if(scrolltop) {
  				$loaded.scrollTop(scrolltop);
  			}
  			
  			publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
  		}
  	};
  
  	publicMethod.prep = function (object) {
  		if (!open) {
  			return;
  		}
  		
  		var callback, speed = settings.transition === "none" ? 0 : settings.speed;
  
  		$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
  
  		$loaded = $tag(div, 'LoadedContent').append(object);
  		
  		function getWidth() {
  			settings.w = settings.w || $loaded.width();
  			settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
  			return settings.w;
  		}
  		function getHeight() {
  			settings.h = settings.h || $loaded.height();
  			settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
  			return settings.h;
  		}
  		
  		$loaded.hide()
  		.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
  		.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
  		.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
  		.prependTo($content);
  		
  		$loadingBay.hide();
  		
  		// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
  		
  		$(photo).css({'float': 'none'});
  
  		callback = function () {
  			var total = $related.length,
  				iframe,
  				frameBorder = 'frameBorder',
  				allowTransparency = 'allowTransparency',
  				complete;
  			
  			if (!open) {
  				return;
  			}
  			
  			function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2
  				if ($.support.opacity === false) {
  					$box[0].style.removeAttribute('filter');
  				}
  			}
  			
  			complete = function () {
  				clearTimeout(loadingTimer);
  				$loadingOverlay.hide();
  				trigger(event_complete, settings.onComplete);
  			};
  
  			
  			$title.html(settings.title).add($loaded).show();
  			
  			if (total > 1) { // handle grouping
  				if (typeof settings.current === "string") {
  					$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
  				}
  				
  				$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
  				$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
  				
  				slideshow();
  				
  				// Preloads images within a rel group
  				if (settings.preloading) {
  					$.each([getIndex(-1), getIndex(1)], function(){
  						var src,
  							img,
  							i = $related[this],
  							data = $.data(i, colorbox);
  
  						if (data && data.href) {
  							src = data.href;
  							if ($.isFunction(src)) {
  								src = src.call(i);
  							}
  						} else {
  							src = $(i).attr('href');
  						}
  
  						if (src && isImage(data, src)) {
  							src = retinaUrl(data, src);
  							img = document.createElement('img');
  							img.src = src;
  						}
  					});
  				}
  			} else {
  				$groupControls.hide();
  			}
  			
  			if (settings.iframe) {
  				iframe = $tag('iframe')[0];
  				
  				if (frameBorder in iframe) {
  					iframe[frameBorder] = 0;
  				}
  				
  				if (allowTransparency in iframe) {
  					iframe[allowTransparency] = "true";
  				}
  
  				if (!settings.scrolling) {
  					iframe.scrolling = "no";
  				}
  				
  				$(iframe)
  					.attr({
  						src: settings.href,
  						name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
  						'class': prefix + 'Iframe',
  						allowFullScreen : true, // allow HTML5 video to go fullscreen
  						webkitAllowFullScreen : true,
  						mozallowfullscreen : true
  					})
  					.one('load', complete)
  					.appendTo($loaded);
  				
  				$events.one(event_purge, function () {
  					iframe.src = "//about:blank";
  				});
  
  				if (settings.fastIframe) {
  					$(iframe).trigger('load');
  				}
  			} else {
  				complete();
  			}
  			
  			if (settings.transition === 'fade') {
  				$box.fadeTo(speed, 1, removeFilter);
  			} else {
  				removeFilter();
  			}
  		};
  		
  		if (settings.transition === 'fade') {
  			$box.fadeTo(speed, 0, function () {
  				publicMethod.position(0, callback);
  			});
  		} else {
  			publicMethod.position(speed, callback);
  		}
  	};
  
  	function load () {
  		var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
  		
  		active = true;
  		
  		photo = false;
  		
  		element = $related[index];
  		
  		makeSettings();
  		
  		trigger(event_purge);
  		
  		trigger(event_load, settings.onLoad);
  		
  		settings.h = settings.height ?
  				setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
  				settings.innerHeight && setSize(settings.innerHeight, 'y');
  		
  		settings.w = settings.width ?
  				setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
  				settings.innerWidth && setSize(settings.innerWidth, 'x');
  		
  		// Sets the minimum dimensions for use in image scaling
  		settings.mw = settings.w;
  		settings.mh = settings.h;
  		
  		// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
  		// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
  		if (settings.maxWidth) {
  			settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
  			settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
  		}
  		if (settings.maxHeight) {
  			settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
  			settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
  		}
  		
  		href = settings.href;
  		
  		loadingTimer = setTimeout(function () {
  			$loadingOverlay.show();
  		}, 100);
  		
  		if (settings.inline) {
  			// Inserts an empty placeholder where inline content is being pulled from.
  			// An event is bound to put inline content back when Colorbox closes or loads new content.
  			$inline = $tag(div).hide().insertBefore($(href)[0]);
  
  			$events.one(event_purge, function () {
  				$inline.replaceWith($loaded.children());
  			});
  
  			prep($(href));
  		} else if (settings.iframe) {
  			// IFrame element won't be added to the DOM until it is ready to be displayed,
  			// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
  			prep(" ");
  		} else if (settings.html) {
  			prep(settings.html);
  		} else if (isImage(settings, href)) {
  
  			href = retinaUrl(settings, href);
  
  			photo = document.createElement('img');
  
  			$(photo)
  			.addClass(prefix + 'Photo')
  			.bind('error',function () {
  				settings.title = false;
  				prep($tag(div, 'Error').html(settings.imgError));
  			})
  			.one('load', function () {
  				var percent;
  
  				if (request !== requests) {
  					return;
  				}
  
  				$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
  					var attr = $(element).attr(val) || $(element).attr('data-'+val);
  					if (attr) {
  						photo.setAttribute(val, attr);
  					}
  				});
  
  				if (settings.retinaImage && window.devicePixelRatio > 1) {
  					photo.height = photo.height / window.devicePixelRatio;
  					photo.width = photo.width / window.devicePixelRatio;
  				}
  
  				if (settings.scalePhotos) {
  					setResize = function () {
  						photo.height -= photo.height * percent;
  						photo.width -= photo.width * percent;
  					};
  					if (settings.mw && photo.width > settings.mw) {
  						percent = (photo.width - settings.mw) / photo.width;
  						setResize();
  					}
  					if (settings.mh && photo.height > settings.mh) {
  						percent = (photo.height - settings.mh) / photo.height;
  						setResize();
  					}
  				}
  				
  				if (settings.h) {
  					photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
  				}
  				
  				if ($related[1] && (settings.loop || $related[index + 1])) {
  					photo.style.cursor = 'pointer';
  					photo.onclick = function () {
  						publicMethod.next();
  					};
  				}
  
  				photo.style.width = photo.width + 'px';
  				photo.style.height = photo.height + 'px';
  
  				setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
  					prep(photo);
  				}, 1);
  			});
  			
  			setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
  				photo.src = href;
  			}, 1);
  		} else if (href) {
  			$loadingBay.load(href, settings.data, function (data, status) {
  				if (request === requests) {
  					prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
  				}
  			});
  		}
  	}
  		
  	// Navigates to the next page/image in a set.
  	publicMethod.next = function () {
  		if (!active && $related[1] && (settings.loop || $related[index + 1])) {
  			index = getIndex(1);
  			launch($related[index]);
  		}
  	};
  	
  	publicMethod.prev = function () {
  		if (!active && $related[1] && (settings.loop || index)) {
  			index = getIndex(-1);
  			launch($related[index]);
  		}
  	};
  
  	// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
  	publicMethod.close = function () {
  		if (open && !closing) {
  			
  			closing = true;
  			
  			open = false;
  			
  			trigger(event_cleanup, settings.onCleanup);
  			
  			$window.unbind('.' + prefix);
  			
  			$overlay.fadeTo(settings.fadeOut || 0, 0);
  			
  			$box.stop().fadeTo(settings.fadeOut || 0, 0, function () {
  			
  				$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
  				
  				trigger(event_purge);
  				
  				$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
  				
  				setTimeout(function () {
  					closing = false;
  					trigger(event_closed, settings.onClosed);
  				}, 1);
  			});
  		}
  	};
  
  	// Removes changes Colorbox made to the document, but does not remove the plugin.
  	publicMethod.remove = function () {
  		if (!$box) { return; }
  
  		$box.stop();
  		$.colorbox.close();
  		$box.stop().remove();
  		$overlay.remove();
  		closing = false;
  		$box = null;
  		$('.' + boxElement)
  			.removeData(colorbox)
  			.removeClass(boxElement);
  
  		$(document).unbind('click.'+prefix);
  	};
  
  	// A method for fetching the current element Colorbox is referencing.
  	// returns a jQuery object.
  	publicMethod.element = function () {
  		return $(element);
  	};
  
  	publicMethod.settings = defaults;
  
  }(jQuery, document, window));
  
  /*!
   * Isotope PACKAGED v2.1.0
   * Filter & sort magical layouts
   * http://isotope.metafizzy.co
   */
  
  (function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):"object"==typeof exports?i(require("jquery")):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||o()}function o(){e.isReady=!0;for(var t=0,i=s.length;i>t;t++){var o=s[t];o()}}function n(n){return"complete"===r.readyState?o():(n.bind(r,"DOMContentLoaded",i),n.bind(r,"readystatechange",i),n.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],n):"object"==typeof exports?module.exports=n(require("eventie")):t.docReady=n(t.eventie)}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function n(i){function n(){if(!d){d=!0;var o=t.getComputedStyle;if(p=function(){var t=o?function(t){return o(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||r("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See http://bit.ly/getsizebug1"),i}}(),h=i("boxSizing")){var n=document.createElement("div");n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style[h]="border-box";var s=document.body||document.documentElement;s.appendChild(n);var a=p(n);f=200===e(a.width),s.removeChild(n)}}}function a(t){if(n(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=p(t);if("none"===i.display)return o();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var a=r.isBorderBox=!(!h||!i[h]||"border-box"!==i[h]),d=0,l=s.length;l>d;d++){var c=s[d],y=i[c];y=u(t,y);var m=parseFloat(y);r[c]=isNaN(m)?0:m}var g=r.paddingLeft+r.paddingRight,v=r.paddingTop+r.paddingBottom,_=r.marginLeft+r.marginRight,I=r.marginTop+r.marginBottom,L=r.borderLeftWidth+r.borderRightWidth,z=r.borderTopWidth+r.borderBottomWidth,b=a&&f,x=e(i.width);x!==!1&&(r.width=x+(b?0:g+L));var S=e(i.height);return S!==!1&&(r.height=S+(b?0:v+z)),r.innerWidth=r.width-(g+L),r.innerHeight=r.height-(v+z),r.outerWidth=r.width+_,r.outerHeight=r.height+I,r}}function u(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var o=e.style,n=o.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),o.left=i,i=o.pixelLeft,o.left=n,s&&(r.left=s),i}var p,h,f,d=!1;return a}var r="undefined"==typeof console?i:function(t){console.error(t)},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("desandro-get-style-property")):t.getSize=n(t.getStyleProperty)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){i(t);for(var o=t.parentNode.querySelectorAll(e),n=0,r=o.length;r>n;n++)if(o[n]===t)return!0;return!1}function n(t,o){return i(t),e(t,o)}var r,s=function(){if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,o=e.length;o>i;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),u=e(a,"div");r=u?e:n}else r=o;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete v[n],delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):"object"==typeof exports?module.exports=s(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):"object"==typeof exports?module.exports=i(require("../layout-mode"),require("masonry-layout")):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e
  },d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){var e;t?(t=o(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},d.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):"object"==typeof exports?module.exports=r(require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window);
  /*!
   * imagesLoaded PACKAGED v3.1.8
   * JavaScript is all like "You images are done yet or what?"
   * MIT License
   */
  
  
  /*!
   * EventEmitter v4.2.6 - git.io/ee
   * Oliver Caldwell
   * MIT license
   * @preserve
   */
  
  (function () {
  	
  
  	/**
  	 * Class for managing events.
  	 * Can be extended to provide event functionality in other classes.
  	 *
  	 * @class EventEmitter Manages event registering and emitting.
  	 */
  	function EventEmitter() {}
  
  	// Shortcuts to improve speed and size
  	var proto = EventEmitter.prototype;
  	var exports = this;
  	var originalGlobalValue = exports.EventEmitter;
  
  	/**
  	 * Finds the index of the listener for the event in it's storage array.
  	 *
  	 * @param {Function[]} listeners Array of listeners to search through.
  	 * @param {Function} listener Method to look for.
  	 * @return {Number} Index of the specified listener, -1 if not found
  	 * @api private
  	 */
  	function indexOfListener(listeners, listener) {
  		var i = listeners.length;
  		while (i--) {
  			if (listeners[i].listener === listener) {
  				return i;
  			}
  		}
  
  		return -1;
  	}
  
  	/**
  	 * Alias a method while keeping the context correct, to allow for overwriting of target method.
  	 *
  	 * @param {String} name The name of the target method.
  	 * @return {Function} The aliased method
  	 * @api private
  	 */
  	function alias(name) {
  		return function aliasClosure() {
  			return this[name].apply(this, arguments);
  		};
  	}
  
  	/**
  	 * Returns the listener array for the specified event.
  	 * Will initialise the event object and listener arrays if required.
  	 * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
  	 * Each property in the object response is an array of listener functions.
  	 *
  	 * @param {String|RegExp} evt Name of the event to return the listeners from.
  	 * @return {Function[]|Object} All listener functions for the event.
  	 */
  	proto.getListeners = function getListeners(evt) {
  		var events = this._getEvents();
  		var response;
  		var key;
  
  		// Return a concatenated array of all matching events if
  		// the selector is a regular expression.
  		if (typeof evt === 'object') {
  			response = {};
  			for (key in events) {
  				if (events.hasOwnProperty(key) && evt.test(key)) {
  					response[key] = events[key];
  				}
  			}
  		}
  		else {
  			response = events[evt] || (events[evt] = []);
  		}
  
  		return response;
  	};
  
  	/**
  	 * Takes a list of listener objects and flattens it into a list of listener functions.
  	 *
  	 * @param {Object[]} listeners Raw listener objects.
  	 * @return {Function[]} Just the listener functions.
  	 */
  	proto.flattenListeners = function flattenListeners(listeners) {
  		var flatListeners = [];
  		var i;
  
  		for (i = 0; i < listeners.length; i += 1) {
  			flatListeners.push(listeners[i].listener);
  		}
  
  		return flatListeners;
  	};
  
  	/**
  	 * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
  	 *
  	 * @param {String|RegExp} evt Name of the event to return the listeners from.
  	 * @return {Object} All listener functions for an event in an object.
  	 */
  	proto.getListenersAsObject = function getListenersAsObject(evt) {
  		var listeners = this.getListeners(evt);
  		var response;
  
  		if (listeners instanceof Array) {
  			response = {};
  			response[evt] = listeners;
  		}
  
  		return response || listeners;
  	};
  
  	/**
  	 * Adds a listener function to the specified event.
  	 * The listener will not be added if it is a duplicate.
  	 * If the listener returns true then it will be removed after it is called.
  	 * If you pass a regular expression as the event name then the listener will be added to all events that match it.
  	 *
  	 * @param {String|RegExp} evt Name of the event to attach the listener to.
  	 * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.addListener = function addListener(evt, listener) {
  		var listeners = this.getListenersAsObject(evt);
  		var listenerIsWrapped = typeof listener === 'object';
  		var key;
  
  		for (key in listeners) {
  			if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
  				listeners[key].push(listenerIsWrapped ? listener : {
  					listener: listener,
  					once: false
  				});
  			}
  		}
  
  		return this;
  	};
  
  	/**
  	 * Alias of addListener
  	 */
  	proto.on = alias('addListener');
  
  	/**
  	 * Semi-alias of addListener. It will add a listener that will be
  	 * automatically removed after it's first execution.
  	 *
  	 * @param {String|RegExp} evt Name of the event to attach the listener to.
  	 * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.addOnceListener = function addOnceListener(evt, listener) {
  		return this.addListener(evt, {
  			listener: listener,
  			once: true
  		});
  	};
  
  	/**
  	 * Alias of addOnceListener.
  	 */
  	proto.once = alias('addOnceListener');
  
  	/**
  	 * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
  	 * You need to tell it what event names should be matched by a regex.
  	 *
  	 * @param {String} evt Name of the event to create.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.defineEvent = function defineEvent(evt) {
  		this.getListeners(evt);
  		return this;
  	};
  
  	/**
  	 * Uses defineEvent to define multiple events.
  	 *
  	 * @param {String[]} evts An array of event names to define.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.defineEvents = function defineEvents(evts) {
  		for (var i = 0; i < evts.length; i += 1) {
  			this.defineEvent(evts[i]);
  		}
  		return this;
  	};
  
  	/**
  	 * Removes a listener function from the specified event.
  	 * When passed a regular expression as the event name, it will remove the listener from all events that match it.
  	 *
  	 * @param {String|RegExp} evt Name of the event to remove the listener from.
  	 * @param {Function} listener Method to remove from the event.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.removeListener = function removeListener(evt, listener) {
  		var listeners = this.getListenersAsObject(evt);
  		var index;
  		var key;
  
  		for (key in listeners) {
  			if (listeners.hasOwnProperty(key)) {
  				index = indexOfListener(listeners[key], listener);
  
  				if (index !== -1) {
  					listeners[key].splice(index, 1);
  				}
  			}
  		}
  
  		return this;
  	};
  
  	/**
  	 * Alias of removeListener
  	 */
  	proto.off = alias('removeListener');
  
  	/**
  	 * Adds listeners in bulk using the manipulateListeners method.
  	 * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
  	 * You can also pass it a regular expression to add the array of listeners to all events that match it.
  	 * Yeah, this function does quite a bit. That's probably a bad thing.
  	 *
  	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
  	 * @param {Function[]} [listeners] An optional array of listener functions to add.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.addListeners = function addListeners(evt, listeners) {
  		// Pass through to manipulateListeners
  		return this.manipulateListeners(false, evt, listeners);
  	};
  
  	/**
  	 * Removes listeners in bulk using the manipulateListeners method.
  	 * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
  	 * You can also pass it an event name and an array of listeners to be removed.
  	 * You can also pass it a regular expression to remove the listeners from all events that match it.
  	 *
  	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
  	 * @param {Function[]} [listeners] An optional array of listener functions to remove.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.removeListeners = function removeListeners(evt, listeners) {
  		// Pass through to manipulateListeners
  		return this.manipulateListeners(true, evt, listeners);
  	};
  
  	/**
  	 * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
  	 * The first argument will determine if the listeners are removed (true) or added (false).
  	 * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
  	 * You can also pass it an event name and an array of listeners to be added/removed.
  	 * You can also pass it a regular expression to manipulate the listeners of all events that match it.
  	 *
  	 * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
  	 * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
  	 * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
  		var i;
  		var value;
  		var single = remove ? this.removeListener : this.addListener;
  		var multiple = remove ? this.removeListeners : this.addListeners;
  
  		// If evt is an object then pass each of it's properties to this method
  		if (typeof evt === 'object' && !(evt instanceof RegExp)) {
  			for (i in evt) {
  				if (evt.hasOwnProperty(i) && (value = evt[i])) {
  					// Pass the single listener straight through to the singular method
  					if (typeof value === 'function') {
  						single.call(this, i, value);
  					}
  					else {
  						// Otherwise pass back to the multiple function
  						multiple.call(this, i, value);
  					}
  				}
  			}
  		}
  		else {
  			// So evt must be a string
  			// And listeners must be an array of listeners
  			// Loop over it and pass each one to the multiple method
  			i = listeners.length;
  			while (i--) {
  				single.call(this, evt, listeners[i]);
  			}
  		}
  
  		return this;
  	};
  
  	/**
  	 * Removes all listeners from a specified event.
  	 * If you do not specify an event then all listeners will be removed.
  	 * That means every event will be emptied.
  	 * You can also pass a regex to remove all events that match it.
  	 *
  	 * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.removeEvent = function removeEvent(evt) {
  		var type = typeof evt;
  		var events = this._getEvents();
  		var key;
  
  		// Remove different things depending on the state of evt
  		if (type === 'string') {
  			// Remove all listeners for the specified event
  			delete events[evt];
  		}
  		else if (type === 'object') {
  			// Remove all events matching the regex.
  			for (key in events) {
  				if (events.hasOwnProperty(key) && evt.test(key)) {
  					delete events[key];
  				}
  			}
  		}
  		else {
  			// Remove all listeners in all events
  			delete this._events;
  		}
  
  		return this;
  	};
  
  	/**
  	 * Alias of removeEvent.
  	 *
  	 * Added to mirror the node API.
  	 */
  	proto.removeAllListeners = alias('removeEvent');
  
  	/**
  	 * Emits an event of your choice.
  	 * When emitted, every listener attached to that event will be executed.
  	 * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
  	 * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
  	 * So they will not arrive within the array on the other side, they will be separate.
  	 * You can also pass a regular expression to emit to all events that match it.
  	 *
  	 * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
  	 * @param {Array} [args] Optional array of arguments to be passed to each listener.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.emitEvent = function emitEvent(evt, args) {
  		var listeners = this.getListenersAsObject(evt);
  		var listener;
  		var i;
  		var key;
  		var response;
  
  		for (key in listeners) {
  			if (listeners.hasOwnProperty(key)) {
  				i = listeners[key].length;
  
  				while (i--) {
  					// If the listener returns true then it shall be removed from the event
  					// The function is executed either with a basic call or an apply if there is an args array
  					listener = listeners[key][i];
  
  					if (listener.once === true) {
  						this.removeListener(evt, listener.listener);
  					}
  
  					response = listener.listener.apply(this, args || []);
  
  					if (response === this._getOnceReturnValue()) {
  						this.removeListener(evt, listener.listener);
  					}
  				}
  			}
  		}
  
  		return this;
  	};
  
  	/**
  	 * Alias of emitEvent
  	 */
  	proto.trigger = alias('emitEvent');
  
  	/**
  	 * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
  	 * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
  	 *
  	 * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
  	 * @param {...*} Optional additional arguments to be passed to each listener.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.emit = function emit(evt) {
  		var args = Array.prototype.slice.call(arguments, 1);
  		return this.emitEvent(evt, args);
  	};
  
  	/**
  	 * Sets the current value to check against when executing listeners. If a
  	 * listeners return value matches the one set here then it will be removed
  	 * after execution. This value defaults to true.
  	 *
  	 * @param {*} value The new value to check for when executing listeners.
  	 * @return {Object} Current instance of EventEmitter for chaining.
  	 */
  	proto.setOnceReturnValue = function setOnceReturnValue(value) {
  		this._onceReturnValue = value;
  		return this;
  	};
  
  	/**
  	 * Fetches the current value to check against when executing listeners. If
  	 * the listeners return value matches this one then it should be removed
  	 * automatically. It will return true by default.
  	 *
  	 * @return {*|Boolean} The current value to check for or the default, true.
  	 * @api private
  	 */
  	proto._getOnceReturnValue = function _getOnceReturnValue() {
  		if (this.hasOwnProperty('_onceReturnValue')) {
  			return this._onceReturnValue;
  		}
  		else {
  			return true;
  		}
  	};
  
  	/**
  	 * Fetches the events object and creates one if required.
  	 *
  	 * @return {Object} The events storage object.
  	 * @api private
  	 */
  	proto._getEvents = function _getEvents() {
  		return this._events || (this._events = {});
  	};
  
  	/**
  	 * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
  	 *
  	 * @return {Function} Non conflicting EventEmitter class.
  	 */
  	EventEmitter.noConflict = function noConflict() {
  		exports.EventEmitter = originalGlobalValue;
  		return EventEmitter;
  	};
  
  	// Expose the class either via AMD, CommonJS or the global object
  	if (typeof define === 'function' && define.amd) {
  		define('eventEmitter/EventEmitter',[],function () {
  			return EventEmitter;
  		});
  	}
  	else if (typeof module === 'object' && module.exports){
  		module.exports = EventEmitter;
  	}
  	else {
  		this.EventEmitter = EventEmitter;
  	}
  }.call(this));
  
  /*!
   * eventie v1.0.4
   * event binding helper
   *   eventie.bind( elem, 'click', myFn )
   *   eventie.unbind( elem, 'click', myFn )
   */
  
  /*jshint browser: true, undef: true, unused: true */
  /*global define: false */
  
  ( function( window ) {
  
  
  
  var docElem = document.documentElement;
  
  var bind = function() {};
  
  function getIEEvent( obj ) {
    var event = window.event;
    // add event.target
    event.target = event.target || event.srcElement || obj;
    return event;
  }
  
  if ( docElem.addEventListener ) {
    bind = function( obj, type, fn ) {
      obj.addEventListener( type, fn, false );
    };
  } else if ( docElem.attachEvent ) {
    bind = function( obj, type, fn ) {
      obj[ type + fn ] = fn.handleEvent ?
        function() {
          var event = getIEEvent( obj );
          fn.handleEvent.call( fn, event );
        } :
        function() {
          var event = getIEEvent( obj );
          fn.call( obj, event );
        };
      obj.attachEvent( "on" + type, obj[ type + fn ] );
    };
  }
  
  var unbind = function() {};
  
  if ( docElem.removeEventListener ) {
    unbind = function( obj, type, fn ) {
      obj.removeEventListener( type, fn, false );
    };
  } else if ( docElem.detachEvent ) {
    unbind = function( obj, type, fn ) {
      obj.detachEvent( "on" + type, obj[ type + fn ] );
      try {
        delete obj[ type + fn ];
      } catch ( err ) {
        // can't delete window object properties
        obj[ type + fn ] = undefined;
      }
    };
  }
  
  var eventie = {
    bind: bind,
    unbind: unbind
  };
  
  // transport
  if ( typeof define === 'function' && define.amd ) {
    // AMD
    define( 'eventie/eventie',eventie );
  } else {
    // browser global
    window.eventie = eventie;
  }
  
  })( this );
  
  /*!
   * imagesLoaded v3.1.8
   * JavaScript is all like "You images are done yet or what?"
   * MIT License
   */
  
  ( function( window, factory ) { 
    // universal module definition
  
    /*global define: false, module: false, require: false */
  
    if ( typeof define === 'function' && define.amd ) {
      // AMD
      define( [
        'eventEmitter/EventEmitter',
        'eventie/eventie'
      ], function( EventEmitter, eventie ) {
        return factory( window, EventEmitter, eventie );
      });
    } else if ( typeof exports === 'object' ) {
      // CommonJS
      module.exports = factory(
        window,
        require('wolfy87-eventemitter'),
        require('eventie')
      );
    } else {
      // browser global
      window.imagesLoaded = factory(
        window,
        window.EventEmitter,
        window.eventie
      );
    }
  
  })( window,
  
  // --------------------------  factory -------------------------- //
  
  function factory( window, EventEmitter, eventie ) {
  
  
  
  var $ = window.jQuery;
  var console = window.console;
  var hasConsole = typeof console !== 'undefined';
  
  // -------------------------- helpers -------------------------- //
  
  // extend objects
  function extend( a, b ) {
    for ( var prop in b ) {
      a[ prop ] = b[ prop ];
    }
    return a;
  }
  
  var objToString = Object.prototype.toString;
  function isArray( obj ) {
    return objToString.call( obj ) === '[object Array]';
  }
  
  // turn element or nodeList into an array
  function makeArray( obj ) {
    var ary = [];
    if ( isArray( obj ) ) {
      // use object if already an array
      ary = obj;
    } else if ( typeof obj.length === 'number' ) {
      // convert nodeList to array
      for ( var i=0, len = obj.length; i < len; i++ ) {
        ary.push( obj[i] );
      }
    } else {
      // array of single index
      ary.push( obj );
    }
    return ary;
  }
  
    // -------------------------- imagesLoaded -------------------------- //
  
    /**
     * @param {Array, Element, NodeList, String} elem
     * @param {Object or Function} options - if function, use as callback
     * @param {Function} onAlways - callback function
     */
    function ImagesLoaded( elem, options, onAlways ) {
      // coerce ImagesLoaded() without new, to be new ImagesLoaded()
      if ( !( this instanceof ImagesLoaded ) ) {
        return new ImagesLoaded( elem, options );
      }
      // use elem as selector string
      if ( typeof elem === 'string' ) {
        elem = document.querySelectorAll( elem );
      }
  
      this.elements = makeArray( elem );
      this.options = extend( {}, this.options );
  
      if ( typeof options === 'function' ) {
        onAlways = options;
      } else {
        extend( this.options, options );
      }
  
      if ( onAlways ) {
        this.on( 'always', onAlways );
      }
  
      this.getImages();
  
      if ( $ ) {
        // add jQuery Deferred object
        this.jqDeferred = new $.Deferred();
      }
  
      // HACK check async to allow time to bind listeners
      var _this = this;
      setTimeout( function() {
        _this.check();
      });
    }
  
    ImagesLoaded.prototype = new EventEmitter();
  
    ImagesLoaded.prototype.options = {};
  
    ImagesLoaded.prototype.getImages = function() {
      this.images = [];
  
      // filter & find items if we have an item selector
      for ( var i=0, len = this.elements.length; i < len; i++ ) {
        var elem = this.elements[i];
        // filter siblings
        if ( elem.nodeName === 'IMG' ) {
          this.addImage( elem );
        }
        // find children
        // no non-element nodes, #143
        var nodeType = elem.nodeType;
        if ( !nodeType || !( nodeType === 1 || nodeType === 9 || nodeType === 11 ) ) {
          continue;
        }
        var childElems = elem.querySelectorAll('img');
        // concat childElems to filterFound array
        for ( var j=0, jLen = childElems.length; j < jLen; j++ ) {
          var img = childElems[j];
          this.addImage( img );
        }
      }
    };
  
    /**
     * @param {Image} img
     */
    ImagesLoaded.prototype.addImage = function( img ) {
      var loadingImage = new LoadingImage( img );
      this.images.push( loadingImage );
    };
  
    ImagesLoaded.prototype.check = function() {
      var _this = this;
      var checkedCount = 0;
      var length = this.images.length;
      this.hasAnyBroken = false;
      // complete if no images
      if ( !length ) {
        this.complete();
        return;
      }
  
      function onConfirm( image, message ) {
        if ( _this.options.debug && hasConsole ) {
          console.log( 'confirm', image, message );
        }
  
        _this.progress( image );
        checkedCount++;
        if ( checkedCount === length ) {
          _this.complete();
        }
        return true; // bind once
      }
  
      for ( var i=0; i < length; i++ ) {
        var loadingImage = this.images[i];
        loadingImage.on( 'confirm', onConfirm );
        loadingImage.check();
      }
    };
  
    ImagesLoaded.prototype.progress = function( image ) {
      this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
      // HACK - Chrome triggers event before object properties have changed. #83
      var _this = this;
      setTimeout( function() {
        _this.emit( 'progress', _this, image );
        if ( _this.jqDeferred && _this.jqDeferred.notify ) {
          _this.jqDeferred.notify( _this, image );
        }
      });
    };
  
    ImagesLoaded.prototype.complete = function() {
      var eventName = this.hasAnyBroken ? 'fail' : 'done';
      this.isComplete = true;
      var _this = this;
      // HACK - another setTimeout so that confirm happens after progress
      setTimeout( function() {
        _this.emit( eventName, _this );
        _this.emit( 'always', _this );
        if ( _this.jqDeferred ) {
          var jqMethod = _this.hasAnyBroken ? 'reject' : 'resolve';
          _this.jqDeferred[ jqMethod ]( _this );
        }
      });
    };
  
    // -------------------------- jquery -------------------------- //
  
    if ( $ ) {
      $.fn.imagesLoaded = function( options, callback ) {
        var instance = new ImagesLoaded( this, options, callback );
        return instance.jqDeferred.promise( $(this) );
      };
    }
  
  
    // --------------------------  -------------------------- //
  
    function LoadingImage( img ) {
      this.img = img;
    }
  
    LoadingImage.prototype = new EventEmitter();
  
    LoadingImage.prototype.check = function() {
      // first check cached any previous images that have same src
      var resource = cache[ this.img.src ] || new Resource( this.img.src );
      if ( resource.isConfirmed ) {
        this.confirm( resource.isLoaded, 'cached was confirmed' );
        return;
      }
  
      // If complete is true and browser supports natural sizes,
      // try to check for image status manually.
      if ( this.img.complete && this.img.naturalWidth !== undefined ) {
        // report based on naturalWidth
        this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
        return;
      }
  
      // If none of the checks above matched, simulate loading on detached element.
      var _this = this;
      resource.on( 'confirm', function( resrc, message ) {
        _this.confirm( resrc.isLoaded, message );
        return true;
      });
  
      resource.check();
    };
  
    LoadingImage.prototype.confirm = function( isLoaded, message ) {
      this.isLoaded = isLoaded;
      this.emit( 'confirm', this, message );
    };
  
    // -------------------------- Resource -------------------------- //
  
    // Resource checks each src, only once
    // separate class from LoadingImage to prevent memory leaks. See #115
  
    var cache = {};
  
    function Resource( src ) {
      this.src = src;
      // add to cache
      cache[ src ] = this;
    }
  
    Resource.prototype = new EventEmitter();
  
    Resource.prototype.check = function() {
      // only trigger checking once
      if ( this.isChecked ) {
        return;
      }
      // simulate loading on detached element
      var proxyImage = new Image();
      eventie.bind( proxyImage, 'load', this );
      eventie.bind( proxyImage, 'error', this );
      proxyImage.src = this.src;
      // set flag
      this.isChecked = true;
    };
  
    // ----- events ----- //
  
    // trigger specified handler for event type
    Resource.prototype.handleEvent = function( event ) {
      var method = 'on' + event.type;
      if ( this[ method ] ) {
        this[ method ]( event );
      }
    };
  
    Resource.prototype.onload = function( event ) {
      this.confirm( true, 'onload' );
      this.unbindProxyEvents( event );
    };
  
    Resource.prototype.onerror = function( event ) {
      this.confirm( false, 'onerror' );
      this.unbindProxyEvents( event );
    };
  
    // ----- confirm ----- //
  
    Resource.prototype.confirm = function( isLoaded, message ) {
      this.isConfirmed = true;
      this.isLoaded = isLoaded;
      this.emit( 'confirm', this, message );
    };
  
    Resource.prototype.unbindProxyEvents = function( event ) {
      eventie.unbind( event.target, 'load', this );
      eventie.unbind( event.target, 'error', this );
    };
  
    // -----  ----- //
  
    return ImagesLoaded;
  
  });
  /**
   * navigation.js
   *
   * Handles toggling the navigation menu for small screens and enables tab
   * support for dropdown menus.
   */
  ( function() {
  	var container, button, menu, links, subMenus;
  
  	container = document.getElementById( 'site-navigation' );
  	if ( ! container ) {
  		return;
  	}
  
  	button = container.getElementsByTagName( 'button' )[0];
  	if ( 'undefined' === typeof button ) {
  		return;
  	}
  
  	menu = container.getElementsByTagName( 'ul' )[0];
  
  	// Hide menu toggle button if menu is empty and return early.
  	if ( 'undefined' === typeof menu ) {
  		button.style.display = 'none';
  		return;
  	}
  
  	menu.setAttribute( 'aria-expanded', 'false' );
  	if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
  		menu.className += ' nav-menu';
  	}
  
  	button.onclick = function() {
  		if ( -1 !== container.className.indexOf( 'toggled' ) ) {
  			container.className = container.className.replace( ' toggled', '' );
  			button.setAttribute( 'aria-expanded', 'false' );
  			menu.setAttribute( 'aria-expanded', 'false' );
  		} else {
  			container.className += ' toggled';
  			button.setAttribute( 'aria-expanded', 'true' );
  			menu.setAttribute( 'aria-expanded', 'true' );
  		}
  	};
  
  	// Get all the link elements within the menu.
  	links    = menu.getElementsByTagName( 'a' );
  	subMenus = menu.getElementsByTagName( 'ul' );
  
  	// Set menu items with submenus to aria-haspopup="true".
  	for ( var i = 0, len = subMenus.length; i < len; i++ ) {
  		subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
  	}
  
  	// Each time a menu link is focused or blurred, toggle focus.
  	for ( i = 0, len = links.length; i < len; i++ ) {
  		links[i].addEventListener( 'focus', toggleFocus, true );
  		links[i].addEventListener( 'blur', toggleFocus, true );
  	}
  
  	/**
  	 * Sets or removes .focus class on an element.
  	 */
  	function toggleFocus() {
  		var self = this;
  
  		// Move up through the ancestors of the current link until we hit .nav-menu.
  		while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
  
  			// On li elements toggle the class .focus.
  			if ( 'li' === self.tagName.toLowerCase() ) {
  				if ( -1 !== self.className.indexOf( 'focus' ) ) {
  					self.className = self.className.replace( ' focus', '' );
  				} else {
  					self.className += ' focus';
  				}
  			}
  
  			self = self.parentElement;
  		}
  	}
  } )();
  
  /**
   * skip-link-focus-fix.js
   *
   * Helps with accessibility for keyboard only users.
   *
   * Learn more: https://git.io/vWdr2
   */
  ( function() {
  	var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
  	    is_opera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
  	    is_ie     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
  
  	if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
  		window.addEventListener( 'hashchange', function() {
  			var id = location.hash.substring( 1 ),
  				element;
  
  			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
  				return;
  			}
  
  			element = document.getElementById( id );
  
  			if ( element ) {
  				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
  					element.tabIndex = -1;
  				}
  
  				element.focus();
  			}
  		}, false );
  	}
  })();
  
  /*! WOW - v1.0.2 - 2014-10-28
  * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=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}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.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))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.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.style.visibility="visible");return e},e.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},e.prototype.vendors=["moz","webkit"],e.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},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.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.config.live)?void 0:this.stop()},e.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},e.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+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);