Files
2011-05-11 21:48:56 -04:00

8 lines
35 KiB
JavaScript

/*!
* Ender: open module JavaScript framework
* copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat)
* https://github.com/ender-js/ender
* License MIT
* Build: ender build jeesh
*/
!function(a){function d(a,b){return new c(a,b)}function c(a,b){this.elements=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:d._select(a,b),this.length=this.elements.length;for(var c=0;c<this.length;c++)this[c]=this.elements[c]}function b(a,b){for(var c in b)c!="noConflict"&&(a[c]=b[c])}b(d,{ender:function(a,e){b(e?c.prototype:d,a)},_select:function(){return[]}});var e=a.$;d.noConflict=function(){a.$=e;return this},typeof module!="undefined"&&module.exports?module.exports=d:a.$=d}(this),!function(){var a={},b={exports:a};!function(a){function k(){c=1;for(var a=0,b=d.length;a<b;a++)d[a]()}var c=0,d=[],e,f=!1,g=a.createElement("a"),h="DOMContentLoaded",i="addEventListener",j="onreadystatechange";/^loade|c/.test(a.readyState)&&(c=1),a[i]&&a[i](h,function l(){a.removeEventListener(h,l,f),k()},f),g.doScroll&&a.attachEvent(j,e=function e(){/^c/.test(a.readyState)&&(a.detachEvent(j,e),k())});var m=g.doScroll?function(a){self!=top?c?a():d.push(a):!function(){try{g.doScroll("left")}catch(b){return setTimeout(function(){m(a)},50)}a()}()}:function(a){c?a():d.push(a)};typeof b!="undefined"&&b.exports?b.exports={domReady:m}:window.domReady=m}(document),$.ender(b.exports)}(),!function(){var a={},b={exports:a};(function(){var a=this,c=a._,d={},e=Array.prototype,f=Object.prototype,g=Function.prototype,h=e.slice,i=e.unshift,j=f.toString,k=f.hasOwnProperty,l=e.forEach,m=e.map,n=e.reduce,o=e.reduceRight,p=e.filter,q=e.every,r=e.some,s=e.indexOf,t=e.lastIndexOf,u=Array.isArray,v=Object.keys,w=g.bind,x=function(a){return new C(a)};typeof b!="undefined"&&b.exports?(b.exports=x,x._=x):a._=x,x.VERSION="1.1.6";var y=x.each=x.forEach=function(a,b,c){if(a!=null)if(l&&a.forEach===l)a.forEach(b,c);else if(x.isNumber(a.length)){for(var e=0,f=a.length;e<f;e++)if(b.call(c,a[e],e,a)===d)return}else for(var g in a)if(k.call(a,g)&&b.call(c,a[g],g,a)===d)return};x.map=function(a,b,c){var d=[];if(a==null)return d;if(m&&a.map===m)return a.map(b,c);y(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)});return d},x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=c!==void 0;a==null&&(a=[]);if(n&&a.reduce===n){d&&(b=x.bind(b,d));return e?a.reduce(b,c):a.reduce(b)}y(a,function(a,f,g){!e&&f===0?(c=a,e=!0):c=b.call(d,c,a,f,g)});if(!e)throw new TypeError("Reduce of empty array with no initial value");return c},x.reduceRight=x.foldr=function(a,b,c,d){a==null&&(a=[]);if(o&&a.reduceRight===o){d&&(b=x.bind(b,d));return c!==void 0?a.reduceRight(b,c):a.reduceRight(b)}var e=(x.isArray(a)?a.slice():x.toArray(a)).reverse();return x.reduce(e,b,c,d)},x.find=x.detect=function(a,b,c){var d;z(a,function(a,e,f){if(b.call(c,a,e,f)){d=a;return!0}});return d},x.filter=x.select=function(a,b,c){var d=[];if(a==null)return d;if(p&&a.filter===p)return a.filter(b,c);y(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)});return d},x.reject=function(a,b,c){var d=[];if(a==null)return d;y(a,function(a,e,f){b.call(c,a,e,f)||(d[d.length]=a)});return d},x.every=x.all=function(a,b,c){var e=!0;if(a==null)return e;if(q&&a.every===q)return a.every(b,c);y(a,function(a,f,g){if(!(e=e&&b.call(c,a,f,g)))return d});return e};var z=x.some=x.any=function(a,b,c){b||(b=x.identity);var e=!1;if(a==null)return e;if(r&&a.some===r)return a.some(b,c);y(a,function(a,f,g){if(e=b.call(c,a,f,g))return d});return e};x.include=x.contains=function(a,b){var c=!1;if(a==null)return c;if(s&&a.indexOf===s)return a.indexOf(b)!=-1;z(a,function(a){if(c=a===b)return!0});return c},x.invoke=function(a,b){var c=h.call(arguments,2);return x.map(a,function(a){return(b.call?b||a:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,function(a){return a[b]})},x.max=function(a,b,c){if(!b&&x.isArray(a))return Math.max.apply(Math,a);var d={computed:-Infinity};y(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g>=d.computed&&(d={value:a,computed:g})});return d.value},x.min=function(a,b,c){if(!b&&x.isArray(a))return Math.min.apply(Math,a);var d={computed:Infinity};y(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g<d.computed&&(d={value:a,computed:g})});return d.value},x.sortBy=function(a,b,c){return x.pluck(x.map(a,function(a,d,e){return{value:a,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")},x.sortedIndex=function(a,b,c){c||(c=x.identity);var d=0,e=a.length;while(d<e){var f=d+e>>1;c(a[f])<c(b)?d=f+1:e=f}return d},x.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(x.isArray(a))return a;if(x.isArguments(a))return h.call(a);return x.values(a)},x.size=function(a){return x.toArray(a).length},x.first=x.head=function(a,b,c){return b!=null&&!c?h.call(a,0,b):a[0]},x.rest=x.tail=function(a,b,c){return h.call(a,b==null||c?1:b)},x.last=function(a){return a[a.length-1]},x.compact=function(a){return x.filter(a,function(a){return!!a})},x.flatten=function(a){return x.reduce(a,function(a,b){if(x.isArray(b))return a.concat(x.flatten(b));a[a.length]=b;return a},[])},x.without=function(a){var b=h.call(arguments,1);return x.filter(a,function(a){return!x.include(b,a)})},x.uniq=x.unique=function(a,b){return x.reduce(a,function(a,c,d){if(0==d||(b===!0?x.last(a)!=c:!x.include(a,c)))a[a.length]=c;return a},[])},x.intersect=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.indexOf(b,a)>=0})})},x.zip=function(){var a=h.call(arguments),b=x.max(x.pluck(a,"length")),c=Array(b);for(var d=0;d<b;d++)c[d]=x.pluck(a,""+d);return c},x.indexOf=function(a,b,c){if(a==null)return-1;var d,e;if(c){d=x.sortedIndex(a,b);return a[d]===b?d:-1}if(s&&a.indexOf===s)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b){if(a==null)return-1;if(t&&a.lastIndexOf===t)return a.lastIndexOf(b);var c=a.length;while(c--)if(a[c]===b)return c;return-1},x.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=Array(d);while(e<d)f[e++]=a,a+=c;return f},x.bind=function(a,b){if(a.bind===w&&w)return w.apply(a,h.call(arguments,1));var c=h.call(arguments,2);return function(){return a.apply(b,c.concat(h.call(arguments)))}},x.bindAll=function(a){var b=h.call(arguments,1);b.length==0&&(b=x.functions(a)),y(b,function(b){a[b]=x.bind(a[b],a)});return a},x.memoize=function(a,b){var c={};b||(b=x.identity);return function(){var d=b.apply(this,arguments);return k.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}},x.delay=function(a,b){var c=h.call(arguments,2);return setTimeout(function(){return a.apply(a,c)},b)},x.defer=function(a){return x.delay.apply(x,[a,1].concat(h.call(arguments,1)))};var A=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d);if(c||!d)d=setTimeout(g,b)}};x.throttle=function(a,b){return A(a,b,!1)},x.debounce=function(a,b){return A(a,b,!0)},x.once=function(a){var b=!1,c;return function(){if(b)return c;b=!0;return c=a.apply(this,arguments)}},x.wrap=function(a,b){return function(){var c=[a].concat(h.call(arguments));return b.apply(this,c)}},x.compose=function(){var a=h.call(arguments);return function(){var b=h.call(arguments);for(var c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},x.keys=v||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)k.call(a,c)&&(b[b.length]=c);return b},x.values=function(a){return x.map(a,x.identity)},x.functions=x.methods=function(a){return x.filter(x.keys(a),function(b){return x.isFunction(a[b])}).sort()},x.extend=function(a){y(h.call(arguments,1),function(b){for(var c in b)b[c]!==void 0&&(a[c]=b[c])});return a},x.defaults=function(a){y(h.call(arguments,1),function(b){for(var c in b)a[c]==null&&(a[c]=b[c])});return a},x.clone=function(a){return x.isArray(a)?a.slice():x.extend({},a)},x.tap=function(a,b){b(a);return a},x.isEqual=function(a,b){if(a===b)return!0;var c=typeof a,d=typeof b;if(c!=d)return!1;if(a==b)return!0;if(!a&&b||a&&!b)return!1;a._chain&&(a=a._wrapped),b._chain&&(b=b._wrapped);if(a.isEqual)return a.isEqual(b);if(x.isDate(a)&&x.isDate(b))return a.getTime()===b.getTime();if(x.isNaN(a)&&x.isNaN(b))return!1;if(x.isRegExp(a)&&x.isRegExp(b))return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if(c!=="object")return!1;if(a.length&&a.length!==b.length)return!1;var e=x.keys(a),f=x.keys(b);if(e.length!=f.length)return!1;for(var g in a)if(!(g in b)||!x.isEqual(a[g],b[g]))return!1;return!0},x.isEmpty=function(a){if(x.isArray(a)||x.isString(a))return a.length===0;for(var b in a)if(k.call(a,b))return!1;return!0},x.isElement=function(a){return!!a&&a.nodeType==1},x.isArray=u||function(a){return j.call(a)==="[object Array]"},x.isArguments=function(a){return!!a&&!!k.call(a,"callee")},x.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)},x.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)},x.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)},x.isNaN=function(a){return a!==a},x.isBoolean=function(a){return a===!0||a===!1},x.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)},x.isRegExp=function(a){return!(!(a&&a.test&&a.exec)||!a.ignoreCase&&a.ignoreCase!==!1)},x.isNull=function(a){return a===null},x.isUndefined=function(a){return a===void 0},x.noConflict=function(){a._=c;return this},x.identity=function(a){return a},x.times=function(a,b,c){for(var d=0;d<a;d++)b.call(c,d)},x.mixin=function(a){y(x.functions(a),function(b){E(b,x[b]=a[b])})};var B=0;x.uniqueId=function(a){var b=B++;return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g},x.template=function(a,b){var c=x.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(c.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(c.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj",d);return b?e(b):e};var C=function(a){this._wrapped=a};x.prototype=C.prototype;var D=function(a,b){return b?x(a).chain():a},E=function(a,b){C.prototype[a]=function(){var a=h.call(arguments);i.call(a,this._wrapped);return D(b.apply(x,a),this._chain)}};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];C.prototype[a]=function(){b.apply(this._wrapped,arguments);return D(this._wrapped,this._chain)}}),y(["concat","join","slice"],function(a){var b=e[a];C.prototype[a]=function(){return D(b.apply(this._wrapped,arguments),this._chain)}}),C.prototype.chain=function(){this._chain=!0;return this},C.prototype.value=function(){return this._wrapped}})(),$.ender(b.exports)}(),!function(a,b){function j(a,c){d[e]=this[e];var g=this,h=new d,j=typeof a==b,k=j?a:this,l=j?{}:a,m=function(){this.initialize?this.initialize.apply(this,arguments):(c||f(a)&&g.apply(this,arguments),k.apply(this,arguments))};m.methods=function(a){i(h,a,g),m[e]=h;return this},m.methods.call(m,l).prototype.constructor=m,m.extend=arguments.callee,m[e].implement=m.statics=function(a,b){a=typeof a=="string"?function(){var c={};c[a]=b;return c}():a,i(this,a,g);return this};return m}function i(a,d,f){for(var g in d)d.hasOwnProperty(g)&&(a[g]=typeof d[g]==b&&typeof f[e][g]==b&&c.test(d[g])?h(g,d[g],f):d[g])}function h(a,b,c){return function(){var d=this.supr;this.supr=c[e][a];var f=b.apply(this,arguments);this.supr=d;return f}}function g(a){return j.call(typeof a==b?a:d,a,1)}var c=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,d=function(){},e="prototype",f=function(a){return typeof a===b};if(typeof module!="undefined"&&module.exports)module.exports=g;else{var k=a.klass;g.noConflict=function(){a.klass=k;return this},a.klass=g}}(this,"function"),$.ender({klass:klass.noConflict()}),!function(a,b,c){function w(a,c){var e=b.createElement("script"),f=0;e.onload=e[r]=function(){e[p]&&!!h.test(e[p])||f||(e.onload=e[r]=null,f=1,c())},e.async=1,e.src=a,d.parentNode.insertBefore(e,d)}function t(a,b){s(a,function(a){return!b(a)})}var d=b.getElementsByTagName("script")[0],e={},f={},g={},h=/^i|c/,i={},k="string",l=!1,m,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange",s=function(a,b){for(m=0,j=a.length;m<j;++m)if(!b(a[m]))return 0;return 1};!b[p]&&b[q]&&(b[q](o,function u(){b.removeEventListener(o,u,l),b[p]="complete"},l),b[p]="loading");var v=function(a,b,d){function o(){if(!--l){e[k]=1,j&&j();for(var a in g)s(a.split("|"),m)&&!t(g[a],m)&&(g[a]=[])}}function m(a){return a.call?a():e[a]}a=a[n]?a:[a];var h=b&&b.call,j=h?b:d,k=h?a.join(""):b,l=a.length;c(function(){t(a,function(a){i[a]?(k&&(f[k]=1),o()):(i[a]=1,k&&(f[k]=1),w(v.path?v.path+a+".js":a,o))})},0);return v};v.get=w,v.ready=function(a,b,c){a=a[n]?a:[a];var d=[];!t(a,function(a){e[a]||d[n](a)})&&s(a,function(a){return e[a]})?b():!function(a){g[a]=g[a]||[],g[a][n](b),c&&c(d)}(a.join("|"));return v};var x=a.$script;v.noConflict=function(){a.$script=x;return this},typeof module!="undefined"&&module.exports?module.exports=v:a.$script=v}(this,document,setTimeout),!function(){var a=$script.noConflict();$.ender({script:a,ready:a.ready,require:a,getScript:a.get})}(),!function(a,b){function W(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function V(a,c){var d=typeof c=="string"?V(c)[0]:c||b;if(!d)return[];if(h=T(a,c,V))return h;if(b.getElementsByClassName&&(h=a.match(y)))return G(d.getElementsByClassName(h[1]));return G(d.querySelectorAll(a))}function U(a){return a===window||a&&a.nodeType&&a.nodeType.toString().match(/[19]/)}function T(a,c,d){var e=typeof c=="string"?d(c)[0]:c||b;if(U(a))return!c||U(e)&&S(a,e)?[a]:[];if(a&&typeof a=="object"&&a.length&&isFinite(a.length))return G(a);if(h=a.match(x))return(m=b.getElementById(h[1]))?[m]:[];if(h=a.match(z))return G(e.getElementsByTagName(h[1]));return!1}function R(a){var b=[],c=[],d,g,h=L.g(a)||L.s(a,a.split(C));h=h.slice(0);if(!h.length)return b;b=O(h);if(!h.length)return b;for(e=0,g=b.length,f=0;e<g;e++){n=b[e],j=n;for(d=h.length;d--;)z:while(j!==B&&(j=j.parentNode))if(p=N.apply(j,M(h[d])))break z;p&&(c[f++]=n)}return c}function Q(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(K.g("^="+c)||K.s("^="+c,new RegExp("^"+P(c))));case"$=":return b.match(K.g("$="+c)||K.s("$="+c,new RegExp(P(c)+"$")));case"*=":return b.match(K.g(c)||K.s(c,new RegExp(P(c))));case"~=":return b.match(K.g("~="+c)||K.s("~="+c,new RegExp("(?:^|\\s+)"+P(c)+"(?:\\s+|$)")));case"|=":return b.match(K.g("|="+c)||K.s("|="+c,new RegExp("^"+P(c)+"(-|$)")))}return!1}function P(a){return J.g(a)||J.s(a,a.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1"))}function O(a){var c=[],d=a.pop(),e=M(d),f=e[1]||"*",g,i,j,k=a.length&&(h=a[0].match(x))?b.getElementById(h[1]):b;if(!k)return c;j=k.getElementsByTagName(f);for(g=0,i=j.length;g<i;g++)m=j[g],(r=N.apply(m,e))&&c.push(r);return c}function N(a,b,c,e,f,g,h){var j,k,l;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(j=c.match(v))&&j[1]!==this.id)return!1;if(c&&(q=c.match(w)))for(d=q.length;d--;){k=q[d].slice(1);if(!(I.g(k)||I.s(k,new RegExp("(^|\\s+)"+k+"(\\s+|$)"))).test(this.className))return!1}if(e&&!h){i=this.attributes;for(l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&(i[l].name||l)==f)return this}if(e&&!Q(g,this.getAttribute(f)||"",h))return!1;return this}function M(a){return a.match(F)}function G(a){k=[];for(d=0,o=a.length;d<o;d++)k[d]=a[d];return k}var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=/#([\w\-]+)/,w=/\.[\w\-]+/g,x=/^#([\w\-]+$)/,y=/^\.([\w\-]+)$/,z=/^([\w\-]+)$/,A=/^([\w]+)?\.([\w\-]+)$/,B=b.documentElement,C=/\s(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,D=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,E=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,F=new RegExp(D.source+"("+E.source+")?"),H=function(){this.c={}};H.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var I=new H,J=new H,K=new H,L=new H,S="compareDocumentPosition"in B?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in B?function(a,b){return b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},X=function(){if(b.querySelector&&b.querySelectorAll)return V;return function(a,c){var d=typeof c=="string"?X(c)[0]:c||b;if(!d)return[];var f,g,i=[],j=[],l;if(h=T(a,c,X))return h;if(h=a.match(A)){s=d.getElementsByTagName(h[1]||"*"),k=I.g(h[2])||I.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(f=0,g=s.length,e=0;f<g;f++)k.test(s[f].className)&&(i[e++]=s[f]);return i}for(f=0,s=a.split(","),g=s.length;f<g;f++)j[f]=R(s[f]);for(f=0,g=j.length;f<g&&(u=j[f]);f++){var m=u;if(d!==b){m=[];for(e=0,h=u.length;e<h&&(l=u[e]);e++)S(l,d)&&m.push(l)}i=i.concat(m)}return W(i)}}();X.uniq=W;var Y=a.qwery;X.noConflict=function(){a.qwery=Y;return this},a.qwery=X}(this,document),!function(){var a=qwery.noConflict();$._select=a,$.ender({find:function(b){var c=[],d,e,f,g,h;for(d=0,e=this.length;d<e;d++){h=a(b,this[d]);for(f=0,g=h.length;f<g;f++)c.push(h[f])}return $(a.uniq(c))}},!0)}(),!function(a){function w(a){return new p(a)}function v(){return{x:window.pageXOffset||c.scrollLeft,y:window.pageYOffset||c.scrollTop}}function u(a){return a===window||/^(?:body|html)$/i.test(a.tagName)}function t(a,b,c){var d=this.elements[0];if(a==null&&b==null)return(u(d)?v():{x:d.scrollLeft,y:d.scrollTop})[c];u(d)?window.scrollTo(a,b):(a!=null&&(d.scrollLeft=a),b!=null&&(d.scrollTop=b));return this}function s(a){return typeof a=="string"?w.create(a):n(a)?[a]:a}function r(a){var b=a.name;if(a.disabled||!b)return"";b=q(b);switch(a.tagName.toLowerCase()){case"input":switch(a.type){case"reset":case"button":case"image":case"file":return"";case"checkbox":case"radio":return a.checked?b+"="+(a.value?q(a.value):!0)+"&":"";default:return b+"="+(a.value?q(a.value):!0)+"&"}break;case"textarea":return b+"="+q(a.value)+"&";case"select":return b+"="+q(a.options[a.selectedIndex].value)+"&"}return""}function q(a){return encodeURIComponent(a)}function p(a){this.elements=[],this.length=0;if(a){this.elements=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=this.elements.length;for(var b=0;b<this.length;b++)this[b]=this.elements[b]}}function o(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function n(a){return a&&a.nodeName&&a.nodeType==1}function m(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function l(a){return a.replace(/(^\s*|\s*$)/g,"")}function k(a,b){for(i=0,len=a.length;i<len;i++)b(a[i])}function j(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}var b=document,c=b.documentElement,d=/^checked|value|selected$/,e=/^checked|selected$/,f=/msie/.test(navigator.userAgent),g=[],h=0;p.prototype={each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b);return this},map:function(a,b){var c=[],d;for(var e=0;e<this.length;e++)d=a.call(this,this[e]),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return w(this[0])},last:function(){return w(this[this.length-1])},html:function(a){return typeof a!="undefined"?this.each(function(b){b.innerHTML=a}):this.elements[0]?this.elements[0].innerHTML:""},addClass:function(a){return this.each(function(b){this.hasClass(b,a)||(b.className=l(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){this.hasClass(b,a)&&(b.className=l(b.className.replace(j(a)," ")))})},hasClass:function(a,b){return typeof b=="undefined"?o(this.elements,function(b){return j(a).test(b.className)}):j(b).test(a.className)},toggleClass:function(a,b){if(typeof b!="undefined"&&!b)return this;return this.each(function(b){this.hasClass(b,a)?b.className=l(b.className.replace(j(a)," ")):b.className=l(b.className+" "+a)})},show:function(a){return this.each(function(a){a.style.display=""})},hide:function(a){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){k(s(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;k(s(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a){return this.each(function(b){a.appendChild(b)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},prependTo:function(a){return this.each(function(b){a.insertBefore(b,w.firstChild(a))})},before:function(a){return this.each(function(b){k(w.create(a),function(a){b.parentNode.insertBefore(a,b)})})},after:function(a){return this.each(function(b){k(w.create(a),function(a){b.parentNode.insertBefore(a,b.nextSibling)})})},css:function(a,b){if(b===undefined&&typeof a=="string")return this[0].style[m(a)];var c=typeof a=="string"?function(c){c.style[m(a)]=b}:function(b){for(var c in a)a.hasOwnProperty(c)&&(b.style[m(c)]=a[c])};return this.each(c)},offset:function(){var a=this.elements[0],b=a.offsetWidth,c=a.offsetHeight,d=a.offsetTop,e=a.offsetLeft;while(a=a.offsetParent)d=d+a.offsetTop,e=e+a.offsetLeft;return{top:d,left:e,height:c,width:b}},attr:function(a,b){var c=this.elements[0];return typeof b=="undefined"?d.test(a)?e.test(a)&&typeof c[a]=="string"?!0:c[a]:c.getAttribute(a):this.each(function(c){c.setAttribute(a,b)})},removeAttr:function(a){return this.each(function(b){b.removeAttribute(a)})},data:function(a,b){var c=this.elements[0];if(typeof b=="undefined"){c.getAttribute("data-node-uid")||c.setAttribute("data-node-uid",++h);var d=c.getAttribute("data-node-uid");g[d]||(g[d]={});return g[d][a]}return this.each(function(c){c.getAttribute("data-node-uid")||c.setAttribute("data-node-uid",++h);var d=c.getAttribute("data-node-uid"),e={};e[a]=b,g[d]=e})},remove:function(){return this.each(function(a){a.parentNode&&a.parentNode.removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a.parentNode.removeChild(a)})},scrollTop:function(a){return t.call(this,null,a,"y")},scrollLeft:function(a){return t.call(this,a,null,"x")},serialize:function(){var a=this[0],b=a.getElementsByTagName("input"),c=a.getElementsByTagName("select"),d=a.getElementsByTagName("textarea");return(w(b).map(r).join("")+w(c).map(r).join("")+w(d).map(r).join("")).replace(/&$/,"")},serializeArray:function(){for(var a=this.serialize().split("&"),b=0,c=a.length,d=[],e;b<c;b++)a[b]&&(e=a[b].split("="))&&d.push({name:e[0],value:e[1]});return d}},w.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||p.prototype)[c]=a[c])},w.create=function(a){return typeof a=="string"?function(){var c=b.createElement("div"),d=[];c.innerHTML=a;var e=c.childNodes;c=c.firstChild,d.push(c);while(c=c.nextSibling)c.nodeType==1&&d.push(c);return d}():n(a)?[a.cloneNode(!0)]:[]},w.doc=function(){var a=c.scrollWidth,b=c.scrollHeight,d=this.viewport();return{width:Math.max(a,d.width),height:Math.max(b,d.height)}},w.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},w.viewport=function(){var a=self.innerHeight,b=self.innerWidth;f&&(a=c.clientHeight)&&(b=c.clientWidth);return{width:b,height:a}},w.isAncestor="compareDocumentPosition"in c?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in c?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1};var x=a.bonzo;w.noConflict=function(){a.bonzo=x;return this},a.bonzo=w}(this),!function(){function c(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function b(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}var a=bonzo.noConflict();$.ender(a),$.ender(a(),!0),$.ender({create:function(b){return $(a.create(b))}}),$.ender({parents:function(a){var d=$(a),e,f,g,h=[];for(e=0,f=this.length;e<f;e++){g=this[e];while(g=g.parentNode)b(d,g)!==-1&&h.push(g)}return $(c(h))},first:function(){return $(this[0])},last:function(){return $(this[this.length-1])},next:function(){return $(a(this).next())},previous:function(){return $(a(this).previous())},siblings:function(){var a,b,d,e=[];for(a=0,b=this.length;a<b;a++){d=this[a];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[a];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return $(c(e))}},!0)}(),!function(a){function F(a){var b=a.relatedTarget;if(!b)return b==null;return b!=this&&b.prefix!="xul"&&!/document/.test(this.toString())&&!p(this,b)}var b=1,c={},d={},e=/over|out/,f=/[^\.]*(?=\..*)\.|.*/,g=/\..*/,h="addEventListener",i="attachEvent",j="removeEventListener",k="detachEvent",l=a.document||{},m=l.documentElement||{},n=m[h],o=n?h:i,p=function(a,b){var c=b.parentNode;while(c!=null){if(c==a)return!0;c=c.parentNode}},q=function(a,c){return a.__uid=c||a.__uid||b++},r=function(a){var b=q(a);return c[b]=c[b]||{}},s=n?function(a,b,c,d){a[d?h:j](b,c,!1)}:function(a,b,c,d,e){e&&d&&(a["_on"+e]=a["_on"+e]||0),a[d?i:k]("on"+b,c)},t=function(b,c,d){return function(e){e=D(e||((this.ownerDocument||this.document||this).parentWindow||a).event);return c.apply(b,[e].concat(d))}},u=function(a,b,c,d,e){return function(f){(d?d.call(this,f):f&&f.propertyName=="_on"+c||!f)&&b.apply(a,[f].concat(e))}},v=function(a,b,c,e){var h=b.replace(g,""),i=r(a),j=i[h]||(i[h]={}),k=q(c,b.replace(f,""));if(j[k])return a;var l=G[h];l&&(c=l.condition?u(a,c,h,l.condition):c,h=l.base||h);var m=n||E.indexOf(h)>-1;c=m?t(a,c,e):u(a,c,h,!1,e);if(h=="unload"){var p=c;c=function(){w(a,h,c)&&p()}}a[o]&&s(a,m?h:"propertychange",c,!0,!m&&h),j[k]=c,c.__uid=k;return h=="unload"?a:d[q(a)]=a},w=function(a,b,c){var d,e,i,j,k=r(a),l=b.replace(g,"");if(!k||!k[l])return a;e=b.replace(f,""),i=e?e.split("."):[c.__uid];for(j=i.length;j--;){d=i[j],c=k[l][d],delete k[l][d];if(a[o]){l=G[l]?G[l].base:l;var m=a[h]||E.indexOf(l)>-1;s(a,m?l:"propertychange",c,!1,!m&&l)}}return a},x=function(a,b,c){return function(d){var e=typeof a=="string"?c(a,this):a;for(var f=d.target;f&&f!=this;f=f.parentNode)for(var g=e.length;g--;)if(e[g]==f)return b.apply(f,arguments)}},y=function(a,b,c,d,e){if(typeof b=="object"&&!c)for(var f in b)b.hasOwnProperty(f)&&y(a,f,b[f]);else{var g=typeof c=="string",h=(g?c:b).split(" ");c=g?x(b,d,e):c;for(var i=h.length;i--;)v(a,h[i],c,Array.prototype.slice.call(arguments,g?4:3))}return a},z=function(a,b,c){var d,e,h,i=typeof b=="string",j=i&&b.replace(f,""),k=w,l=r(a);if(i&&/\s/.test(b)){b=b.split(" ");var m=b.length-1;while(z(a,b[m])&&m--);return a}h=i?b.replace(g,""):b;if(!l||i&&!l[h])return a;if(typeof c=="function")k(a,h,c);else if(j)k(a,b);else{k=h?k:z,e=i&&h,h=h?c||l[h]||h:l;for(d in h)h.hasOwnProperty(d)&&k(a,e||d,h[d])}return a},A=function(a,b){var c,d,e,h=b.split(" ");for(e=h.length;e--;){b=h[e].replace(g,"");var i=E.indexOf(b)>-1,j=h[e].replace(f,""),k=r(a)[b];if(j){j=j.split(".");for(d=j.length;d--;)k[j[d]]&&k[j[d]]()}else if(a[o])B(i,b,a);else for(d in k)k.hasOwnProperty(d)&&k[d]()}return a},B=n?function(b,c,d){evt=document.createEvent(b?"HTMLEvents":"UIEvents"),evt[b?"initEvent":"initUIEvent"](c,!0,!0,a,1),d.dispatchEvent(evt)}:function(a,b,c){a?c.fireEvent("on"+b,document.createEventObject()):c["_on"+b]++},C=function(a,b,c){var d=r(b),e,f;e=c?d[c]:d;for(f in e)e.hasOwnProperty(f)&&(c?y:C)(a,c||b,c?e[f]:f);return a},D=function(a){var b={};if(!a)return b;var c=a.type,d=a.target||a.srcElement;b.preventDefault=D.preventDefault(a),b.stopPropagation=D.stopPropagation(a),b.target=d&&d.nodeType==3?d.parentNode:d;if(c.indexOf("key")!=-1)b.keyCode=a.which||a.keyCode;else if(/click|mouse|menu/i.test(c)){b.rightClick=a.which==3||a.button==2,b.pos={x:0,y:0};if(a.pageX||a.pageY)b.clientX=a.pageX,b.clientY=a.pageY;else if(a.clientX||a.clientY)b.clientX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,b.clientY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;e.test(c)&&(b.relatedTarget=a.relatedTarget||a[(c=="mouseover"?"from":"to")+"Element"])}for(var f in a)f in b||(b[f]=a[f]);return b};D.preventDefault=function(a){return function(){a.preventDefault?a.preventDefault():a.returnValue=!1}},D.stopPropagation=function(a){return function(){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}};var E="click,dblclick,mouseup,mousedown,contextmenu,mousewheel,DOMMouseScroll,mouseover,mouseout,mousemove,selectstart,selectend,keydown,keypress,keyup,orientationchange,touchstart,touchmove,touchend,touchcancel,gesturestart,gesturechange,gestureend,focus,blur,change,reset,select,submit,load,unload,beforeunload,resize,move,DOMContentLoaded,readystatechange,"+"error,abort,scroll".split(","),G={mouseenter:{base:"mouseover",condition:F},mouseleave:{base:"mouseout",condition:F},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}},H={add:y,remove:z,clone:C,fire:A},I=function(a){var b=z(a).__uid;b&&(delete d[b],delete c[b])};a[i]&&y(a,"unload",function(){for(var b in d)d.hasOwnProperty(b)&&I(d[b]);a.CollectGarbage&&CollectGarbage()});var J=a.bean;H.noConflict=function(){a.bean=J;return this},typeof module!="undefined"&&module.exports?module.exports=H:a.bean=H}(this),!function(){var a=bean.noConflict(),b=function(b,c,d){var e=c?[c]:[];return function(){for(var d,f=0,g=this.elements.length;f<g;f++)d=[this.elements[f]].concat(e,Array.prototype.slice.call(arguments,0)),d.length==4&&d.push($),!arguments.length&&b=="add"&&c&&(b="fire"),a[b].apply(this,d);return this}},c=b("add"),d=b("remove"),e=b("fire"),f={on:c,addListener:c,bind:c,listen:c,delegate:c,unbind:d,unlisten:d,removeListener:d,undelegate:d,emit:e,trigger:e,cloneEvents:b("clone"),hover:function(b,c){for(var d=0,e=this.elements.length;d<e;d++)a.add.call(this,this.elements[d],"mouseenter",b),a.add.call(this,this.elements[d],"mouseleave",c);return this}},g=["blur","change","click","dbltclick","error","focus","focusin","focusout","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mouseout","mouseover","mouseup","resize","scroll","select","submit","unload"];for(var h=g.length;h--;){var i=g[h];f[i]=b("add",i)}$.ender(f,!0)}(),!function(context){function reqwest(a,b){return new Reqwest(a,b)}function init(o,fn){function error(a){o.error&&o.error(a),complete(a)}function success(resp){o.timeout&&clearTimeout(self.timeout)&&(self.timeout=null);var r=resp.responseText;switch(type){case"json":resp=eval("("+r+")");break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function complete(a){o.complete&&o.complete(a)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort(),error()},o.timeout)),this.request=getRequest(o,success,error)}function setType(a){if(/\.json$/.test(a))return"json";if(/\.js$/.test(a))return"js";if(/\.html?$/.test(a))return"html";if(/\.xml$/.test(a))return"xml";return"js"}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function getRequest(a,b,c){var d=xhr();d.open(a.method||"GET",typeof a=="string"?a:a.url,!0),setHeaders(d,a),d.onreadystatechange=readyState(d,b,c),a.before&&a.before(d),d.send(a.data||null);return d}function setHeaders(a,b){var c=b.headers||{};c.Accept="text/javascript, text/html, application/xml, text/xml, */*";if(b.data){c["Content-type"]="application/x-www-form-urlencoded";for(var d in c)c.hasOwnProperty(d)&&a.setRequestHeader(d,c[d],!1)}}function readyState(a,b,c){return function(){a&&a.readyState==4&&(twoHundo.test(a.status)?b(a):c(a))}}var twoHundo=/^20\d$/,xhr="XMLHttpRequest"in window?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}};var old=context.reqwest;reqwest.noConflict=function(){context.reqwest=old;return this},context.reqwest=reqwest}(this),$.ender({ajax:reqwest.noConflict()}),!function(a){function A(a,b){a=typeof a=="string"?document.getElementById(a):a,b=z(b);var c={duration:b.duration,easing:b.easing,after:b.after};delete b.duration,delete b.easing,delete b.after;if(e&&typeof c.easing!="function")return y(a,b,c);var d=q(b,function(a,b){a=r(a);return p(a)in h&&g.test(b)?[a,b+"px"]:[a,b]});x(a,d,c)}function z(a){var b={};for(var c in a)b[c]=a[c],c=="after"&&delete a[c];return b}function y(a,b,c){var d=[],f=[],i=c.duration||1e3,j=c.easing||"ease-out";i=i+"ms",c.after&&a.addEventListener(l,function k(){c.after(),a.removeEventListener(l,k,!0)},!0),setTimeout(function(){var c;for(c in b)b.hasOwnProperty(c)&&d.push(r(c)+" "+i+" "+j);d=d.join(","),a.style[e+"Transition"]=d;for(c in b){var f=p(c)in h&&g.test(b[c])?b[c]+"px":b[c];b.hasOwnProperty(c)&&(a.style[p(c)]=f)}},10)}function x(a,b,c,d){c=c||{};var e=w(b),f=a.currentStyle?a.currentStyle:getComputedStyle(a,null),g={},h=+(new Date),i,j=c.duration||200,k=h+j,l,m=c.easing||function(a){return-Math.cos(a*Math.PI)/2+.5};for(i in e)g[i]=v(f[i]);l=setInterval(function(){var b=+(new Date),f,i=b>k?1:(b-h)/j;for(f in e)a.style[f]=e[f].f(g[f].v,e[f].v,m(i))+e[f].u;b>k&&(clearInterval(l),c.after&&c.after(),d&&setTimeout(d,1))},10)}function w(a){var c,d={},e=k.length,f;b.innerHTML='<div style="'+a+'"></div>',c=b.childNodes[0].style;while(e--)(f=c[k[e]])&&(d[k[e]]=v(f));return d}function v(a){var b=parseFloat(a),c=a?a.replace(/^[\-\d\.]+/,""):a;return isNaN(b)?{v:c,f:u,u:""}:{v:b,f:s,u:c}}function u(a,b,c){var d=2,e,f,g,h=[],i=[];while((e=3)&&(f=arguments[d-1])&&d--)if(t(f,0)=="r"){f=f.match(/\d+/g);while(e--)h.push(~~f[e])}else{f.length==4&&(f="#"+t(f,1)+t(f,1)+t(f,2)+t(f,2)+t(f,3)+t(f,3));while(e--)h.push(parseInt(t(f,1+e*2,2),16))}while(e--)g=~~(h[e+3]+(h[e]-h[e+3])*c),i.push(g<0?0:g>255?255:g);return"rgb("+i.join(",")+")"}function t(a,b,c){return a.substr(b,c||1)}function s(a,b,c){return(a+(b-a)*c).toFixed(3)}function r(a){if(a.toUpperCase()===a)return a;return a.replace(/([a-zA-Z0-9])([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function q(a,b){return o(a,function(a,c){var d=b?b(c,a):[c,a];return d[0]+":"+d[1]+";"}).join("")}function p(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function o(a,b,c){var d=[],e;for(e in a)d.push(b.call(c,a[e],e,a));return d}var b=document.createElement("div"),c=["webkit","Moz","O"],d=3,e,f,g=/\d+$/,h={},i="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color fontWeight lineHeight opacity outlineColor zIndex",j="top bottom left right borderWidth borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderSpacing borderRadius marginBottom marginLeft marginRight marginTop width height maxHeight maxWidth minHeight minWidth paddingBottom paddingLeft paddingRight paddingTop fontSize wordSpacing textIndent letterSpacing outlineWidth outlineOffset",k=(i+" "+j).split(" ");while(d--)f=c[d],b.style.cssText="-"+f.toLowerCase()+"-transition-property:opacity;",typeof b.style[f+"TransitionProperty"]!="undefined"&&(e=f);var l=/^w/.test(e)?"webkitTransitionEnd":"transitionend";for(var m=j.split(" "),n=m.length;n--;)h[m[n]]=1;var B=a.emile;A.noConflict=function(){a.emile=B;return this},a.emile=A}(this),!function(){function c(a,c,d){var e=b(a,c);for(var f=0,g=this.length;f<g;f++)this[f].style.opacity=d?0:1,this[f].style.filter="alpha(opacity="+(d?0:1)*100+")",this[f].style.display="";return this.animate({opacity:d,duration:e[0],after:e[1]})}var a=emile.noConflict(),b=function(a,b){var c=typeof a=="number"?a:1e3,d=typeof b=="function"?b:typeof a=="function"?a:function(){};return[c,d]};$.ender({animate:function(b){var c=this;setTimeout(function(){for(var d=0,f=c.length;d<f;d++)a(c[d],b)},0);return this},fadeIn:function(a,b){return c.call(this,a,b,1)},fadeOut:function(a,b){return c.call(this,a,b,0)}},!0)}()