text: (function(){var c;var e=function(){};var d=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"];var b=d.length;var a=(window.console=window.console||{});while(b--){c=d[b];if(!a[c]){a[c]=e}}}());
  /*
   * classie - class helper functions
   * from bonzo https://github.com/ded/bonzo
   * 
   * classie.has( elem, 'my-class' ) -> true/false
   * classie.add( elem, 'my-new-class' )
   * classie.remove( elem, 'my-unwanted-class' )
   * classie.toggle( elem, 'my-class' )
   */
  !function(j){function f(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function h(i,a){var c=b(i,a)?d:k;c(i,a)}var b,k,d;"classList" in document.documentElement?(b=function(c,a){return c.classList.contains(a)},k=function(c,a){c.classList.add(a)},d=function(c,a){c.classList.remove(a)}):(b=function(c,a){return f(a).test(c.className)},k=function(c,a){b(c,a)||(c.className=c.className+" "+a)},d=function(c,a){c.className=c.className.replace(f(a)," ")});var g={hasClass:b,addClass:k,removeClass:d,toggleClass:h,has:b,add:k,remove:d,toggle:h};"function"==typeof define&&define.amd?define(g):j.classie=g}(window);
  /*
  * 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){a.fn.fitVids=function(f){var g={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var h=document.head||document.getElementsByTagName("head")[0],b=".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%;}",c=document.createElement("div");c.innerHTML='<p>x</p><style id="fit-vids-style">'+b+"</style>",h.appendChild(c.childNodes[1])}return f&&a.extend(g,f),this.each(function(){var i=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];g.customSelector&&i.push(g.customSelector);var j=".fitvidsignore";g.ignore&&(j=j+", "+g.ignore);var d=a(this).find(i.join(","));d=d.not("object object"),d=d.not(j),d.each(function(m){var p=a(this);if(!(p.parents(j).length>0||"embed"===this.tagName.toLowerCase()&&p.parent("object").length||p.parent(".fluid-width-video-wrapper").length)){p.css("height")||p.css("width")||!isNaN(p.attr("height"))&&!isNaN(p.attr("width"))||(p.attr("height",9),p.attr("width",16));var k="object"===this.tagName.toLowerCase()||p.attr("height")&&!isNaN(parseInt(p.attr("height"),10))?parseInt(p.attr("height"),10):p.height(),l=isNaN(parseInt(p.attr("width"),10))?p.width():parseInt(p.attr("width"),10),q=k/l;if(!p.attr("id")){var n="fitvid"+m;p.attr("id",n)}p.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*q+"%"),p.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto);(function(a){a.fn.jflickrfeed=function(e,b){e=a.extend(true,{flickrbase:"http://api.flickr.com/services/feeds/",feedapi:"photos_public.gne",limit:20,qstrings:{lang:"en-us",format:"json",jsoncallback:"?"},cleanDescription:true,useTemplate:true,itemTemplate:"",itemCallback:function(){}},e);var f=e.flickrbase+e.feedapi+"?";var c=true;for(var d in e.qstrings){if(!c){f+="&"}f+=d+"="+e.qstrings[d];c=false}return a(this).each(function(){var g=a(this);var h=this;a.getJSON(f,function(i){a.each(i.items,function(j,l){if(j<e.limit){if(e.cleanDescription){var n=/<p>(.*?)<\/p>/g;var k=l.description;if(n.test(k)){l.description=k.match(n)[2];if(l.description!=undefined){l.description=l.description.replace("<p>","").replace("</p>","")}}}l.image_s=l.media.m.replace("_m","_s");l.image_t=l.media.m.replace("_m","_t");l.image_m=l.media.m.replace("_m","_m");l.image=l.media.m.replace("_m","");l.image_b=l.media.m.replace("_m","_b");delete l.media;if(e.useTemplate){var p=e.itemTemplate;for(var m in l){var o=new RegExp("{{"+m+"}}","g");p=p.replace(o,l[m])}g.append(p)}e.itemCallback.call(h,l)}});if(a.isFunction(b)){b.call(h,i)}})})}})(jQuery);(function(){var a,b;a=function(){function c(d,h){var f,g;this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1};if(typeof d=="object"){for(f in d){g=d[f],this.options[f]=g}}this.context=h!=null?h:this,this.unique=this._genKey()}return c.prototype.hasNext=function(){return typeof this.context.nextUrl=="string"&&this.context.nextUrl.length>0},c.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},c.prototype.run=function(g){var e,f,d;if(typeof this.options.clientId!="string"&&typeof this.options.accessToken!="string"){throw new Error("Missing clientId or accessToken.")}if(typeof this.options.accessToken!="string"&&typeof this.options.clientId!="string"){throw new Error("Missing clientId or accessToken.")}return this.options.before!=null&&typeof this.options.before=="function"&&this.options.before.call(this),typeof document!="undefined"&&document!==null&&(d=document.createElement("script"),d.id="instafeed-fetcher",d.src=g||this._buildUrl(),e=document.getElementsByTagName("head"),e[0].appendChild(d),f="instafeedCache"+this.unique,window[f]=new c(this.options,this),window[f].unique=this.unique),!0},c.prototype.parse=function(A){var P,J,M,G,N,K,Q,j,C,H,q,F,L,z,R,I,D,V,k,T,B,O;if(typeof A!="object"){if(this.options.error!=null&&typeof this.options.error=="function"){return this.options.error.call(this,"Invalid JSON data"),!1}throw new Error("Invalid JSON response")}if(A.meta.code!==200){if(this.options.error!=null&&typeof this.options.error=="function"){return this.options.error.call(this,A.meta.error_message),!1}throw new Error("Error from Instagram: "+A.meta.error_message)}if(A.data.length===0){if(this.options.error!=null&&typeof this.options.error=="function"){return this.options.error.call(this,"No images were returned from Instagram"),!1}throw new Error("No images were returned from Instagram")}this.options.success!=null&&typeof this.options.success=="function"&&this.options.success.call(this,A),this.context.nextUrl="",A.pagination!=null&&(this.context.nextUrl=A.pagination.next_url);if(this.options.sortBy!=="none"){this.options.sortBy==="random"?z=["","random"]:z=this.options.sortBy.split("-"),L=z[0]==="least"?!0:!1;switch(z[1]){case"random":A.data.sort(function(){return 0.5-Math.random()});break;case"recent":A.data=this._sortBy(A.data,"created_time",L);break;case"liked":A.data=this._sortBy(A.data,"likes.count",L);break;case"commented":A.data=this._sortBy(A.data,"comments.count",L);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}}if(typeof document!="undefined"&&document!==null&&this.options.mock===!1){j=A.data,this.options.limit!=null&&j.length>this.options.limit&&(j=j.slice(0,this.options.limit+1||9000000000)),J=document.createDocumentFragment(),this.options.filter!=null&&typeof this.options.filter=="function"&&(j=this._filter(j,this.options.filter));if(this.options.template!=null&&typeof this.options.template=="string"){G="",K="",H="",R=document.createElement("div");for(I=0,k=j.length;I<k;I++){N=j[I],Q=N.images[this.options.resolution].url,this.options.useHttp||(Q=Q.replace("http://","//")),K=this._makeTemplate(this.options.template,{model:N,id:N.id,link:N.link,image:Q,caption:this._getObjectProperty(N,"caption.text"),likes:N.likes.count,comments:N.comments.count,location:this._getObjectProperty(N,"location.name")}),G+=K}R.innerHTML=G,O=[].slice.call(R.childNodes);for(D=0,T=O.length;D<T;D++){F=O[D],J.appendChild(F)}}else{for(V=0,B=j.length;V<B;V++){N=j[V],C=document.createElement("img"),Q=N.images[this.options.resolution].url,this.options.useHttp||(Q=Q.replace("http://","//")),C.src=Q,this.options.links===!0?(P=document.createElement("a"),P.href=N.link,P.appendChild(C),J.appendChild(P)):J.appendChild(C)}}document.getElementById(this.options.target).appendChild(J),M=document.getElementsByTagName("head")[0],M.removeChild(document.getElementById("instafeed-fetcher")),q="instafeedCache"+this.unique,window[q]=void 0;try{delete window[q]}catch(U){}}return this.options.after!=null&&typeof this.options.after=="function"&&this.options.after.call(this),!0},c.prototype._buildUrl=function(){var d,g,f;d="https://api.instagram.com/v1";switch(this.options.get){case"popular":g="media/popular";break;case"tagged":if(typeof this.options.tagName!="string"){throw new Error("No tag name specified. Use the 'tagName' option.")}g="tags/"+this.options.tagName+"/media/recent";break;case"location":if(typeof this.options.locationId!="number"){throw new Error("No location specified. Use the 'locationId' option.")}g="locations/"+this.options.locationId+"/media/recent";break;case"user":if(typeof this.options.userId!="number"){throw new Error("No user specified. Use the 'userId' option.")}if(typeof this.options.accessToken!="string"){throw new Error("No access token. Use the 'accessToken' option.")}g="users/"+this.options.userId+"/media/recent";break;default:throw new Error("Invalid option for get: '"+this.options.get+"'.")}return f=""+d+"/"+g,this.options.accessToken!=null?f+="?access_token="+this.options.accessToken:f+="?client_id="+this.options.clientId,this.options.limit!=null&&(f+="&count="+this.options.limit),f+="&callback=instafeedCache"+this.unique+".parse",f},c.prototype._genKey=function(){var d;return d=function(){return((1+Math.random())*65536|0).toString(16).substring(1)},""+d()+d()+d()+d()},c.prototype._makeTemplate=function(d,l){var g,j,f,k,h;j=/(?:\{{2})([\w\[\]\.]+)(?:\}{2})/,g=d;while(j.test(g)){f=g.match(j)[1],k=(h=this._getObjectProperty(l,f))!=null?h:"",g=g.replace(j,""+k)}return g},c.prototype._getObjectProperty=function(d,h){var f,g;h=h.replace(/\[(\w+)\]/g,".$1"),g=h.split(".");while(g.length){f=g.shift();if(!(d!=null&&f in d)){return null}d=d[f]}return d},c.prototype._sortBy=function(d,h,f){var g;return g=function(j,l){var k,m;return k=this._getObjectProperty(j,h),m=this._getObjectProperty(l,h),f?k>m?1:-1:k<m?1:-1},d.sort(g.bind(this)),d},c.prototype._filter=function(d,l){var g,j,f,k,h;g=[],f=function(i){if(l(i)){return g.push(i)}};for(k=0,h=d.length;k<h;k++){j=d[k],f(j)}return g},c}(),b=typeof exports!="undefined"&&exports!==null?exports:window,b.Instafeed=a}).call(this);
  /*
   * imagesLoaded PACKAGED v3.1.8
   * JavaScript is all like "You images are done yet or what?"
   * MIT License
   */
  (function(){function a(){}function g(h,j){for(var i=h.length;i--;){if(h[i].listener===j){return i}}return -1}function c(h){return function(){return this[h].apply(this,arguments)}}var b=a.prototype,f=this,d=f.EventEmitter;b.getListeners=function(h){var l,k,j=this._getEvents();if("object"==typeof h){l={};for(k in j){j.hasOwnProperty(k)&&h.test(k)&&(l[k]=j[k])}}else{l=j[h]||(j[h]=[])}return l},b.flattenListeners=function(h){var j,i=[];for(j=0;j<h.length;j+=1){i.push(h[j].listener)}return i},b.getListenersAsObject=function(h){var j,i=this.getListeners(h);return i instanceof Array&&(j={},j[h]=i),j||i},b.addListener=function(h,k){var j,m=this.getListenersAsObject(h),l="object"==typeof k;for(j in m){m.hasOwnProperty(j)&&-1===g(m[j],k)&&m[j].push(l?k:{listener:k,once:!1})}return this},b.on=c("addListener"),b.addOnceListener=function(h,i){return this.addListener(h,{listener:i,once:!0})},b.once=c("addOnceListener"),b.defineEvent=function(h){return this.getListeners(h),this},b.defineEvents=function(h){for(var i=0;i<h.length;i+=1){this.defineEvent(h[i])}return this},b.removeListener=function(h,k){var j,m,l=this.getListenersAsObject(h);for(m in l){l.hasOwnProperty(m)&&(j=g(l[m],k),-1!==j&&l[m].splice(j,1))}return this},b.off=c("removeListener"),b.addListeners=function(h,i){return this.manipulateListeners(!1,h,i)},b.removeListeners=function(h,i){return this.manipulateListeners(!0,h,i)},b.manipulateListeners=function(h,q,k){var j,m,l=h?this.removeListener:this.addListener,p=h?this.removeListeners:this.addListeners;if("object"!=typeof q||q instanceof RegExp){for(j=k.length;j--;){l.call(this,q,k[j])}}else{for(j in q){q.hasOwnProperty(j)&&(m=q[j])&&("function"==typeof m?l.call(this,j,m):p.call(this,j,m))}}return this},b.removeEvent=function(h){var l,k=typeof h,j=this._getEvents();if("string"===k){delete j[h]}else{if("object"===k){for(l in j){j.hasOwnProperty(l)&&h.test(l)&&delete j[l]}}else{delete this._events}}return this},b.removeAllListeners=c("removeEvent"),b.emitEvent=function(h,q){var k,j,m,l,p=this.getListenersAsObject(h);for(m in p){if(p.hasOwnProperty(m)){for(j=p[m].length;j--;){k=p[m][j],k.once===!0&&this.removeListener(h,k.listener),l=k.listener.apply(this,q||[]),l===this._getOnceReturnValue()&&this.removeListener(h,k.listener)}}}return this},b.trigger=c("emitEvent"),b.emit=function(h){var i=Array.prototype.slice.call(arguments,1);return this.emitEvent(h,i)},b.setOnceReturnValue=function(h){return this._onceReturnValue=h,this},b._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},b._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return f.EventEmitter=d,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}).call(this),function(a){function g(h){var e=a.event;return e.target=e.target||e.srcElement||h,e}var c=document.documentElement,b=function(){};c.addEventListener?b=function(h,j,i){h.addEventListener(j,i,!1)}:c.attachEvent&&(b=function(h,k,j){h[k+j]=j.handleEvent?function(){var e=g(h);j.handleEvent.call(j,e)}:function(){var e=g(h);j.call(h,e)},h.attachEvent("on"+k,h[k+j])});var f=function(){};c.removeEventListener?f=function(h,j,i){h.removeEventListener(j,i,!1)}:c.detachEvent&&(f=function(h,l,k){h.detachEvent("on"+l,h[l+k]);try{delete h[l+k]}catch(j){h[l+k]=void 0}});var d={bind:b,unbind:f};"function"==typeof define&&define.amd?define("eventie/eventie",d):a.eventie=d}(this),function(a,b){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(d,c){return b(a,d,c)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(k,z,q){function p(a,d){for(var c in d){a[c]=d[c]}return a}function x(a){return"[object Array]"===j.call(a)}function w(a){var f=[];if(x(a)){f=a}else{if("number"==typeof a.length){for(var d=0,c=a.length;c>d;d++){f.push(a[d])}}else{f.push(a)}}return f}function y(a,f,c){if(!(this instanceof y)){return new y(a,f)}"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=w(a),this.options=p({},this.options),"function"==typeof f?c=f:p(this.options,f),c&&this.on("always",c),this.getImages(),b&&(this.jqDeferred=new b.Deferred);var d=this;setTimeout(function(){d.check()})}function l(a){this.img=a}function g(a){this.src=a,B[a]=this}var b=k.jQuery,A=k.console,m="undefined"!=typeof A,j=Object.prototype.toString;y.prototype=new z,y.prototype.options={},y.prototype.getImages=function(){this.images=[];for(var a=0,D=this.elements.length;D>a;a++){var h=this.elements[a];"IMG"===h.nodeName&&this.addImage(h);var d=h.nodeType;if(d&&(1===d||9===d||11===d)){for(var v=h.querySelectorAll("img"),u=0,C=v.length;C>u;u++){var c=v[u];this.addImage(c)}}}},y.prototype.addImage=function(a){var c=new l(a);this.images.push(c)},y.prototype.check=function(){function a(i,n){return s.options.debug&&m&&A.log("confirm",i,n),s.progress(i),d++,d===c&&s.complete(),!0}var s=this,d=0,c=this.images.length;if(this.hasAnyBroken=!1,!c){return void this.complete()}for(var h=0;c>h;h++){var f=this.images[h];f.on("confirm",a),f.check()}},y.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;var c=this;setTimeout(function(){c.emit("progress",c,a),c.jqDeferred&&c.jqDeferred.notify&&c.jqDeferred.notify(c,a)})},y.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var c=this;setTimeout(function(){if(c.emit(a,c),c.emit("always",c),c.jqDeferred){var d=c.hasAnyBroken?"reject":"resolve";c.jqDeferred[d](c)}})},b&&(b.fn.imagesLoaded=function(a,d){var c=new y(this,a,d);return c.jqDeferred.promise(b(this))}),l.prototype=new z,l.prototype.check=function(){var a=B[this.img.src]||new g(this.img.src);if(a.isConfirmed){return void this.confirm(a.isLoaded,"cached was confirmed")}if(this.img.complete&&void 0!==this.img.naturalWidth){return void this.confirm(0!==this.img.naturalWidth,"naturalWidth")}var c=this;a.on("confirm",function(d,f){return c.confirm(d.isLoaded,f),!0}),a.check()},l.prototype.confirm=function(a,c){this.isLoaded=a,this.emit("confirm",this,c)};var B={};return g.prototype=new z,g.prototype.check=function(){if(!this.isChecked){var a=new Image;q.bind(a,"load",this),q.bind(a,"error",this),a.src=this.src,this.isChecked=!0}},g.prototype.handleEvent=function(a){var c="on"+a.type;this[c]&&this[c](a)},g.prototype.onload=function(a){this.confirm(!0,"onload"),this.unbindProxyEvents(a)},g.prototype.onerror=function(a){this.confirm(!1,"onerror"),this.unbindProxyEvents(a)},g.prototype.confirm=function(a,c){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,c)},g.prototype.unbindProxyEvents=function(a){q.unbind(a.target,"load",this),q.unbind(a.target,"error",this)},y});
  /*
   * Retina.js v1.3.0
   *
   * Copyright 2014 Imulus, LLC
   * Released under the MIT license
   *
   * Retina.js is an open source script that makes it easy to serve
   * high-resolution images to devices with retina displays.
   */
  !function(){function h(){}function i(b){return m.retinaImageSuffix+b}function j(b,f){if(this.path=b||"","undefined"!=typeof f&&null!==f){this.at_2x_path=f,this.perform_check=!1}else{if(void 0!==document.createElement){var g=document.createElement("a");g.href=this.path,g.pathname=g.pathname.replace(n,i),this.at_2x_path=g.href}else{var o=this.path.split("?");o[0]=o[0].replace(n,i),this.at_2x_path=o.join("?")}this.perform_check=!0}}function k(c){this.el=c,this.path=new j(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var d=this;this.path.check_2x_variant(function(b){b&&d.swap()})}var l="undefined"==typeof exports?window:exports,m={retinaImageSuffix:"@2x",check_mime_type:!0,force_original_dimensions:!0};l.Retina=h,h.configure=function(c){null===c&&(c={});for(var d in c){c.hasOwnProperty(d)&&(m[d]=c[d])}},h.init=function(c){null===c&&(c=l);var d=c.onload||function(){};c.onload=function(){var b,g,o=document.getElementsByTagName("img"),p=[];for(b=0;b<o.length;b+=1){g=o[b],g.getAttributeNode("data-no-retina")||p.push(new k(g))}d()}},h.isRetina=function(){var b="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return l.devicePixelRatio>1?!0:l.matchMedia&&l.matchMedia(b).matches?!0:!1};var n=/\.\w+$/;l.RetinaImagePath=j,j.confirmed_paths=[],j.prototype.is_external=function(){return !(!this.path.match(/^https?\:/i)||this.path.match("//"+document.domain))},j.prototype.check_2x_variant=function(c){var e,f=this;return this.is_external()?c(!1):this.perform_check||"undefined"==typeof this.at_2x_path||null===this.at_2x_path?this.at_2x_path in j.confirmed_paths?c(!0):(e=new XMLHttpRequest,e.open("HEAD",this.at_2x_path),e.onreadystatechange=function(){if(4!==e.readyState){return c(!1)}if(e.status>=200&&e.status<=399){if(m.check_mime_type){var a=e.getResponseHeader("Content-Type");if(null===a||!a.match(/^image/i)){return c(!1)}}return j.confirmed_paths.push(f.at_2x_path),c(!0)}return c(!1)},e.send(),void 0):c(!0)},l.RetinaImage=k,k.prototype.swap=function(d){function e(){f.el.complete?(m.force_original_dimensions&&(f.el.setAttribute("width",f.el.offsetWidth),f.el.setAttribute("height",f.el.offsetHeight)),f.el.setAttribute("src",d)):setTimeout(e,5)}"undefined"==typeof d&&(d=this.path.at_2x_path);var f=this;e()},h.isRetina()&&h.init(l)}();!function(a,b){"function"==typeof define&&define.amd?define([],b(a)):"object"==typeof exports?module.exports=b(a):a.smoothScroll=b(a)}("undefined"!=typeof global?global:this.window||this.global,function(x){var K,F,I,G,j={},L=!!x.document.querySelector&&!!x.addEventListener,C={speed:500,easing:"easeInOutCubic",offset:0,updateURL:!0,callback:function(){}},q=function(){var c={},h=!1,d=0,g=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(h=arguments[0],d++);for(var f=function(a){for(var e in a){Object.prototype.hasOwnProperty.call(a,e)&&(c[e]=h&&"[object Object]"===Object.prototype.toString.call(a[e])?q(!0,c[e],a[e]):a[e])}};g>d;d++){var b=arguments[d];f(b)}return c},J=function(a){return Math.max(a.scrollHeight,a.offsetHeight,a.clientHeight)},D=function(c,h){var d,g,f=h.charAt(0),b="classList" in document.documentElement;for("["===f&&(h=h.substr(1,h.length-2),d=h.split("="),d.length>1&&(g=!0,d[1]=d[1].replace(/"/g,"").replace(/'/g,"")));c&&c!==document;c=c.parentNode){if("."===f){if(b){if(c.classList.contains(h.substr(1))){return c}}else{if(new RegExp("(^|\\s)"+h.substr(1)+"(\\s|$)").test(c.className)){return c}}}if("#"===f&&c.id===h.substr(1)){return c}if("["===f&&c.hasAttribute(d[0])){if(!g){return c}if(c.getAttribute(d[0])===d[1]){return c}}if(c.tagName.toLowerCase()===h){return c}}return null},z=function(c){for(var h,d=String(c),g=d.length,f=-1,b="",i=d.charCodeAt(0);++f<g;){if(h=d.charCodeAt(f),0===h){throw new InvalidCharacterError("Invalid character: the input contains U+0000.")}b+=h>=1&&31>=h||127==h||0===f&&h>=48&&57>=h||1===f&&h>=48&&57>=h&&45===i?"\\"+h.toString(16)+" ":h>=128||45===h||95===h||h>=48&&57>=h||h>=65&&90>=h||h>=97&&122>=h?d.charAt(f):"\\"+d.charAt(f)}return b},w=function(a,c){var b;return"easeInQuad"===a&&(b=c*c),"easeOutQuad"===a&&(b=c*(2-c)),"easeInOutQuad"===a&&(b=0.5>c?2*c*c:-1+(4-2*c)*c),"easeInCubic"===a&&(b=c*c*c),"easeOutCubic"===a&&(b=--c*c*c+1),"easeInOutCubic"===a&&(b=0.5>c?4*c*c*c:(c-1)*(2*c-2)*(2*c-2)+1),"easeInQuart"===a&&(b=c*c*c*c),"easeOutQuart"===a&&(b=1- --c*c*c*c),"easeInOutQuart"===a&&(b=0.5>c?8*c*c*c*c:1-8*--c*c*c*c),"easeInQuint"===a&&(b=c*c*c*c*c),"easeOutQuint"===a&&(b=1+ --c*c*c*c*c),"easeInOutQuint"===a&&(b=0.5>c?16*c*c*c*c*c:1+16*--c*c*c*c*c),b||c},B=function(a,d,b){var c=0;if(a.offsetParent){do{c+=a.offsetTop,a=a.offsetParent}while(a)}return c=c-d-b,c>=0?c:0},E=function(){return Math.max(x.document.body.scrollHeight,x.document.documentElement.scrollHeight,x.document.body.offsetHeight,x.document.documentElement.offsetHeight,x.document.body.clientHeight,x.document.documentElement.clientHeight)},H=function(a){return a&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(a):{}},A=function(b,a){x.history.pushState&&(a||"true"===a)&&x.history.pushState(null,null,[x.location.protocol,"//",x.location.host,x.location.pathname,x.location.search,b].join(""))},M=function(a){return null===a?0:J(a)+a.offsetTop};j.animateScroll=function(T,p,c){var U=H(T?T.getAttribute("data-options"):null),P=q(P||C,c||{},U);p="#"+z(p.substr(1));var m="#"===p?x.document.documentElement:x.document.querySelector(p),d=x.pageYOffset;I||(I=x.document.querySelector("[data-scroll-header]")),G||(G=M(I));var W=$("header").hasClass("sticky"),r=B(m,G,parseInt(P.offset,10));$(T).hasClass("inline-scroll")||W||(r-=$(".showhide").is(":visible")?40:100);var R,h,f,e=r-d,o=E(),V=0;A(p,P.updateURL);var g=function(n,l,b){var s=x.pageYOffset;(n==l||s==l||x.innerHeight+s>=o)&&(clearInterval(b),m.focus(),P.callback(T,p))},i=function(){V+=16,h=V/parseInt(P.speed,10),h=h>1?1:h,f=d+e*w(P.easing,h),x.scrollTo(0,Math.floor(f)),g(f,r,R)},v=function(){R=setInterval(i,16)};0===x.pageYOffset&&x.scrollTo(0,0),v()};var k=function(a){var b=D(a.target,"[data-scroll]");b&&"a"===b.tagName.toLowerCase()&&(a.preventDefault(),j.animateScroll(b,b.hash,K))},N=function(){F||(F=setTimeout(function(){F=null,G=M(I)},66))};return j.destroy=function(){K&&(x.document.removeEventListener("click",k,!1),x.removeEventListener("resize",N,!1),K=null,F=null,I=null,G=null)},j.init=function(a){L&&(j.destroy(),K=q(C,a||{}),I=x.document.querySelector("[data-scroll-header]"),G=M(I),x.document.addEventListener("click",k,!1),I&&x.addEventListener("resize",N,!1))},j});(function(a,d,b,c){a.fn.formchimp=function(k){var g=a(this);var e=a("body");var h=g.attr("action").replace("/post?","/post-json?").concat("&c=?");var f=g.find('[type="submit"]');var i={appendElement:g,buttonSelector:f,buttonText:"",debug:false,errorMessage:"",onMailChimpSuccess:function(){},onMailChimpError:function(){},responseClass:"mc-response",successMessage:"",url:h,};var j=i.buttonSelector.text();a.extend(i,k);a(g).on("submit",function(l){l.preventDefault();e.removeClass("mc-success mc-error").addClass("mc-loading");if(a("."+i.responseClass).length===0){$responseContainer=a("<div/>").addClass(i.responseClass).appendTo(i.appendElement)}else{$responseContainer.html("")}a.ajax({url:i.url,data:g.serialize(),dataType:"jsonp"}).done(function(m){if(i.debug){console.log(JSON.stringify(m))}var n=m.msg;if(!isNaN(n.charAt(0))&&n.charAt(2)==="-"){n=n.substring(3)}e.addClass("mc-"+m.result).removeClass("mc-loading");if(m.result==="success"){if(i.successMessage!==""){n=i.successMessage}if(i.buttonText!==""){i.buttonSelector.text(i.buttonText)}a(b).trigger("mailChimpSuccess");i.onMailChimpSuccess.call()}else{if(i.errorMessage!==""){n=i.errorMessage}if(i.buttonText!==""){i.buttonSelector.text(j)}a(b).trigger("mailChimpError");i.onMailChimpError.call()}$responseContainer.html(n)})})}})(jQuery,window,document);