/*! * Simple jQuery Equal Heights * * Copyright (c) 2013 Matt Banks * Dual licensed under the MIT and GPL licenses. * Uses the same license as jQuery, see: * http://docs.jquery.com/License * * @version 1.5.1 */ !function(a){a.fn.equalHeights=function(){var b=0,c=a(this);return c.each(function(){var c=a(this).innerHeight();c>b&&(b=c)}),c.css("height",b)},a("[data-equal]").each(function(){var b=a(this),c=b.data("equal");b.find(c).equalHeights()})}(jQuery); /*! * imagesLoaded PACKAGED v4.1.4 * JavaScript is all like "You images are done yet or what?" * MIT License */ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o',templateBoundaries:["{{","}}"],transform:null};if(e)for(var o in t)"undefined"!=typeof e[o]&&(t[o]=e[o]);n("string"==typeof t.target||"object"==typeof t.target,"target must be a string or DOM node, got "+t.target+" ("+typeof t.target+")"),n("string"==typeof t.accessToken||"function"==typeof t.accessToken,"accessToken must be a string or function, got "+t.accessToken+" ("+typeof t.accessToken+")"),n("number"==typeof t.accessTokenTimeout,"accessTokenTimeout must be a number, got "+t.accessTokenTimeout+" ("+typeof t.accessTokenTimeout+")"),n("number"==typeof t.apiTimeout,"apiTimeout must be a number, got "+t.apiTimeout+" ("+typeof t.apiTimeout+")"),n("boolean"==typeof t.debug,"debug must be true or false, got "+t.debug+" ("+typeof t.debug+")"),n("boolean"==typeof t.mock,"mock must be true or false, got "+t.mock+" ("+typeof t.mock+")"),n("object"==typeof t.templateBoundaries&&2===t.templateBoundaries.length&&"string"==typeof t.templateBoundaries[0]&&"string"==typeof t.templateBoundaries[1],"templateBoundaries must be an array of 2 strings, got "+t.templateBoundaries+" ("+typeof t.templateBoundaries+")"),n(!t.template||"string"==typeof t.template,"template must null or string, got "+t.template+" ("+typeof t.template+")"),n(!t.error||"function"==typeof t.error,"error must be null or function, got "+t.error+" ("+typeof t.error+")"),n(!t.before||"function"==typeof t.before,"before must be null or function, got "+t.before+" ("+typeof t.before+")"),n(!t.after||"function"==typeof t.after,"after must be null or function, got "+t.after+" ("+typeof t.after+")"),n(!t.success||"function"==typeof t.success,"success must be null or function, got "+t.success+" ("+typeof t.success+")"),n(!t.filter||"function"==typeof t.filter,"filter must be null or function, got "+t.filter+" ("+typeof t.filter+")"),n(!t.transform||"function"==typeof t.transform,"transform must be null or function, got "+t.transform+" ("+typeof t.transform+")"),n(!t.sort||"function"==typeof t.sort,"sort must be null or function, got "+t.sort+" ("+typeof t.sort+")"),n(!t.render||"function"==typeof t.render,"render must be null or function, got "+t.render+" ("+typeof t.render+")"),n(!t.limit||"number"==typeof t.limit,"limit must be null or number, got "+t.limit+" ("+typeof t.limit+")"),this._state={running:!1},this._options=t}return e.prototype.run=function(){var r=this,s=null,o=null,i=null,a=null;return this._debug("run","options",this._options),this._debug("run","state",this._state),this._state.running?(this._debug("run","already running, skipping"),!1):(this._start(),this._debug("run","getting dom node"),(s="string"==typeof this._options.target?document.getElementById(this._options.target):this._options.target)?(this._debug("run","got dom node",s),this._debug("run","getting access token"),this._getAccessToken(function(e,t){if(e)return r._debug("onTokenReceived","error",e),void r._fail(new Error("error getting access token: "+e.message));o="https://graph.instagram.com/me/media?fields=caption,id,media_type,media_url,permalink,thumbnail_url,timestamp,username&access_token="+t,r._debug("onTokenReceived","request url",o),r._makeApiRequest(o,function(e,t){if(e)return r._debug("onResponseReceived","error",e),void r._fail(new Error("api request error: "+e.message));r._debug("onResponseReceived","data",t),r._success(t);try{i=r._processData(t),r._debug("onResponseReceived","processed data",i)}catch(o){return void r._fail(o)}if(r._options.mock)r._debug("onResponseReceived","mock enabled, skipping render");else{try{a=r._renderData(i),r._debug("onResponseReceived","html content",a)}catch(n){return void r._fail(n)}s.innerHTML=a}r._finish()})}),!0):(this._fail(new Error("no element found with ID "+this._options.target)),!1))},e.prototype._processData=function(e){var t="function"==typeof this._options.transform,o="function"==typeof this._options.filter,n="function"==typeof this._options.sort,r="number"==typeof this._options.limit,s=[],i=null,a=null,u=null,c=null;if(this._debug("processData","hasFilter",o,"hasTransform",t,"hasSort",n,"hasLimit",r),"object"!=typeof e||"object"!=typeof e.data||e.data.length<=0)return null;for(var l=0;l\?,\./|\\\s]+/i,n=[];if("string"==typeof e)for(;null!==(match=t.exec(e));)!1===o.test(match[1])&&n.push(match[1]);return n},e.prototype._getItemData=function(e){var t=null,o=null;switch(e.media_type){case"IMAGE":t="image",o=e.media_url;break;case"VIDEO":t="video",o=e.thumbnail_url;break;case"CAROUSEL_ALBUM":t="album",o=e.media_url}return{caption:e.caption,tags:this._extractTags(e.caption),id:e.id,image:o,link:e.permalink,model:e,timestamp:e.timestamp,type:t,username:e.username}},e.prototype._renderData=function(e){var t="string"==typeof this._options.template,o="function"==typeof this._options.render,n=null,r=null,s="";if(this._debug("renderData","hasTemplate",t,"hasRender",o),"object"!=typeof e||e.length<=0)return null;for(var i=0;i