YUI.add("yui-gallery-soon",function(e){e.namespace("IXL");
/*!
* based on setImmediate.js. https://github.com/NobleJS/setImmediate
* Copyright (c) 2011 Barnesandnoble.com, llc and Donavon West
* https://github.com/NobleJS/setImmediate/blob/master/MIT-LICENSE.txt
*/
/**
* Similar to Y.later, but sooner.
*
* based on setImmediate.js. https://github.com/NobleJS/setImmediate
*
* Copyright (c) 2011 Barnesandnoble.com, llc and Donavon West
*
* https://github.com/NobleJS/setImmediate/blob/master/MIT-LICENSE.txt
* @module gallery-soon
*/!function(e){"use strict";var n,t,a,i,o,r,s,c={},u="soon",f=e.config.win;n=function(e){var n=c[e];return!!n&&(n(),delete c[e],!0)},
/**
* Y.soon accepts a callback function. The callback function will be called
* once, as soon as possible, in a future turn of the JavaScript event loop.
* If the function requires a specific execution context or arguments, wrap
* it with Y.bind. Y.soon returns an object with a cancel method. If the
* cancel method is called before the callback function, the callback
* function won't be called.
*
* based on setImmediate.js. https://github.com/NobleJS/setImmediate
*
* Copyright (c) 2011 Barnesandnoble.com, llc and Donavon West
*
* https://github.com/NobleJS/setImmediate/blob/master/MIT-LICENSE.txt
* @method soon
* @for YUI
* @param {Function} callback function
* @returns {Object}
*
* -
* cancel
*
* -
* If the cancel method is called before the callback function,
* the callback function won't be called.
*
*
*/
e.UA.nodejs&&"undefined"!=typeof process&&"nextTick"in process?t=function(t){var i=e.guid(u),o=a(i,t);return process.nextTick(function(){n(i)}),o}:(s=0,e.Array.some(["setImmediate","mozSetImmediate","msSetImmediate","oSetImmediate","webkitSetImmediate"],function(e){return e in f&&(s=f[e],!0)}),s&&(t=function(t){var i=e.guid(u),o=a(i,t);return s(function(){n(i)}),o}),t||function(){if("postMessage"in f&&!("importScripts"in f)){var i=f.onmessage,o=f.postMessage,r=!0;f.onmessage=function(){r=!1},o("","*"),f.onmessage=i,r&&(e.on("message",function(e){var t=e._event;t.source===f&&n(t.data)&&e.halt(!0)}),t=function(n){var t=e.guid(u),i=a(t,n);return o(t,"*"),i})}return t}()||function(){if("MessageChannel"in f){var i=new MessageChannel,o=i.port2;i.port1.onmessage=function(e){n(e.data)},t=function(n){var t=e.guid(u),i=a(t,n);return o.postMessage(t),i}}return t}()||(i=e.config.doc,o=i.getElementsByTagName("head")[0],r=function(){o.removeChild(this);var e=this.callback;this.callback=null,e()},t=function(e){var n=i.createElement("script");n.callback=e,n.onreadystatechange=r,o.appendChild(n)})||(t=function(t){var i=e.guid(u),o=a(i,t);return e.later(0,null,n,[i]),o})),a=function(e,n){return c[e]=n,{cancel:function(){delete c[e]}}},e.soon=t}(e)},"@VERSION@",{requires:[]});