Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.2.4 => zepto compatibility added, fixed demos, updated jeesh, bette…

…r event attachment, string definition clean up
  • Loading branch information...
commit 7fd2880ad07657fa614cb970d55ba880ee3c4ada 1 parent 16c2846
Andras Nemeseri authored
View
2  demos/content-types.html
@@ -100,7 +100,7 @@
<div class="grid">
<h2>Flash</h2>
- <a id="trigger-flash" class="thumbs"><img src="http://www.bradfordbulls.co.uk/Media/jpg/youtube%20logo.jpg" alt="Flash object" width="100" height="100"></a>
+ <a id="trigger-flash" class="thumbs"><img src="http://nabtron.com/wp-content/uploads/2010/10/youtube-100x100.jpg" alt="Flash object" width="100" height="100"></a>
<div id="overlay-flash" class="ender-overlay overlay-flash">
<a class="close close-button" title="Close">&#9747;</a>
View
4 demos/jquery.html
@@ -19,7 +19,7 @@
<h1>jQuery Compatibility</h1>
<p>
- You can use ender-overlay in your existing jQuery based project without any modification! You can check the source of this page, I'm using jQuery here instead of Jeesk and Morpheus. Tested with jQuery 1.7.1.
+ You can use ender-overlay in your existing jQuery based project without any modification! You can check the source of this page, I'm using jQuery here instead of Jeesk and Morpheus. Tested with jQuery 1.8 - 1.9.
</p>
<div class="clr">
@@ -91,7 +91,7 @@
</div> <!-- #container -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="../ender.overlay.js"></script>
<script>
$(document).ready(function () {
View
117 demos/zepto.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Ender-overlay: Zepto compatibility</title>
+ <link rel="stylesheet" href="main.css" type="text/css">
+ <link rel="stylesheet" href="ender-overlay.css" type="text/css">
+
+ <!-- syntax highlights -->
+ <link rel="stylesheet" href="http://yandex.st/highlightjs/6.1/styles/github.min.css">
+ </head>
+ <body>
+ <div id="container" class="demo">
+
+ <ul class="breadcrumb">
+ <li><a href="../index.html" class="back-home">Main Page &raquo;</a></li>
+ </ul>
+
+ <h1>Zepto Compatibility</h1>
+
+ <p>
+ You can use ender-overlay in your existing Zepto based project without any modification! You can check the source of this page, I'm using Zepto here instead of Jeesk and Morpheus. Tested with the latest <a href="https://github.com/madrobby/zepto" target="_blank">Zepto</a> with default modules.
+ </p>
+
+ <div class="clr">
+ <div class="grid">
+ <h2>Image</h2>
+
+ <a id="trigger-image" class="thumbs"><img src="http://farm6.static.flickr.com/5008/5248981729_3a05d42d32_t.jpg" alt="Undercover" width="100" height="100"></a>
+
+ <div id="overlay-image" class="ender-overlay overlay-image">
+ <a class="close close-button" title="Close">&#9747;</a>
+ <img src="http://farm6.static.flickr.com/5008/5248981729_3a05d42d32.jpg" alt="Undercover" width="500" height="500">
+ </div> <!-- #overlay-image -->
+ </div>
+
+
+ <div class="grid">
+ <h2>HTML</h2>
+
+ <a id="trigger-html" class="thumbs"><img src="http://farm6.static.flickr.com/5250/5348822142_9c1e7e8bdd_t.jpg" alt="The Price of Information" width="100" height="100"></a>
+
+ <div id="overlay-html" class="ender-overlay overlay-html">
+ <a class="close close-button" title="Close">&#9747;</a>
+ <img src="http://farm6.static.flickr.com/5250/5348822142_9c1e7e8bdd.jpg" alt="The Price of Information" width="500" height="500">
+ <div>
+ <h2>The Price of Information</h2>
+ <p>by <a href="http://www.flickr.com/people/necccc/">Szabolcs Toth</a></p>
+
+ <p>This photo was taken on December 12, 2010 in Financial District South, San Francisco, CA, US, using a Canon EOS 40D.</p>
+ <p>
+ Strobist info: YN560 bare @ 1/8 from the left,
+ YN560 through white umbrella from the right @ 1/4,
+ Triggered with optical slaves
+ </p>
+
+ <h3>Tags</h3>
+ <ul>
+ <li>San Francisco</li>
+ <li>CA</li>
+ <li>sf</li>
+ <li>fun</li>
+ <li>parody</li>
+ <li>crime</li>
+ <li>sunglasses</li>
+ <li>retro</li>
+ <li>strobist</li>
+ <li>murder</li>
+ <li>scene</li>
+ <li>CSI</li>
+ </ul>
+
+ <h3>View all sizes on Flickr</h3>
+ <ul>
+ <li><a href="http://www.flickr.com/photos/necccc/5348822142/sizes/s/in/set-72157625490624866/">Small</a></li>
+ <li><a href="http://www.flickr.com/photos/necccc/5348822142/sizes/m/in/set-72157625490624866/">Medium</a></li>
+ <li><a href="http://www.flickr.com/photos/necccc/5348822142/sizes/l/in/set-72157625490624866/">Large</a></li>
+ <li><a href="http://www.flickr.com/photos/necccc/5348822142/sizes/o/in/set-72157625490624866/">Original</a></li>
+ </ul>
+
+ <h3>Licence</h3>
+ <p>Request to license _Nec's photos via Getty Images: <a href="http://www.flickr.com/photos/necccc/5329325629/request/">here</a></p>
+ <p>&copy; All Rights Reserved</p>
+ </div>
+ </div> <!-- #overlay-html -->
+ </div>
+ </div> <!-- .clr -->
+
+ <p><a href="../index.html">Go back to the documentation</a></p>
+
+ </div> <!-- #container -->
+
+
+ <script type="text/javascript" src="zepto.min.js"></script>
+ <script src="../ender.overlay.js"></script>
+ <script>
+ $(document).ready(function () {
+ // init overlays
+ $("#overlay-image").overlay({ trigger: "#trigger-image" });
+ $("#overlay-html").overlay({ trigger: "#trigger-html" });
+ });
+ </script>
+
+ <script src="http://yandex.st/highlightjs/6.1/highlight.min.js"></script>
+ <script>hljs.initHighlightingOnLoad();</script>
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-25617420-1']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ </body>
+</html>
View
2  demos/zepto.min.js
@@ -0,0 +1,2 @@
+/* Zepto v1.0rc1-146-g4364a33 - polyfill zepto event detect fx ajax form - zeptojs.com/license */
+(function(e){String.prototype.trim===e&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===e&&(Array.prototype.reduce=function(t){if(this===void 0||this===null)throw new TypeError;var n=Object(this),r=n.length>>>0,i=0,s;if(typeof t!="function")throw new TypeError;if(r==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError}while(!0);while(i<r)i in n&&(s=t.call(e,s,n[i],i,n)),i++;return s})})();var Zepto=function(){function O(e){return e==null?String(e):T[N.call(e)]||"object"}function M(e){return O(e)=="function"}function _(e){return e!=null&&e==e.window}function D(e){return e!=null&&e.nodeType==e.DOCUMENT_NODE}function P(e){return O(e)=="object"}function H(e){return P(e)&&!_(e)&&e.__proto__==Object.prototype}function B(e){return e instanceof Array}function j(e){return typeof e.length=="number"}function F(e){return o.call(e,function(e){return e!=null})}function I(e){return e.length>0?n.fn.concat.apply([],e):e}function q(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function R(e){return e in f?f[e]:f[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function U(e,t){return typeof t=="number"&&!c[q(e)]?t+"px":t}function z(e){var t,n;return a[e]||(t=u.createElement(e),u.body.appendChild(t),n=l(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),n=="none"&&(n="block"),a[e]=n),a[e]}function W(e){return"children"in e?s.call(e.children):n.map(e.childNodes,function(e){if(e.nodeType==1)return e})}function X(n,r,i){for(t in r)i&&H(r[t])?(H(n[t])||(n[t]={}),X(n[t],r[t],i)):r[t]!==e&&(n[t]=r[t])}function V(t,r){return r===e?n(t):n(t).filter(r)}function $(e,t,n,r){return M(t)?t.call(e,n,r):t}function J(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function K(t,n){var r=t.className,i=r&&r.baseVal!==e;if(n===e)return i?r.baseVal:r;i?r.baseVal=n:t.className=n}function Q(e){var t;try{return e?e=="true"||(e=="false"?!1:e=="null"?null:isNaN(t=Number(e))?/^[\[\{]/.test(e)?n.parseJSON(e):e:t):e}catch(r){return e}}function G(e,t){t(e);for(var n in e.childNodes)G(e.childNodes[n],t)}var e,t,n,r,i=[],s=i.slice,o=i.filter,u=window.document,a={},f={},l=u.defaultView.getComputedStyle,c={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/^(?:body|html)$/i,v=["val","css","html","text","data","width","height","offset"],m=["after","prepend","before","append"],g=u.createElement("table"),y=u.createElement("tr"),b={tr:u.createElement("tbody"),tbody:g,thead:g,tfoot:g,td:y,th:y,"*":u.createElement("div")},w=/complete|loaded|interactive/,E=/^\.([\w-]+)$/,S=/^#([\w-]*)$/,x=/^[\w-]+$/,T={},N=T.toString,C={},k,L,A=u.createElement("div");return C.matches=function(e,t){if(!e||e.nodeType!==1)return!1;var n=e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,s=!i;return s&&(i=A).appendChild(e),r=~C.qsa(i,t).indexOf(e),s&&A.removeChild(e),r},k=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},L=function(e){return o.call(e,function(t,n){return e.indexOf(t)==n})},C.fragment=function(t,r,i){t.replace&&(t=t.replace(p,"<$1></$2>")),r===e&&(r=h.test(t)&&RegExp.$1),r in b||(r="*");var o,u,a=b[r];return a.innerHTML=""+t,u=n.each(s.call(a.childNodes),function(){a.removeChild(this)}),H(i)&&(o=n(u),n.each(i,function(e,t){v.indexOf(e)>-1?o[e](t):o.attr(e,t)})),u},C.Z=function(e,t){return e=e||[],e.__proto__=n.fn,e.selector=t||"",e},C.isZ=function(e){return e instanceof C.Z},C.init=function(t,r){if(!t)return C.Z();if(M(t))return n(u).ready(t);if(C.isZ(t))return t;var i;if(B(t))i=F(t);else if(P(t))i=[H(t)?n.extend({},t):t],t=null;else if(h.test(t))i=C.fragment(t.trim(),RegExp.$1,r),t=null;else{if(r!==e)return n(r).find(t);i=C.qsa(u,t)}return C.Z(i,t)},n=function(e,t){return C.init(e,t)},n.extend=function(e){var t,n=s.call(arguments,1);return typeof e=="boolean"&&(t=e,e=n.shift()),n.forEach(function(n){X(e,n,t)}),e},C.qsa=function(e,t){var n;return D(e)&&S.test(t)?(n=e.getElementById(RegExp.$1))?[n]:[]:e.nodeType!==1&&e.nodeType!==9?[]:s.call(E.test(t)?e.getElementsByClassName(RegExp.$1):x.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t))},n.contains=function(e,t){return e!==t&&e.contains(t)},n.type=O,n.isFunction=M,n.isWindow=_,n.isArray=B,n.isPlainObject=H,n.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},n.inArray=function(e,t,n){return i.indexOf.call(t,e,n)},n.camelCase=k,n.trim=function(e){return e.trim()},n.uuid=0,n.support={},n.expr={},n.map=function(e,t){var n,r=[],i,s;if(j(e))for(i=0;i<e.length;i++)n=t(e[i],i),n!=null&&r.push(n);else for(s in e)n=t(e[s],s),n!=null&&r.push(n);return I(r)},n.each=function(e,t){var n,r;if(j(e)){for(n=0;n<e.length;n++)if(t.call(e[n],n,e[n])===!1)return e}else for(r in e)if(t.call(e[r],r,e[r])===!1)return e;return e},n.grep=function(e,t){return o.call(e,t)},window.JSON&&(n.parseJSON=JSON.parse),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){T["[object "+t+"]"]=t.toLowerCase()}),n.fn={forEach:i.forEach,reduce:i.reduce,push:i.push,sort:i.sort,indexOf:i.indexOf,concat:i.concat,map:function(e){return n(n.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return n(s.apply(this,arguments))},ready:function(e){return w.test(u.readyState)?e(n):u.addEventListener("DOMContentLoaded",function(){e(n)},!1),this},get:function(t){return t===e?s.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(e){return i.every.call(this,function(t,n){return e.call(t,n,t)!==!1}),this},filter:function(e){return M(e)?this.not(this.not(e)):n(o.call(this,function(t){return C.matches(t,e)}))},add:function(e,t){return n(L(this.concat(n(e,t))))},is:function(e){return this.length>0&&C.matches(this[0],e)},not:function(t){var r=[];if(M(t)&&t.call!==e)this.each(function(e){t.call(this,e)||r.push(this)});else{var i=typeof t=="string"?this.filter(t):j(t)&&M(t.item)?s.call(t):n(t);this.forEach(function(e){i.indexOf(e)<0&&r.push(e)})}return n(r)},has:function(e){return this.filter(function(){return P(e)?n.contains(this,e):n(this).find(e).size()})},eq:function(e){return e===-1?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!P(e)?e:n(e)},last:function(){var e=this[this.length-1];return e&&!P(e)?e:n(e)},find:function(e){var t;return this.length==1?t=n(C.qsa(this[0],e)):t=this.map(function(){return C.qsa(this,e)}),t},closest:function(e,t){var r=this[0];while(r&&!C.matches(r,e))r=r!==t&&!D(r)&&r.parentNode;return n(r)},parents:function(e){var t=[],r=this;while(r.length>0)r=n.map(r,function(e){if((e=e.parentNode)&&!D(e)&&t.indexOf(e)<0)return t.push(e),e});return V(t,e)},parent:function(e){return V(L(this.pluck("parentNode")),e)},children:function(e){return V(this.map(function(){return W(this)}),e)},contents:function(){return this.map(function(){return s.call(this.childNodes)})},siblings:function(e){return V(this.map(function(e,t){return o.call(W(t.parentNode),function(e){return e!==t})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(e){return n.map(this,function(t){return t[e]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=null),l(this,"").getPropertyValue("display")=="none"&&(this.style.display=z(this.nodeName))})},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=M(e);if(this[0]&&!t)var r=n(e).get(0),i=r.parentNode||this.length>1;return this.each(function(s){n(this).wrapAll(t?e.call(this,s):i?r.cloneNode(!0):r)})},wrapAll:function(e){if(this[0]){n(this[0]).before(e=n(e));var t;while((t=e.children()).length)e=t.first();n(e).append(this)}return this},wrapInner:function(e){var t=M(e);return this.each(function(r){var i=n(this),s=i.contents(),o=t?e.call(this,r):e;s.length?s.wrapAll(o):i.append(o)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var r=n(this);(t===e?r.css("display")=="none":t)?r.show():r.hide()})},prev:function(e){return n(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return n(this.pluck("nextElementSibling")).filter(e||"*")},html:function(t){return t===e?this.length>0?this[0].innerHTML:null:this.each(function(e){var r=this.innerHTML;n(this).empty().append($(this,t,e,r))})},text:function(t){return t===e?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=t})},attr:function(n,r){var i;return typeof n=="string"&&r===e?this.length==0||this[0].nodeType!==1?e:n=="value"&&this[0].nodeName=="INPUT"?this.val():!(i=this[0].getAttribute(n))&&n in this[0]?this[0][n]:i:this.each(function(e){if(this.nodeType!==1)return;if(P(n))for(t in n)J(this,t,n[t]);else J(this,n,$(this,r,e,this.getAttribute(n)))})},removeAttr:function(e){return this.each(function(){this.nodeType===1&&J(this,e)})},prop:function(t,n){return n===e?this[0]&&this[0][t]:this.each(function(e){this[t]=$(this,n,e,this[t])})},data:function(t,n){var r=this.attr("data-"+q(t),n);return r!==null?Q(r):e},val:function(t){return t===e?this[0]&&(this[0].multiple?n(this[0]).find("option").filter(function(e){return this.selected}).pluck("value"):this[0].value):this.each(function(e){this.value=$(this,t,e,this.value)})},offset:function(e){if(e)return this.each(function(t){var r=n(this),i=$(this,e,t,r.offset()),s=r.offsetParent().offset(),o={top:i.top-s.top,left:i.left-s.left};r.css("position")=="static"&&(o.position="relative"),r.css(o)});if(this.length==0)return null;var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:t.width,height:t.height}},css:function(e,n){if(arguments.length<2&&typeof e=="string")return this[0]&&(this[0].style[k(e)]||l(this[0],"").getPropertyValue(e));var r="";for(t in e)!e[t]&&e[t]!==0?this.each(function(){this.style.removeProperty(q(t))}):r+=q(t)+":"+U(t,e[t])+";";return typeof e=="string"&&(!n&&n!==0?this.each(function(){this.style.removeProperty(q(e))}):r=q(e)+":"+U(e,n)),this.each(function(){this.style.cssText+=";"+r})},index:function(e){return e?this.indexOf(n(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return i.some.call(this,function(e){return this.test(K(e))},R(e))},addClass:function(e){return this.each(function(t){r=[];var i=K(this),s=$(this,e,t,i);s.split(/\s+/g).forEach(function(e){n(this).hasClass(e)||r.push(e)},this),r.length&&K(this,i+(i?" ":"")+r.join(" "))})},removeClass:function(t){return this.each(function(n){if(t===e)return K(this,"");r=K(this),$(this,t,n,r).split(/\s+/g).forEach(function(e){r=r.replace(R(e)," ")}),K(this,r.trim())})},toggleClass:function(t,r){return this.each(function(i){var s=n(this),o=$(this,t,i,K(this));o.split(/\s+/g).forEach(function(t){(r===e?!s.hasClass(t):r)?s.addClass(t):s.removeClass(t)})})},scrollTop:function(){if(!this.length)return;return"scrollTop"in this[0]?this[0].scrollTop:this[0].scrollY},position:function(){if(!this.length)return;var e=this[0],t=this.offsetParent(),r=this.offset(),i=d.test(t[0].nodeName)?{top:0,left:0}:t.offset();return r.top-=parseFloat(n(e).css("margin-top"))||0,r.left-=parseFloat(n(e).css("margin-left"))||0,i.top+=parseFloat(n(t[0]).css("border-top-width"))||0,i.left+=parseFloat(n(t[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.left-i.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||u.body;while(e&&!d.test(e.nodeName)&&n(e).css("position")=="static")e=e.offsetParent;return e})}},n.fn.detach=n.fn.remove,["width","height"].forEach(function(t){n.fn[t]=function(r){var i,s=this[0],o=t.replace(/./,function(e){return e[0].toUpperCase()});return r===e?_(s)?s["inner"+o]:D(s)?s.documentElement["offset"+o]:(i=this.offset())&&i[t]:this.each(function(e){s=n(this),s.css(t,$(this,r,e,s[t]()))})}}),m.forEach(function(e,t){var r=t%2;n.fn[e]=function(){var e,i=n.map(arguments,function(t){return e=O(t),e=="object"||e=="array"||t==null?t:C.fragment(t)}),s,o=this.length>1;return i.length<1?this:this.each(function(e,u){s=r?u:u.parentNode,u=t==0?u.nextSibling:t==1?u.firstChild:t==2?u:null,i.forEach(function(e){if(o)e=e.cloneNode(!0);else if(!s)return n(e).remove();G(s.insertBefore(e,u),function(e){e.nodeName!=null&&e.nodeName.toUpperCase()==="SCRIPT"&&(!e.type||e.type==="text/javascript")&&!e.src&&window.eval.call(window,e.innerHTML)})})})},n.fn[r?e+"To":"insert"+(t?"Before":"After")]=function(t){return n(t)[e](this),this}}),C.Z.prototype=n.fn,C.uniq=L,C.deserializeValue=Q,n.zepto=C,n}();window.Zepto=Zepto,"$"in window||(window.$=Zepto),function(e){function o(e){return e._zid||(e._zid=r++)}function u(e,t,r,i){t=a(t);if(t.ns)var s=f(t.ns);return(n[o(e)]||[]).filter(function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||s.test(e.ns))&&(!r||o(e.fn)===o(r))&&(!i||e.sel==i)})}function a(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function f(e){return new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)")}function l(t,n,r){e.type(t)!="string"?e.each(t,r):t.split(/\s/).forEach(function(e){r(e,n)})}function c(e,t){return e.del&&(e.e=="focus"||e.e=="blur")||!!t}function h(e){return s[e]||e}function p(t,r,i,u,f,p){var d=o(t),v=n[d]||(n[d]=[]);l(r,i,function(n,r){var i=a(n);i.fn=r,i.sel=u,i.e in s&&(r=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return i.fn.apply(this,arguments)}),i.del=f&&f(r,n);var o=i.del||r;i.proxy=function(e){var n=o.apply(t,[e].concat(e.data));return n===!1&&(e.preventDefault(),e.stopPropagation()),n},i.i=v.length,v.push(i),t.addEventListener(h(i.e),i.proxy,c(i,p))})}function d(e,t,r,i,s){var a=o(e);l(t||"",r,function(t,r){u(e,t,r,i).forEach(function(t){delete n[a][t.i],e.removeEventListener(h(t.e),t.proxy,c(t,s))})})}function b(t){var n,r={originalEvent:t};for(n in t)!g.test(n)&&t[n]!==undefined&&(r[n]=t[n]);return e.each(y,function(e,n){r[e]=function(){return this[n]=v,t[e].apply(t,arguments)},r[n]=m}),r}function w(e){if(!("defaultPrevented"in e)){e.defaultPrevented=!1;var t=e.preventDefault;e.preventDefault=function(){this.defaultPrevented=!0,t.call(this)}}}var t=e.zepto.qsa,n={},r=1,i={},s={mouseenter:"mouseover",mouseleave:"mouseout"};i.click=i.mousedown=i.mouseup=i.mousemove="MouseEvents",e.event={add:p,remove:d},e.proxy=function(t,n){if(e.isFunction(t)){var r=function(){return t.apply(n,arguments)};return r._zid=o(t),r}if(typeof n=="string")return e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(e,t){return this.each(function(){p(this,e,t)})},e.fn.unbind=function(e,t){return this.each(function(){d(this,e,t)})},e.fn.one=function(e,t){return this.each(function(n,r){p(this,e,t,null,function(e,t){return function(){var n=e.apply(r,arguments);return d(r,t,e),n}})})};var v=function(){return!0},m=function(){return!1},g=/^([A-Z]|layer[XY]$)/,y={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,n,r){return this.each(function(i,s){p(s,n,r,t,function(n){return function(r){var i,o=e(r.target).closest(t,s).get(0);if(o)return i=e.extend(b(r),{currentTarget:o,liveFired:s}),n.apply(o,[i].concat([].slice.call(arguments,1)))}})})},e.fn.undelegate=function(e,t,n){return this.each(function(){d(this,t,n,e)})},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,r){return!n||e.isFunction(n)?this.bind(t,n||r):this.delegate(n,t,r)},e.fn.off=function(t,n,r){return!n||e.isFunction(n)?this.unbind(t,n||r):this.undelegate(n,t,r)},e.fn.trigger=function(t,n){if(typeof t=="string"||e.isPlainObject(t))t=e.Event(t);return w(t),t.data=n,this.each(function(){"dispatchEvent"in this&&this.dispatchEvent(t)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(s,o){r=b(typeof t=="string"?e.Event(t):t),r.data=n,r.target=o,e.each(u(o,t.type||t),function(e,t){i=t.proxy(r);if(r.isImmediatePropagationStopped())return!1})}),i},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return e?this.bind(t,e):this.trigger(t)}}),["focus","blur"].forEach(function(t){e.fn[t]=function(e){return e?this.bind(t,e):this.each(function(){try{this[t]()}catch(e){}}),this}}),e.Event=function(e,t){typeof e!="string"&&(t=e,e=t.type);var n=document.createEvent(i[e]||"Events"),r=!0;if(t)for(var s in t)s=="bubbles"?r=!!t[s]:n[s]=t[s];return n.initEvent(e,r,!0,null,null,null,null,null,null,null,null,null,null,null,null),n.isDefaultPrevented=function(){return this.defaultPrevented},n}}(Zepto),function(e){function t(e){var t=this.os={},n=this.browser={},r=e.match(/WebKit\/([\d.]+)/),i=e.match(/(Android)\s+([\d.]+)/),s=e.match(/(iPad).*OS\s([\d_]+)/),o=!s&&e.match(/(iPhone\sOS)\s([\d_]+)/),u=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),a=u&&e.match(/TouchPad/),f=e.match(/Kindle\/([\d.]+)/),l=e.match(/Silk\/([\d._]+)/),c=e.match(/(BlackBerry).*Version\/([\d.]+)/),h=e.match(/(BB10).*Version\/([\d.]+)/),p=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),d=e.match(/PlayBook/),v=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),m=e.match(/Firefox\/([\d.]+)/);if(n.webkit=!!r)n.version=r[1];i&&(t.android=!0,t.version=i[2]),o&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),s&&(t.ios=t.ipad=!0,t.version=s[2].replace(/_/g,".")),u&&(t.webos=!0,t.version=u[2]),a&&(t.touchpad=!0),c&&(t.blackberry=!0,t.version=c[2]),h&&(t.bb10=!0,t.version=h[2]),p&&(t.rimtabletos=!0,t.version=p[2]),d&&(n.playbook=!0),f&&(t.kindle=!0,t.version=f[1]),l&&(n.silk=!0,n.version=l[1]),!l&&t.android&&e.match(/Kindle Fire/)&&(n.silk=!0),v&&(n.chrome=!0,n.version=v[1]),m&&(n.firefox=!0,n.version=m[1]),t.tablet=!!(s||d||i&&!e.match(/Mobile/)||m&&e.match(/Tablet/)),t.phone=!t.tablet&&!!(i||o||u||c||h||v||m)}t.call(e,navigator.userAgent),e.__detect=t}(Zepto),function(e,t){function y(e){return b(e.replace(/([a-z])([A-Z])/,"$1-$2"))}function b(e){return e.toLowerCase()}function w(e){return r?r+e:b(e)}var n="",r,i,s,o={Webkit:"webkit",Moz:"",O:"o",ms:"MS"},u=window.document,a=u.createElement("div"),f=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,l,c,h,p,d,v,m,g={};e.each(o,function(e,i){if(a.style[e+"TransitionProperty"]!==t)return n="-"+b(e)+"-",r=i,!1}),l=n+"transform",g[c=n+"transition-property"]=g[h=n+"transition-duration"]=g[p=n+"transition-timing-function"]=g[d=n+"animation-name"]=g[v=n+"animation-duration"]=g[m=n+"animation-timing-function"]="",e.fx={off:r===t&&a.style.transitionProperty===t,speeds:{_default:400,fast:200,slow:600},cssPrefix:n,transitionEnd:w("TransitionEnd"),animationEnd:w("AnimationEnd")},e.fn.animate=function(t,n,r,i){return e.isPlainObject(n)&&(r=n.easing,i=n.complete,n=n.duration),n&&(n=(typeof n=="number"?n:e.fx.speeds[n]||e.fx.speeds._default)/1e3),this.anim(t,n,r,i)},e.fn.anim=function(n,r,i,s){var o,u={},a,b="",w=this,E,S=e.fx.transitionEnd;r===t&&(r=.4),e.fx.off&&(r=0);if(typeof n=="string")u[d]=n,u[v]=r+"s",u[m]=i||"linear",S=e.fx.animationEnd;else{a=[];for(o in n)f.test(o)?b+=o+"("+n[o]+") ":(u[o]=n[o],a.push(y(o)));b&&(u[l]=b,a.push(l)),r>0&&typeof n=="object"&&(u[c]=a.join(", "),u[h]=r+"s",u[p]=i||"linear")}return E=function(t){if(typeof t!="undefined"){if(t.target!==t.currentTarget)return;e(t.target).unbind(S,E)}e(this).css(g),s&&s.call(this)},r>0&&this.bind(S,E),this.size()&&this.get(0).clientLeft,this.css(u),r<=0&&setTimeout(function(){w.each(function(){E.call(this)})},0),this},a=null}(Zepto),function($){function triggerAndReturn(e,t,n){var r=$.Event(t);return $(e).trigger(r,n),!r.defaultPrevented}function triggerGlobal(e,t,n,r){if(e.global)return triggerAndReturn(t||document,n,r)}function ajaxStart(e){e.global&&$.active++===0&&triggerGlobal(e,null,"ajaxStart")}function ajaxStop(e){e.global&&!--$.active&&triggerGlobal(e,null,"ajaxStop")}function ajaxBeforeSend(e,t){var n=t.context;if(t.beforeSend.call(n,e,t)===!1||triggerGlobal(t,n,"ajaxBeforeSend",[e,t])===!1)return!1;triggerGlobal(t,n,"ajaxSend",[e,t])}function ajaxSuccess(e,t,n){var r=n.context,i="success";n.success.call(r,e,i,t),triggerGlobal(n,r,"ajaxSuccess",[t,n,e]),ajaxComplete(i,t,n)}function ajaxError(e,t,n,r){var i=r.context;r.error.call(i,n,t,e),triggerGlobal(r,i,"ajaxError",[n,r,e]),ajaxComplete(t,n,r)}function ajaxComplete(e,t,n){var r=n.context;n.complete.call(r,t,e),triggerGlobal(n,r,"ajaxComplete",[t,n]),ajaxStop(n)}function empty(){}function mimeToDataType(e){return e&&(e==htmlType?"html":e==jsonType?"json":scriptTypeRE.test(e)?"script":xmlTypeRE.test(e)&&"xml")||"text"}function appendQuery(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function serializeData(e){e.processData&&e.data&&$.type(e.data)!="string"&&(e.data=$.param(e.data,e.traditional)),e.data&&(!e.type||e.type.toUpperCase()=="GET")&&(e.url=appendQuery(e.url,e.data))}function parseArguments(e,t,n,r){var i=!$.isFunction(t);return{url:e,data:i?t:undefined,success:i?$.isFunction(n)?n:undefined:t,dataType:i?r||n:n}}function serialize(e,t,n,r){var i,s=$.isArray(t);$.each(t,function(t,o){i=$.type(o),r&&(t=n?r:r+"["+(s?"":t)+"]"),!r&&s?e.add(o.name,o.value):i=="array"||!n&&i=="object"?serialize(e,o,n,t):e.add(t,o)})}var jsonpID=0,document=window.document,key,name,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,scriptTypeRE=/^(?:text|application)\/javascript/i,xmlTypeRE=/^(?:text|application)\/xml/i,jsonType="application/json",htmlType="text/html",blankRE=/^\s*$/;$.active=0,$.ajaxJSONP=function(e){if("type"in e){var t="jsonp"+ ++jsonpID,n=document.createElement("script"),r=function(){clearTimeout(o),$(n).remove(),delete window[t]},i=function(n){r();if(!n||n=="timeout")window[t]=empty;ajaxError(null,n||"abort",s,e)},s={abort:i},o;return serializeData(e),ajaxBeforeSend(s,e)===!1?(i("abort"),!1):(window[t]=function(t){r(),ajaxSuccess(t,s,e)},n.onerror=function(){i("error")},n.src=e.url.replace(/=\?/,"="+t),$("head").append(n),e.timeout>0&&(o=setTimeout(function(){i("timeout")},e.timeout)),s)}return $.ajax(e)},$.ajaxSettings={type:"GET",beforeSend:empty,success:empty,error:empty,complete:empty,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript",json:jsonType,xml:"application/xml, text/xml",html:htmlType,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0},$.ajax=function(options){var settings=$.extend({},options||{});for(key in $.ajaxSettings)settings[key]===undefined&&(settings[key]=$.ajaxSettings[key]);ajaxStart(settings),settings.crossDomain||(settings.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(settings.url)&&RegExp.$2!=window.location.host);var dataType=settings.dataType,hasPlaceholder=/=\?/.test(settings.url);if(dataType=="jsonp"||hasPlaceholder)return hasPlaceholder||(settings.url=appendQuery(settings.url,"callback=?")),$.ajaxJSONP(settings);settings.url||(settings.url=window.location.toString()),serializeData(settings);var mime=settings.accepts[dataType],baseHeaders={},protocol=/^([\w-]+:)\/\//.test(settings.url)?RegExp.$1:window.location.protocol,xhr=settings.xhr(),abortTimeout;settings.crossDomain||(baseHeaders["X-Requested-With"]="XMLHttpRequest"),mime&&(baseHeaders.Accept=mime,mime.indexOf(",")>-1&&(mime=mime.split(",",2)[0]),xhr.overrideMimeType&&xhr.overrideMimeType(mime));if(settings.contentType||settings.contentType!==!1&&settings.data&&settings.type.toUpperCase()!="GET")baseHeaders["Content-Type"]=settings.contentType||"application/x-www-form-urlencoded";settings.headers=$.extend(baseHeaders,settings.headers||{}),xhr.onreadystatechange=function(){if(xhr.readyState==4){xhr.onreadystatechange=empty,clearTimeout(abortTimeout);var result,error=!1;if(xhr.status>=200&&xhr.status<300||xhr.status==304||xhr.status==0&&protocol=="file:"){dataType=dataType||mimeToDataType(xhr.getResponseHeader("content-type")),result=xhr.responseText;try{dataType=="script"?(1,eval)(result):dataType=="xml"?result=xhr.responseXML:dataType=="json"&&(result=blankRE.test(result)?null:$.parseJSON(result))}catch(e){error=e}error?ajaxError(error,"parsererror",xhr,settings):ajaxSuccess(result,xhr,settings)}else ajaxError(null,xhr.status?"error":"abort",xhr,settings)}};var async="async"in settings?settings.async:!0;xhr.open(settings.type,settings.url,async);for(name in settings.headers)xhr.setRequestHeader(name,settings.headers[name]);return ajaxBeforeSend(xhr,settings)===!1?(xhr.abort(),!1):(settings.timeout>0&&(abortTimeout=setTimeout(function(){xhr.onreadystatechange=empty,xhr.abort(),ajaxError(null,"timeout",xhr,settings)},settings.timeout)),xhr.send(settings.data?settings.data:null),xhr)},$.get=function(e,t,n,r){return $.ajax(parseArguments.apply(null,arguments))},$.post=function(e,t,n,r){var i=parseArguments.apply(null,arguments);return i.type="POST",$.ajax(i)},$.getJSON=function(e,t,n){var r=parseArguments.apply(null,arguments);return r.dataType="json",$.ajax(r)},$.fn.load=function(e,t,n){if(!this.length)return this;var r=this,i=e.split(/\s/),s,o=parseArguments(e,t,n),u=o.success;return i.length>1&&(o.url=i[0],s=i[1]),o.success=function(e){r.html(s?$("<div>").html(e.replace(rscript,"")).find(s):e),u&&u.apply(r,arguments)},$.ajax(o),this};var escape=encodeURIComponent;$.param=function(e,t){var n=[];return n.add=function(e,t){this.push(escape(e)+"="+escape(t))},serialize(n,e,t),n.join("&").replace(/%20/g,"+")}}(Zepto),function(e){e.fn.serializeArray=function(){var t=[],n;return e(Array.prototype.slice.call(this.get(0).elements)).each(function(){n=e(this);var r=n.attr("type");this.nodeName.toLowerCase()!="fieldset"&&!this.disabled&&r!="submit"&&r!="reset"&&r!="button"&&(r!="radio"&&r!="checkbox"||this.checked)&&t.push({name:n.attr("name"),value:n.val()})}),t},e.fn.serialize=function(){var e=[];return this.serializeArray().forEach(function(t){e.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))}),e.join("&")},e.fn.submit=function(t){if(t)this.bind("submit",t);else if(this.length){var n=e.Event("submit");this.eq(0).trigger(n),n.defaultPrevented||this.get(0).submit()}return this}}(Zepto);
View
3,927 ender.js
2,222 additions, 1,705 deletions not shown
View
38 ender.min.js
@@ -9,40 +9,36 @@
/*!
* Ender: open module JavaScript framework (client-lib)
* copyright Dustin Diaz & Jacob Thornton 2011-2012 (@ded @fat)
- * http://ender.no.de
+ * http://ender.jit.su
* License MIT
*/
-(function(a){function f(a){var c=b["$"+a]||window[a];if(!c)throw new Error("Ender Error: Requested module '"+a+"' has not been defined.");return c}function g(a,c){return b["$"+a]=c}function h(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function i(a,b){var c,d;this.selector=a;if(typeof a=="undefined"){c=[];this.selector=""}else typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window?c=j._select(a,b):c=isFinite(a.length)?a:[a];this.length=c.length;for(d=this.length;d--;)this[d]=c[d]}function j(a,b){return new i(a,b)}a.global=a;var b={},c=a.$,d=a.require,e=a.provide;a.provide=g;a.require=f;i.prototype.forEach=function(a,b){var c,d;for(c=0,d=this.length;c<d;++c)c in this&&a.call(b||this[c],this[c],c,this);return this};i.prototype.$=j;j._VERSION="0.4.3-dev";j.fn=i.prototype;j.ender=function(a,b){h(b?i.prototype:j,a)};j._select=function(a,b){return typeof a=="string"?(b||document).querySelectorAll(a):a.nodeName?[a]:a};j.noConflict=function(b){a.$=c;if(b){a.provide=e;a.require=d;b(f,g,this)}return this};typeof module!="undefined"&&module.exports&&(module.exports=j);a.ender=a.$=a.ender||j}(this));(function(){var a={exports:{}},b=a.exports;
+(function(a){function g(a){var c=b["$"+a]||window[a];if(!c)throw new Error("Ender Error: Requested module '"+a+"' has not been defined.");return c}function h(a,c){return b["$"+a]=c}function i(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function j(a,b){var c,d;this.selector=a;if(typeof a=="undefined"){c=[];this.selector=""}else typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window?c=k._select(a,b):c=isFinite(a.length)?a:[a];this.length=c.length;for(d=this.length;d--;)this[d]=c[d]}function k(a,b){return new j(a,b)}a.global=a;var b={},c=a.$,d=a.ender,e=a.require,f=a.provide;a.provide=h;a.require=g;j.prototype.forEach=function(a,b){var c,d;for(c=0,d=this.length;c<d;++c)c in this&&a.call(b||this[c],this[c],c,this);return this};j.prototype.$=k;k._VERSION="0.4.3-dev";k.fn=j.prototype;k.ender=function(a,b){i(b?j.prototype:k,a)};k._select=function(a,b){return typeof a=="string"?(b||document).querySelectorAll(a):a.nodeName?[a]:a};k.noConflict=function(b){a.$=c;if(b){a.provide=f;a.require=e;a.ender=d;typeof b=="function"&&b(g,h,this)}return this};typeof module!="undefined"&&module.exports&&(module.exports=k);a.ender=a.$=k}(this));(function(){var a={exports:{}},b=a.exports;
/*!
* Morpheus - A Brilliant Animator
* https://github.com/ded/morpheus - (c) Dustin Diaz 2011
* License MIT
*/
-;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=c()}("morpheus",function(){function s(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b);for(c=0;c<a.length;++c)if(a[c]===b)return c}function t(a){var b,c,d=r.length;for(b=d;b--;){r[b](a);c=!0}c&&q(t)}function u(a){r.push(a)===1&&t()}function v(a){var b,c,d=s(r,a);if(d>=0){c=r.slice(d+1);r.length=d;r=r.concat(c)}}function w(a,b){var c={},d;if(d=a.match(i))c.rotate=G(d[1],b?b.rotate:null);if(d=a.match(j))c.scale=G(d[1],b?b.scale:null);if(d=a.match(k)){c.skewx=G(d[1],b?b.skewx:null);c.skewy=G(d[3],b?b.skewy:null)}if(d=a.match(l)){c.translatex=G(d[1],b?b.translatex:null);c.translatey=G(d[3],b?b.translatey:null)}return c}function x(a){var b="";"rotate"in a&&(b+="rotate("+a.rotate+"deg) ");"scale"in a&&(b+="scale("+a.scale+") ");"translatex"in a&&(b+="translate("+a.translatex+"px,"+a.translatey+"px) ");"skewx"in a&&(b+="skew("+a.skewx+"deg,"+a.skewy+"deg)");return b}function y(a,b,c){return"#"+(1<<24|a<<16|b<<8|c).toString(16).slice(1)}function z(a){var b=/rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(a);return(b?y(b[1],b[2],b[3]):a).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function A(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function B(a){return typeof a=="function"}function C(a,b,c,d,f,g){function n(a){var e=a-k;if(e>h||l){g=isFinite(g)?g:1;l?m&&b(g):b(g);v(n);return c&&c.apply(i)}isFinite(g)?b(j*d(e/h)+f):b(d(e/h))}d=B(d)?d:H.easings[d]||function(a){return Math.sin(a*Math.PI/2)};var h=a||e,i=this,j=g-f,k=+(new Date),l=0,m=0;u(n);return{stop:function(a){l=1;m=a;a||(c=null)}}}function D(a,b){var c=a.length,d=[],e,f;for(e=0;e<c;++e)d[e]=[a[e][0],a[e][1]];for(f=1;f<c;++f)for(e=0;e<c-f;++e){d[e][0]=(1-b)*d[e][0]+b*d[parseInt(e+1,10)][0];d[e][1]=(1-b)*d[e][1]+b*d[parseInt(e+1,10)][1]}return[d[0][0],d[0][1]]}function E(a,b,c){var d=[],e,f,g,h;for(e=0;e<6;e++){g=Math.min(15,parseInt(b.charAt(e),16));h=Math.min(15,parseInt(c.charAt(e),16));f=Math.floor((h-g)*a+g);f=f>15?15:f<0?0:f;d[e]=f.toString(16)}return"#"+d.join("")}function F(a,b,c,d,f,g,h){if(f=="transform"){h={};for(var i in c[g][f])h[i]=i in d[g][f]?Math.round(((d[g][f][i]-c[g][f][i])*a+c[g][f][i])*e)/e:c[g][f][i];return h}if(typeof c[g][f]=="string")return E(a,c[g][f],d[g][f]);h=Math.round(((d[g][f]-c[g][f])*a+c[g][f])*e)/e;f in m||(h+=b[g][f]||"px");return h}function G(a,b,c,d,e){return(c=g.exec(a))?(e=parseFloat(c[2]))&&b+(c[1]=="+"?1:-1)*e:parseFloat(a)}function H(a,b){var c=a?c=isFinite(a.length)?a:[a]:[],d,e=b.complete,g=b.duration,i=b.easing,j=b.bezier,k=[],l=[],m=[],q=[],r,s;delete b.complete;delete b.duration;delete b.easing;delete b.bezier;if(j){r=b.left;s=b.top;delete b.right;delete b.bottom;delete b.left;delete b.top}for(d=c.length;d--;){k[d]={};l[d]={};m[d]={};if(j){var t=p(c[d],"left"),u=p(c[d],"top"),v=[G(B(r)?r(c[d]):r||0,parseFloat(t)),G(B(s)?s(c[d]):s||0,parseFloat(u))];q[d]=B(j)?j(c[d],v):j;q[d].push(v);q[d].unshift([parseInt(t,10),parseInt(u,10)])}for(var y in b){var E=p(c[d],y),H,I=B(b[y])?b[y](c[d]):b[y];if(typeof I=="string"&&f.test(I)&&!f.test(E)){delete b[y];continue}k[d][y]=y=="transform"?w(E):typeof I=="string"&&f.test(I)?z(E).slice(1):parseFloat(E);l[d][y]=y=="transform"?w(I,k[d][y]):typeof I=="string"&&I.charAt(0)=="#"?z(I).slice(1):G(I,parseFloat(E));typeof I=="string"&&(H=I.match(h))&&(m[d][y]=H[1])}}return C.apply(c,[g,function(a,e,f){for(d=c.length;d--;){if(j){f=D(q[d],a);c[d].style.left=f[0]+"px";c[d].style.top=f[1]+"px"}for(var g in b){e=F(a,m,k,l,g,d);g=="transform"?c[d].style[n]=x(e):g=="opacity"&&!o?c[d].style.filter="alpha(opacity="+e*100+")":c[d].style[A(g)]=e}}},e,i])}var a=this,b=document,c=window,d=b.documentElement,e=1e3,f=/^rgb\(|#/,g=/^([+\-])=([\d\.]+)/,h=/^(?:[\+\-]=)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,i=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,j=/scale\(((?:[+\-]=)?([\d\.]+))\)/,k=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,l=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,m={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},n=function(){var a=b.createElement("a").style,c=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],d;for(d=0;d<c.length;d++)if(c[d]in a)return c[d]}(),o=function(){return typeof b.createElement("a").style.opacity!="undefined"}(),p=b.defaultView&&b.defaultView.getComputedStyle?function(a,c){c=c=="transform"?n:c;var d=null,e=b.defaultView.getComputedStyle(a,"");e&&(d=e[A(c)]);return a.style[c]||d}:d.currentStyle?function(a,b){b=A(b);if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[A(b)]},q=function(){return c.requestAnimationFrame||c.webkitRequestAnimationFrame||c.mozRequestAnimationFrame||c.oRequestAnimationFrame||c.msRequestAnimationFrame||function(a){c.setTimeout(function(){a(+(new Date))},11)}}(),r=[];H.tween=C;H.getStyle=p;H.bezier=D;H.transform=n;H.parseTransform=w;H.formatTransform=x;H.easings={};return H});provide("morpheus",a.exports);var c=require("morpheus");!function(a){a.ender({animate:function(a){return c(this,a)},fadeIn:function(a,b){return c(this,{duration:a,opacity:1,complete:b})},fadeOut:function(a,b){return c(this,{duration:a,opacity:0,complete:b})}},!0);a.ender({tween:c.tween})}(ender)})();(function(){var a={exports:{}},b=a.exports;
+;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=c()}("morpheus",function(){function u(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b);for(c=0;c<a.length;++c)if(a[c]===b)return c}function v(a){var b,c=t.length;d&&a>1e12&&(a=e());for(b=c;b--;)t[b](a);t.length&&s(v)}function w(a){t.push(a)===1&&s(v)}function x(a){var b,c=u(t,a);if(c>=0){b=t.slice(c+1);t.length=c;t=t.concat(b)}}function y(a,b){var c={},d;if(d=a.match(k))c.rotate=J(d[1],b?b.rotate:null);if(d=a.match(l))c.scale=J(d[1],b?b.scale:null);if(d=a.match(m)){c.skewx=J(d[1],b?b.skewx:null);c.skewy=J(d[3],b?b.skewy:null)}if(d=a.match(n)){c.translatex=J(d[1],b?b.translatex:null);c.translatey=J(d[3],b?b.translatey:null)}return c}function z(a){var b="";"rotate"in a&&(b+="rotate("+a.rotate+"deg) ");"scale"in a&&(b+="scale("+a.scale+") ");"translatex"in a&&(b+="translate("+a.translatex+"px,"+a.translatey+"px) ");"skewx"in a&&(b+="skew("+a.skewx+"deg,"+a.skewy+"deg)");return b}function A(a,b,c){return"#"+(1<<24|a<<16|b<<8|c).toString(16).slice(1)}function B(a){var b=a.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return(b?A(b[1],b[2],b[3]):a).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function C(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function D(a){return typeof a=="function"}function E(a){return Math.sin(a*Math.PI/2)}function F(a,b,c,d,f,h){function o(a){var e=a-l;if(e>i||m){h=isFinite(h)?h:1;m?n&&b(h):b(h);x(o);return c&&c.apply(j)}isFinite(h)?b(k*d(e/i)+f):b(d(e/i))}d=D(d)?d:K.easings[d]||E;var i=a||g,j=this,k=h-f,l=e(),m=0,n=0;w(o);return{stop:function(a){m=1;n=a;a||(c=null)}}}function G(a,b){var c=a.length,d=[],e,f;for(e=0;e<c;++e)d[e]=[a[e][0],a[e][1]];for(f=1;f<c;++f)for(e=0;e<c-f;++e){d[e][0]=(1-b)*d[e][0]+b*d[parseInt(e+1,10)][0];d[e][1]=(1-b)*d[e][1]+b*d[parseInt(e+1,10)][1]}return[d[0][0],d[0][1]]}function H(a,b,c){var d=[],e,f,g,h;for(e=0;e<6;e++){g=Math.min(15,parseInt(b.charAt(e),16));h=Math.min(15,parseInt(c.charAt(e),16));f=Math.floor((h-g)*a+g);f=f>15?15:f<0?0:f;d[e]=f.toString(16)}return"#"+d.join("")}function I(a,b,c,d,e,f,h){if(e=="transform"){h={};for(var i in c[f][e])h[i]=i in d[f][e]?Math.round(((d[f][e][i]-c[f][e][i])*a+c[f][e][i])*g)/g:c[f][e][i];return h}if(typeof c[f][e]=="string")return H(a,c[f][e],d[f][e]);h=Math.round(((d[f][e]-c[f][e])*a+c[f][e])*g)/g;e in o||(h+=b[f][e]||"px");return h}function J(a,b,c,d,e){return(c=i.exec(a))?(e=parseFloat(c[2]))&&b+(c[1]=="+"?1:-1)*e:parseFloat(a)}function K(a,b){var c=a?c=isFinite(a.length)?a:[a]:[],d,e=b.complete,f=b.duration,g=b.easing,i=b.bezier,k=[],l=[],m=[],n=[],o,s;if(i){o=b.left;s=b.top;delete b.right;delete b.bottom;delete b.left;delete b.top}for(d=c.length;d--;){k[d]={};l[d]={};m[d]={};if(i){var t=r(c[d],"left"),u=r(c[d],"top"),v=[J(D(o)?o(c[d]):o||0,parseFloat(t)),J(D(s)?s(c[d]):s||0,parseFloat(u))];n[d]=D(i)?i(c[d],v):i;n[d].push(v);n[d].unshift([parseInt(t,10),parseInt(u,10)])}for(var w in b){switch(w){case"complete":case"duration":case"easing":case"bezier":continue}var x=r(c[d],w),A,E=D(b[w])?b[w](c[d]):b[w];if(typeof E=="string"&&h.test(E)&&!h.test(x)){delete b[w];continue}k[d][w]=w=="transform"?y(x):typeof E=="string"&&h.test(E)?B(x).slice(1):parseFloat(x);l[d][w]=w=="transform"?y(E,k[d][w]):typeof E=="string"&&E.charAt(0)=="#"?B(E).slice(1):J(E,parseFloat(x));typeof E=="string"&&(A=E.match(j))&&(m[d][w]=A[1])}}return F.apply(c,[f,function(a,e,f){for(d=c.length;d--;){if(i){f=G(n[d],a);c[d].style.left=f[0]+"px";c[d].style.top=f[1]+"px"}for(var g in b){e=I(a,m,k,l,g,d);g=="transform"?c[d].style[p]=z(e):g=="opacity"&&!q?c[d].style.filter="alpha(opacity="+e*100+")":c[d].style[C(g)]=e}}},e,g])}var a=document,b=window,c=b.performance,d=c&&(c.now||c.webkitNow||c.msNow||c.mozNow),e=d?function(){return d.call(c)}:function(){return+(new Date)},f=a.documentElement,g=1e3,h=/^rgb\(|#/,i=/^([+\-])=([\d\.]+)/,j=/^(?:[\+\-]=)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,k=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,l=/scale\(((?:[+\-]=)?([\d\.]+))\)/,m=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,n=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,o={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},p=function(){var b=a.createElement("a").style,c=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],d;for(d=0;d<c.length;d++)if(c[d]in b)return c[d]}(),q=function(){return typeof a.createElement("a").style.opacity!="undefined"}(),r=a.defaultView&&a.defaultView.getComputedStyle?function(b,c){c=c=="transform"?p:c;var d=null,e=a.defaultView.getComputedStyle(b,"");e&&(d=e[C(c)]);return b.style[c]||d}:f.currentStyle?function(a,b){b=C(b);if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[C(b)]},s=function(){return b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.msRequestAnimationFrame||b.oRequestAnimationFrame||function(a){b.setTimeout(function(){a(+(new Date))},17)}}(),t=[];K.tween=F;K.getStyle=r;K.bezier=G;K.transform=p;K.parseTransform=y;K.formatTransform=z;K.easings={};return K});provide("morpheus",a.exports);var c=require("morpheus");!function(a){a.ender({animate:function(a){return c(this,a)},fadeIn:function(a,b){return c(this,{duration:a,opacity:1,complete:b})},fadeOut:function(a,b){return c(this,{duration:a,opacity:0,complete:b})}},!0);a.ender({tween:c.tween})}(ender)})();(function(){var a={exports:{}},b=a.exports;
/*!
- * bean.js - copyright Jacob Thornton 2011
+ * domready (c) Dustin Diaz 2012 - License MIT
+ */
+;!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("domready",function(a){function m(a){l=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k="readyState",l=/^loade|c/.test(e[k]);e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d);m()},d);g&&e.attachEvent(j,c=function(){if(/^c/.test(e[k])){e.detachEvent(j,c);m()}});return a=g?function(c){self!=top?l?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){l?a():b.push(a)}});provide("domready",a.exports);!function(a){var b=require("domready");a.ender({domReady:b});a.ender({ready:function(a){b(a);return this}},!0)}(ender)})();(function(){var a={exports:{}},b=a.exports;
+/*!
+ * Bean - copyright (c) Jacob Thornton 2011-2012
* https://github.com/fat/bean
+ * MIT license
+ */
+;!function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=d(b,c):typeof define=="function"&&typeof define.amd=="object"?define(d):c[b]=d(b,c)}("bean",this,function(a,b){var c=window,d=b[a],e=/[^\.]*(?=\..*)\.|.*/,f=/\..*/,g="addEventListener",h="removeEventListener",i=document||{},j=i.documentElement||{},k=j[g],l=k?g:"attachEvent",m={},n=Array.prototype.slice,o=function(a,b){return a.split(b||" ")},p=function(a){return typeof a=="string"},q=function(a){return typeof a=="function"},r="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",s="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinputreadystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",t=function(a,b,c){for(c=0;c<b.length;c++)b[c]&&(a[b[c]]=1);return a}({},o(r+(k?s:""))),u=function(){var a="compareDocumentPosition"in j?function(a,b){return b.compareDocumentPosition&&(b.compareDocumentPosition(a)&16)===16}:"contains"in j?function(a,b){b=b.nodeType===9||b===window?j:b;return b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},b=function(b){var c=b.relatedTarget;return c?c!==this&&c.prefix!=="xul"&&!/document/.test(this.toString())&&!a(c,this):c==null};return{mouseenter:{base:"mouseover",condition:b},mouseleave:{base:"mouseout",condition:b},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),v=function(){var a=o("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),b=a.concat(o("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),d=b.concat(o("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),e=a.concat(o("char charCode key keyCode keyIdentifier keyLocation location")),f=a.concat(o("data")),g=a.concat(o("touches targetTouches changedTouches scale rotation")),h=a.concat(o("data origin source")),k=a.concat(o("state")),l=/over|out/,m=[{reg:/key/i,fix:function(a,b){b.keyCode=a.keyCode||a.which;return e}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(a,c,d){c.rightClick=a.which===3||a.button===2;c.pos={x:0,y:0};if(a.pageX||a.pageY){c.clientX=a.pageX;c.clientY=a.pageY}else if(a.clientX||a.clientY){c.clientX=a.clientX+i.body.scrollLeft+j.scrollLeft;c.clientY=a.clientY+i.body.scrollTop+j.scrollTop}l.test(d)&&(c.relatedTarget=a.relatedTarget||a[(d=="mouseover"?"from":"to")+"Element"]);return b}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return d}},{reg:/^text/i,fix:function(){return f}},{reg:/^touch|^gesture/i,fix:function(){return g}},{reg:/^message$/i,fix:function(){return h}},{reg:/^popstate$/i,fix:function(){return k}},{reg:/.*/,fix:function(){return a}}],n={},p=function(a,b,d){if(!arguments.length)return;a=a||((b.ownerDocument||b.document||b).parentWindow||c).event;this.originalEvent=a;this.isNative=d;this.isBean=!0;if(!a)return;var e=a.type,f=a.target||a.srcElement,g,h,i,j,k;this.target=f&&f.nodeType===3?f.parentNode:f;if(d){k=n[e];if(!k)for(g=0,h=m.length;g<h;g++)if(m[g].reg.test(e)){n[e]=k=m[g].fix;break}j=k(a,this,e);for(g=j.length;g--;)!((i=j[g])in this)&&i in a&&(this[i]=a[i])}};p.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1};p.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0};p.prototype.stop=function(){this.preventDefault();this.stopPropagation();this.stopped=!0};p.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation();this.isImmediatePropagationStopped=function(){return!0}};p.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()};p.prototype.clone=function(a){var b=new p(this,this.element,this.isNative);b.currentTarget=a;return b};return p}(),w=function(a,b){return!k&&!b&&(a===i||a===c)?j:a},x=function(){var a=function(a,b,c,d){var e=function(c,e){return b.apply(a,d?n.call(e,c?0:1).concat(d):e)},f=function(c,d){return b.__beanDel?b.__beanDel.ft(c.target,a):d},g=c?function(a){var b=f(a,this);if(c.apply(b,arguments)){a&&(a.currentTarget=b);return e(a,arguments)}}:function(a){b.__beanDel&&(a=a.clone(f(a)));return e(a,arguments)};g.__beanDel=b.__beanDel;return g},b=function(b,c,d,e,f,g,h){var i=u[c],j;c=="unload"&&(d=D(E,b,c,d,e));if(i){i.condition&&(d=a(b,d,i.condition,g));c=i.base||c}this.isNative=j=t[c]&&!!b[l];this.customType=!k&&!j&&c;this.element=b;this.type=c;this.original=e;this.namespaces=f;this.eventType=k||j?c:"propertychange";this.target=w(b,j);this[l]=!!this.target[l];this.root=h;this.handler=a(b,d,null,g)};b.prototype.inNamespaces=function(a){var b,c,d=0;if(!a)return!0;if(!this.namespaces)return!1;for(b=a.length;b--;)for(c=this.namespaces.length;c--;)a[b]==this.namespaces[c]&&d++;return a.length===d};b.prototype.matches=function(a,b,c){return this.element===a&&(!b||this.original===b)&&(!c||this.handler===c)};return b}(),y=function(){var a={},b=function(c,d,e,f,g,h){var i=g?"r":"$";if(!d||d=="*")for(var j in a)j.charAt(0)==i&&b(c,j.substr(1),e,f,g,h);else{var k=0,l,m=a[i+d],n=c=="*";if(!m)return;for(l=m.length;k<l;k++)if((n||m[k].matches(c,e,f))&&!h(m[k],m,k,d))return}},c=function(b,c,d,e){var f,g=a[(e?"r":"$")+c];if(g)for(f=g.length;f--;)if(!g[f].root&&g[f].matches(b,d,null))return!0;return!1},d=function(a,c,d,e){var f=[];b(a,c,d,null,e,function(a){return f.push(a)});return f},e=function(b){var c=!b.root&&!this.has(b.element,b.type,null,!1),d=(b.root?"r":"$")+b.type;(a[d]||(a[d]=[])).push(b);return c},f=function(c){b(c.element,c.type,null,c.handler,c.root,function(b,c,d){c.splice(d,1);b.removed=!0;c.length===0&&delete a[(b.root?"r":"$")+b.type];return!1})},g=function(){var b,c=[];for(b in a)b.charAt(0)=="$"&&(c=c.concat(a[b]));return c};return{has:c,get:d,put:e,del:f,entries:g}}(),z,A=function(a){arguments.length?z=a:z=i.querySelectorAll?function(a,b){return b.querySelectorAll(a)}:function(){throw new Error("Bean: No selector engine installed")}},B=function(a,b){if(!k&&b&&a&&a.propertyName!="_on"+b)return;var c=y.get(this,b||a.type,null,!1),d=c.length,e=0;a=new v(a,this,!0);b&&(a.type=b);for(;e<d&&!a.isImmediatePropagationStopped();e++)c[e].removed||c[e].handler.call(this,a)},C=k?function(a,b,c){a[c?g:h](b,B,!1)}:function(a,b,c,d){var e;if(c){y.put(e=new x(a,d||b,function(b){B.call(a,b,d)},B,null,null,!0));d&&a["_on"+d]==null&&(a["_on"+d]=0);e.target.attachEvent("on"+e.eventType,e.handler)}else{e=y.get(a,d||b,B,!0)[0];if(e){e.target.detachEvent("on"+e.eventType,e.handler);y.del(e)}}},D=function(a,b,c,d,e){return function(){d.apply(this,arguments);a(b,c,e)}},E=function(a,b,c,d){var e=b&&b.replace(f,""),g=y.get(a,e,null,!1),h={},i,j;for(i=0,j=g.length;i<j;i++)if((!c||g[i].original===c)&&g[i].inNamespaces(d)){y.del(g[i]);!h[g[i].eventType]&&g[i][l]&&(h[g[i].eventType]={t:g[i].eventType,c:g[i].type})}for(i in h)y.has(a,h[i].t,null,!1)||C(a,h[i].t,!1,h[i].c)},F=function(a,b){var c=function(b,c){var d,e=p(a)?z(a,c):a;for(;b&&b!==c;b=b.parentNode)for(d=e.length;d--;)if(e[d]===b)return b},d=function(a){var d=c(a.target,this);d&&b.apply(d,arguments)};d.__beanDel={ft:c,selector:a};return d},G=k?function(a,b,d){var e=i.createEvent(a?"HTMLEvents":"UIEvents");e[a?"initEvent":"initUIEvent"](b,!0,!0,c,1);d.dispatchEvent(e)}:function(a,b,c){c=w(c,a);a?c.fireEvent("on"+b,i.createEventObject()):c["_on"+b]++},H=function(a,b,c){var d=p(b),g,h,i,j;if(d&&b.indexOf(" ")>0){b=o(b);for(j=b.length;j--;)H(a,b[j],c);return a}h=d&&b.replace(f,"");h&&u[h]&&(h=u[h].base);if(!b||d){if(i=d&&b.replace(e,""))i=o(i,".");E(a,h,c,i)}else if(q(b))E(a,null,b);else for(g in b)b.hasOwnProperty(g)&&H(a,g,b[g]);return a},I=function(a,b,c,d){var g,h,i,j,k,p,r;if(c===undefined&&typeof b=="object"){for(h in b)b.hasOwnProperty(h)&&I.call(this,a,h,b[h]);return}if(!q(c)){g=d;k=n.call(arguments,4);d=F(c,g,z)}else{k=n.call(arguments,3);d=g=c}i=o(b);this===m&&(d=D(H,a,b,d,g));for(j=i.length;j--;){r=y.put(p=new x(a,i[j].replace(f,""),d,g,o(i[j].replace(e,""),"."),k,!1));p[l]&&r&&C(a,p.eventType,!0,p.customType)}return a},J=function(a,b,c,d){return I.apply(null,p(c)?[a,c,b,d].concat(arguments.length>3?n.call(arguments,5):[]):n.call(arguments))},K=function(){return I.apply(m,arguments)},L=function(a,b,c){var d=o(b),g,h,i,j,k;for(g=d.length;g--;){b=d[g].replace(f,"");if(j=d[g].replace(e,""))j=o(j,".");if(!j&&!c&&a[l])G(t[b],b,a);else{k=y.get(a,b,null,!1);c=[!1].concat(c);for(h=0,i=k.length;h<i;h++)k[h].inNamespaces(j)&&k[h].handler.apply(a,c)}}return a},M=function(a,b,c){var d=y.get(b,c,null,!1),e=d.length,f=0,g,h;for(;f<e;f++)if(d[f].original){g=[a,d[f].type];(h=d[f].handler.__beanDel)&&g.push(h.selector);g.push(d[f].original);I.apply(null,g)}return a},N={on:I,add:J,one:K,off:H,remove:H,clone:M,fire:L,setSelectorEngine:A,noConflict:function(){b[a]=d;return this}};if(c.attachEvent){var O=function(){var a,b=y.entries();for(a in b)b[a].type&&b[a].type!=="unload"&&H(b[a].element,b[a].type);c.detachEvent("onunload",O);c.CollectGarbage&&c.CollectGarbage()};c.attachEvent("onunload",O)}A();return N});provide("bean",a.exports);!function(a){var b=require("bean"),c=function(a,c,d){var e=c?[c]:[];return function(){for(var d=0,f=this.length;d<f;d++){!arguments.length&&a=="on"&&c&&(a="fire");b[a].apply(this,[this[d]].concat(e,Array.prototype.slice.call(arguments,0)))}return this}},d=c("add"),e=c("on"),f=c("one"),g=c("off"),h=c("fire"),i=c("clone"),j=function(a,c,d){for(d=this.length;d--;){b.on.call(this,this[d],"mouseenter",a);b.on.call(this,this[d],"mouseleave",c)}return this},k={on:e,addListener:e,bind:e,listen:e,delegate:d,one:f,off:g,unbind:g,unlisten:g,removeListener:g,undelegate:g,emit:h,trigger:h,cloneEvents:i,hover:j},l="blur change click dblclick error focus focusin focusout keydown keypress keyup load mousedown mouseenter mouseleave mouseout mouseover mouseup mousemove resize scroll select submit unload".split(" ");for(var m=l.length;m--;)k[l[m]]=c("on",l[m]);b.setSelectorEngine(a);a.ender(k,!0)}(ender)})();(function(){var a={exports:{}},b=a.exports;
+/*!
+ * @preserve Qwery - A Blazing Fast query selector engine
+ * https://github.com/ded/qwery
+ * copyright Dustin Diaz 2012
* MIT License
- * special thanks to:
- * dean edwards: http://dean.edwards.name/
- * dperini: https://github.com/dperini/nwevents
- * the entire mootools team: github.com/mootools/mootools-core
*/
-;!function(b,c,d){typeof a!="undefined"?a.exports=d(b,c):typeof define=="function"&&typeof define.amd=="object"?define(d):c[b]=d(b,c)}("bean",this,function(a,b){var c=window,d=b[a],e=/over|out/,f=/[^\.]*(?=\..*)\.|.*/,g=/\..*/,h="addEventListener",i="attachEvent",j="removeEventListener",k="detachEvent",l="ownerDocument",m="target",n="querySelectorAll",o=document||{},p=o.documentElement||{},q=p[h],r=q?h:i,s=Array.prototype.slice,t=/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,u=/mouse.*(wheel|scroll)/i,v=/^text/i,w=/^touch|^gesture/i,x={},y=function(a,b,c){for(c=0;c<b.length;c++)a[b[c]]=1;return a}({},("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll "+(q?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":"")).split(" ")),z=function(){function c(a){var c=a.relatedTarget;return c?c!==this&&c.prefix!=="xul"&&!/document/.test(this.toString())&&!b(c,this):c===null}var a="compareDocumentPosition",b=a in p?function(b,c){return c[a]&&(c[a](b)&16)===16}:"contains"in p?function(a,b){b=b.nodeType===9||b===window?p:b;return b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0};return{mouseenter:{base:"mouseover",condition:c},mouseleave:{base:"mouseout",condition:c},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),A=function(){var a="altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which".split(" "),b=a.concat("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" ")),c=b.concat("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis".split(" ")),d=a.concat("char charCode key keyCode keyIdentifier keyLocation".split(" ")),f=a.concat(["data"]),g=a.concat("touches targetTouches changedTouches scale rotation".split(" ")),h=a.concat(["data","origin","source"]),i="preventDefault",j=function(a){return function(){a[i]?a[i]():a.returnValue=!1}},k="stopPropagation",l=function(a){return function(){a[k]?a[k]():a.cancelBubble=!0}},n=function(a){return function(){a[i]();a[k]();a.stopped=!0}},q=function(a,b,c){var d,e;for(d=c.length;d--;){e=c[d];!(e in b)&&e in a&&(b[e]=a[e])}};return function(r,s){var x={originalEvent:r,isNative:s};if(!r)return x;var y,z=r.type,A=r[m]||r.srcElement;x[i]=j(r);x[k]=l(r);x.stop=n(x);x[m]=A&&A.nodeType===3?A.parentNode:A;if(s){if(z.indexOf("key")!==-1){y=d;x.keyCode=r.keyCode||r.which}else if(t.test(z)){y=b;x.rightClick=r.which===3||r.button===2;x.pos={x:0,y:0};if(r.pageX||r.pageY){x.clientX=r.pageX;x.clientY=r.pageY}else if(r.clientX||r.clientY){x.clientX=r.clientX+o.body.scrollLeft+p.scrollLeft;x.clientY=r.clientY+o.body.scrollTop+p.scrollTop}e.test(z)&&(x.relatedTarget=r.relatedTarget||r[(z==="mouseover"?"from":"to")+"Element"])}else w.test(z)?y=g:u.test(z)?y=c:v.test(z)?y=f:z==="message"&&(y=h);q(r,x,y||a)}return x}}(),B=function(a,b){return!q&&!b&&(a===o||a===c)?p:a},C=function(){function a(a,b,c,d,e){var f=this.isNative=y[b]&&a[r];this.element=a;this.type=b;this.handler=c;this.original=d;this.namespaces=e;this.custom=z[b];this.eventType=q||f?b:"propertychange";this.customType=!q&&!f&&b;this[m]=B(a,f);this[r]=this[m][r]}a.prototype={inNamespaces:function(a){var b,c;if(!a)return!0;if(!this.namespaces)return!1;for(b=a.length;b--;)for(c=this.namespaces.length;c--;)if(a[b]===this.namespaces[c])return!0;return!1},matches:function(a,b,c){return this.element===a&&(!b||this.original===b)&&(!c||this.handler===c)}};return a}(),D=function(){var a={},b=function(c,d,e,f,g){if(!d||d==="*")for(var h in a)h.charAt(0)==="$"&&b(c,h.substr(1),e,f,g);else{var i=0,j,k=a["$"+d],l=c==="*";if(!k)return;for(j=k.length;i<j;i++)if(l||k[i].matches(c,e,f))if(!g(k[i],k,i,d))return}},c=function(b,c,d){var e,f=a["$"+c];if(f)for(e=f.length;e--;)if(f[e].matches(b,d,null))return!0;return!1},d=function(a,c,d){var e=[];b(a,c,d,null,function(a){return e.push(a)});return e},e=function(b){(a["$"+b.type]||(a["$"+b.type]=[])).push(b);return b},f=function(c){b(c.element,c.type,null,c.handler,function(b,c,d){c.splice(d,1);c.length===0&&delete a["$"+b.type];return!1})},g=function(){var b,c=[];for(b in a)b.charAt(0)==="$"&&(c=c.concat(a[b]));return c};return{has:c,get:d,put:e,del:f,entries:g}}(),E=o[n]?function(a,b){return b[n](a)}:function(){throw new Error("Bean: No selector engine installed")},F=function(a){E=a},G=q?function(a,b,c,d){a[d?h:j](b,c,!1)}:function(a,b,c,d,e){e&&d&&a["_on"+e]===null&&(a["_on"+e]=0);a[d?i:k]("on"+b,c)},H=function(a,b,d){var e=b.__beanDel,f=function(f){f=A(f||((this[l]||this.document||this).parentWindow||c).event,!0);e&&(f.currentTarget=e.ft(f[m],a));return b.apply(a,[f].concat(d))};f.__beanDel=e;return f},I=function(a,b,d,e,f,g){var h=b.__beanDel,i=function(i){var j=h?h.ft(i[m],a):this;if(e?e.apply(j,arguments):q?!0:i&&i.propertyName==="_on"+d||!i){if(i){i=A(i||((this[l]||this.document||this).parentWindow||c).event,g);i.currentTarget=j}b.apply(a,i&&(!f||f.length===0)?arguments:s.call(arguments,i?0:1).concat(f))}};i.__beanDel=h;return i},J=function(a,b,c,d,e){return function(){a(b,c,e);d.apply(this,arguments)}},K=function(a,b,c,d){var e,f,h,i=b&&b.replace(g,""),j=D.get(a,i,c);for(e=0,f=j.length;e<f;e++)if(j[e].inNamespaces(d)){(h=j[e])[r]&&G(h[m],h.eventType,h.handler,!1,h.type);D.del(h)}},L=function(a,b,c,d,e){var h,i=b.replace(g,""),j=b.replace(f,"").split(".");if(D.has(a,i,c))return a;i==="unload"&&(c=J(K,a,i,c,d));if(z[i]){z[i].condition&&(c=I(a,c,i,z[i].condition,e,!0));i=z[i].base||i}h=D.put(new C(a,i,c,d,j[0]&&j));h.handler=h.isNative?H(a,h.handler,e):I(a,h.handler,i,!1,e,!1);h[r]&&G(h[m],h.eventType,h.handler,!0,h.customType)},M=function(a,b,c){var d=function(b,d){var e,f=typeof a=="string"?c(a,d):a;for(;b&&b!==d;b=b.parentNode)for(e=f.length;e--;)if(f[e]===b)return b},e=function(a){var c=d(a[m],this);c&&b.apply(c,arguments)};e.__beanDel={ft:d,selector:a,$:c};return e},N=function(a,b,c){var d,e,h,i,j=K,k=b&&typeof b=="string";if(k&&b.indexOf(" ")>0){b=b.split(" ");for(i=b.length;i--;)N(a,b[i],c);return a}e=k&&b.replace(g,"");e&&z[e]&&(e=z[e].type);if(!b||k){if(h=k&&b.replace(f,""))h=h.split(".");j(a,e,c,h)}else if(typeof b=="function")j(a,null,b);else for(d in b)b.hasOwnProperty(d)&&N(a,d,b[d]);return a},O=function(a,b,c,d,e){var f,g,h,i,j=c,k=c&&typeof c=="string";if(b&&!c&&typeof b=="object")for(f in b)b.hasOwnProperty(f)&&O.apply(this,[a,f,b[f]]);else{i=arguments.length>3?s.call(arguments,3):[];g=(k?c:b).split(" ");k&&(c=M(b,j=d,e||E))&&(i=s.call(i,1));this===x&&(c=J(N,a,b,c,j));for(h=g.length;h--;)L(a,g[h],c,j,i)}return a},P=function(){return O.apply(x,arguments)},Q=q?function(a,b,d){var e=o.createEvent(a?"HTMLEvents":"UIEvents");e[a?"initEvent":"initUIEvent"](b,!0,!0,c,1);d.dispatchEvent(e)}:function(a,b,c){c=B(c,a);a?c.fireEvent("on"+b,o.createEventObject()):c["_on"+b]++},R=function(a,b,c){var d,e,h,i,j,k=b.split(" ");for(d=k.length;d--;){b=k[d].replace(g,"");if(i=k[d].replace(f,""))i=i.split(".");if(!i&&!c&&a[r])Q(y[b],b,a);else{j=D.get(a,b);c=[!1].concat(c);for(e=0,h=j.length;e<h;e++)j[e].inNamespaces(i)&&j[e].handler.apply(a,c)}}return a},S=function(a,b,c){var d=0,e=D.get(b,c),f=e.length,g,h;for(;d<f;d++)if(e[d].original){h=e[d].handler.__beanDel;h?g=[a,h.selector,e[d].type,e[d].original,h.$]:g=[a,e[d].type,e[d].original];O.apply(null,g)}return a},T={add:O,one:P,remove:N,clone:S,fire:R,setSelectorEngine:F,noConflict:function(){b[a]=d;return this}};if(c[i]){var U=function(){var a,b=D.entries();for(a in b)b[a].type&&b[a].type!=="unload"&&N(b[a].element,b[a].type);c[k]("onunload",U);c.CollectGarbage&&c.CollectGarbage()};c[i]("onunload",U)}return T});provide("bean",a.exports);!function(a){var b=require("bean"),c=function(a,c,d){var e=c?[c]:[];return function(){for(var d=0,f=this.length;d<f;d++){!arguments.length&&a=="add"&&c&&(a="fire");b[a].apply(this,[this[d]].concat(e,Array.prototype.slice.call(arguments,0)))}return this}},d=c("add"),e=c("remove"),f=c("fire"),g={on:d,addListener:d,bind:d,listen:d,delegate:d,one:c("one"),off:e,unbind:e,unlisten:e,removeListener:e,undelegate:e,emit:f,trigger:f,cloneEvents:c("clone"),hover:function(a,c,d){for(d=this.length;d--;){b.add.call(this,this[d],"mouseenter",a);b.add.call(this,this[d],"mouseleave",c)}return this}},h="blur change click dblclick error focus focusin focusout keydown keypress keyup load mousedown mouseenter mouseleave mouseout mouseover mouseup mousemove resize scroll select submit unload".split(" ");for(var i=h.length;i--;)g[h[i]]=c("add",h[i]);b.setSelectorEngine(a);a.ender(g,!0)}(ender)})();(function(){var a={exports:{}},b=a.exports;
+(function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=d():typeof c["define"]=="function"&&c.define.amd?define(d):c[b]=d()})("qwery",this,function(){function C(){this.c={}}function H(a){return D.g(a)||D.s(a,"(^|\\s+)"+a+"(\\s+|$)",1)}function I(a,b){var c=0,d=a.length;for(;c<d;c++)b(a[c])}function J(a){for(var b=[],c=0,d=a.length;c<d;++c)V(a[c])?b=b.concat(a[c]):b[b.length]=a[c];return b}function K(a){var b=0,c=a.length,d=[];for(;b<c;b++)d[b]=a[b];return d}function L(a){while(a=a.previousSibling)if(a[h]==1)break;return a}function M(a){return a.match(A)}function N(a,b,c,d,e,f,i,l,m,n,o){var p,q,r,s,t;if(this[h]!==1)return!1;if(b&&b!=="*"&&this[g]&&this[g].toLowerCase()!==b)return!1;if(c&&(q=c.match(j))&&q[1]!==this.id)return!1;if(c&&(t=c.match(k)))for(p=t.length;p--;)if(!H(t[p].slice(1)).test(this.className))return!1;if(m&&Y.pseudos[m]&&!Y.pseudos[m](this,o))return!1;if(d&&!i){s=this.attributes;for(r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&(s[r].name||r)==e)return this}return d&&!P(f,_(this,e)||"",i)?!1:this}function O(a){return E.g(a)||E.s(a,a.replace(t,"\\$1"))}function P(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(F.g("^="+c)||F.s("^="+c,"^"+O(c),1));case"$=":return b.match(F.g("$="+c)||F.s("$="+c,O(c)+"$",1));case"*=":return b.match(F.g(c)||F.s(c,O(c),1));case"~=":return b.match(F.g("~="+c)||F.s("~="+c,"(?:^|\\s+)"+O(c)+"(?:\\s+|$)",1));case"|=":return b.match(F.g("|="+c)||F.s("|="+c,"^"+O(c)+"(-|$)",1))}return 0}function Q(a,b){var c=[],e=[],f,i,j,k,m,n,o,p,q=b,r=G.g(a)||G.s(a,a.split(z)),s=a.match(y);if(!r.length)return c;k=(r=r.slice(0)).pop();r.length&&(j=r[r.length-1].match(l))&&(q=X(b,j[1]));if(!q)return c;o=M(k);n=q!==b&&q[h]!==9&&s&&/^[+~]$/.test(s[s.length-1])?function(a){while(q=q.nextSibling)q[h]==1&&(o[1]?o[1]==q[g].toLowerCase():1)&&(a[a.length]=q);return a}([]):q[d](o[1]||"*");for(f=0,i=n.length;f<i;f++)if(p=N.apply(n[f],o))c[c.length]=p;if(!r.length)return c;I(c,function(a){S(a,r,s)&&(e[e.length]=a)});return e}function R(a,b,c){if(T(b))return a==b;if(V(b))return!!~J(b).indexOf(a);var d=b.split(","),e,f;while(b=d.pop()){e=G.g(b)||G.s(b,b.split(z));f=b.match(y);e=e.slice(0);if(N.apply(a,M(e.pop()))&&(!e.length||S(a,e,f,c)))return!0}return!1}function S(a,b,c,d){function f(a,d,g){while(g=B[c[d]](g,a))if(T(g)&&N.apply(g,M(b[d]))){if(!d)return g;if(e=f(g,d-1,g))return e}}var e;return(e=f(a,b.length-1,a))&&(!d||$(e,d))}function T(a,b){return a&&typeof a=="object"&&(b=a[h])&&(b==1||b==9)}function U(a){var b=[],c,d;a:for(c=0;c<a.length;++c){for(d=0;d<b.length;++d)if(b[d]==a[c])continue a;b[b.length]=a[c]}return b}function V(a){return typeof a=="object"&&isFinite(a.length)}function W(b){return b?typeof b=="string"?Y(b)[0]:!b[h]&&V(b)?b[0]:b:a}function X(a,b,c){return a[h]===9?a.getElementById(b):a.ownerDocument&&((c=a.ownerDocument.getElementById(b))&&$(c,a)&&c||!$(a,a.ownerDocument)&&i('[id="'+b+'"]',a)[0])}function Y(a,b){var e,f,g=W(b);if(!g||!a)return[];if(a===window||T(a))return!b||a!==window&&T(g)&&$(a,g)?[a]:[];if(a&&V(a))return J(a);if(e=a.match(x)){if(e[1])return(f=X(g,e[1]))?[f]:[];if(e[2])return K(g[d](e[2]));if(ab&&e[3])return K(g[c](e[3]))}return i(a,g)}function Z(a,b){return function(c){var d,e;if(p.test(c)){if(a[h]!==9){(e=d=a.getAttribute("id"))||a.setAttribute("id",e="__qwerymeupscotty");c='[id="'+e+'"]'+c;b(a.parentNode||a,c,!0);d||a.removeAttribute("id")}return}c.length&&b(a,c,!1)}}var a=document,b=a.documentElement,c="getElementsByClassName",d="getElementsByTagName",e="querySelectorAll",f="useNativeQSA",g="tagName",h="nodeType",i,j=/#([\w\-]+)/,k=/\.[\w\-]+/g,l=/^#([\w\-]+)$/,m=/^\.([\w\-]+)$/,n=/^([\w\-]+)$/,o=/^([\w]+)?\.([\w\-]+)$/,p=/(^|,)\s*[>~+]/,q=/^\s+|\s*([,\s\+\~>]|$)\s*/g,r=/[\s\>\+\~]/,s=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,t=/([.*+?\^=!:${}()|\[\]\/\\])/g,u=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,v=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,w=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,x=new RegExp(l.source+"|"+n.source+"|"+m.source),y=new RegExp("("+r.source+")"+s.source,"g"),z=new RegExp(r.source+s.source),A=new RegExp(u.source+"("+v.source+")?"+"("+w.source+")?"),B={" ":function(a){return a&&a!==b&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){return a?(c=L(a))&&(d=L(b))&&c==d&&c:!1}};C.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b,c){b=c?new RegExp(b):b;return this.c[a]=b}};var D=new C,E=new C,F=new C,G=new C,$="compareDocumentPosition"in b?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in b?function(a,c){c=c[h]===9||c==window?b:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},_=function(){var b=a.createElement("p");return(b.innerHTML='<a href="#x">x</a>')&&b.firstChild.getAttribute("href")!="#x"?function(a,b){return b==="class"?a.className:b==="href"||b==="src"?a.getAttribute(b,2):a.getAttribute(b)}:function(a,b){return a.getAttribute(b)}}(),ab=!!a[c],bb=a.querySelector&&a[e],cb=function(a,b){var c=[],d,f;try{if(b[h]===9||!p.test(a))return K(b[e](a));I(d=a.split(","),Z(b,function(a,b){f=a[e](b);f.length==1?c[c.length]=f.item(0):f.length&&(c=c.concat(K(f)))}));return d.length>1&&c.length>1?U(c):c}catch(g){}return db(a,b)},db=function(a,b){var c=[],e,f,g,i,j,k;a=a.replace(q,"$1");if(f=a.match(o)){j=H(f[2]);e=b[d](f[1]||"*");for(g=0,i=e.length;g<i;g++)j.test(e[g].className)&&(c[c.length]=e[g]);return c}I(k=a.split(","),Z(b,function(a,d,e){j=Q(d,a);for(g=0,i=j.length;g<i;g++)if(a[h]===9||e||$(j[g],b))c[c.length]=j[g]}));return k.length>1&&c.length>1?U(c):c},eb=function(a){typeof a[f]!="undefined"&&(i=a[f]?bb?cb:db:db)};eb({useNativeQSA:!0});Y.configure=eb;Y.uniq=U;Y.is=R;Y.pseudos={};return Y});provide("qwery",a.exports);(function(a){var b=function(){var a;try{a=require("qwery")}catch(b){a=require("qwery-mobile")}finally{return a}}();a.pseudos=b.pseudos;a._select=function(c,d){return(a._select=function(){var c;if(typeof a.create=="function")return function(c,d){return/^\s*</.test(c)?a.create(c,d):b(c,d)};try{c=require("bonzo");return function(a,d){return/^\s*</.test(a)?c.create(a,d):b(a,d)}}catch(d){}return b}())(c,d)};a.ender({find:function(c){var d=[],e,f,g,h,i;for(e=0,f=this.length;e<f;e++){i=b(c,this[e]);for(g=0,h=i.length;g<h;g++)d.push(i[g])}return a(b.uniq(d))},and:function(b){var c=a(b);for(var d=this.length,e=0,f=this.length+c.length;d<f;d++,e++)this[d]=c[e];this.length+=c.length;return this},is:function(a,c){var d,e;for(d=0,e=this.length;d<e;d++)if(b.is(this[d],a,c))return!0;return!1}},!0)})(ender)})();(function(){var a={exports:{}},b=a.exports;
/*!
* Bonzo: DOM Utility (c) Dustin Diaz 2012
* https://github.com/ded/bonzo
* License MIT
*/
-(function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=c():typeof d["define"]!="undefined"&&d["define"]=="function"&&d.define.amd?define(b,c):d[b]=c()})("bonzo",function(){function G(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function H(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function I(a,b,c){for(var d=0,e=a.length;d<e;d++)if(O(a[d])){I(a[d].childNodes,b,c);b.call(c||a[d],a[d],d,a)}return a}function J(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function K(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function L(a){a[y]("data-node-uid")||a[x]("data-node-uid",++t);var b=a[y]("data-node-uid");return s[b]||(s[b]={})}function M(a){var b=a[y]("data-node-uid");b&&delete s[b]}function N(a,b){try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function O(a){return a&&a.nodeName&&a.nodeType==1}function P(a,b,c,d,e){for(d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function Q(a){a=="transform"&&(a=A.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=A.transform+"Origin")||a=="float"&&(a=A.cssFloat);return a?J(a):null}function S(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;H(W(i),function(a){H(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0),c,d;if(g.$&&g.cloneEvents){g.$(a).cloneEvents(b);c=g.$(a).find("*");d=g.$(b).find("*");for(var e=0;e<d.length;e++)g.$(c[e]).cloneEvents(d[e])}return a}():b;c(a,f);h[d]=f;d++})},this);H(h,function(a,b){g[b]=a});g.length=d;return g}function T(a,b,c){var d=$(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];if(e=="static"){d.css("position",g);e=g}isNaN(i[0])&&(i[0]=h?0:a.offsetLeft);isNaN(i[1])&&(i[1]=h?0:a.offsetTop);b!=null&&(a.style.left=b-f.left+i[0]+w);c!=null&&(a.style.top=c-f.top+i[1]+w)}function U(a,b){return typeof b=="function"?b(a):b}function V(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a];this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function W(a){return typeof a=="string"?$.create(a):O(a)?[a]:a}function X(a,c,d){var e=this[0];if(!e)return this;if(a==null&&c==null)return(Y(e)?Z():{x:e.scrollLeft,y:e.scrollTop})[d];if(Y(e))b.scrollTo(a,c);else{a!=null&&(e.scrollLeft=a);c!=null&&(e.scrollTop=c)}return this}function Y(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function Z(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function $(a,b){return new V(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^(checked|value|selected)$/i,h=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,i=["<table>","</table>",1],j=["<table><tbody><tr>","</tr></tbody></table>",3],k=["<select>","</select>",1],l=["_","",0,1],m={thead:i,tbody:i,tfoot:i,colgroup:i,caption:i,tr:["<table><tbody>","</tbody></table>",2],th:j,td:j,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:k,optgroup:k,script:l,style:l,link:l,param:l,base:l},n=/^(checked|selected)$/,o=/msie/i.test(navigator.userAgent),p,q,r,s={},t=0,u=/^-?[\d\.]+$/,v=/^data-(.+)$/,w="px",x="setAttribute",y="getAttribute",z="getElementsByTagName",A=function(){var a=c.createElement("p");a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:a[z]("a")[0][y]("href")!="#x",autoTbody:a[z]("tbody").length!==0,computedStyle:c.defaultView&&c.defaultView.getComputedStyle,cssFloat:a[z]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a}}(),B=/(^\s*|\s*$)/g,C=/\s+/,D=String.prototype.toString,E={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},F=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(B,"")},R=A.computedStyle?function(a,b){var d=null,e=c.defaultView.getComputedStyle(a,"");e&&(d=e[b]);return a.style[b]||d}:o&&d.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};if(A.classList){p=function(a,b){return a.classList.contains(b)};q=function(a,b){a.classList.add(b)};r=function(a,b){a.classList.remove(b)}}else{p=function(a,b){return G(b).test(a.className)};q=function(a,b){a.className=F(a.className+" "+b)};r=function(a,b){a.className=F(a.className.replace(G(b)," "))}}V.prototype={get:function(a){return this[a]||null},each:function(a,b){return H(this,a,b)},deepEach:function(a,b){return I(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++){d=a.call(this,this[e],e);b?b(d)&&c.push(d):c.push(d)}return c},html:function(a,b){function e(b){H(W(a),function(a){b.appendChild(a)})}var c=b?d.textContent===undefined?"innerText":"textContent":"innerHTML";return typeof a!="undefined"?this.empty().each(function(d){!b&&h.test(d.tagName)?e(d):function(){try{d[c]=a}catch(b){e(d)}}()}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},append:function(a){return this.each(function(b){H(W(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;H(W(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return S.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return S.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},before:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return S.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return S.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){this.deepEach(M);return this.each(function(b){b.parentNode.replaceChild($.create(a)[0],b)})},addClass:function(a){a=D.call(a).split(C);return this.each(function(b){H(a,function(a){a&&!p(b,U(b,a))&&q(b,U(b,a))})})},removeClass:function(a){a=D.call(a).split(C);return this.each(function(b){H(a,function(a){a&&p(b,U(b,a))&&r(b,U(b,a))})})},hasClass:function(a){a=D.call(a).split(C);return P(this,function(b){return P(a,function(a){return a&&p(b,a)})})},toggleClass:function(a,b){a=D.call(a).split(C);return this.each(function(c){H(a,function(a){a&&(typeof b!="undefined"?b?q(c,a):r(c,a):p(c,a)?r(c,a):q(c,a))})})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""});a&&a();return this},first:function(){return $(this.length?this[0]:[])},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(e)},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})},focus:function(){this.length&&this[0].focus();return this},blur:function(){return this.each(function(a){a.blur()})},css:function(a,d,e){function g(a,b,c){for(var d in f)if(f.hasOwnProperty(d)){c=f[d];(b=Q(d))&&u.test(c)&&!(b in E)&&(c+=w);a.style[b]=U(a,c)}}if(d===undefined&&typeof a=="string"){d=this[0];if(!d)return null;if(d===c||d===b){e=d===c?$.doc():$.viewport();return a=="width"?e.width:a=="height"?e.height:""}return(a=Q(a))?R(d,a):null}var f=a;if(typeof a=="string"){f={};f[a]=d}if(o&&f.opacity){f.filter="alpha(opacity="+f.opacity*100+")";f.zoom=a.zoom||1;delete f.opacity}return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){T(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent){f+=c.offsetTop;g+=c.offsetLeft;if(c!=document.body){f-=c.scrollTop;g-=c.scrollLeft}}return{top:f,left:g,height:e,width:d}},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""};b.first().css({position:"absolute",visibility:"hidden",display:"block"});return c}(this):null,c=a.offsetWidth,d=a.offsetHeight;b&&this.first().css(b);return{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?g.test(a)?n.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!A.hrefExtended?c[y](a):c[y](a,2):null:this.each(function(c){g.test(a)?c[a]=U(c,b):c[x](a,U(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){n.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e,f;if(typeof b=="undefined"){if(!c)return null;e=L(c);if(typeof a=="undefined"){H(c.attributes,function(a){(f=(""+a.name).match(v))&&(e[J(f[1])]=N(a.value))});return e}typeof e[a]=="undefined"&&(e[a]=N(this.attr("data-"+K(a))));return e[a]}return this.each(function(c){L(c)[a]=b})},remove:function(){this.deepEach(M);return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){I(a.childNodes,M);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return X.call(this,null,a,"y")},scrollLeft:function(a){return X.call(this,a,null,"x")}};$.setQueryEngine=function(a){f=a;delete $.setQueryEngine};$.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||V.prototype)[c]=a[c])};$.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),d=c.createElement("div"),f=[],g=b?m[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=g&&g[3],j=e,k=A.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);d.innerHTML=g?g[0]+a+g[1]:a;while(h--)d=d.firstChild;i&&d&&d.nodeType!==1&&(d=d.nextSibling);do(!b||d.nodeType==1)&&(!k||d.tagName.toLowerCase()!="tbody")&&f.push(d);while(d=d.nextSibling);H(f,function(a){a[j]&&a[j].removeChild(a)});return f}():O(a)?[a.cloneNode(!0)]:[]};$.doc=function(){var a=$.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}};$.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};$.viewport=function(){return{width:o?d.clientWidth:self.innerWidth,height:o?d.clientHeight:self.innerHeight}};$.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};return $},this);provide("bonzo",a.exports);(function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a);a.ender(b);a.ender(b(),!0);a.ender({create:function(c){return a(b.create(c))}});a.id=function(b){return a([document.getElementById(b)])};a.ender({parents:function(b,e){if(!this.length)return this;var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f,g=[];for(c=0,e=this.length;c<e;c++){if(!(f=b.firstChild(this[c])))continue;g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f)}return a(d(g))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)})(ender)})();(function(){var a={exports:{}},b=a.exports;
-/*!
- * domready (c) Dustin Diaz 2012 - License MIT
- */
-;!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("domready",function(a){function m(a){l=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k="readyState",l=/^loade|c/.test(e[k]);e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d);m()},d);g&&e.attachEvent(j,c=function(){if(/^c/.test(e[k])){e.detachEvent(j,c);m()}});return a=g?function(c){self!=top?l?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){l?a():b.push(a)}});provide("domready",a.exports);!function(a){var b=require("domready");a.ender({domReady:b});a.ender({ready:function(a){b(a);return this}},!0)}(ender)})();(function(){var a={exports:{}},b=a.exports;
-/*!
- * Qwery - A Blazing Fast query selector engine
- * https://github.com/ded/qwery
- * copyright Dustin Diaz & Jacob Thornton 2011
- * MIT License
- */
-(function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=c():typeof d["define"]!="undefined"&&d["define"]=="function"&&d.define.amd?define(b,c):d[b]=c()})("qwery",function(){function C(){this.c={}}function H(a){return D.g(a)||D.s(a,"(^|\\s+)"+a+"(\\s+|$)",1)}function I(a,b){var c=0,d=a.length;for(;c<d;c++)b(a[c])}function J(a){for(var b=[],c=0,d=a.length;c<d;++c)V(a[c])?b=b.concat(a[c]):b[b.length]=a[c];return b}function K(a){var b=0,c=a.length,d=[];for(;b<c;b++)d[b]=a[b];return d}function L(a){while(a=a.previousSibling)if(a[h]==1)break;return a}function M(a){return a.match(A)}function N(a,b,c,d,e,f,i,l,m,n,o){var p,q,r,s,t;if(this[h]!==1)return!1;if(b&&b!=="*"&&this[g]&&this[g].toLowerCase()!==b)return!1;if(c&&(q=c.match(j))&&q[1]!==this.id)return!1;if(c&&(t=c.match(k)))for(p=t.length;p--;)if(!H(t[p].slice(1)).test(this.className))return!1;if(m&&Y.pseudos[m]&&!Y.pseudos[m](this,o))return!1;if(d&&!i){s=this.attributes;for(r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&(s[r].name||r)==e)return this}return d&&!P(f,_(this,e)||"",i)?!1:this}function O(a){return E.g(a)||E.s(a,a.replace(t,"\\$1"))}function P(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(F.g("^="+c)||F.s("^="+c,"^"+O(c),1));case"$=":return b.match(F.g("$="+c)||F.s("$="+c,O(c)+"$",1));case"*=":return b.match(F.g(c)||F.s(c,O(c),1));case"~=":return b.match(F.g("~="+c)||F.s("~="+c,"(?:^|\\s+)"+O(c)+"(?:\\s+|$)",1));case"|=":return b.match(F.g("|="+c)||F.s("|="+c,"^"+O(c)+"(-|$)",1))}return 0}function Q(a,b){var c=[],e=[],f,i,j,k,m,n,o,p,q=b,r=G.g(a)||G.s(a,a.split(z)),s=a.match(y);if(!r.length)return c;k=(r=r.slice(0)).pop();r.length&&(j=r[r.length-1].match(l))&&(q=X(b,j[1]));if(!q)return c;o=M(k);n=q!==b&&q[h]!==9&&s&&/^[+~]$/.test(s[s.length-1])?function(a){while(q=q.nextSibling)q[h]==1&&(o[1]?o[1]==q[g].toLowerCase():1)&&(a[a.length]=q);return a}([]):q[d](o[1]||"*");for(f=0,i=n.length;f<i;f++)if(p=N.apply(n[f],o))c[c.length]=p;if(!r.length)return c;I(c,function(a){S(a,r,s)&&(e[e.length]=a)});return e}function R(a,b,c){if(T(b))return a==b;if(V(b))return!!~J(b).indexOf(a);var d=b.split(","),e,f;while(b=d.pop()){e=G.g(b)||G.s(b,b.split(z));f=b.match(y);e=e.slice(0);if(N.apply(a,M(e.pop()))&&(!e.length||S(a,e,f,c)))return!0}return!1}function S(a,b,c,d){function f(a,d,g){while(g=B[c[d]](g,a))if(T(g)&&N.apply(g,M(b[d]))){if(!d)return g;if(e=f(g,d-1,g))return e}}var e;return(e=f(a,b.length-1,a))&&(!d||$(e,d))}function T(a,b){return a&&typeof a=="object"&&(b=a[h])&&(b==1||b==9)}function U(a){var b=[],c,d;a:for(c=0;c<a.length;++c){for(d=0;d<b.length;++d)if(b[d]==a[c])continue a;b[b.length]=a[c]}return b}function V(a){return typeof a=="object"&&isFinite(a.length)}function W(b){return b?typeof b=="string"?Y(b)[0]:!b[h]&&V(b)?b[0]:b:a}function X(a,b,c){return a[h]===9?a.getElementById(b):a.ownerDocument&&((c=a.ownerDocument.getElementById(b))&&$(c,a)&&c||!$(a,a.ownerDocument)&&i('[id="'+b+'"]',a)[0])}function Y(a,b){var e,f,g=W(b);if(!g||!a)return[];if(a===window||T(a))return!b||a!==window&&T(g)&&$(a,g)?[a]:[];if(a&&V(a))return J(a);if(e=a.match(x)){if(e[1])return(f=X(g,e[1]))?[f]:[];if(e[2])return K(g[d](e[2]));if(ab&&e[3])return K(g[c](e[3]))}return i(a,g)}function Z(a,b){return function(c){var d,e;if(p.test(c)){if(a[h]!==9){(e=d=a.getAttribute("id"))||a.setAttribute("id",e="__qwerymeupscotty");c='[id="'+e+'"]'+c;b(a.parentNode||a,c,!0);d||a.removeAttribute("id")}return}c.length&&b(a,c,!1)}}var a=document,b=a.documentElement,c="getElementsByClassName",d="getElementsByTagName",e="querySelectorAll",f="useNativeQSA",g="tagName",h="nodeType",i,j=/#([\w\-]+)/,k=/\.[\w\-]+/g,l=/^#([\w\-]+)$/,m=/^\.([\w\-]+)$/,n=/^([\w\-]+)$/,o=/^([\w]+)?\.([\w\-]+)$/,p=/(^|,)\s*[>~+]/,q=/^\s+|\s*([,\s\+\~>]|$)\s*/g,r=/[\s\>\+\~]/,s=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,t=/([.*+?\^=!:${}()|\[\]\/\\])/g,u=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,v=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,w=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,x=new RegExp(l.source+"|"+n.source+"|"+m.source),y=new RegExp("("+r.source+")"+s.source,"g"),z=new RegExp(r.source+s.source),A=new RegExp(u.source+"("+v.source+")?"+"("+w.source+")?"),B={" ":function(a){return a&&a!==b&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){return a?(c=L(a))&&(d=L(b))&&c==d&&c:!1}};C.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b,c){b=c?new RegExp(b):b;return this.c[a]=b}};var D=new C,E=new C,F=new C,G=new C,$="compareDocumentPosition"in b?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in b?function(a,c){c=c[h]===9||c==window?b:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},_=function(){var b=a.createElement("p");return(b.innerHTML='<a href="#x">x</a>')&&b.firstChild.getAttribute("href")!="#x"?function(a,b){return b==="class"?a.className:b==="href"||b==="src"?a.getAttribute(b,2):a.getAttribute(b)}:function(a,b){return a.getAttribute(b)}}(),ab=!!a[c],bb=a.querySelector&&a[e],cb=function(a,b){var c=[],d,f;try{if(b[h]===9||!p.test(a))return K(b[e](a));I(d=a.split(","),Z(b,function(a,b){f=a[e](b);f.length==1?c[c.length]=f.item(0):f.length&&(c=c.concat(K(f)))}));return d.length>1&&c.length>1?U(c):c}catch(g){}return db(a,b)},db=function(a,b){var c=[],e,f,g,i,j,k;a=a.replace(q,"$1");if(f=a.match(o)){j=H(f[2]);e=b[d](f[1]||"*");for(g=0,i=e.length;g<i;g++)j.test(e[g].className)&&(c[c.length]=e[g]);return c}I(k=a.split(","),Z(b,function(a,d,e){j=Q(d,a);for(g=0,i=j.length;g<i;g++)if(a[h]===9||e||$(j[g],b))c[c.length]=j[g]}));return k.length>1&&c.length>1?U(c):c},eb=function(a){typeof a[f]!="undefined"&&(i=a[f]?bb?cb:db:db)};eb({useNativeQSA:!0});Y.configure=eb;Y.uniq=U;Y.is=R;Y.pseudos={};return Y},this);provide("qwery",a.exports);(function(a){var b=require("qwery");a.pseudos=b.pseudos;a._select=function(c,d){return(a._select=function(a){try{a=require("bonzo");return function(c,d){return/^\s*</.test(c)?a.create(c,d):b(c,d)}}catch(c){}return b}())(c,d)};a.ender({find:function(c){var d=[],e,f,g,h,i;for(e=0,f=this.length;e<f;e++){i=b(c,this[e]);for(g=0,h=i.length;g<h;g++)d.push(i[g])}return a(b.uniq(d))},and:function(b){var c=a(b);for(var d=this.length,e=0,f=this.length+c.length;d<f;d++,e++)this[d]=c[e];return this},is:function(a,c){var d,e;for(d=0,e=this.length;d<e;d++)if(b.is(this[d],a,c))return!0;return!1}},!0)})(ender)})()
+(function(b,c,d){typeof a!="undefined"&&a.exports?a.exports=d():typeof define=="function"&&define.amd?define(d):c[b]=d()})("bonzo",this,function(){function G(a){return a&&a.nodeName&&(a.nodeType==1||a.nodeType==11)}function H(a,b,c){var d,e,f;if(typeof a=="string")return ab.create(a);G(a)&&(a=[a]);if(c){f=[];for(d=0,e=a.length;d<e;d++)f[d]=X(b,a[d]);return f}return a}function I(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function J(a,b,c,d){var e,f=0,g=a.length;for(;f<g;f++){e=d?a.length-f-1:f;b.call(c||a[e],a[e],e,a)}return a}function K(a,b,c){for(var d=0,e=a.length;d<e;d++)if(G(a[d])){K(a[d].childNodes,b,c);b.call(c||a[d],a[d],d,a)}return a}function L(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function M(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function N(a){a[x]("data-node-uid")||a[w]("data-node-uid",++s);var b=a[x]("data-node-uid");return r[b]||(r[b]={})}function O(a){var b=a[x]("data-node-uid");b&&delete r[b]}function P(a){var b;try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function Q(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c||null,a[d],d,a))return!0;return!1}function R(a){a=="transform"&&(a=z.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=z.transform+"Origin")||a=="float"&&(a=z.cssFloat);return a?L(a):null}function T(a,b,c,d){var e=0,f=b||this,g=[],h=E&&typeof a=="string"&&a.charAt(0)!="<"?E(a):a;J(H(h),function(a,b){J(f,function(d){c(a,g[e++]=b>0?X(f,d):d)},null,d)},this,d);f.length=e;J(g,function(a){f[--e]=a},null,!d);return f}function U(a,b,c){var d=ab(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];if(e=="static"){d.css("position",g);e=g}isNaN(i[0])&&(i[0]=h?0:a.offsetLeft);isNaN(i[1])&&(i[1]=h?0:a.offsetTop);b!=null&&(a.style.left=b-f.left+i[0]+v);c!=null&&(a.style.top=c-f.top+i[1]+v)}function V(a,b){return typeof b=="function"?b(a):b}function W(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a];this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function X(a,b){var c=b.cloneNode(!0),d,e;if(a.$&&typeof a.cloneEvents=="function"){a.$(c).cloneEvents(b);d=a.$(c).find("*");e=a.$(b).find("*");for(var f=0;f<e.length;f++)a.$(d[f]).cloneEvents(e[f])}return c}function Y(b,c,d){var e=this[0];if(!e)return this;if(b==null&&c==null)return(Z(e)?$():{x:e.scrollLeft,y:e.scrollTop})[d];if(Z(e))a.scrollTo(b,c);else{b!=null&&(e.scrollLeft=b);c!=null&&(e.scrollTop=c)}return this}function Z(b){return b===a||/^(?:body|html)$/i.test(b.tagName)}function $(){return{x:a.pageXOffset||c.scrollLeft,y:a.pageYOffset||c.scrollTop}}function _(a){var b=document.createElement("script"),c=a.match(g);b.src=c[1];return b}function ab(a){return new W(a)}var a=window,b=a.document,c=b.documentElement,d="parentNode",e=/^(checked|value|selected|disabled)$/i,f=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,g=/\s*<script +src=['"]([^'"]+)['"]>/,h=["<table>","</table>",1],i=["<table><tbody><tr>","</tr></tbody></table>",3],j=["<select>","</select>",1],k=["_","",0,1],l={thead:h,tbody:h,tfoot:h,colgroup:h,caption:h,tr:["<table><tbody>","</tbody></table>",2],th:i,td:i,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:j,optgroup:j,script:k,style:k,link:k,param:k,base:k},m=/^(checked|selected|disabled)$/,n=/msie/i.test(navigator.userAgent),o,p,q,r={},s=0,t=/^-?[\d\.]+$/,u=/^data-(.+)$/,v="px",w="setAttribute",x="getAttribute",y="getElementsByTagName",z=function(){var a=b.createElement("p");a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:a[y]("a")[0][x]("href")!="#x",autoTbody:a[y]("tbody").length!==0,computedStyle:b.defaultView&&b.defaultView.getComputedStyle,cssFloat:a[y]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["transform","webkitTransform","MozTransform","OTransform","msTransform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a,opasity:function(){return typeof b.createElement("a").style.opacity!="undefined"}()}}(),A=/(^\s*|\s*$)/g,B=/\s+/,C=String.prototype.toString,D={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},E=b.querySelectorAll&&function(a){return b.querySelectorAll(a)},F=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(A,"")},S=z.computedStyle?function(a,c){var d=null,e=b.defaultView.getComputedStyle(a,"");e&&(d=e[c]);return a.style[c]||d}:n&&c.currentStyle?function(a,b){if(b=="opacity"&&!z.opasity){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};if(z.classList){o=function(a,b){return a.classList.contains(b)};p=function(a,b){a.classList.add(b)};q=function(a,b){a.classList.remove(b)}}else{o=function(a,b){return I(b).test(a.className)};p=function(a,b){a.className=F(a.className+" "+b)};q=function(a,b){a.className=F(a.className.replace(I(b)," "))}}W.prototype={get:function(a){return this[a]||null},each:function(a,b){return J(this,a,b)},deepEach:function(a,b){return K(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++){d=a.call(this,this[e],e);b?b(d)&&c.push(d):c.push(d)}return c},html:function(a,b){var d=b?c.textContent===undefined?"innerText":"textContent":"innerHTML",e=this,g=function(b,c){J(H(a,e,c),function(a){b.appendChild(a)})},h=function(c,e){try{if(b||typeof a=="string"&&!f.test(c.tagName))return c[d]=a}catch(h){}g(c,e)};return typeof a!="undefined"?this.empty().each(h):this[0]?this[0][d]:""},text:function(a){return this.html(a,!0)},append:function(a){var b=this;return this.each(function(c,d){J(H(a,b,d),function(a){c.appendChild(a)})})},prepend:function(a){var b=this;return this.each(function(c,d){var e=c.firstChild;J(H(a,b,d),function(a){c.insertBefore(a,e)})})},appendTo:function(a,b){return T.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return T.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)},1)},before:function(a){var b=this;return this.each(function(c,e){J(H(a,b,e),function(a){c[d].insertBefore(a,c)})})},after:function(a){var b=this;return this.each(function(c,e){J(H(a,b,e),function(a){c[d].insertBefore(a,c.nextSibling)},null,1)})},insertBefore:function(a,b){return T.call(this,a,b,function(a,b){a[d].insertBefore(b,a)})},insertAfter:function(a,b){return T.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[d].insertBefore(b,c):a[d].appendChild(b)},1)},replaceWith:function(a){ab(H(a)).insertAfter(this);return this.remove()},addClass:function(a){a=C.call(a).split(B);return this.each(function(b){J(a,function(a){a&&!o(b,V(b,a))&&p(b,V(b,a))})})},removeClass:function(a){a=C.call(a).split(B);return this.each(function(b){J(a,function(a){a&&o(b,V(b,a))&&q(b,V(b,a))})})},hasClass:function(a){a=C.call(a).split(B);return Q(this,function(b){return Q(a,function(a){return a&&o(b,a)})})},toggleClass:function(a,b){a=C.call(a).split(B);return this.each(function(c){J(a,function(a){a&&(typeof b!="undefined"?b?!o(c,a)&&p(c,a):q(c,a):o(c,a)?q(c,a):p(c,a))})})},show:function(a){a=typeof a=="string"?a:"";return this.each(function(b){b.style.display=a})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){b=typeof b=="string"?b:"";typeof a!="function"&&(a=null);return this.each(function(c){c.style.display=c.offsetWidth||c.offsetHeight?"none":b;a&&a.call(c)})},first:function(){return ab(this.length?this[0]:[])},last:function(){return ab(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(d)},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})},focus:function(){this.length&&this[0].focus();return this},blur:function(){this.length&&this[0].blur();return this},css:function(c,d){function g(a,b,c){for(var d in f)if(f.hasOwnProperty(d)){c=f[d];(b=R(d))&&t.test(c)&&!(b in D)&&(c+=v);try{a.style[b]=V(a,c)}catch(e){}}}var e,f=c;if(d===undefined&&typeof c=="string"){d=this[0];if(!d)return null;if(d===b||d===a){e=d===b?ab.doc():ab.viewport();return c=="width"?e.width:c=="height"?e.height:""}return(c=R(c))?S(d,c):null}if(typeof c=="string"){f={};f[c]=d}if(n&&f.opacity){f.filter="alpha(opacity="+f.opacity*100+")";f.zoom=c.zoom||1;delete f.opacity}return this.each(g)},offset:function(a,c){if(!a||typeof a!="object"||typeof a.top!="number"&&typeof a.left!="number"){if(typeof a=="number"||typeof c=="number")return this.each(function(b){U(b,a,c)});if(!this[0])return{top:0,left:0,height:0,width:0};var d=this[0],e=d.ownerDocument.documentElement,f=d.getBoundingClientRect(),g=$(),h=d.offsetWidth,i=d.offsetHeight,j=f.top+g.y-Math.max(0,e&&e.clientTop,b.body.clientTop),k=f.left+g.x-Math.max(0,e&&e.clientLeft,b.body.clientLeft);return{top:j,left:k,height:i,width:h}}return this.each(function(b){U(b,a.left,a.top)})},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=a.nodeType==9&&a.documentElement,c=!b&&!!a.style&&!a.offsetWidth&&!a.offsetHeight?function(b){var c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""};b.first().css({position:"absolute",visibility:"hidden",display:"block"});return c}(this):null,d=b?Math.max(a.body.scrollWidth,a.body.offsetWidth,b.scrollWidth,b.offsetWidth,b.clientWidth):a.offsetWidth,e=b?Math.max(a.body.scrollHeight,a.body.offsetHeight,b.scrollHeight,b.offsetHeight,b.clientHeight):a.offsetHeight;c&&this.first().css(c);return{height:e,width:d}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?e.test(a)?m.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!z.hrefExtended?c[x](a):c[x](a,2):null:this.each(function(c){e.test(a)?c[a]=V(c,b):c[w](a,V(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){m.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e;if(typeof b=="undefined"){if(!c)return null;d=N(c);if(typeof a=="undefined"){J(c.attributes,function(a){(e=(""+a.name).match(u))&&(d[L(e[1])]=P(a.value))});return d}typeof d[a]=="undefined"&&(d[a]=P(this.attr("data-"+M(a))));return d[a]}return this.each(function(c){N(c)[a]=b})},remove:function(){this.deepEach(O);return this.detach()},empty:function(){return this.each(function(a){K(a.childNodes,O);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.each(function(a){a[d]&&a[d].removeChild(a)})},scrollTop:function(a){return Y.call(this,null,a,"y")},scrollLeft:function(a){return Y.call(this,a,null,"x")}};ab.setQueryEngine=function(a){E=a;delete ab.setQueryEngine};ab.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||W.prototype)[c]=a[c])};ab.create=function(a){return typeof a=="string"&&a!==""?function(){if(g.test(a))return[_(a)];var c=a.match(/^\s*<([^\s>]+)/),e=b.createElement("div"),f=[],h=c?l[c[1].toLowerCase()]:null,i=h?h[2]+1:1,j=h&&h[3],k=d,m=z.autoTbody&&h&&h[0]=="<table>"&&!/<tbody/i.test(a);e.innerHTML=h?h[0]+a+h[1]:a;while(i--)e=e.firstChild;j&&e&&e.nodeType!==1&&(e=e.nextSibling);do(!c||e.nodeType==1)&&(!m||e.tagName&&e.tagName!="TBODY")&&f.push(e);while(e=e.nextSibling);J(f,function(a){a[k]&&a[k].removeChild(a)});return f}():G(a)?[a.cloneNode(!0)]:[]};ab.doc=function(){var a=ab.viewport();return{width:Math.max(b.body.scrollWidth,c.scrollWidth,a.width),height:Math.max(b.body.scrollHeight,c.scrollHeight,a.height)}};ab.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};ab.viewport=function(){return{width:n?c.clientWidth:self.innerWidth,height:n?c.clientHeight:self.innerHeight}};ab.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[d])if(b===a)return!0;return!1};return ab});provide("bonzo",a.exports);(function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a);a.ender(b);a.ender(b(),!0);a.ender({create:function(c){return a(b.create(c))}});a.id=function(b){return a([document.getElementById(b)])};a.ender({parents:function(b,e){if(!this.length)return this;b||(b="*");var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f,g=[];for(c=0,e=this.length;c<e;c++){if(!(f=b.firstChild(this[c])))continue;g.push(f);while(f=f.nextSibling)f.nodeType==1&&g.push(f)}return a(d(g))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)})(ender)})()
View
136 ender.overlay.js
@@ -25,9 +25,9 @@
Mozilla and Webkit support only
*/
transition = (function () {
- var st = document.createElement("div").style,
- transitionEnd = "TransitionEnd",
- transitionProp = "Transition",
+ var st = document.createElement('div').style,
+ transitionEnd = 'TransitionEnd',
+ transitionProp = 'Transition',
support = st.transition !== undefined ||
st.WebkitTransition !== undefined ||
st.MozTransition !== undefined;
@@ -35,17 +35,17 @@
return support && {
prop: (function () {
if (st.WebkitTransition !== undefined) {
- transitionProp = "WebkitTransition";
+ transitionProp = 'WebkitTransition';
} else if (st.MozTransition !== undefined) {
- transitionProp = "MozTransition";
+ transitionProp = 'MozTransition';
}
return transitionProp;
}()),
end: (function () {
if (st.WebkitTransition !== undefined) {
- transitionEnd = "webkitTransitionEnd";
+ transitionEnd = 'webkitTransitionEnd';
} else if (st.MozTransition !== undefined) {
- transitionEnd = "transitionend";
+ transitionEnd = 'transitionend';
}
return transitionEnd;
}())
@@ -79,7 +79,7 @@
}
function clone(obj) {
- if (null === obj || "object" !== typeof obj) {
+ if (null === obj || 'object' !== typeof obj) {
return obj;
}
var copy = obj.constructor(),
@@ -128,7 +128,7 @@
// css3 setted, if available apply the css
if (options.css3transition && transition) {
dummy = el[0].offsetWidth; // force reflow; source: bootstrap
- el[0].style[transition.prop] = "all " + animation.duration + "ms ease-out";
+ el[0].style[transition.prop] = 'all ' + animation.duration + 'ms ease-out';
// takaritas
delete animation.duration;
@@ -138,15 +138,15 @@
el.bind(transition.end, function () {
// delete transition properties and events
el.unbind(transition.end);
- el[0].style[transition.prop] = "none";
+ el[0].style[transition.prop] = 'none';
complete();
});
} else if (window.ender) {
// use morpheus
- el.animate(extend(animation, {"complete": complete}));
+ el.animate(extend(animation, {'complete': complete}));
} else {
// use animate from jquery
- el.animate(animation, animation.duration, "swing", complete);
+ el.animate(animation, animation.duration, 'swing', complete);
}
}
@@ -160,7 +160,7 @@
OverlayMask.prototype = {
init: function (options) {
this.options = {
- id: "ender-overlay-mask",
+ id: 'ender-overlay-mask',
zIndex: 9998,
opacity: 0.6,
color: "#777"
@@ -168,19 +168,19 @@
extend(this.options, options || {});
- var $mask = $("#" + this.options.id),
+ var $mask = $('#' + this.options.id),
opt = this.options;
if (! $mask.length) {
- $mask = $("<div></div>")
- .attr("id", this.options.id)
+ $mask = $('<div></div>')
+ .attr('id', this.options.id)
.css({
- display: "none",
- position: "absolute",
+ display: 'none',
+ position: 'absolute',
top: 0,
left: 0
})
- .appendTo("body");
+ .appendTo('body');
}
this.$mask = $mask;
@@ -210,10 +210,10 @@
el: this.$mask,
animStartCss: {
opacity: 0.01, // ie quirk
- display: "block"
+ display: 'block'
},
animation: animObj,
- fallbackCss: {display: "block", opacity: opt.opacity},
+ fallbackCss: {display: 'block', opacity: opt.opacity},
css3transition: opt.css3transition
});
@@ -235,9 +235,9 @@
el: this.$mask,
animation: animObj,
complete: function () {
- self.$mask.css({display: "none"});
+ self.$mask.css({display: 'none'});
},
- fallbackCss: {display: "none"},
+ fallbackCss: {display: 'none'},
css3transition: opt.css3transition
});
},
@@ -245,10 +245,23 @@
getDocSize: function () {
if (window.ender) { // ender
return {
- width: $("body").width(),
+ width: $.doc().width,
height: $.doc().height
};
- } else { // jquery
+ } else if (window.Zepto) {
+ // zepto caches the document height..
+ var doc = window.document,
+ html = doc.documentElement,
+ ie = /msie/i.test(navigator.userAgent),
+ vp = {
+ width: ie ? html.clientWidth : self.innerWidth,
+ height: ie ? html.clientHeight : self.innerHeight
+ }
+ return {
+ width: Math.max(doc.body.scrollWidth, html.scrollWidth, vp.width),
+ height: Math.max(doc.body.scrollHeight, html.scrollHeight, vp.height)
+ };
+ } else { // jquery / zepto
return {
width: $(document).width(),
height: $(document).height()
@@ -276,9 +289,9 @@
init: function ($el, options) {
this.options = {
top: 80,
- position: "absolute",
- cssClass: "ender-overlay",
- close: ".close",
+ position: 'absolute',
+ cssClass: 'ender-overlay',
+ close: '.close',
trigger: null,
zIndex: 9999,
showMask: true,
@@ -316,7 +329,7 @@
this.setOptions(options);
this.$overlay = $el.css({
- display: "none"
+ display: 'none'
});
if (this.options.showMask) {
@@ -324,9 +337,9 @@
}
// prevent multiple event binding
- if (! this.$overlay.attr("data-overlayloaded")) {
+ if (! this.$overlay.attr('data-overlayloaded')) {
this.attachEvents();
- this.$overlay.attr("data-overlayloaded", 1);
+ this.$overlay.attr('data-overlayloaded', 1);
}
if (this.options.autoOpen) {
@@ -340,35 +353,34 @@
// Bind open method to trigger's click event
if (opt.trigger && $(opt.trigger).length) {
- $(opt.trigger).click(function (e) {
+ $(opt.trigger).on('click', function (e) {
e.preventDefault();
self.open();
});
}
- this.$overlay
- .delegate(opt.close, 'click', function (e) {
- e.preventDefault();
- self.close();
- });
+ this.$overlay.on('click', opt.close, function (e) {
+ e.preventDefault();
+ self.close();
+ });
// attach event listeners
- $(document).bind("ender-overlay.close", function () {
+ $(document).on('ender-overlay.close', function () {
self.close();
});
- $(document).bind("ender-overlay.closeOverlay", function () {
+ $(document).on('ender-overlay.closeOverlay', function () {
self.close(true);
});
if (opt.closeOnEsc) {
- $(document).keyup(function (e) {
+ $(document).on('keyup', function (e) {
self.onKeyUp(e);
});
}
if (this.mask && opt.closeOnMaskClick) {
- this.mask.getMask().click(function () {
+ this.mask.getMask().on('click', function () {
self.close();
});
}
@@ -383,9 +395,9 @@
// setup overlay
this.$overlay
.addClass(opt.cssClass)
- .appendTo("body");
+ .appendTo('body');
- if (opt.position === "absolute") {
+ if (opt.position === 'absolute') {
topPos += scrollTop;
}
@@ -393,18 +405,18 @@
// so we try to find out
if (overlayWidth === 0) {
this.$overlay.css({
- display: "block",
- position: "absolute",
+ display: 'block',
+ position: 'absolute',
left: -9999
});
overlayWidth = this.$overlay.width();
}
this.$overlay.css({
- display: "none",
+ display: 'none',
position: opt.position,
top: topPos,
- left: "50%",
+ left: '50%',
zIndex: opt.zIndex,
marginLeft: overlayWidth / 2 * -1
});
@@ -416,7 +428,7 @@
animationIn = opt.animationIn ? clone(opt.animationIn) : false,
api = this.getApi();
- if (this.$overlay.css("display") === "block" ||
+ if (this.$overlay.css('display') === 'block' ||
opt.onBeforeOpen(api) === false) {
return;
}
@@ -424,25 +436,25 @@
this.setupOverlay();
if (! opt.allowMultipleDisplay) {
- $(document).trigger("ender-overlay.closeOverlay");
+ $(document).trigger('ender-overlay.closeOverlay');
}
animate({
el: this.$overlay,
- animStartCss: extend({display: "block"}, opt.startAnimationCss),
+ animStartCss: extend({display: 'block'}, opt.startAnimationCss),
animation: animationIn,
complete: function () {
if (animationIn && animationIn.opacity === 1) {
- self.$overlay.css({ "filter": "" }); // ie quirk
+ self.$overlay.css({ 'filter': '' }); // ie quirk
}
self.options.onOpen(api);
},
- fallbackCss: {display: "block", opacity: 1},
+ fallbackCss: {display: 'block', opacity: 1},
css3transition: opt.css3transition
});
if (this.mask &&
- typeof dontOpenMask === "undefined") {
+ typeof dontOpenMask === 'undefined') {
this.mask.show();
}
},
@@ -454,7 +466,7 @@
api = this.getApi();
if (opt.onBeforeClose(api) === false ||
- this.$overlay.css("display") !== "block") {
+ this.$overlay.css('display') !== 'block') {
return;
}
@@ -462,22 +474,22 @@
el: this.$overlay,
animation: animationOut,
complete: function () {
- self.$overlay.css({display: "none"});
+ self.$overlay.css({display: 'none'});
self.options.onClose(api);
},
- fallbackCss: {display: "none", opacity: 0},
+ fallbackCss: {display: 'none', opacity: 0},
css3transition: opt.css3transition
});
if (this.mask &&
- typeof dontHideMask === "undefined") {
+ typeof dontHideMask === 'undefined') {
this.mask.hide();
}
},
onKeyUp: function (e) {
if (e.keyCode === 27 &&
- this.$overlay.css("display") !== "none") {
+ this.$overlay.css('display') !== 'none') {
this.close();
}
},
@@ -494,11 +506,11 @@
extend(this.options, options || {});
var opt = this.options;
- if (opt.animationIn === "none") {
+ if (opt.animationIn === 'none') {
opt.animationIn = false;
}
- if (opt.animationOut === "none") {
+ if (opt.animationOut === 'none') {
opt.animationOut = false;
}
@@ -522,7 +534,7 @@
opt.mask.durationOut = 0;
}
- if (typeof opt.mask.css3transition !== "boolean") {
+ if (typeof opt.mask.css3transition !== 'boolean') {
opt.mask.css3transition = opt.css3transition;
}
}
@@ -545,4 +557,4 @@
return new Overlay(el, options);
};
-}(window.ender || window.jQuery);
+}(window.ender || window.jQuery || window.Zepto);
View
5 index.html
@@ -26,7 +26,7 @@
</p>
<p>
- Moreover, it's even compatible with jQuery! So if you want to include it in a jQuery based project, you can do it without any extra work.
+ Moreover, it's even compatible with jQuery and Zepto! So if you want to include it in a jQuery/Zepto based project, you can do it without any extra work.
</p>
<p>
@@ -44,6 +44,7 @@
<li><a href="demos/content-types.html">Examples with different content types</a></li>
<li><a href="demos/configuration.html">Configuration examples</a></li>
<li><a href="demos/jquery.html">jQuery compatibility</a></li>
+ <li><a href="demos/zepto.html">Zepto compatibility</a></li>
</ul>
<!-- h2>Build</h2>
@@ -60,7 +61,7 @@
<h2>Download Source</h2>
<p>The source is hosted at <a href="https://github.com/nemeseri/ender-overlay">Github</a>.</p>
- <a href="https://raw.github.com/nemeseri/ender-overlay/master/ender.overlay.js" class="button">Download v0.2.3</a>
+ <a href="https://raw.github.com/nemeseri/ender-overlay/master/ender.overlay.js" class="button">Download v0.2.4</a>
<h2>Overlay configuration</h2>
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "ender-overlay",
"description": "Highly customizable overlay for Ender",
- "version": "0.2.3",
+ "version": "0.2.4",
"homepage": "http://nemeseri.com/ender-overlay/",
"author": "Andras Nemeseri <andras@nemeseri.com> (http://nemeseri.com)",
"keywords": ["ender", "overlay", "dialog", "ui", "lightbox", "fancybox", "modal"],
Please sign in to comment.
Something went wrong with that request. Please try again.