File: /home/adventp/www/wp-content/plugins/ut-portfolio/assets/js/jquery.images.loaded.min.js
/*!
* imagesLoaded PACKAGED v3.2.0
* 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(){function c(){}var l=c.prototype;var v=this;var x=v.EventEmitter;function h(z,A){var y=z.length;while(y--){if(z[y].listener===A){return y}}return -1}function j(y){return function z(){return this[y].apply(this,arguments)}}l.getListeners=function t(y){var B=this._getEvents();var z;var A;if(typeof y==="object"){z={};for(A in B){if(B.hasOwnProperty(A)&&y.test(A)){z[A]=B[A]}}}else{z=B[y]||(B[y]=[])}return z};l.flattenListeners=function r(A){var y=[];var z;for(z=0;z<A.length;z+=1){y.push(A[z].listener)}return y};l.getListenersAsObject=function e(y){var A=this.getListeners(y);var z;if(A instanceof Array){z={};z[y]=A}return z||A};l.addListener=function f(y,B){var A=this.getListenersAsObject(y);var C=typeof B==="object";var z;for(z in A){if(A.hasOwnProperty(z)&&h(A[z],B)===-1){A[z].push(C?B:{listener:B,once:false})}}return this};l.on=j("addListener");l.addOnceListener=function a(y,z){return this.addListener(y,{listener:z,once:true})};l.once=j("addOnceListener");l.defineEvent=function p(y){this.getListeners(y);return this};l.defineEvents=function q(y){for(var z=0;z<y.length;z+=1){this.defineEvent(y[z])}return this};l.removeListener=function b(y,C){var B=this.getListenersAsObject(y);var z;var A;for(A in B){if(B.hasOwnProperty(A)){z=h(B[A],C);if(z!==-1){B[A].splice(z,1)}}}return this};l.off=j("removeListener");l.addListeners=function m(y,z){return this.manipulateListeners(false,y,z)};l.removeListeners=function s(y,z){return this.manipulateListeners(true,y,z)};l.manipulateListeners=function g(z,A,C){var B;var D;var E=z?this.removeListener:this.addListener;var y=z?this.removeListeners:this.addListeners;if(typeof A==="object"&&!(A instanceof RegExp)){for(B in A){if(A.hasOwnProperty(B)&&(D=A[B])){if(typeof D==="function"){E.call(this,B,D)}else{y.call(this,B,D)}}}}else{B=C.length;while(B--){E.call(this,A,C[B])}}return this};l.removeEvent=function o(y){var B=typeof y;var A=this._getEvents();var z;if(B==="string"){delete A[y]}else{if(B==="object"){for(z in A){if(A.hasOwnProperty(z)&&y.test(z)){delete A[z]}}}else{delete this._events}}return this};l.removeAllListeners=j("removeEvent");l.emitEvent=function u(y,A){var D=this.getListenersAsObject(y);var E;var C;var B;var z;for(B in D){if(D.hasOwnProperty(B)){C=D[B].length;while(C--){E=D[B][C];if(E.once===true){this.removeListener(y,E.listener)}z=E.listener.apply(this,A||[]);if(z===this._getOnceReturnValue()){this.removeListener(y,E.listener)}}}}return this};l.trigger=j("emitEvent");l.emit=function k(y){var z=Array.prototype.slice.call(arguments,1);return this.emitEvent(y,z)};l.setOnceReturnValue=function i(y){this._onceReturnValue=y;return this};l._getOnceReturnValue=function n(){if(this.hasOwnProperty("_onceReturnValue")){return this._onceReturnValue}else{return true}};l._getEvents=function d(){return this._events||(this._events={})};c.noConflict=function w(){v.EventEmitter=x;return c};if(typeof define==="function"&&define.amd){define("eventEmitter/EventEmitter",[],function(){return c})}else{if(typeof module==="object"&&module.exports){module.exports=c}else{this.EventEmitter=c}}}.call(this));
/*!
* eventie v1.0.4
* event binding helper
* eventie.bind( elem, 'click', myFn )
* eventie.unbind( elem, 'click', myFn )
*/
(function(e){var b=document.documentElement;var f=function(){};function a(h){var g=e.event;g.target=g.target||g.srcElement||h;return g}if(b.addEventListener){f=function(i,h,g){i.addEventListener(h,g,false)}}else{if(b.attachEvent){f=function(i,h,g){i[h+g]=g.handleEvent?function(){var j=a(i);g.handleEvent.call(g,j)}:function(){var j=a(i);g.call(i,j)};i.attachEvent("on"+h,i[h+g])}}}var d=function(){};if(b.removeEventListener){d=function(i,h,g){i.removeEventListener(h,g,false)}}else{if(b.detachEvent){d=function(j,h,g){j.detachEvent("on"+h,j[h+g]);try{delete j[h+g]}catch(i){j[h+g]=undefined}}}}var c={bind:f,unbind:d};if(typeof define==="function"&&define.amd){define("eventie/eventie",c)}else{e.eventie=c}})(this);
/*!
* imagesLoaded v3.2.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
(function(b,a){if(typeof define=="function"&&define.amd){define(["eventEmitter/EventEmitter","eventie/eventie"],function(d,c){return a(b,d,c)})}else{if(typeof module=="object"&&module.exports){module.exports=a(b,require("wolfy87-eventemitter"),require("eventie"))}else{b.imagesLoaded=a(b,b.EventEmitter,b.eventie)}}})(window,function factory(g,m,k){var e=g.jQuery;var c=g.console;function i(p,o){for(var q in o){p[q]=o[q]}return p}var n=Object.prototype.toString;function f(o){return n.call(o)=="[object Array]"}function a(q){var p=[];if(f(q)){p=q}else{if(typeof q.length=="number"){for(var o=0;o<q.length;o++){p.push(q[o])}}else{p.push(q)}}return p}function d(q,p,o){if(!(this instanceof d)){return new d(q,p,o)}if(typeof q=="string"){q=document.querySelectorAll(q)}this.elements=a(q);this.options=i({},this.options);if(typeof p=="function"){o=p}else{i(this.options,p)}if(o){this.on("always",o)}this.getImages();if(e){this.jqDeferred=new e.Deferred()}var r=this;setTimeout(function(){r.check()})}d.prototype=new m();d.prototype.options={};d.prototype.getImages=function(){this.images=[];for(var o=0;o<this.elements.length;o++){var p=this.elements[o];this.addElementImages(p)}};d.prototype.addElementImages=function(s){if(s.nodeName=="IMG"){this.addImage(s)}if(this.options.background===true){this.addElementBackgroundImages(s)}var o=s.nodeType;if(!o||!b[o]){return}var t=s.querySelectorAll("img");for(var r=0;r<t.length;r++){var p=t[r];this.addImage(p)}if(typeof this.options.background=="string"){var q=s.querySelectorAll(this.options.background);for(r=0;r<q.length;r++){var u=q[r];this.addElementBackgroundImages(u)}}};var b={1:true,9:true,11:true};d.prototype.addElementBackgroundImages=function(q){var p=h(q);var s=/url\(['"]*([^'"\)]+)['"]*\)/gi;var r=s.exec(p.backgroundImage);while(r!==null){var o=r&&r[1];if(o){this.addBackground(o,q)}r=s.exec(p.backgroundImage)}};var h=g.getComputedStyle||function(o){return o.currentStyle};d.prototype.addImage=function(o){var p=new j(o);this.images.push(p)};d.prototype.addBackground=function(o,q){var p=new l(o,q);this.images.push(p)};d.prototype.check=function(){var r=this;this.progressedCount=0;this.hasAnyBroken=false;if(!this.images.length){this.complete();return}function q(u,t,s){setTimeout(function(){r.progress(u,t,s)})}for(var o=0;o<this.images.length;o++){var p=this.images[o];p.once("progress",q);p.check()}};d.prototype.progress=function(q,p,o){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!q.isLoaded;this.emit("progress",this,q,p);if(this.jqDeferred&&this.jqDeferred.notify){this.jqDeferred.notify(this,q)}if(this.progressedCount==this.images.length){this.complete()}if(this.options.debug&&c){c.log("progress: "+o,q,p)}};d.prototype.complete=function(){var p=this.hasAnyBroken?"fail":"done";this.isComplete=true;this.emit(p,this);this.emit("always",this);if(this.jqDeferred){var o=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[o](this)}};function j(o){this.img=o}j.prototype=new m();j.prototype.check=function(){var o=this.getIsImageComplete();if(o){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image();k.bind(this.proxyImage,"load",this);k.bind(this.proxyImage,"error",this);k.bind(this.img,"load",this);k.bind(this.img,"error",this);this.proxyImage.src=this.img.src};j.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth!==undefined};j.prototype.confirm=function(o,p){this.isLoaded=o;this.emit("progress",this,this.img,p)};j.prototype.handleEvent=function(o){var p="on"+o.type;if(this[p]){this[p](o)}};j.prototype.onload=function(){this.confirm(true,"onload");this.unbindEvents()};j.prototype.onerror=function(){this.confirm(false,"onerror");this.unbindEvents()};j.prototype.unbindEvents=function(){k.unbind(this.proxyImage,"load",this);k.unbind(this.proxyImage,"error",this);k.unbind(this.img,"load",this);k.unbind(this.img,"error",this)};function l(o,p){this.url=o;this.element=p;this.img=new Image()}l.prototype=new j();l.prototype.check=function(){k.bind(this.img,"load",this);k.bind(this.img,"error",this);this.img.src=this.url;var o=this.getIsImageComplete();if(o){this.confirm(this.img.naturalWidth!==0,"naturalWidth");this.unbindEvents()}};l.prototype.unbindEvents=function(){k.unbind(this.img,"load",this);k.unbind(this.img,"error",this)};l.prototype.confirm=function(o,p){this.isLoaded=o;this.emit("progress",this,this.element,p)};d.makeJQueryPlugin=function(o){o=o||g.jQuery;if(!o){return}e=o;e.fn.imagesLoaded=function(q,r){var p=new d(this,q,r);return p.jqDeferred.promise(e(this))}};d.makeJQueryPlugin();return d});