var im=function(){function a(a){i=a}function b(a){"manual"==a&&(j=!1,c())}function c(){if(window.getComputedStyle&&""!==window.getComputedStyle(i,"::after").content){var a=window.getComputedStyle(i,"::after").content;try{k=JSON.parse(h(a))}catch(b){}}}function d(a){return j&&c(),k.hasOwnProperty(a)&&k[a].active}function e(a){return!d(a)}function f(){j&&c();var a={name:!1,value:0};for(var b in k)if(k.hasOwnProperty(b)){var d=parseFloat(k[b].value);k[b].active&&d>a.value&&(a={name:b,value:d})}return a.name}function g(a,b){return j&&c(),k&&k.hasOwnProperty(a)?b?parseFloat(k[a].value):k[a].value:!1}/**
  *
  * Function by Les James (@lesjames) taken from https://css-tricks.com/making-sass-talk-to-javascript-with-json/
  *
  **/
function h(a){return("string"==typeof a||a instanceof String)&&(a=a.replace(/[']/g,'"').replace(/\\|^[\s\S]{0,1}|[\s\S]$/g,"")),a}var i=document.body,j=!0,k=!1;return{setElement:a,setUpdateMode:b,greaterThan:d,lessThan:e,getActive:f,getValue:g,update:c}}();/*! A fix for the iOS orientationchange zoom bug.
 Script by @scottjehl, rebound by @wilto.
 MIT / GPLv2 License.
*/
!function(a){function b(){k.setAttribute("content",n),o=!0}function c(){k.setAttribute("content",m),o=!1}function d(d){j=d.accelerationIncludingGravity,g=Math.abs(j.x),h=Math.abs(j.y),i=Math.abs(j.z),a.orientation&&180!==a.orientation||!(g>7||(i>6&&8>h||8>i&&h>6)&&g>5)?o||b():o&&c()}
// This fix addresses an iOS bug, so return early if the UA claims it's something else.
var e=navigator.userAgent;if(/iPhone|iPad|iPod/.test(navigator.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(e)&&e.indexOf("AppleWebKit")>-1){var f=a.document;if(f.querySelector){var g,h,i,j,k=f.querySelector("meta[name=viewport]"),l=k&&k.getAttribute("content"),m=l+",maximum-scale=1",n=l+",maximum-scale=10",o=!0;k&&(a.addEventListener("orientationchange",b,!1),a.addEventListener("devicemotion",d,!1))}}}(this),/*!
 * jQuery Placeholder Plugin v2.3.1
 * https://github.com/mathiasbynens/jquery-placeholder
 *
 * Copyright 2011, 2015 Mathias Bynens
 * Released under the MIT license
 */
function(a){"function"==typeof define&&define.amd?
// AMD
define(["jquery"],a):a("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(a){function b(b){
// Return an object of element attributes
var c={},d=/^jQuery\d+$/;return a.each(b.attributes,function(a,b){b.specified&&!d.test(b.name)&&(c[b.name]=b.value)}),c}function c(b,c){var d=this,f=a(this);if(d.value===f.attr(h?"placeholder-x":"placeholder")&&f.hasClass(n.customClass))if(d.value="",f.removeClass(n.customClass),f.data("placeholder-password")){
// If `clearPlaceholder` was called from `$.valHooks.input.set`
if(f=f.hide().nextAll('input[type="password"]:first').show().attr("id",f.removeAttr("id").data("placeholder-id")),b===!0)return f[0].value=c,c;f.focus()}else d==e()&&d.select()}function d(d){var e,f=this,g=a(this),i=f.id;
// If the placeholder is activated, triggering blur event (`$input.trigger('blur')`) should do nothing.
if(!d||"blur"!==d.type||!g.hasClass(n.customClass))if(""===f.value){if("password"===f.type){if(!g.data("placeholder-textinput")){try{e=g.clone().prop({type:"text"})}catch(j){e=a("<input>").attr(a.extend(b(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":g,"placeholder-id":i}).bind("focus.placeholder",c),g.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}f.value="",g=g.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",g.data("placeholder-id")).show()}else{var k=g.data("placeholder-password");k&&(k[0].value="",g.attr("id",g.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"))}g.addClass(n.customClass),g[0].value=g.attr(h?"placeholder-x":"placeholder")}else g.removeClass(n.customClass)}function e(){
// Avoid IE9 `document.activeElement` of death
try{return document.activeElement}catch(a){}}/****
     * Allows plugin behavior simulation in modern browsers for easier debugging. 
     * When setting to true, use attribute "placeholder-x" rather than the usual "placeholder" in your inputs/textareas 
     * i.e. <input type="text" placeholder-x="my placeholder text" />
     */
var f,g,h=!1,i="[object OperaMini]"===Object.prototype.toString.call(window.operamini),j="placeholder"in document.createElement("input")&&!i&&!h,k="placeholder"in document.createElement("textarea")&&!i&&!h,l=a.valHooks,m=a.propHooks,n={};j&&k?(g=a.fn.placeholder=function(){return this},g.input=!0,g.textarea=!0):(g=a.fn.placeholder=function(b){var e={customClass:"placeholder"};return n=a.extend({},e,b),this.filter((j?"textarea":":input")+"["+(h?"placeholder-x":"placeholder")+"]").not("."+n.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":c,"blur.placeholder":d}).data("placeholder-enabled",!0).trigger("blur.placeholder")},g.input=j,g.textarea=k,f={get:function(b){var c=a(b),d=c.data("placeholder-password");return d?d[0].value:c.data("placeholder-enabled")&&c.hasClass(n.customClass)?"":b.value},set:function(b,f){var g,h,i=a(b);return""!==f&&(g=i.data("placeholder-textinput"),h=i.data("placeholder-password"),g?(c.call(g[0],!0,f)||(b.value=f),g[0].value=f):h&&(c.call(b,!0,f)||(h[0].value=f),b.value=f)),i.data("placeholder-enabled")?(""===f?(b.value=f,b!=e()&&d.call(b)):(i.hasClass(n.customClass)&&c.call(b),b.value=f),i):(b.value=f,i)}},j||(l.input=f,m.value=f),k||(l.textarea=f,m.value=f),a(function(){a(document).delegate("form","submit.placeholder",function(){var b=a("."+n.customClass,this).each(function(){c.call(this,!0,"")});setTimeout(function(){b.each(d)},10)})}),a(window).bind("beforeunload.placeholder",function(){var b=!0;try{"javascript:void(0)"===document.activeElement.toString()&&(b=!1)}catch(c){}b&&a("."+n.customClass).each(function(){this.value=""})}))}),/*global jQuery */
/*jshint browser:true */
/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/
function(a){"use strict";a.fn.fitVids=function(b){var c={customSelector:null};if(!document.getElementById("fit-vids-style")){
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
var d=document.head||document.getElementsByTagName("head")[0],e=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",f=document.createElement("div");f.innerHTML='<p>x</p><style id="fit-vids-style">'+e+"</style>",d.appendChild(f.childNodes[1])}return b&&a.extend(c,b),this.each(function(){var b=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];c.customSelector&&b.push(c.customSelector);var d=a(this).find(b.join(","));d=d.not("object object"),d.each(function(){var b=a(this);if(!("embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),d=isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10),e=c/d;if(!b.attr("id")){var f="fitvid"+Math.floor(999999*Math.random());b.attr("id",f)}b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),b.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),function(a){if("function"==typeof define&&define.amd)define(a);else if("object"==typeof exports)module.exports=a();else{var b=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=b,c}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if("undefined"!=typeof document){
// Write
if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires&&"; expires="+f.expires.toUTCString(),f.path&&"; path="+f.path,f.domain&&"; domain="+f.domain,f.secure?"; secure":""].join("")}
// Read
b||(g={});for(
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var j=document.cookie?document.cookie.split("; "):[],k=/(%[0-9A-Z]{2})+/g,l=0;l<j.length;l++){var m=j[l].split("="),n=m.slice(1).join("=");'"'===n.charAt(0)&&(n=n.slice(1,-1));try{var o=m[0].replace(k,decodeURIComponent);if(n=c.read?c.read(n,o):c(n,o)||n.replace(k,decodeURIComponent),this.json)try{n=JSON.parse(n)}catch(i){}if(b===o){g=n;break}b||(g[o]=n)}catch(i){}}return g}}return d.set=d,d.get=function(a){return d(a)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b(function(){})});/*
 * SVGeezy.js 1.0
 *
 * Copyright 2012, Ben Howdle http://twostepmedia.co.uk
 * Released under the WTFPL license
 * http://sam.zoy.org/wtfpl/
 *
 * Date: Sun Aug 26 20:38 2012 GMT
 */
/*
	//call like so, pass in a class name that you don't want it to check and a filetype to replace .svg with
	svgeezy.init('nocheck', 'png');
*/
var svgeezy=function(){return{init:function(a,b){this.avoid=a||!1,this.filetype=b||"png",this.svgSupport=this.supportsSvg(),this.svgSupport||(this.images=document.getElementsByTagName("img"),this.imgL=this.images.length,this.fallbacks())},fallbacks:function(){for(;this.imgL--;)if(!this.hasClass(this.images[this.imgL],this.avoid)||!this.avoid){var a=this.images[this.imgL].getAttribute("src");if(null===a)continue;if("svg"==this.getFileExt(a)){var b=a.replace(".svg","."+this.filetype);this.images[this.imgL].setAttribute("src",b)}}},getFileExt:function(a){var b=a.split(".").pop();return-1!==b.indexOf("?")&&(b=b.split("?")[0]),b},hasClass:function(a,b){return(" "+a.className+" ").indexOf(" "+b+" ")>-1},supportsSvg:function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}}}();/*! grunt-grunticon Stylesheet Loader - v2.1.6 | https://github.com/filamentgroup/grunticon | (c) 2015 Scott Jehl, Filament Group, Inc. | MIT license. */
!function(){function a(a,b,c){"use strict";var d=window.document.createElement("link"),e=b||window.document.getElementsByTagName("script")[0],f=window.document.styleSheets;return d.rel="stylesheet",d.href=a,d.media="only x",e.parentNode.insertBefore(d,e),d.onloadcssdefined=function(a){for(var b,c=0;c<f.length;c++)f[c].href&&f[c].href===d.href&&(b=!0);b?a():setTimeout(function(){d.onloadcssdefined(a)})},d.onloadcssdefined(function(){d.media=c||"all"}),d}function b(a,b){a.onload=function(){a.onload=null,b&&b.call(a)},"isApplicationInstalled"in navigator&&"onloadcssdefined"in a&&a.onloadcssdefined(b)}!function(c){var d=function(e,f){"use strict";if(e&&3===e.length){var g=c.navigator,h=c.document,i=c.Image,j=!(!h.createElementNS||!h.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||!h.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")||c.opera&&-1===g.userAgent.indexOf("Chrome")||-1!==g.userAgent.indexOf("Series40")),k=new i;k.onerror=function(){d.method="png",d.href=e[2],a(e[2])},k.onload=function(){var c=1===k.width&&1===k.height,g=e[c&&j?0:c?1:2];c&&j?d.method="svg":c?d.method="datapng":d.method="png",d.href=g,b(a(g),f)},k.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",h.documentElement.className+=" grunticon"}};d.loadCSS=a,d.onloadCSS=b,c.grunticon=d}(this)}(),
// Avoid `console` errors in browsers that lack a console.
// http://html5boilerplate.com/
function(){for(var a,b=function(){},c=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],d=c.length,e=window.console=window.console||{};d--;)a=c[d],e[a]||(e[a]=b)}(),/*!
 * imagesLoaded PACKAGED v4.1.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}(this,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return-1==d.indexOf(b)&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||[];return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return-1!=d&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=0,e=c[d];b=b||[];for(var f=this._onceEvents&&this._onceEvents[a];e;){var g=f&&f[e];g&&(this.off(a,e),delete f[e]),e.apply(this,b),d+=g?0:1,e=c[d]}return this}},a}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(c){return b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("ev-emitter")):a.imagesLoaded=b(a,a.EvEmitter)}(window,function(a,b){function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){var b=[];if(Array.isArray(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function e(a,b,f){return this instanceof e?("string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=d(a),this.options=c({},this.options),"function"==typeof b?f=b:c(this.options,b),f&&this.on("always",f),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new e(a,b,f)}function f(a){this.img=a}function g(a,b){this.url=a,this.element=b,this.img=new Image}var h=a.jQuery,i=a.console;e.prototype=Object.create(b.prototype),e.prototype.options={},e.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},e.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),this.options.background===!0&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&j[b]){for(var c=a.querySelectorAll("img"),d=0;d<c.length;d++){var e=c[d];this.addImage(e)}if("string"==typeof this.options.background){var f=a.querySelectorAll(this.options.background);for(d=0;d<f.length;d++){var g=f[d];this.addElementBackgroundImages(g)}}}};var j={1:!0,9:!0,11:!0};return e.prototype.addElementBackgroundImages=function(a){var b=getComputedStyle(a);if(b)for(var c=/url\((['"])?(.*?)\1\)/gi,d=c.exec(b.backgroundImage);null!==d;){var e=d&&d[2];e&&this.addBackground(e,a),d=c.exec(b.backgroundImage)}},e.prototype.addImage=function(a){var b=new f(a);this.images.push(b)},e.prototype.addBackground=function(a,b){var c=new g(a,b);this.images.push(c)},e.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(b){b.once("progress",a),b.check()}):void this.complete()},e.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emitEvent("progress",[this,a,b]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+c,a,b)},e.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(a,[this]),this.emitEvent("always",[this]),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},f.prototype=Object.create(b.prototype),f.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},f.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},f.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.img,b])},f.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},f.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},f.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},f.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype=Object.create(f.prototype),g.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var a=this.getIsImageComplete();a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},g.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},g.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.element,b])},e.makeJQueryPlugin=function(b){b=b||a.jQuery,b&&(h=b,h.fn.imagesLoaded=function(a,b){var c=new e(this,a,b);return c.jqDeferred.promise(h(this))})},e.makeJQueryPlugin(),e}),
// Unslider JS
!function(a){return a?(a.Unslider=function(b,c){var d=this;return d._="unslider",d.defaults={autoplay:!1,delay:3e3,speed:750,easing:"swing",keys:{prev:37,next:39},nav:!0,arrows:{prev:'<a class="'+d._+'-arrow prev">Prev</a>',next:'<a class="'+d._+'-arrow next">Next</a>'},animation:"horizontal",selectors:{container:"ul:first",slides:"li"},animateHeight:!1,activeClass:d._+"-active",swipe:!0,swipeThreshold:.2},d.$context=b,d.options={},d.$parent=null,d.$container=null,d.$slides=null,d.$nav=null,d.$arrows=[],d.total=0,d.current=0,d.prefix=d._+"-",d.eventSuffix="."+d.prefix+~~(2e3*Math.random()),d.interval=null,d.init=function(b){return d.options=a.extend({},d.defaults,b),d.$container=d.$context.find(d.options.selectors.container).addClass(d.prefix+"wrap"),d.$slides=d.$container.children(d.options.selectors.slides),d.setup(),a.each(["nav","arrows","keys","infinite"],function(b,c){d.options[c]&&d["init"+a._ucfirst(c)]()}),jQuery.event.special.swipe&&d.options.swipe&&d.initSwipe(),d.options.autoplay&&d.start(),d.calculateSlides(),d.$context.trigger(d._+".ready"),d.animate(d.options.index||d.current,"init")},d.setup=function(){d.$context.addClass(d.prefix+d.options.animation).wrap('<div class="'+d._+'" />'),d.$parent=d.$context.parent("."+d._);var a=d.$context.css("position");"static"===a&&d.$context.css("position","relative"),d.$context.css("overflow","hidden")},d.calculateSlides=function(){if(d.total=d.$slides.length,"fade"!==d.options.animation){var a="width";"vertical"===d.options.animation&&(a="height"),d.$container.css(a,100*d.total+"%").addClass(d.prefix+"carousel"),d.$slides.css(a,100/d.total+"%")}},d.start=function(){return d.interval=setTimeout(function(){d.next()},d.options.delay),d},d.stop=function(){return clearTimeout(d.interval),d},d.initNav=function(){var b=a('<nav class="'+d.prefix+'nav"><ol /></nav>');d.$slides.each(function(c){var e=this.getAttribute("data-nav")||c+1;a.isFunction(d.options.nav)&&(e=d.options.nav.call(d.$slides.eq(c),c,e)),b.children("ol").append('<li data-slide="'+c+'">'+e+"</li>")}),d.$nav=b.insertAfter(d.$context),d.$nav.find("li").on("click"+d.eventSuffix,function(){var b=a(this).addClass(d.options.activeClass);b.siblings().removeClass(d.options.activeClass),d.animate(b.attr("data-slide"))})},d.initArrows=function(){d.options.arrows===!0&&(d.options.arrows=d.defaults.arrows),a.each(d.options.arrows,function(b,c){d.$arrows.push(a(c).insertAfter(d.$context).on("click"+d.eventSuffix,d[b]))})},d.initKeys=function(){d.options.keys===!0&&(d.options.keys=d.defaults.keys),a(document).on("keyup"+d.eventSuffix,function(b){a.each(d.options.keys,function(c,e){b.which===e&&a.isFunction(d[c])&&d[c].call(d)})})},d.initSwipe=function(){var a=d.$slides.width();"fade"!==d.options.animation&&d.$container.on({movestart:function(a){return a.distX>a.distY&&a.distX<-a.distY||a.distX<a.distY&&a.distX>-a.distY?!!a.preventDefault():void d.$container.css("position","relative")},move:function(b){d.$container.css("left",-(100*d.current)+100*b.distX/a+"%")},moveend:function(b){Math.abs(b.distX)/a>d.options.swipeThreshold?d[b.distX<0?"next":"prev"]():d.$container.animate({left:-(100*d.current)+"%"},d.options.speed/2)}})},d.initInfinite=function(){var b=["first","last"];a.each(b,function(a,c){d.$slides.push.apply(d.$slides,d.$slides.filter(':not(".'+d._+'-clone")')[c]().clone().addClass(d._+"-clone")["insert"+(0===a?"After":"Before")](d.$slides[b[~~!a]]()))})},d.destroyArrows=function(){a.each(d.$arrows,function(a,b){b.remove()})},d.destroySwipe=function(){d.$container.off("movestart move moveend")},d.destroyKeys=function(){a(document).off("keyup"+d.eventSuffix)},d.setIndex=function(a){return 0>a&&(a=d.total-1),d.current=Math.min(Math.max(0,a),d.total-1),d.options.nav&&d.$nav.find('[data-slide="'+d.current+'"]')._active(d.options.activeClass),d.$slides.eq(d.current)._active(d.options.activeClass),d},d.animate=function(b,c){if("first"===b&&(b=0),"last"===b&&(b=d.total),isNaN(b))return d;d.options.autoplay&&d.stop().start(),d.setIndex(b),d.$context.trigger(d._+".change",[b,d.$slides.eq(b)]);var e="animate"+a._ucfirst(d.options.animation);return a.isFunction(d[e])&&d[e](d.current,c),d},d.next=function(){var a=d.current+1;return a>=d.total&&(a=0),d.animate(a,"next")},d.prev=function(){return d.animate(d.current-1,"prev")},d.animateHorizontal=function(a){var b="left";return"rtl"===d.$context.attr("dir")&&(b="right"),d.options.infinite&&d.$container.css("margin-"+b,"-100%"),d.slide(b,a)},d.animateVertical=function(a){return d.options.animateHeight=!0,d.options.infinite&&d.$container.css("margin-top",-d.$slides.outerHeight()),d.slide("top",a)},d.slide=function(a,b){if(d.options.animateHeight&&d._move(d.$context,{height:d.$slides.eq(b).outerHeight()},!1),d.options.infinite){var c;b===d.total-1&&(c=d.total-3,b=-1),b===d.total-2&&(c=0,b=d.total-2),"number"==typeof c&&(d.setIndex(c),d.$context.on(d._+".moved",function(){d.current===c&&d.$container.css(a,-(100*c)+"%").off(d._+".moved")}))}var e={};return e[a]=-(100*b)+"%",d._move(d.$container,e)},d.animateFade=function(a){var b=d.$slides.eq(a).addClass(d.options.activeClass);d._move(b.siblings().removeClass(d.options.activeClass),{opacity:0}),d._move(b,{opacity:1},!1)},d._move=function(a,b,c,e){return c!==!1&&(c=function(){d.$context.trigger(d._+".moved")}),a._move(b,e||d.options.speed,d.options.easing,c)},d.init(c)},a.fn._active=function(a){return this.addClass(a).siblings().removeClass(a)},a._ucfirst=function(a){return(a+"").toLowerCase().replace(/^./,function(a){return a.toUpperCase()})},a.fn._move=function(){return this.stop(!0,!0),a.fn[a.fn.velocity?"velocity":"animate"].apply(this,arguments)},void(a.fn.unslider=function(b){return this.each(function(){var c=a(this);if("string"==typeof b&&c.data("unslider")){b=b.split(":");var d=c.data("unslider")[b[0]];if(a.isFunction(d))return d.apply(c,b[1]?b[1].split(","):null)}return c.data("unslider",new a.Unslider(c,b))})})):console.warn("Unslider needs jQuery")}(window.jQuery),function(a){"use strict";function b(){d=!(a(window).width()>e)}function c(){i.classList.remove("hidden"),i.play()}
// Remove the 'no-js' <body> class
a("html").removeClass("no-js"),
// Enable FitVids on the content area
a(".content").fitVids(),
// SVG fallbacks
svgeezy.init("svg-no-check","png"),
// Support for HTML5 placeholders
a("input, textarea").placeholder(),
// Grunticon
"function"==typeof grunticon&&grunticon([grunticon_paths.svg,grunticon_paths.png,grunticon_paths.fallback]),/***************************
	 * SMOOTH SCROLL TO ANCHOR *
	 *****************************************************************/
a('a[href*=#]:not([href=#]):not(".menu-link")').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var b=a(this.hash);if(b=b.length?b:a("[name="+this.hash.slice(1)+"]"),b.length)return a("html,body").animate({scrollTop:b.offset().top},1e3),!1}});/****************
	 * MOBILE CHECK *
	 *****************************************************************/
var d,e=768;/*************************
	 * MOBILE HEADER PADDING *
	 *****************************************************************/
if(
// Initial
b(),
// On Resize
a(window).resize(function(){b()}),/**********************
	 * MOBILE MENU TOGGLE *
	 *****************************************************************/
a("#mobile-menu").on("click",function(b){b.preventDefault(),a(".nav-primary").is(":visible")?(
// $('.nav-primary').removeClass('in-view');
a(".nav-primary").slideUp(),a("#mobile-menu").removeClass("open")):(
// $('.nav-primary').addClass('in-view');
a(".nav-primary").slideDown(),a("#mobile-menu").addClass("open"))}),d){var f=a(".site-header").height();a(".site-header").imagesLoaded(function(){a(".site-container").css({paddingTop:f+"px"})}),a("#lower-home-page").css({top:"-"+f+"px"})}/****************************
	 * SET FOOTER BLOCK HEIGHTS *
	 *****************************************************************/
var g=0;/*******************
	 * HOME PAGE VIDEO *
	 *****************************************************************/
// Home Page Video
if(d||(a(".upper-footer .footer-flex").each(function(){a(this).height()>g&&(g=a(this).height())}),a(".upper-footer .footer-flex").each(function(){a(this).height(g)})),a(".rsb-home").length>0){if(!d){var h=document.getElementById("video-wrap"),i=document.createElement("video");i.setAttribute("id","home-video"),
// newVideoElement.setAttribute("autoplay", "autoplay");
i.setAttribute("loop","loop"),i.setAttribute("preload","auto"),i.setAttribute("muted","muted"),i.classList.add("hidden");
// MP4
var j=document.createElement("source");j.setAttribute("src",site_info.theme_path+"/video/railside-home-video.mp4"),j.setAttribute("type","video/mp4"),i.appendChild(j);
// OGG
var k=document.createElement("source");k.setAttribute("src",site_info.theme_path+"/video/railside-home-video.ogv"),k.setAttribute("type","video/ogv"),i.appendChild(k);
// WEBM
var l=document.createElement("source");l.setAttribute("src",site_info.theme_path+"/video/railside-home-video.webm"),l.setAttribute("type","video/webm"),i.appendChild(l),
// videoDiv.appendChild(newVideoElement);
i.oncanplaythrough=function(){console.log("Video Ready... starting playback"),h.appendChild(i),setTimeout(c,500)}}
// Pause the video if scrolled past
var m=a(".site-header").offset().top;a(window).scroll(function(){document.getElementById("home-video")&&(a(window).scrollTop()+50>=m?document.getElementById("home-video").pause():document.getElementById("home-video").play())})}/********************
	 * HOME PAGE SLIDER *
	 *****************************************************************/
a("#home-slider").length>0&&a("#home-slider").unslider({autoplay:!0,animation:"fade",arrows:!1,nav:!1,speed:1e3,delay:6e3});/*****************
	 * ON TAP POP-UP *
	 *****************************************************************/
var n=a("#on-tap-wrap"),o=a("#close-on-tap"),p=!1;/**********************
	 * MENU SHOW AND HIDE *
	 *****************************************************************/
if(a('.menu-item a[href="#on-tap"], .on-tap-icon').click(function(b){b.preventDefault(),p?(n.removeClass("in-view"),a("body").removeClass("overflow-hidden"),p=!1):(n.addClass("in-view"),a("body").addClass("overflow-hidden"),p=!0)}),
// Close button
o.click(function(){n.removeClass("in-view"),a("body").removeClass("overflow-hidden"),p=!1}),
// Click outside to close
n.click(function(b){p&&(n.removeClass("in-view"),a("body").removeClass("overflow-hidden"),p=!1)}),
// ESC key to clear modal
a(document).keyup(function(b){27==b.keyCode&&p&&(n.removeClass("in-view"),a("body").removeClass("overflow-hidden"),p=!1)}),a(".rsb-menu").length>0){var q=a(".menu-link"),r=a("#menu-pointer");q.click(function(b){var c=a(this).attr("href"),e=a(this).attr("data-pointer-class");console.log(e),d?a("html,body").animate({scrollTop:a(c).offset().top-a(".site-header").height()},1e3):(b.preventDefault(),a(c).is(":visible")||(a(".menu-section").each(function(){a(this).hide()}),a(c).show(),r.removeClass().addClass(e)))})}}(window.jQuery);
//# sourceMappingURL=scripts.min.js.map