(function(t){function e(){}function n(a){if(a){var h="undefined"==typeof console?e:function(t){console.error(t)};return a.bridget=function(t,e){var r,s,n;(n=e).prototype.option||(n.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),r=t,s=e,a.fn[r]=function(e){if("string"!=typeof e)return this.each(function(){var t=a.data(this,r);t?(t.option(e),t._init()):(t=new s(this,e),a.data(this,r,t))});for(var t=u.call(arguments,1),n=0,i=this.length;nn;n+=1)e.push(t[n].listener);return e},n.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&((e={})[t]=n),e||n},n.addListener=function(t,e){var n,i=this.getListenersAsObject(t),o="object"==typeof e;for(n in i)i.hasOwnProperty(n)&&-1===r(i[n],e)&&i[n].push(o?e:{listener:e,once:!1});return this},n.on=e("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=e("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,e){var n,i,o=this.getListenersAsObject(t);for(i in o)o.hasOwnProperty(i)&&(n=r(o[i],e),-1!==n&&o[i].splice(n,1));return this},n.off=e("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,n){var i,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(i=n.length;i--;)r.call(this,e,n[i]);else for(i in e)e.hasOwnProperty(i)&&(o=e[i])&&("function"==typeof o?r:s).call(this,i,o);return this},n.removeEvent=function(t){var e,n=typeof t,i=this._getEvents();if("string"==n)delete i[t];else if(t instanceof RegExp)for(e in i)i.hasOwnProperty(e)&&t.test(e)&&delete i[e];else delete this._events;return this},n.removeAllListeners=e("removeEvent"),n.emitEvent=function(t,e){var n,i,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(i=s[o].length;i--;)n=s[o][i],!0===n.once&&this.removeListener(t,n.listener),r=n.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},n.trigger=e("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return i.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof r[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,i=o.length;nn;n+=1)e.push(t[n].listener);return e},n.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&((e={})[t]=n),e||n},n.addListener=function(t,e){var n,i=this.getListenersAsObject(t),o="object"==typeof e;for(n in i)i.hasOwnProperty(n)&&-1===r(i[n],e)&&i[n].push(o?e:{listener:e,once:!1});return this},n.on=e("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=e("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,e){var n,i,o=this.getListenersAsObject(t);for(i in o)o.hasOwnProperty(i)&&(n=r(o[i],e),-1!==n&&o[i].splice(n,1));return this},n.off=e("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,n){var i,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(i=n.length;i--;)r.call(this,e,n[i]);else for(i in e)e.hasOwnProperty(i)&&(o=e[i])&&("function"==typeof o?r:s).call(this,i,o);return this},n.removeEvent=function(t){var e,n=typeof t,i=this._getEvents();if("string"==n)delete i[t];else if("object"==n)for(e in i)i.hasOwnProperty(e)&&t.test(e)&&delete i[e];else delete this._events;return this},n.removeAllListeners=e("removeEvent"),n.emitEvent=function(t,e){var n,i,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(i=s[o].length;i--;)n=s[o][i],!0===n.once&&this.removeListener(t,n.listener),r=n.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},n.trigger=e("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return i.EventEmitter=o,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(n){function i(t){var e=n.event;return e.target=e.target||e.srcElement||t,e}var t=document.documentElement,e=function(){};t.addEventListener?e=function(t,e,n){t.addEventListener(e,n,!1)}:t.attachEvent&&(e=function(e,t,n){e[t+n]=n.handleEvent?function(){var t=i(e);n.handleEvent.call(n,t)}:function(){var t=i(e);n.call(e,t)},e.attachEvent("on"+t,e[t+n])});var o=function(){};t.removeEventListener?o=function(t,e,n){t.removeEventListener(e,n,!1)}:t.detachEvent&&(o=function(e,n,i){e.detachEvent("on"+n,e[n+i]);try{delete e[n+i]}catch(t){e[n+i]=void 0}}),o={bind:e,unbind:o},"function"==typeof define&&define.amd?define("eventie/eventie",o):n.eventie=o}(this),function(n,i){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(t,e){return i(n,t,e)}):"object"==typeof exports?module.exports=i(n,require("eventEmitter"),require("eventie")):n.imagesLoaded=i(n,n.EventEmitter,n.eventie)}(this,function(t,e,n){function o(t,e){for(var n in e)t[n]=e[n];return t}function r(t){var e,n=[];if(e=t,"[object Array]"===f.call(e))n=t;else if("number"==typeof t.length)for(var i=0,o=t.length;i