Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Welcome to v1.2.3

  • Loading branch information...
commit 441510639fc7cef799d2c0ee45cf38f54d151de5 1 parent ce2e8f9
@ryanflorence authored
View
2  builds/snack-min.js
@@ -7,4 +7,4 @@
* jQuery (c) John Resig Dual license MIT or GPL Version 2
* contentLoaded (c) Diego Perini MIT License
* Zepto.js (c) Thomas Fuchs MIT License
-*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.2",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;switch(a.isArray(b)){case"object":f=a.toQueryString(b,e);break;case"array":var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e);break;default:f=e+"="+encodeURIComponent(b)}b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document)
+*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.3",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;if(a.isArray(b)){var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e)}else typeof b=="object"?f=a.toQueryString(b,e):f=e+"="+encodeURIComponent(b);b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document)
View
2  builds/snack-qwery-min.js
@@ -7,4 +7,4 @@
* jQuery (c) John Resig Dual license MIT or GPL Version 2
* contentLoaded (c) Diego Perini MIT License
* Zepto.js (c) Thomas Fuchs MIT License
-*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.2",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;switch(a.isArray(b)){case"object":f=a.toQueryString(b,e);break;case"array":var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e);break;default:f=e+"="+encodeURIComponent(b)}b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),!function(a,b){function W(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function V(a,c){var d=typeof c=="string"?V(c)[0]:c||b;if(!d||!a)return[];if(h=T(a,c,V))return h;if(b.getElementsByClassName&&(h=a.match(y)))return G(d.getElementsByClassName(h[1]));return G(d.querySelectorAll(a))}function U(a){return a===window||a&&a.nodeType&&a.nodeType.toString().match(/[19]/)}function T(a,c,d){var e=typeof c=="string"?d(c)[0]:c||b;if(U(a))return!c||U(e)&&S(a,e)?[a]:[];if(a&&typeof a=="object"&&isFinite(a.length))return G(a);if(h=a.match(x))return(m=b.getElementById(h[1]))?[m]:[];if(h=a.match(z))return G(e.getElementsByTagName(h[1]));return!1}function R(a){var b=[],c=[],d,g,h=L.g(a)||L.s(a,a.split(C));h=h.slice(0);if(!h.length)return b;b=O(h);if(!h.length)return b;for(e=0,g=b.length,f=0;e<g;e++){n=b[e],j=n;for(d=h.length;d--;)z:while(j!==B&&(j=j.parentNode))if(p=N.apply(j,M(h[d])))break z;p&&(c[f++]=n)}return c}function Q(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(K.g("^="+c)||K.s("^="+c,new RegExp("^"+P(c))));case"$=":return b.match(K.g("$="+c)||K.s("$="+c,new RegExp(P(c)+"$")));case"*=":return b.match(K.g(c)||K.s(c,new RegExp(P(c))));case"~=":return b.match(K.g("~="+c)||K.s("~="+c,new RegExp("(?:^|\\s+)"+P(c)+"(?:\\s+|$)")));case"|=":return b.match(K.g("|="+c)||K.s("|="+c,new RegExp("^"+P(c)+"(-|$)")))}return!1}function P(a){return J.g(a)||J.s(a,a.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1"))}function O(a){var c=[],d=a.pop(),e=M(d),f=e[1]||"*",g,i,j,k=a.length&&(h=a[0].match(x))?b.getElementById(h[1]):b;if(!k)return c;j=k.getElementsByTagName(f);for(g=0,i=j.length;g<i;g++)m=j[g],(r=N.apply(m,e))&&c.push(r);return c}function N(a,b,c,e,f,g,h){var j,k,l;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(j=c.match(v))&&j[1]!==this.id)return!1;if(c&&(q=c.match(w)))for(d=q.length;d--;){k=q[d].slice(1);if(!(I.g(k)||I.s(k,new RegExp("(^|\\s+)"+k+"(\\s+|$)"))).test(this.className))return!1}if(e&&!h){i=this.attributes;for(l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&(i[l].name||l)==f)return this}if(e&&!Q(g,this.getAttribute(f)||"",h))return!1;return this}function M(a){return a.match(F)}function G(a){k=[];for(d=0,o=a.length;d<o;d++)k[d]=a[d];return k}var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=/#([\w\-]+)/,w=/\.[\w\-]+/g,x=/^#([\w\-]+$)/,y=/^\.([\w\-]+)$/,z=/^([\w\-]+)$/,A=/^([\w]+)?\.([\w\-]+)$/,B=b.documentElement,C=/\s(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,D=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,E=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,F=new RegExp(D.source+"("+E.source+")?"),H=function(){this.c={}};H.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var I=new H,J=new H,K=new H,L=new H,S="compareDocumentPosition"in B?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in B?function(a,b){return b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},X=function(){if(b.querySelector&&b.querySelectorAll)return V;return function(a,c){var d=typeof c=="string"?X(c)[0]:c||b;if(!d||!a)return[];var f,g,i=[],j=[],l;if(h=T(a,c,X))return h;if(h=a.match(A)){s=d.getElementsByTagName(h[1]||"*"),k=I.g(h[2])||I.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(f=0,g=s.length,e=0;f<g;f++)k.test(s[f].className)&&(i[e++]=s[f]);return i}for(f=0,s=a.split(","),g=s.length;f<g;f++)j[f]=R(s[f]);for(f=0,g=j.length;f<g&&(u=j[f]);f++){var m=u;if(d!==b){m=[];for(e=0,h=u.length;e<h&&(l=u[e]);e++)S(l,d)&&m.push(l)}i=i.concat(m)}return W(i)}}();X.uniq=W;var Y=a.qwery;X.noConflict=function(){a.qwery=Y;return this},a.qwery=X}(this,document),snack.qwery=qwery.noConflict(),snack.wrap.defineEngine(function(a,b){return snack.qwery(a,b)})
+*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.3",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;if(a.isArray(b)){var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e)}else typeof b=="object"?f=a.toQueryString(b,e):f=e+"="+encodeURIComponent(b);b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),!function(a,b){function X(a,c){var d=typeof c=="string"?X(c)[0]:c||b;if(!d||!a)return[];if(h=U(a,c,X))return h;return Z(a,d)}function W(a){var b=[],c,d;label:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue label;b[b.length]=a[c]}return b}function V(a){return a&&a.nodeType&&(a.nodeType==1||a.nodeType==9)}function U(a,c,d){var e=typeof c=="string"?d(c)[0]:c||b;if(a===window||V(a))return!c||a!==window&&V(e)&&Y(a,e)?[a]:[];if(a&&typeof a=="object"&&isFinite(a.length))return N(a);if(h=a.match(w))return(m=b.getElementById(h[1]))?[m]:[];if(h=a.match(y))return N(e.getElementsByTagName(h[1]));return!1}function T(a){var c=[],d=[],e,f=0,g,h,i,j,k,l,m,n,o,q,r=M.g(a)||M.s(a,a.split(C));r=r.slice(0);if(!r.length)return c;k=r.pop(),n=r.length&&(i=r[r.length-2].match(w))?b.getElementById(i[1]):b;if(!n)return c;o=P(k),m=/^[+~]$/.test(r[r.length-1])?function(a){a=[];while(n=n.nextSibling)n.nodeType==1&&(o[1]?o[1]==n.tagName.toLowerCase():1)&&a.push(n);return a}():n.getElementsByTagName(o[1]||"*");for(e=0,h=m.length;e<h;e++)if(q=Q.apply(m[e],o))c[f++]=q;if(!r.length)return c;for(f=0,h=c.length,g=0;f<h;f++){j=c[f];for(e=r.length-2;e>=0;e=e-2)while(j=H[r[e+1]](j,c[f]))if(p=Q.apply(j,P(r[e])))break;p&&(d[g++]=c[f])}return d}function S(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(L.g("^="+c)||L.s("^="+c,new RegExp("^"+R(c))));case"$=":return b.match(L.g("$="+c)||L.s("$="+c,new RegExp(R(c)+"$")));case"*=":return b.match(L.g(c)||L.s(c,new RegExp(R(c))));case"~=":return b.match(L.g("~="+c)||L.s("~="+c,new RegExp("(?:^|\\s+)"+R(c)+"(?:\\s+|$)")));case"|=":return b.match(L.g("|="+c)||L.s("|="+c,new RegExp("^"+R(c)+"(-|$)")))}return 0}function R(a){return K.g(a)||K.s(a,a.replace(D,"\\$1"))}function Q(a,b,c,e,f,g,h){var j,k,l;if(b&&this.tagName.toLowerCase()!==b)return!1;if(c&&(j=c.match(u))&&j[1]!==this.id)return!1;if(c&&(q=c.match(v)))for(d=q.length;d--;){k=q[d].slice(1);if(!(J.g(k)||J.s(k,new RegExp("(^|\\s+)"+k+"(\\s+|$)"))).test(this.className))return!1}if(e&&!h){i=this.attributes;for(l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&(i[l].name||l)==f)return this}if(e&&!S(g,this.getAttribute(f)||"",h))return!1;return this}function P(a){return a.match(G)}function O(a){while(a=a.previousSibling)if(a.nodeType==1)break;return a}function N(a){k=[];for(d=0,o=a.length;d<o;d++)k[d]=a[d];return k}function I(){this.c={}}var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=/#([\w\-]+)/,v=/\.[\w\-]+/g,w=/^#([\w\-]+$)/,x=/^\.([\w\-]+)$/,y=/^([\w\-]+)$/,z=/^([\w]+)?\.([\w\-]+)$/,A=b.documentElement,B=/\s*([\s\+\~>])\s*/g,C=/([\s\>\+\~])(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,D=/([.*+?\^=!:${}()|\[\]\/\\])/g,E=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,F=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,G=new RegExp(E.source+"("+F.source+")?"),H={" ":function(a){return a&&a!==A&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){if(!a)return!1;c=O(a),d=O(b);return c&&d&&c==d&&c}};I.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b){this.c[a]=b;return b}};var J=new I,K=new I,L=new I,M=new I,Y="compareDocumentPosition"in A?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in A?function(a,c){c=c==b||c==window?A:c;return c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},Z=b.querySelector&&b.querySelectorAll?function(a,c){if(b.getElementsByClassName&&(h=a.match(x)))return N(c.getElementsByClassName(h[1]));return N(c.querySelectorAll(a))}:function(a,c){a=a.replace(B,"$1");var d=[],f,i=[],j;if(h=a.match(z)){s=c.getElementsByTagName(h[1]||"*"),k=J.g(h[2])||J.s(h[2],new RegExp("(^|\\s+)"+h[2]+"(\\s+|$)"));for(j=0,g=s.length,e=0;j<g;j++)k.test(s[j].className)&&(d[e++]=s[j]);return d}for(j=0,s=a.split(","),g=s.length;j<g;j++)i[j]=T(s[j]);for(j=0,g=i.length;j<g&&(f=i[j]);j++){var l=f;if(c!==b){l=[];for(e=0,h=f.length;e<h&&(element=f[e]);e++)Y(element,c)&&l.push(element)}d=d.concat(l)}return W(d)};X.uniq=W;var $=a.qwery;X.noConflict=function(){a.qwery=$;return this},a.qwery=X}(this,document),snack.qwery=qwery.noConflict(),snack.wrap.defineEngine(function(a,b){return snack.qwery(a,b)})
View
242 builds/snack-qwery.js
@@ -39,7 +39,7 @@ if (typeof Object.create != 'function'){
}
snack.extend({
- v: '1.2.2',
+ v: '1.2.3',
bind: function (fn, context, args) {
args = args || [];
@@ -391,19 +391,17 @@ if (typeof Object.create != 'function'){
var result
- switch (snack.isArray(value)){
- case 'object':
- result = snack.toQueryString(value, key)
- break
- case 'array':
- var qs = {}
- snack.each(value, function(val, i){
- qs[i] = val
- })
- result = snack.toQueryString(qs, key)
- break
- default: result = key + '=' + encodeURIComponent(value)
+ if (snack.isArray(value)){
+ var qs = {}
+ snack.each(value, function(val, i){
+ qs[i] = val
+ })
+ result = snack.toQueryString(qs, key)
}
+ else if (typeof value == 'object')
+ result = snack.toQueryString(value, key)
+ else
+ result = key + '=' + encodeURIComponent(value)
if (value !== null)
queryString.push(result)
@@ -658,8 +656,8 @@ if (typeof Object.create != 'function'){
return this
},
- fire: function (namespace, arguments){
- return listenerMethod(this, 'fire', namespace, arguments)
+ fire: function (namespace, args){
+ return listenerMethod(this, 'fire', namespace, args)
},
delegate: function (event, delegation, handler){
@@ -671,27 +669,28 @@ if (typeof Object.create != 'function'){
return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '')
}
- function listenerMethod(wrapper, method, namespace, arguments){
+ function listenerMethod(wrapper, method, namespace, args){
var data = wrapper.data(namespace)
if (data)
snack.each(data, function (listener){
- listener[method].apply(wrapper, arguments)
+ listener[method].apply(wrapper, args)
})
return wrapper
}
}(snack, document);
/*!
- * qwery.js - copyright @dedfat
+ * Qwery - A Blazing Fast query selector engine
* https://github.com/ded/qwery
- * Follow our software http://twitter.com/dedfat
+ * copyright Dustin Diaz & Jacob Thornton 2011
* MIT License
*/
+
!function (context, doc) {
var c, i, j, k, l, m, o, p, r, v,
- el, node, len, found, classes, item, items, token, collection,
+ el, node, len, found, classes, item, items, token,
id = /#([\w\-]+)/,
clas = /\.[\w\-]+/g,
idOnly = /^#([\w\-]+$)/,
@@ -699,22 +698,35 @@ if (typeof Object.create != 'function'){
tagOnly = /^([\w\-]+)$/,
tagAndOrClass = /^([\w]+)?\.([\w\-]+)$/,
html = doc.documentElement,
- tokenizr = /\s(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,
+ normalizr = /\s*([\s\+\~>])\s*/g,
+ tokenizr = /([\s\>\+\~])(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\])/,
+ specialChars = /([.*+?\^=!:${}()|\[\]\/\\])/g,
simple = /^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,
attr = /\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,
- chunker = new RegExp(simple.source + '(' + attr.source + ')?');
-
- function array(ar) {
- r = [];
- for (i = 0, len = ar.length; i < len; i++) {
- r[i] = ar[i];
+ chunker = new RegExp(simple.source + '(' + attr.source + ')?'),
+ walker = {
+ ' ': function (node) {
+ return node && node !== html && node.parentNode
+ },
+ '>': function (node, contestant) {
+ return node && node.parentNode == contestant.parentNode && node.parentNode;
+ },
+ '~': function (node) {
+ return node && node.previousSibling;
+ },
+ '+': function (node, contestant, p1, p2) {
+ if (!node) {
+ return false;
+ }
+ p1 = previous(node);
+ p2 = previous(contestant);
+ return p1 && p2 && p1 == p2 && p1;
}
- return r;
- }
+ };
- var cache = function () {
+ function cache() {
this.c = {};
- };
+ }
cache.prototype = {
g: function (k) {
return this.c[k] || undefined;
@@ -730,6 +742,23 @@ if (typeof Object.create != 'function'){
attrCache = new cache(),
tokenCache = new cache();
+ function array(ar) {
+ r = [];
+ for (i = 0, len = ar.length; i < len; i++) {
+ r[i] = ar[i];
+ }
+ return r;
+ }
+
+ function previous(n) {
+ while (n = n.previousSibling) {
+ if (n.nodeType == 1) {
+ break;
+ }
+ }
+ return n
+ }
+
function q(query) {
return query.match(chunker);
}
@@ -764,24 +793,8 @@ if (typeof Object.create != 'function'){
return this;
}
- function loopAll(tokens) {
- var r = [], token = tokens.pop(), intr = q(token), tag = intr[1] || '*', i, l, els,
- root = tokens.length && (m = tokens[0].match(idOnly)) ? doc.getElementById(m[1]) : doc;
- if (!root) {
- return r;
- }
- els = root.getElementsByTagName(tag);
- for (i = 0, l = els.length; i < l; i++) {
- el = els[i];
- if (item = interpret.apply(el, intr)) {
- r.push(item);
- }
- }
- return r;
- }
-
function clean(s) {
- return cleanCache.g(s) || cleanCache.s(s, s.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g, '\\$1'));
+ return cleanCache.g(s) || cleanCache.s(s, s.replace(specialChars, '\\$1'));
}
function checkAttr(qualify, actual, val) {
@@ -799,58 +812,63 @@ if (typeof Object.create != 'function'){
case '|=':
return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, new RegExp('^' + clean(val) + '(-|$)')));
}
- return false;
+ return 0;
}
function _qwery(selector) {
- var r = [], ret = [], i, l,
+ var r = [], ret = [], i, j = 0, k, l, m, p, token, tag, els, root, intr, item,
tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr));
- tokens = tokens.slice(0);
+ tokens = tokens.slice(0); // this makes a copy of the array so the cached original is not effected
+
if (!tokens.length) {
return r;
}
- r = loopAll(tokens);
+
+ token = tokens.pop();
+ root = tokens.length && (m = tokens[tokens.length - 2].match(idOnly)) ? doc.getElementById(m[1]) : doc;
+ if (!root) {
+ return r;
+ }
+ intr = q(token);
+ els = /^[+~]$/.test(tokens[tokens.length - 1]) ? function (r) {
+ r = []
+ while (root = root.nextSibling) {
+ root.nodeType == 1 && (intr[1] ? intr[1] == root.tagName.toLowerCase() : 1) && r.push(root)
+ }
+ return r
+ }() :
+ root.getElementsByTagName(intr[1] || '*');
+ for (i = 0, l = els.length; i < l; i++) {
+ if (item = interpret.apply(els[i], intr)) {
+ r[j++] = item;
+ }
+ }
+
if (!tokens.length) {
return r;
}
+
// loop through all descendent tokens
for (j = 0, l = r.length, k = 0; j < l; j++) {
- node = r[j];
- p = node;
- // loop through each token
- for (i = tokens.length; i--;) {
- z: // loop through parent nodes
- while (p !== html && (p = p.parentNode)) {
+ p = r[j];
+ // loop through each token backwards crawling up tree
+ for (i = tokens.length - 2; i >= 0;i = i - 2) {
+ // loop through parent nodes
+ while (p = walker[tokens[i + 1]](p, r[j])) {
if (found = interpret.apply(p, q(tokens[i]))) {
- break z;
+ break;
}
}
}
- found && (ret[k++] = node);
+ found && (ret[k++] = r[j]);
}
return ret;
}
- var isAncestor = 'compareDocumentPosition' in html ?
- function (element, container) {
- return (container.compareDocumentPosition(element) & 16) == 16;
- } : 'contains' in html ?
- function (element, container) {
- return container !== element && container.contains(element);
- } :
- function (element, container) {
- while (element = element.parentNode) {
- if (element === container) {
- return 1;
- }
- }
- return 0;
- };
-
function boilerPlate(selector, _root, fn) {
var root = (typeof _root == 'string') ? fn(_root)[0] : (_root || doc);
- if (isNode(selector)) {
- return !_root || (isNode(root) && isAncestor(selector, root)) ? [selector] : [];
+ if (selector === window || isNode(selector)) {
+ return !_root || (selector !== window && isNode(root) && isAncestor(selector, root)) ? [selector] : [];
}
if (selector && typeof selector === 'object' && isFinite(selector.length)) {
return array(selector);
@@ -865,21 +883,7 @@ if (typeof Object.create != 'function'){
}
function isNode(el) {
- return (el === window || el && el.nodeType && el.nodeType.toString().match(/[19]/));
- }
-
- function qsa(selector, _root) {
- var root = (typeof _root == 'string') ? qsa(_root)[0] : (_root || doc);
- if (!root || !selector) {
- return [];
- }
- if (m = boilerPlate(selector, _root, qsa)) {
- return m;
- }
- if (doc.getElementsByClassName && (m = selector.match(classOnly))) {
- return array((root).getElementsByClassName(m[1]));
- }
- return array((root).querySelectorAll(selector));
+ return (el && el.nodeType && (el.nodeType == 1 || el.nodeType == 9));
}
function uniq(ar) {
@@ -896,20 +900,44 @@ if (typeof Object.create != 'function'){
return a;
}
- var qwery = function () {
- // return fast. boosh.
- if (doc.querySelector && doc.querySelectorAll) {
- return qsa;
+ function qwery(selector, _root) {
+ var root = (typeof _root == 'string') ? qwery(_root)[0] : (_root || doc);
+ if (!root || !selector) {
+ return [];
+ }
+ if (m = boilerPlate(selector, _root, qwery)) {
+ return m;
}
- return function (selector, _root) {
- var root = (typeof _root == 'string') ? qwery(_root)[0] : (_root || doc);
- if (!root || !selector) {
- return [];
+ return select(selector, root);
+ }
+
+ var isAncestor = 'compareDocumentPosition' in html ?
+ function (element, container) {
+ return (container.compareDocumentPosition(element) & 16) == 16;
+ } : 'contains' in html ?
+ function (element, container) {
+ container = container == doc || container == window ? html : container;
+ return container !== element && container.contains(element);
+ } :
+ function (element, container) {
+ while (element = element.parentNode) {
+ if (element === container) {
+ return 1;
+ }
}
- var i, l, result = [], collections = [], element;
- if (m = boilerPlate(selector, _root, qwery)) {
- return m;
+ return 0;
+ },
+
+ select = (doc.querySelector && doc.querySelectorAll) ?
+ function (selector, root) {
+ if (doc.getElementsByClassName && (m = selector.match(classOnly))) {
+ return array((root).getElementsByClassName(m[1]));
}
+ return array((root).querySelectorAll(selector));
+ } :
+ function (selector, root) {
+ selector = selector.replace(normalizr, '$1');
+ var result = [], collection, collections = [], i;
if (m = selector.match(tagAndOrClass)) {
items = root.getElementsByTagName(m[1] || '*');
r = classCache.g(m[2]) || classCache.s(m[2], new RegExp('(^|\\s+)' + m[2] + '(\\s+|$)'));
@@ -934,7 +962,6 @@ if (typeof Object.create != 'function'){
}
return uniq(result);
};
- }();
qwery.uniq = uniq;
var oldQwery = context.qwery;
@@ -942,10 +969,9 @@ if (typeof Object.create != 'function'){
context.qwery = oldQwery;
return this;
};
- context.qwery = qwery;
+ context['qwery'] = qwery;
-}(this, document);
-snack.qwery = qwery.noConflict()
+}(this, document);snack.qwery = qwery.noConflict()
snack.wrap.defineEngine(function (selector, context){
return snack.qwery(selector, context);
})
View
2  builds/snack-sizzle-min.js
@@ -7,4 +7,4 @@
* jQuery (c) John Resig Dual license MIT or GPL Version 2
* contentLoaded (c) Diego Perini MIT License
* Zepto.js (c) Thomas Fuchs MIT License
-*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.2",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;switch(a.isArray(b)){case"object":f=a.toQueryString(b,e);break;case"array":var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e);break;default:f=e+"="+encodeURIComponent(b)}b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),function(){function r(a,b,c,d,e,f){for(var g=0,i=d.length;g<i;g++){var j=d[g];if(j){var k=!1;j=j[a];while(j){if(j.sizcache===c){k=d[j.sizset];break}if(j.nodeType===1){f||(j.sizcache=c,j.sizset=g);if(typeof b!="string"){if(j===b){k=!0;break}}else if(h.filter(b,[j]).length>0){k=j;break}}j=j[a]}d[g]=k}}}function q(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,b=0,c=Object.prototype.toString,d=!1,e=!0,f=/\\/g,g=/\W/;[0,0].sort(function(){e=!1;return 0});var h=function(b,d,e,f){e=e||[],d=d||document;var g=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var k,l,n,o,p,q,r,t,u=!0,v=h.isXML(d),w=[],x=b;do{a.exec(""),k=a.exec(x);if(k){x=k[3],w.push(k[1]);if(k[2]){o=k[3];break}}}while(k);if(w.length>1&&j.exec(b))if(w.length===2&&i.relative[w[0]])l=s(w[0]+w[1],d);else{l=i.relative[w[0]]?[d]:h(w.shift(),d);while(w.length)b=w.shift(),i.relative[b]&&(b+=w.shift()),l=s(b,l)}else{!f&&w.length>1&&d.nodeType===9&&!v&&i.match.ID.test(w[0])&&!i.match.ID.test(w[w.length-1])&&(p=h.find(w.shift(),d,v),d=p.expr?h.filter(p.expr,p.set)[0]:p.set[0]);if(d){p=f?{expr:w.pop(),set:m(f)}:h.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),l=p.expr?h.filter(p.expr,p.set):p.set,w.length>0?n=m(l):u=!1;while(w.length)q=w.pop(),r=q,i.relative[q]?r=w.pop():q="",r==null&&(r=d),i.relative[q](n,r,v)}else n=w=[]}n||(n=l),n||h.error(q||b);if(c.call(n)==="[object Array]")if(!u)e.push.apply(e,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&h.contains(d,n[t]))&&e.push(l[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(l[t]);else m(n,e);o&&(h(o,g,e,f),h.uniqueSort(e));return e};h.uniqueSort=function(a){if(o){d=e,a.sort(o);if(d)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},h.matches=function(a,b){return h(a,null,null,b)},h.matchesSelector=function(a,b){return h(b,null,null,[a]).length>0},h.find=function(a,b,c){var d;if(!a)return[];for(var e=0,g=i.order.length;e<g;e++){var h,j=i.order[e];if(h=i.leftMatch[j].exec(a)){var k=h[1];h.splice(1,1);if(k.substr(k.length-1)!=="\\"){h[1]=(h[1]||"").replace(f,""),d=i.find[j](h,b,c);if(d!=null){a=a.replace(i.match[j],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},h.filter=function(a,b,c,d){var e,f,g=a,j=[],k=b,l=b&&b[0]&&h.isXML(b[0]);while(a&&b.length){for(var m in i.filter)if((e=i.leftMatch[m].exec(a))!=null&&e[2]){var n,o,p=i.filter[m],q=e[1];f=!1,e.splice(1,1);if(q.substr(q.length-1)==="\\")continue;k===j&&(j=[]);if(i.preFilter[m]){e=i.preFilter[m](e,k,c,j,d,l);if(!e)f=n=!0;else if(e===!0)continue}if(e)for(var r=0;(o=k[r])!=null;r++)if(o){n=p(o,e,r,k);var s=d^!!n;c&&n!=null?s?f=!0:k[r]=!1:s&&(j.push(o),f=!0)}if(n!==undefined){c||(k=j),a=a.replace(i.match[m],"");if(!f)return[];break}}if(a===g)if(f==null)h.error(a);else break;g=a}return k},h.error=function(a){throw"Syntax error, unrecognized expression: "+a};var i=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!g.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,i=a.length,j;f<i;f++)if(j=a[f]){while((j=j.previousSibling)&&j.nodeType!==1);a[f]=e||j&&j.nodeName.toLowerCase()===b?j||!1:j===b}e&&h.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!g.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var i=c.parentNode;a[e]=i.nodeName.toLowerCase()===b?i:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&h.filter(b,a,!0)}},"":function(a,c,d){var e,f=b++,h=r;typeof c=="string"&&!g.test(c)&&(c=c.toLowerCase(),e=c,h=q),h("parentNode",c,f,a,e,d)},"~":function(a,c,d){var e,f=b++,h=r;typeof c=="string"&&!g.test(c)&&(c=c.toLowerCase(),e=c,h=q),h("previousSibling",c,f,a,e,d)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,g){a=" "+a[1].replace(f,"")+" ";if(g)return a;for(var h=0,i;(i=b[h])!=null;h++)i&&(e^(i.className&&(" "+i.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(i):c&&(b[h]=!1));return!1},ID:function(a){return a[1].replace(f,"")},TAG:function(a,b){return a[1].replace(f,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||h.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var c=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=c[1]+(c[2]||1)-0,a[3]=c[3]-0}else a[2]&&h.error(a[0]);a[0]=b++;return a},ATTR:function(a,b,c,d,e,g){var h=a[1]=a[1].replace(f,"");!g&&i.attrMap[h]&&(a[1]=i.attrMap[h]),a[4]=(a[4]||a[5]||"").replace(f,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=h(b[3],null,null,c);else{var g=h.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(i.match.POS.test(b[0])||i.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!h(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){return a.nodeName.toLowerCase()==="input"&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=i.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||h.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var j=0,k=g.length;j<k;j++)if(g[j]===a)return!1;return!0}h.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=i.attrHandle[c]?i.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=i.setFilters[e];if(f)return f(a,c,b,d)}}},j=i.match.POS,k=function(a,b){return"\\"+(b-0+1)};for(var l in i.match)i.match[l]=new RegExp(i.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source),i.leftMatch[l]=new RegExp(/(^(?:.|\r|\n)*?)/.source+i.match[l].source.replace(/\\(\d+)/g,k));var m=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(n){m=function(a,b){var d=0,e=b||[];if(c.call(a)==="[object Array]")Array.prototype.push.apply(e,a);else if(typeof a.length=="number")for(var f=a.length;d<f;d++)e.push(a[d]);else for(;a[d];d++)e.push(a[d]);return e}}var o,p;document.documentElement.compareDocumentPosition?o=function(a,b){if(a===b){d=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(o=function(a,b){var c,e,f=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){d=!0;return 0}if(h===i)return p(a,b);if(!h)return-1;if(!i)return 1;while(j)f.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=f.length,e=g.length;for(var k=0;k<c&&k<e;k++)if(f[k]!==g[k])return p(f[k],g[k]);return k===c?p(a,g[k],-1):p(f[k],b,1)},p=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),h.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=h.getText(c.childNodes));return b},function(){var a=document.createElement("div"),b="script"+(new Date).getTime(),c=document.documentElement;a.innerHTML="<a name='"+b+"'/>",c.insertBefore(a,c.firstChild),document.getElementById(b)&&(i.find.ID=function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d?d.id===a[1]||typeof d.getAttributeNode!="undefined"&&d.getAttributeNode("id").nodeValue===a[1]?[d]:undefined:[]}},i.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),c.removeChild(a),c=a=null}(),function(){var a=document.createElement("div");a.appendChild(document.createComment("")),a.getElementsByTagName("*").length>0&&(i.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(i.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),document.querySelectorAll&&function(){var a=h,b=document.createElement("div"),c="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){h=function(b,d,e,f){d=d||document;if(!f&&!h.isXML(d)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(g&&(d.nodeType===1||d.nodeType===9)){if(g[1])return m(d.getElementsByTagName(b),e);if(g[2]&&i.find.CLASS&&d.getElementsByClassName)return m(d.getElementsByClassName(g[2]),e)}if(d.nodeType===9){if(b==="body"&&d.body)return m([d.body],e);if(g&&g[3]){var j=d.getElementById(g[3]);if(!j||!j.parentNode)return m([],e);if(j.id===g[3])return m([j],e)}try{return m(d.querySelectorAll(b),e)}catch(k){}}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var l=d,n=d.getAttribute("id"),o=n||c,p=d.parentNode,q=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):d.setAttribute("id",o),q&&p&&(d=d.parentNode);try{if(!q||p)return m(d.querySelectorAll("[id='"+o+"'] "+b),e)}catch(r){}finally{n||l.removeAttribute("id")}}}return a(b,d,e,f)};for(var d in a)h[d]=a[d];b=null}}(),function(){var a=document.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(document.createElement("div"),"div"),d=!1;try{b.call(document.documentElement,"[test!='']:sizzle")}catch(e){d=!0}h.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(a))try{if(d||!i.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&a.document.nodeType!==11)return f}}catch(g){}return h(e,null,null,[a]).length>0}}}(),function(){var a=document.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;i.order.splice(1,0,"CLASS"),i.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),document.documentElement.contains?h.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:document.documentElement.compareDocumentPosition?h.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:h.contains=function(){return!1},h.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var s=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=i.match.PSEUDO.exec(a))e+=c[0],a=a.replace(i.match.PSEUDO,"");a=i.relative[a]?a+"*":a;for(var g=0,j=f.length;g<j;g++)h(a,f[g],d);return h.filter(e,d)};window.Sizzle=h}(),snack.wrap.defineEngine(function(a,b){typeof b=="string"&&(b=Sizzle(b)[0]);return Sizzle(a,b)})
+*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.3",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;if(a.isArray(b)){var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e)}else typeof b=="object"?f=a.toQueryString(b,e):f=e+"="+encodeURIComponent(b);b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),function(){function r(a,b,c,d,e,f){for(var g=0,i=d.length;g<i;g++){var j=d[g];if(j){var k=!1;j=j[a];while(j){if(j.sizcache===c){k=d[j.sizset];break}if(j.nodeType===1){f||(j.sizcache=c,j.sizset=g);if(typeof b!="string"){if(j===b){k=!0;break}}else if(h.filter(b,[j]).length>0){k=j;break}}j=j[a]}d[g]=k}}}function q(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,b=0,c=Object.prototype.toString,d=!1,e=!0,f=/\\/g,g=/\W/;[0,0].sort(function(){e=!1;return 0});var h=function(b,d,e,f){e=e||[],d=d||document;var g=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var k,l,n,o,p,q,r,t,u=!0,v=h.isXML(d),w=[],x=b;do{a.exec(""),k=a.exec(x);if(k){x=k[3],w.push(k[1]);if(k[2]){o=k[3];break}}}while(k);if(w.length>1&&j.exec(b))if(w.length===2&&i.relative[w[0]])l=s(w[0]+w[1],d);else{l=i.relative[w[0]]?[d]:h(w.shift(),d);while(w.length)b=w.shift(),i.relative[b]&&(b+=w.shift()),l=s(b,l)}else{!f&&w.length>1&&d.nodeType===9&&!v&&i.match.ID.test(w[0])&&!i.match.ID.test(w[w.length-1])&&(p=h.find(w.shift(),d,v),d=p.expr?h.filter(p.expr,p.set)[0]:p.set[0]);if(d){p=f?{expr:w.pop(),set:m(f)}:h.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),l=p.expr?h.filter(p.expr,p.set):p.set,w.length>0?n=m(l):u=!1;while(w.length)q=w.pop(),r=q,i.relative[q]?r=w.pop():q="",r==null&&(r=d),i.relative[q](n,r,v)}else n=w=[]}n||(n=l),n||h.error(q||b);if(c.call(n)==="[object Array]")if(!u)e.push.apply(e,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&h.contains(d,n[t]))&&e.push(l[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(l[t]);else m(n,e);o&&(h(o,g,e,f),h.uniqueSort(e));return e};h.uniqueSort=function(a){if(o){d=e,a.sort(o);if(d)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},h.matches=function(a,b){return h(a,null,null,b)},h.matchesSelector=function(a,b){return h(b,null,null,[a]).length>0},h.find=function(a,b,c){var d;if(!a)return[];for(var e=0,g=i.order.length;e<g;e++){var h,j=i.order[e];if(h=i.leftMatch[j].exec(a)){var k=h[1];h.splice(1,1);if(k.substr(k.length-1)!=="\\"){h[1]=(h[1]||"").replace(f,""),d=i.find[j](h,b,c);if(d!=null){a=a.replace(i.match[j],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},h.filter=function(a,b,c,d){var e,f,g=a,j=[],k=b,l=b&&b[0]&&h.isXML(b[0]);while(a&&b.length){for(var m in i.filter)if((e=i.leftMatch[m].exec(a))!=null&&e[2]){var n,o,p=i.filter[m],q=e[1];f=!1,e.splice(1,1);if(q.substr(q.length-1)==="\\")continue;k===j&&(j=[]);if(i.preFilter[m]){e=i.preFilter[m](e,k,c,j,d,l);if(!e)f=n=!0;else if(e===!0)continue}if(e)for(var r=0;(o=k[r])!=null;r++)if(o){n=p(o,e,r,k);var s=d^!!n;c&&n!=null?s?f=!0:k[r]=!1:s&&(j.push(o),f=!0)}if(n!==undefined){c||(k=j),a=a.replace(i.match[m],"");if(!f)return[];break}}if(a===g)if(f==null)h.error(a);else break;g=a}return k},h.error=function(a){throw"Syntax error, unrecognized expression: "+a};var i=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!g.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,i=a.length,j;f<i;f++)if(j=a[f]){while((j=j.previousSibling)&&j.nodeType!==1);a[f]=e||j&&j.nodeName.toLowerCase()===b?j||!1:j===b}e&&h.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!g.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var i=c.parentNode;a[e]=i.nodeName.toLowerCase()===b?i:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&h.filter(b,a,!0)}},"":function(a,c,d){var e,f=b++,h=r;typeof c=="string"&&!g.test(c)&&(c=c.toLowerCase(),e=c,h=q),h("parentNode",c,f,a,e,d)},"~":function(a,c,d){var e,f=b++,h=r;typeof c=="string"&&!g.test(c)&&(c=c.toLowerCase(),e=c,h=q),h("previousSibling",c,f,a,e,d)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,g){a=" "+a[1].replace(f,"")+" ";if(g)return a;for(var h=0,i;(i=b[h])!=null;h++)i&&(e^(i.className&&(" "+i.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(i):c&&(b[h]=!1));return!1},ID:function(a){return a[1].replace(f,"")},TAG:function(a,b){return a[1].replace(f,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||h.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var c=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=c[1]+(c[2]||1)-0,a[3]=c[3]-0}else a[2]&&h.error(a[0]);a[0]=b++;return a},ATTR:function(a,b,c,d,e,g){var h=a[1]=a[1].replace(f,"");!g&&i.attrMap[h]&&(a[1]=i.attrMap[h]),a[4]=(a[4]||a[5]||"").replace(f,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=h(b[3],null,null,c);else{var g=h.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(i.match.POS.test(b[0])||i.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!h(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=i.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||h.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var j=0,k=g.length;j<k;j++)if(g[j]===a)return!1;return!0}h.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=i.attrHandle[c]?i.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=i.setFilters[e];if(f)return f(a,c,b,d)}}},j=i.match.POS,k=function(a,b){return"\\"+(b-0+1)};for(var l in i.match)i.match[l]=new RegExp(i.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source),i.leftMatch[l]=new RegExp(/(^(?:.|\r|\n)*?)/.source+i.match[l].source.replace(/\\(\d+)/g,k));var m=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(n){m=function(a,b){var d=0,e=b||[];if(c.call(a)==="[object Array]")Array.prototype.push.apply(e,a);else if(typeof a.length=="number")for(var f=a.length;d<f;d++)e.push(a[d]);else for(;a[d];d++)e.push(a[d]);return e}}var o,p;document.documentElement.compareDocumentPosition?o=function(a,b){if(a===b){d=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(o=function(a,b){if(a===b){d=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,e,f=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return p(a,b);if(!h)return-1;if(!i)return 1;while(j)f.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=f.length,e=g.length;for(var k=0;k<c&&k<e;k++)if(f[k]!==g[k])return p(f[k],g[k]);return k===c?p(a,g[k],-1):p(f[k],b,1)},p=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),h.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=h.getText(c.childNodes));return b},function(){var a=document.createElement("div"),b="script"+(new Date).getTime(),c=document.documentElement;a.innerHTML="<a name='"+b+"'/>",c.insertBefore(a,c.firstChild),document.getElementById(b)&&(i.find.ID=function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d?d.id===a[1]||typeof d.getAttributeNode!="undefined"&&d.getAttributeNode("id").nodeValue===a[1]?[d]:undefined:[]}},i.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),c.removeChild(a),c=a=null}(),function(){var a=document.createElement("div");a.appendChild(document.createComment("")),a.getElementsByTagName("*").length>0&&(i.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(i.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),document.querySelectorAll&&function(){var a=h,b=document.createElement("div"),c="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){h=function(b,d,e,f){d=d||document;if(!f&&!h.isXML(d)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(g&&(d.nodeType===1||d.nodeType===9)){if(g[1])return m(d.getElementsByTagName(b),e);if(g[2]&&i.find.CLASS&&d.getElementsByClassName)return m(d.getElementsByClassName(g[2]),e)}if(d.nodeType===9){if(b==="body"&&d.body)return m([d.body],e);if(g&&g[3]){var j=d.getElementById(g[3]);if(!j||!j.parentNode)return m([],e);if(j.id===g[3])return m([j],e)}try{return m(d.querySelectorAll(b),e)}catch(k){}}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var l=d,n=d.getAttribute("id"),o=n||c,p=d.parentNode,q=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):d.setAttribute("id",o),q&&p&&(d=d.parentNode);try{if(!q||p)return m(d.querySelectorAll("[id='"+o+"'] "+b),e)}catch(r){}finally{n||l.removeAttribute("id")}}}return a(b,d,e,f)};for(var d in a)h[d]=a[d];b=null}}(),function(){var a=document.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(document.createElement("div"),"div"),d=!1;try{b.call(document.documentElement,"[test!='']:sizzle")}catch(e){d=!0}h.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(a))try{if(d||!i.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&a.document.nodeType!==11)return f}}catch(g){}return h(e,null,null,[a]).length>0}}}(),function(){var a=document.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;i.order.splice(1,0,"CLASS"),i.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),document.documentElement.contains?h.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:document.documentElement.compareDocumentPosition?h.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:h.contains=function(){return!1},h.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var s=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=i.match.PSEUDO.exec(a))e+=c[0],a=a.replace(i.match.PSEUDO,"");a=i.relative[a]?a+"*":a;for(var g=0,j=f.length;g<j;g++)h(a,f[g],d);return h.filter(e,d)};window.Sizzle=h}(),snack.wrap.defineEngine(function(a,b){typeof b=="string"&&(b=Sizzle(b)[0]);return Sizzle(a,b)})
View
52 builds/snack-sizzle.js
@@ -39,7 +39,7 @@ if (typeof Object.create != 'function'){
}
snack.extend({
- v: '1.2.2',
+ v: '1.2.3',
bind: function (fn, context, args) {
args = args || [];
@@ -391,19 +391,17 @@ if (typeof Object.create != 'function'){
var result
- switch (snack.isArray(value)){
- case 'object':
- result = snack.toQueryString(value, key)
- break
- case 'array':
- var qs = {}
- snack.each(value, function(val, i){
- qs[i] = val
- })
- result = snack.toQueryString(qs, key)
- break
- default: result = key + '=' + encodeURIComponent(value)
+ if (snack.isArray(value)){
+ var qs = {}
+ snack.each(value, function(val, i){
+ qs[i] = val
+ })
+ result = snack.toQueryString(qs, key)
}
+ else if (typeof value == 'object')
+ result = snack.toQueryString(value, key)
+ else
+ result = key + '=' + encodeURIComponent(value)
if (value !== null)
queryString.push(result)
@@ -658,8 +656,8 @@ if (typeof Object.create != 'function'){
return this
},
- fire: function (namespace, arguments){
- return listenerMethod(this, 'fire', namespace, arguments)
+ fire: function (namespace, args){
+ return listenerMethod(this, 'fire', namespace, args)
},
delegate: function (event, delegation, handler){
@@ -671,12 +669,12 @@ if (typeof Object.create != 'function'){
return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '')
}
- function listenerMethod(wrapper, method, namespace, arguments){
+ function listenerMethod(wrapper, method, namespace, args){
var data = wrapper.data(namespace)
if (data)
snack.each(data, function (listener){
- listener[method].apply(wrapper, arguments)
+ listener[method].apply(wrapper, args)
})
return wrapper
@@ -1338,7 +1336,8 @@ var Expr = Sizzle.selectors = {
},
reset: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "reset" === elem.type;
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "reset" === elem.type;
},
button: function( elem ) {
@@ -1604,6 +1603,16 @@ if ( document.documentElement.compareDocumentPosition ) {
} else {
sortOrder = function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
var al, bl,
ap = [],
bp = [],
@@ -1611,13 +1620,8 @@ if ( document.documentElement.compareDocumentPosition ) {
bup = b.parentNode,
cur = aup;
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
// If the nodes are siblings (or identical) we can do a quick check
- } else if ( aup === bup ) {
+ if ( aup === bup ) {
return siblingCheck( a, b );
// If no parents were found then the nodes are disconnected
View
2  builds/snack-slick-min.js
@@ -7,4 +7,4 @@
* jQuery (c) John Resig Dual license MIT or GPL Version 2
* contentLoaded (c) Diego Perini MIT License
* Zepto.js (c) Thomas Fuchs MIT License
-*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.2",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;switch(a.isArray(b)){case"object":f=a.toQueryString(b,e);break;case"array":var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e);break;default:f=e+"="+encodeURIComponent(b)}b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),function(){function m(e,f,h,j,l,m,n,o,p,q,r,s,t,u,v,w){if(f||b===-1){a.expressions[++b]=[],c=-1;if(f)return""}if(h||j||c===-1){h=h||" ";var x=a.expressions[b];d&&x[c]&&(x[c].reverseCombinator=i(h)),x[++c]={combinator:h,tag:"*"}}var y=a.expressions[b][c];if(l)y.tag=l.replace(g,"");else if(m)y.id=m.replace(g,"");else if(n)n=n.replace(g,""),y.classList||(y.classList=[]),y.classes||(y.classes=[]),y.classList.push(n),y.classes.push({value:n,regexp:new RegExp("(^|\\s)"+k(n)+"(\\s|$)")});else if(t)w=w||v,w=w?w.replace(g,""):null,y.pseudos||(y.pseudos=[]),y.pseudos.push({key:t.replace(g,""),value:w,type:s.length==1?"class":"element"});else if(o){o=o.replace(g,""),r=(r||"").replace(g,"");var z,A;switch(p){case"^=":A=new RegExp("^"+k(r));break;case"$=":A=new RegExp(k(r)+"$");break;case"~=":A=new RegExp("(^|\\s)"+k(r)+"(\\s|$)");break;case"|=":A=new RegExp("^"+k(r)+"(-|$)");break;case"=":z=function(a){return r==a};break;case"*=":z=function(a){return a&&a.indexOf(r)>-1};break;case"!=":z=function(a){return r!=a};break;default:z=function(a){return!!a}}r==""&&/^[*$^]=$/.test(p)&&(z=function(){return!1}),z||(z=function(a){return a&&A.test(a)}),y.attributes||(y.attributes=[]),y.attributes.push({key:o,operator:p,value:r,test:z})}return""}var a,b,c,d,e={},f={},g=/\\/g,h=function(c,g){if(c==null)return null;if(c.Slick===!0)return c;c=(""+c).replace(/^\s+|\s+$/g,""),d=!!g;var i=d?f:e;if(i[c])return i[c];a={Slick:!0,expressions:[],raw:c,reverse:function(){return h(this.raw,!0)}},b=-1;while(c!=(c=c.replace(l,m)));a.length=a.expressions.length;return i[a.raw]=d?j(a):a},i=function(a){return a==="!"?" ":a===" "?"!":/^!/.test(a)?a.replace(/^!/,""):"!"+a},j=function(a){var b=a.expressions;for(var c=0;c<b.length;c++){var d=b[c],e={parts:[],tag:"*",combinator:i(d[0].combinator)};for(var f=0;f<d.length;f++){var g=d[f];g.reverseCombinator||(g.reverseCombinator=" "),g.combinator=g.reverseCombinator,delete g.reverseCombinator}d.reverse().push(e)}return a},k=function(a){return a.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(a){return"\\"+a})},l=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+k(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),n=this.Slick||{};n.parse=function(a){return h(a)},n.escapeRegExp=k,this.Slick||(this.Slick=n)}.apply(typeof exports!="undefined"?exports:this),function(){var a={},b={},c=Object.prototype.toString;a.isNativeCode=function(a){return/\{\s*\[native code\]\s*\}/.test(""+a)},a.isXML=function(a){return!!a.xmlVersion||!!a.xml||c.call(a)=="[object XMLDocument]"||a.nodeType==9&&a.documentElement.nodeName!="HTML"},a.setDocument=function(a){var c=a.nodeType;if(c!=9)if(c)a=a.ownerDocument;else if(a.navigator)a=a.document;else return;if(this.document!==a){this.document=a;var d=a.documentElement,e=this.getUIDXML(d),f=b[e],g;if(f){for(g in f)this[g]=f[g];return}f=b[e]={},f.root=d,f.isXMLDocument=this.isXML(a),f.brokenStarGEBTN=f.starSelectsClosedQSA=f.idGetsName=f.brokenMixedCaseQSA=f.brokenGEBCN=f.brokenCheckedQSA=f.brokenEmptyAttributeQSA=f.isHTMLDocument=f.nativeMatchesSelector=!1;var h,i,j,k,l,m,n="slick_uniqueid",o=a.createElement("div"),p=a.body||a.getElementsByTagName("body")[0]||d;p.appendChild(o);try{o.innerHTML='<a id="'+n+'"></a>',f.isHTMLDocument=!!a.getElementById(n)}catch(q){}if(f.isHTMLDocument){o.style.display="none",o.appendChild(a.createComment("")),i=o.getElementsByTagName("*").length>1;try{o.innerHTML="foo</foo>",m=o.getElementsByTagName("*"),h=m&&!!m.length&&m[0].nodeName.charAt(0)=="/"}catch(q){}f.brokenStarGEBTN=i||h;try{o.innerHTML='<a name="'+n+'"></a><b id="'+n+'"></b>',f.idGetsName=a.getElementById(n)===o.firstChild}catch(q){}if(o.getElementsByClassName){try{o.innerHTML='<a class="f"></a><a class="b"></a>',o.getElementsByClassName("b").length,o.firstChild.className="b",k=o.getElementsByClassName("b").length!=2}catch(q){}try{o.innerHTML='<a class="a"></a><a class="f b a"></a>',j=o.getElementsByClassName("a").length!=2}catch(q){}f.brokenGEBCN=k||j}if(o.querySelectorAll){try{o.innerHTML="foo</foo>",m=o.querySelectorAll("*"),f.starSelectsClosedQSA=m&&!!m.length&&m[0].nodeName.charAt(0)=="/"}catch(q){}try{o.innerHTML='<a class="MiX"></a>',f.brokenMixedCaseQSA=!o.querySelectorAll(".MiX").length}catch(q){}try{o.innerHTML='<select><option selected="selected">a</option></select>',f.brokenCheckedQSA=o.querySelectorAll(":checked").length==0}catch(q){}try{o.innerHTML='<a class=""></a>',f.brokenEmptyAttributeQSA=o.querySelectorAll('[class*=""]').length!=0}catch(q){}}try{o.innerHTML='<form action="s"><input id="action"/></form>',l=o.firstChild.getAttribute("action")!="s"}catch(q){}f.nativeMatchesSelector=d.matchesSelector||d.mozMatchesSelector||d.webkitMatchesSelector;if(f.nativeMatchesSelector)try{f.nativeMatchesSelector.call(d,":slick"),f.nativeMatchesSelector=null}catch(q){}}try{d.slick_expando=1,delete d.slick_expando,f.getUID=this.getUIDHTML}catch(q){f.getUID=this.getUIDXML}p.removeChild(o),o=m=p=null,f.getAttribute=f.isHTMLDocument&&l?function(a,b){var c=this.attributeGetters[b];if(c)return c.call(a);var d=a.getAttributeNode(b);return d?d.nodeValue:null}:function(a,b){var c=this.attributeGetters[b];return c?c.call(a):a.getAttribute(b)},f.hasAttribute=d&&this.isNativeCode(d.hasAttribute)?function(a,b){return a.hasAttribute(b)}:function(a,b){a=a.getAttributeNode(b);return!(!a||!a.specified&&!a.nodeValue)},f.contains=d&&this.isNativeCode(d.contains)?function(a,b){return a.contains(b)}:d&&d.compareDocumentPosition?function(a,b){return a===b||!!(a.compareDocumentPosition(b)&16)}:function(a,b){if(b)do if(b===a)return!0;while(b=b.parentNode);return!1},f.documentSorter=d.compareDocumentPosition?function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition)return 0;return a.compareDocumentPosition(b)&4?-1:a===b?0:1}:"sourceIndex"in d?function(a,b){if(!a.sourceIndex||!b.sourceIndex)return 0;return a.sourceIndex-b.sourceIndex}:a.createRange?function(a,b){if(!a.ownerDocument||!b.ownerDocument)return 0;var c=a.ownerDocument.createRange(),d=b.ownerDocument.createRange();c.setStart(a,0),c.setEnd(a,0),d.setStart(b,0),d.setEnd(b,0);return c.compareBoundaryPoints(Range.START_TO_END,d)}:null,d=null;for(g in f)this[g]=f[g]}};var d=/^([#.]?)((?:[\w-]+|\*))$/,e=/\[.+[*$^]=(?:""|'')?\]/,f={};a.search=function(a,b,c,g){var h=this.found=g?null:c||[];if(!a)return h;if(a.navigator)a=a.document;else if(!a.nodeType)return h;var i,j,l=this.uniques={},m=!!c&&!!c.length,n=a.nodeType==9;this.document!==(n?a:a.ownerDocument)&&this.setDocument(a);if(m)for(j=h.length;j--;)l[this.getUID(h[j])]=!0;if(typeof b=="string"){var o=b.match(d);simpleSelectors:if(o){var p=o[1],q=o[2],r,s;if(!p){if(q=="*"&&this.brokenStarGEBTN)break simpleSelectors;s=a.getElementsByTagName(q);if(g)return s[0]||null;for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r)}else if(p=="#"){if(!this.isHTMLDocument||!n)break simpleSelectors;r=a.getElementById(q);if(!r)return h;if(this.idGetsName&&r.getAttributeNode("id").nodeValue!=q)break simpleSelectors;if(g)return r||null;(!m||!l[this.getUID(r)])&&h.push(r)}else if(p=="."){if(!this.isHTMLDocument||(!a.getElementsByClassName||this.brokenGEBCN)&&a.querySelectorAll)break simpleSelectors;if(a.getElementsByClassName&&!this.brokenGEBCN){s=a.getElementsByClassName(q);if(g)return s[0]||null;for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r)}else{var t=new RegExp("(^|\\s)"+k.escapeRegExp(q)+"(\\s|$)");s=a.getElementsByTagName("*");for(j=0;r=s[j++];){className=r.className;if(!className||!t.test(className))continue;if(g)return r;(!m||!l[this.getUID(r)])&&h.push(r)}}}m&&this.sort(h);return g?null:h}querySelector:if(a.querySelectorAll){if(!this.isHTMLDocument||f[b]||this.brokenMixedCaseQSA||this.brokenCheckedQSA&&b.indexOf(":checked")>-1||this.brokenEmptyAttributeQSA&&e.test(b)||!n&&b.indexOf(",")>-1||k.disableQSA)break querySelector;var u=b,v=a;if(!n){var w=v.getAttribute("id"),x="slickid__";v.setAttribute("id",x),u="#"+x+" "+u,a=v.parentNode}try{if(g)return a.querySelector(u)||null;s=a.querySelectorAll(u)}catch(y){f[b]=1;break querySelector}finally{n||(w?v.setAttribute("id",w):v.removeAttribute("id"),a=v)}if(this.starSelectsClosedQSA)for(j=0;r=s[j++];)r.nodeName>"@"&&(!m||!l[this.getUID(r)])&&h.push(r);else for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r);m&&this.sort(h);return h}i=this.Slick.parse(b);if(!i.length)return h}else{if(b==null)return h;if(b.Slick)i=b;else{if(this.contains(a.documentElement||a,b)){h?h.push(b):h=b;return h}return h}}this.posNTH={},this.posNTHLast={},this.posNTHType={},this.posNTHTypeLast={},this.push=!m&&(g||i.length==1&&i.expressions[0].length==1)?this.pushArray:this.pushUID,h==null&&(h=[]);var z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.expressions;search:for(j=0;K=N[j];j++)for(z=0;L=K[z];z++){C="combinator:"+L.combinator;if(!this[C])continue search;D=this.isXMLDocument?L.tag:L.tag.toUpperCase(),E=L.id,F=L.classList,G=L.classes,H=L.attributes,I=L.pseudos,M=z===K.length-1,this.bitUniques={},M?(this.uniques=l,this.found=h):(this.uniques={},this.found=[]);if(z===0){this[C](a,D,E,G,H,I,F);if(g&&M&&h.length)break search}else if(g&&M)for(A=0,B=J.length;A<B;A++){this[C](J[A],D,E,G,H,I,F);if(h.length)break search}else for(A=0,B=J.length;A<B;A++)this[C](J[A],D,E,G,H,I,F);J=this.found}(m||i.expressions.length>1)&&this.sort(h);return g?h[0]||null:h},a.uidx=1,a.uidk="slick-uniqueid",a.getUIDXML=function(a){var b=a.getAttribute(this.uidk);b||(b=this.uidx++,a.setAttribute(this.uidk,b));return b},a.getUIDHTML=function(a){return a.uniqueNumber||(a.uniqueNumber=this.uidx++)},a.sort=function(a){if(!this.documentSorter)return a;a.sort(this.documentSorter);return a},a.cacheNTH={},a.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/,a.parseNTHArgument=function(a){var b=a.match(this.matchNTH);if(!b)return!1;var c=b[2]||!1,d=b[1]||1;d=="-"&&(d=-1);var e=+b[3]||0;b=c=="n"?{a:d,b:e}:c=="odd"?{a:2,b:1}:c=="even"?{a:2,b:0}:{a:0,b:d};return this.cacheNTH[a]=b},a.createNTHPseudo=function(a,b,c,d){return function(e,f){var g=this.getUID(e);if(!this[c][g]){var h=e.parentNode;if(!h)return!1;var i=h[a],j=1;if(d){var k=e.nodeName;do{if(i.nodeName!=k)continue;this[c][this.getUID(i)]=j++}while(i=i[b])}else do{if(i.nodeType!=1)continue;this[c][this.getUID(i)]=j++}while(i=i[b])}f=f||"n";var l=this.cacheNTH[f]||this.parseNTHArgument(f);if(!l)return!1;var m=l.a,n=l.b,o=this[c][g];if(m==0)return n==o;if(m>0){if(o<n)return!1}else if(n<o)return!1;return(o-n)%m==0}},a.pushArray=function(a,b,c,d,e,f){this.matchSelector(a,b,c,d,e,f)&&this.found.push(a)},a.pushUID=function(a,b,c,d,e,f){var g=this.getUID(a);!this.uniques[g]&&this.matchSelector(a,b,c,d,e,f)&&(this.uniques[g]=!0,this.found.push(a))},a.matchNode=function(a,b){if(this.isHTMLDocument&&this.nativeMatchesSelector)try{return this.nativeMatchesSelector.call(a,b.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'))}catch(c){}var d=this.Slick.parse(b);if(!d)return!0;var e=d.expressions,f,g=0,h;for(h=0;currentExpression=e[h];h++)if(currentExpression.length==1){var i=currentExpression[0];if(this.matchSelector(a,this.isXMLDocument?i.tag:i.tag.toUpperCase(),i.id,i.classes,i.attributes,i.pseudos))return!0;g++}if(g==d.length)return!1;var j=this.search(this.document,d),k;for(h=0;k=j[h++];)if(k===a)return!0;return!1},a.matchPseudo=function(a,b,c){var d="pseudo:"+b;if(this[d])return this[d](a,c);var e=this.getAttribute(a,b);return c?c==e:!!e},a.matchSelector=function(a,b,c,d,e,f){if(b){var g=this.isXMLDocument?a.nodeName:a.nodeName.toUpperCase();if(b=="*"){if(g<"@")return!1}else if(g!=b)return!1}if(c&&a.getAttribute("id")!=c)return!1;var h,i,j;if(d)for(h=d.length;h--;){j=a.getAttribute("class")||a.className;if(!j||!d[h].regexp.test(j))return!1}if(e)for(h=e.length;h--;){i=e[h];if(i.operator?!i.test(this.getAttribute(a,i.key)):!this.hasAttribute(a,i.key))return!1}if(f)for(h=f.length;h--;){i=f[h];if(!this.matchPseudo(a,i.key,i.value))return!1}return!0};var g={" ":function(a,b,c,d,e,f,g){var h,i,j;if(this.isHTMLDocument){getById:if(c){i=this.document.getElementById(c);if(!i&&a.all||this.idGetsName&&i&&i.getAttributeNode("id").nodeValue!=c){j=a.all[c];if(!j)return;j[0]||(j=[j]);for(h=0;i=j[h++];){var k=i.getAttributeNode("id");if(k&&k.nodeValue==c){this.push(i,b,null,d,e,f);break}}return}if(!i){if(this.contains(this.root,a))return;break getById}if(this.document!==a&&!this.contains(a,i))return;this.push(i,b,null,d,e,f);return}getByClass:if(d&&a.getElementsByClassName&&!this.brokenGEBCN){j=a.getElementsByClassName(g.join(" "));if(!j||!j.length)break getByClass;for(h=0;i=j[h++];)this.push(i,b,c,null,e,f);return}}getByTag:{j=a.getElementsByTagName(b);if(!j||!j.length)break getByTag;this.brokenStarGEBTN||(b=null);for(h=0;i=j[h++];)this.push(i,b,c,d,e,f)}},">":function(a,b,c,d,e,f){if(a=a.firstChild)do a.nodeType==1&&this.push(a,b,c,d,e,f);while(a=a.nextSibling)},"+":function(a,b,c,d,e,f){while(a=a.nextSibling)if(a.nodeType==1){this.push(a,b,c,d,e,f);break}},"^":function(a,b,c,d,e,f){a=a.firstChild,a&&(a.nodeType==1?this.push(a,b,c,d,e,f):this["combinator:+"](a,b,c,d,e,f))},"~":function(a,b,c,d,e,f){while(a=a.nextSibling){if(a.nodeType!=1)continue;var g=this.getUID(a);if(this.bitUniques[g])break;this.bitUniques[g]=!0,this.push(a,b,c,d,e,f)}},"++":function(a,b,c,d,e,f){this["combinator:+"](a,b,c,d,e,f),this["combinator:!+"](a,b,c,d,e,f)},"~~":function(a,b,c,d,e,f){this["combinator:~"](a,b,c,d,e,f),this["combinator:!~"](a,b,c,d,e,f)},"!":function(a,b,c,d,e,f){while(a=a.parentNode)a!==this.document&&this.push(a,b,c,d,e,f)},"!>":function(a,b,c,d,e,f){a=a.parentNode,a!==this.document&&this.push(a,b,c,d,e,f)},"!+":function(a,b,c,d,e,f){while(a=a.previousSibling)if(a.nodeType==1){this.push(a,b,c,d,e,f);break}},"!^":function(a,b,c,d,e,f){a=a.lastChild,a&&(a.nodeType==1?this.push(a,b,c,d,e,f):this["combinator:!+"](a,b,c,d,e,f))},"!~":function(a,b,c,d,e,f){while(a=a.previousSibling){if(a.nodeType!=1)continue;var g=this.getUID(a);if(this.bitUniques[g])break;this.bitUniques[g]=!0,this.push(a,b,c,d,e,f)}}};for(var h in g)a["combinator:"+h]=g[h];var i={empty:function(a){var b=a.firstChild;return(!b||b.nodeType!=1)&&!(a.innerText||a.textContent||"").length},not:function(a,b){return!this.matchNode(a,b)},contains:function(a,b){return(a.innerText||a.textContent||"").indexOf(b)>-1},"first-child":function(a){while(a=a.previousSibling)if(a.nodeType==1)return!1;return!0},"last-child":function(a){while(a=a.nextSibling)if(a.nodeType==1)return!1;return!0},"only-child":function(a){var b=a;while(b=b.previousSibling)if(b.nodeType==1)return!1;var c=a;while(c=c.nextSibling)if(c.nodeType==1)return!1;return!0},"nth-child":a.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":a.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":a.createNTHPseudo("firstChild","nextSibling","posNTHType",!0),"nth-last-of-type":a.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",!0),index:function(a,b){return this["pseudo:nth-child"](a,""+b+1)},even:function(a){return this["pseudo:nth-child"](a,"2n")},odd:function(a){return this["pseudo:nth-child"](a,"2n+1")},"first-of-type":function(a){var b=a.nodeName;while(a=a.previousSibling)if(a.nodeName==b)return!1;return!0},"last-of-type":function(a){var b=a.nodeName;while(a=a.nextSibling)if(a.nodeName==b)return!1;return!0},"only-of-type":function(a){var b=a,c=a.nodeName;while(b=b.previousSibling)if(b.nodeName==c)return!1;var d=a;while(d=d.nextSibling)if(d.nodeName==c)return!1;return!0},enabled:function(a){return!a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked||a.selected},focus:function(a){return this.isHTMLDocument&&this.document.activeElement===a&&(a.href||a.type||this.hasAttribute(a,"tabindex"))},root:function(a){return a===this.root},selected:function(a){return a.selected}};for(var j in i)a["pseudo:"+j]=i[j];a.attributeGetters={"class":function(){return this.getAttribute("class")||this.className},"for":function(){return"htmlFor"in this?this.htmlFor:this.getAttribute("for")},href:function(){return"href"in this?this.getAttribute("href",2):this.getAttribute("href")},style:function(){return this.style?this.style.cssText:this.getAttribute("style")},tabindex:function(){var a=this.getAttributeNode("tabindex");return a&&a.specified?a.nodeValue:null},type:function(){return this.getAttribute("type")}};var k=a.Slick=this.Slick||{};k.version="1.1.5",k.search=function(b,c,d){return a.search(b,c,d)},k.find=function(b,c){return a.search(b,c,null,!0)},k.contains=function(b,c){a.setDocument(b);return a.contains(b,c)},k.getAttribute=function(b,c){return a.getAttribute(b,c)},k.match=function(b,c){if(!b||!c)return!1;if(!c||c===b)return!0;a.setDocument(b);return a.matchNode(b,c)},k.defineAttributeGetter=function(b,c){a.attributeGetters[b]=c;return this},k.lookupAttributeGetter=function(b){return a.attributeGetters[b]},k.definePseudo=function(b,c){a["pseudo:"+b]=function(a,b){return c.call(a,b)};return this},k.lookupPseudo=function(b){var c=a["pseudo:"+b];if(c)return function(a){return c.call(this,a)};return null},k.override=function(b,c){a.override(b,c);return this},k.isXML=a.isXML,k.uidOf=function(b){return a.getUIDHTML(b)},this.Slick||(this.Slick=k)}.apply(typeof exports!="undefined"?exports:this),snack.wrap.defineEngine(function(a,b){typeof b=="string"&&(b=Slick.find(document,b));return Slick.search(b||document,a)})
+*/typeof Object.create!="function"&&(Object.create=function(a){function b(){}b.prototype=a;return new b}),!function(a){var b=a.snack={},c=0,d=Object.prototype.toString,e=[].indexOf,f=[].push;b.extend=function(){if(arguments.length==1)return b.extend(b,arguments[0]);var a=arguments[0];for(var c,d=1,e=arguments.length;d<e;d++)for(c in arguments[d])a[c]=arguments[d][c];return a},b.extend({v:"1.2.3",bind:function(a,b,c){c=c||[];return function(){f.apply(c,arguments);return a.apply(b,c)}},punch:function(a,c,d,e){var f=a[c];a[c]=e?function(){f.apply(a,arguments);return d.apply(a,arguments)}:function(){var c=[].slice.call(arguments,0);c.unshift(b.bind(f,a));return d.apply(a,c)}},create:function(a,c){var d=Object.create(a);if(!c)return d;for(var e in c){if(!c.hasOwnProperty(e))continue;if(!a[e]||typeof c[e]!="function"){d[e]=c[e];continue}b.punch(d,e,c[e])}return d},id:function(){return++c},each:function(a,b,c){if(a.length===void 0){for(var d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);return a}for(var e=0,f=a.length;e<f;e++)b.call(c,a[e],e,a);return a},parseJSON:function(b){if(typeof b=="string"){b=b.replace(/^\s+|\s+$/g,"");var c=/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""));if(!c)throw"Invalid JSON";var d=a.JSON;return d&&d.parse?d.parse(b):(new Function("return "+b))()}},isArray:function(a){return a instanceof Array||d.call(a)=="[object Array]"},indexOf:e?function(a,b){return e.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}})}(window),!function(a,b){var c={},d;a.wrap=function(b,e){typeof b=="string"&&(b=d(b,e)),b.length||(b=[b]);var f=Object.create(c),g=0,h=b.length;for(;g<h;g++)f[g]=b[g];f.length=h,f.id=a.id();return f},a.extend(a.wrap,{define:function(b,d){if(typeof b!="string")for(var e in b)a.wrap.define(e,b[e]);else c[b]=d},defineEngine:function(a){d=a}}),a.wrap.defineEngine(function(a,c){typeof c=="string"&&(c=b.querySelector(c));return(c||b).querySelectorAll(a)})}(snack,document),!function(a,b,c){function l(){try{i.doScroll("left")}catch(a){setTimeout(l,50);return}k("poll")}function k(d){if(d.type!="readystatechange"||c.readyState=="complete")(d.type=="load"?b:c)[e](f+d.type,k,!1),!g&&(g=!0)&&a.each(j,function(a){a.apply(c)})}var d=c.addEventListener?"addEventListener":"attachEvent",e=c.addEventListener?"removeEventListener":"detachEvent",f=c.addEventListener?"":"on",g=!1,h=!0,i=c.documentElement,j=[];a.extend({stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1}}),a.listener=function(b,g){b.delegate&&(b.capture=!0,_handler=g,g=function(d){var e=d.target||d.srcElement,f=typeof b.delegate=="string"?a.wrap(b.delegate,b.node):b.delegate(b.node);while(e&&a.indexOf(e,f)==-1)e=e.parentNode;e&&e!==this&&e!==c&&_handler.call(e,d,e)}),b.context&&(g=a.bind(g,b.context));var h={attach:function(){b.node[d](f+b.event,g,b.capture)},detach:function(){b.node[e](f+b.event,g,b.capture)},fire:function(){g.apply(b.node,arguments)}};h.attach();return h},a.ready=function(a){g?a.apply(c):j.push(a)};if(c.createEventObject&&i.doScroll){try{h=!b.frameElement}catch(m){}h&&l()}c[d](f+"DOMContentLoaded",k,!1),c[d](f+"readystatechange",k,!1),b[d](f+"load",k,!1)}(snack,window,document),!function(a){a.publisher=function(b){var c={};b=b||{},a.extend(b,{subscribe:function(b,d,e){var f={fn:d,ctxt:e||{}};c[b]||(c[b]=[]);var g={attach:function(){c[b].push(f)},detach:function(){c[b].splice(a.indexOf(d,c[b]),1)}};g.attach();return g},publish:function(b,d){if(!c[b])return!1;a.each(c[b],function(a){a.fn.apply(a.ctxt,d||[])});return c[b].length}});return b},a.publisher(a)}(snack),!function(a,b,c){function e(){}a.JSONP=function(b,d){var e="jsonp"+a.id(),f=c.createElement("script"),g=!1;a.JSONP[e]=function(b){g=!1,delete a.JSONP[e],d(b)},typeof b.data=="object"&&(b.data=a.toQueryString(b.data));var h={send:function(){g=!0,f.src=b.url+"?"+b.key+"=snack.JSONP."+e+"&"+b.data,c.getElementsByTagName("head")[0].appendChild(f)},cancel:function(){g&&f.parentNode&&f.parentNode.removeChild(f),g=!1,a.JSONP[e]=function(){delete a.JSONP[e]}}};b.now!==!1&&h.send();return h},a.toQueryString=function(b,c){var d=[];a.each(b,function(b,e){c&&(e=c+"["+e+"]");var f;if(a.isArray(b)){var g={};a.each(b,function(a,b){g[b]=a}),f=a.toQueryString(g,e)}else typeof b=="object"?f=a.toQueryString(b,e):f=e+"="+encodeURIComponent(b);b!==null&&d.push(f)});return d.join("&")};var d=function(){var a=function(){return new XMLHttpRequest},b=function(){return new ActiveXObject("MSXML2.XMLHTTP")},c=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{a();return a}catch(d){try{b();return b}catch(d){c();return c}}}();a.request=function(b,c){if(!(this instanceof a.request))return new a.request(b,c);var e=this;e.options=a.extend({},e.options,b),e.callback=c,e.xhr=new d,e.headers=e.options.headers,e.options.now!==!1&&e.send()},a.request.prototype={options:{exception:e,url:"",data:"",method:"get",now:!0,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,emulation:!0,urlEncoded:!0,encoding:"utf-8"},onStateChange:function(){var a=this,b=a.xhr;if(b.readyState==4&&!!a.running){a.running=!1,a.status=0;try{var c=b.status;a.status=c==1223?204:c}catch(d){}b.onreadystatechange=e;var f=a.status>=200&&a.status<300?[!1,a.xhr.responseText||"",a.xhr.responseXML]:[a.status];a.callback.apply(a,f)}},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){try{return this.xhr.getResponseHeader(a)}catch(b){return null}},send:function(){var b=this,d=b.options;if(b.running)return b;b.running=!0;var e=d.data||"",f=String(d.url),g=d.method.toLowerCase();typeof e!="string"&&(e=a.toQueryString(e));if(d.emulation&&a.indexOf(g,["get","post"])<0){var h="_method="+g;e=e?h+"&"+e:h,g="post"}if(d.urlEncoded&&a.indexOf(g,["post","put"])>-1){var i=d.encoding?"; charset="+d.encoding:"";b.headers["Content-type"]="application/x-www-form-urlencoded"+i}f||(f=c.location.pathname);var j=f.lastIndexOf("/");j>-1&&(j=f.indexOf("#"))>-1&&(f=f.substr(0,j)),e&&g=="get"&&(f+=(f.indexOf("?")>-1?"&":"?")+e,e=null);var k=b.xhr;k.open(g.toUpperCase(),f,open.async,d.user,d.password),d.user&&"withCredentials"in k&&(k.withCredentials=!0),k.onreadystatechange=a.bind(b.onStateChange,b);for(var l in b.headers)try{k.setRequestHeader(l,b.headers[l])}catch(m){d.exception.apply(b,[l,b.headers[l]])}k.send(e),d.async||b.onStateChange();return b},cancel:function(){var a=this;if(!a.running)return a;a.running=!1;var b=a.xhr;b.abort(),b.onreadystatechange=e,a.xhr=new d;return a}}}(snack,window,document),!function(a,b){function d(b,c,d,e){var f=b.data(d);f&&a.each(f,function(a){a[c].apply(b,e)});return b}function c(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}a.wrap.define({data:function(){var a={};return function(b,c){var d=a[this.id];d||(d=a[this.id]={});if(c===void 1)return d[b];return d[b]=c}}(),each:function(b,c){return a.each(this,b,c)},addClass:function(a){return this.each(function(b){c(b.className).indexOf(a)>-1||(b.className=c(b.className+" "+a))})},removeClass:function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1")})},attach:function(b,c,d){var e=b.split("."),f=[];e[1]&&(f=this.data(e[1])||[]),this.each(function(b){var g={node:b,event:e[0]};d&&(g.delegate=d),f.push(a.listener(g,c))}),e[1]&&this.data(e[1],f);return this},detach:function(a){d(this,"detach",a,null,!0),this.data(a,null);return this},fire:function(a,b){return d(this,"fire",a,b)},delegate:function(a,b,c){return this.attach(a,c,b)}})}(snack,document),function(){function m(e,f,h,j,l,m,n,o,p,q,r,s,t,u,v,w){if(f||b===-1){a.expressions[++b]=[],c=-1;if(f)return""}if(h||j||c===-1){h=h||" ";var x=a.expressions[b];d&&x[c]&&(x[c].reverseCombinator=i(h)),x[++c]={combinator:h,tag:"*"}}var y=a.expressions[b][c];if(l)y.tag=l.replace(g,"");else if(m)y.id=m.replace(g,"");else if(n)n=n.replace(g,""),y.classList||(y.classList=[]),y.classes||(y.classes=[]),y.classList.push(n),y.classes.push({value:n,regexp:new RegExp("(^|\\s)"+k(n)+"(\\s|$)")});else if(t)w=w||v,w=w?w.replace(g,""):null,y.pseudos||(y.pseudos=[]),y.pseudos.push({key:t.replace(g,""),value:w,type:s.length==1?"class":"element"});else if(o){o=o.replace(g,""),r=(r||"").replace(g,"");var z,A;switch(p){case"^=":A=new RegExp("^"+k(r));break;case"$=":A=new RegExp(k(r)+"$");break;case"~=":A=new RegExp("(^|\\s)"+k(r)+"(\\s|$)");break;case"|=":A=new RegExp("^"+k(r)+"(-|$)");break;case"=":z=function(a){return r==a};break;case"*=":z=function(a){return a&&a.indexOf(r)>-1};break;case"!=":z=function(a){return r!=a};break;default:z=function(a){return!!a}}r==""&&/^[*$^]=$/.test(p)&&(z=function(){return!1}),z||(z=function(a){return a&&A.test(a)}),y.attributes||(y.attributes=[]),y.attributes.push({key:o,operator:p,value:r,test:z})}return""}var a,b,c,d,e={},f={},g=/\\/g,h=function(c,g){if(c==null)return null;if(c.Slick===!0)return c;c=(""+c).replace(/^\s+|\s+$/g,""),d=!!g;var i=d?f:e;if(i[c])return i[c];a={Slick:!0,expressions:[],raw:c,reverse:function(){return h(this.raw,!0)}},b=-1;while(c!=(c=c.replace(l,m)));a.length=a.expressions.length;return i[a.raw]=d?j(a):a},i=function(a){return a==="!"?" ":a===" "?"!":/^!/.test(a)?a.replace(/^!/,""):"!"+a},j=function(a){var b=a.expressions;for(var c=0;c<b.length;c++){var d=b[c],e={parts:[],tag:"*",combinator:i(d[0].combinator)};for(var f=0;f<d.length;f++){var g=d[f];g.reverseCombinator||(g.reverseCombinator=" "),g.combinator=g.reverseCombinator,delete g.reverseCombinator}d.reverse().push(e)}return a},k=function(a){return a.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(a){return"\\"+a})},l=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+k(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),n=this.Slick||{};n.parse=function(a){return h(a)},n.escapeRegExp=k,this.Slick||(this.Slick=n)}.apply(typeof exports!="undefined"?exports:this),function(){var a={},b={},c=Object.prototype.toString;a.isNativeCode=function(a){return/\{\s*\[native code\]\s*\}/.test(""+a)},a.isXML=function(a){return!!a.xmlVersion||!!a.xml||c.call(a)=="[object XMLDocument]"||a.nodeType==9&&a.documentElement.nodeName!="HTML"},a.setDocument=function(a){var c=a.nodeType;if(c!=9)if(c)a=a.ownerDocument;else if(a.navigator)a=a.document;else return;if(this.document!==a){this.document=a;var d=a.documentElement,e=this.getUIDXML(d),f=b[e],g;if(f){for(g in f)this[g]=f[g];return}f=b[e]={},f.root=d,f.isXMLDocument=this.isXML(a),f.brokenStarGEBTN=f.starSelectsClosedQSA=f.idGetsName=f.brokenMixedCaseQSA=f.brokenGEBCN=f.brokenCheckedQSA=f.brokenEmptyAttributeQSA=f.isHTMLDocument=f.nativeMatchesSelector=!1;var h,i,j,k,l,m,n="slick_uniqueid",o=a.createElement("div"),p=a.body||a.getElementsByTagName("body")[0]||d;p.appendChild(o);try{o.innerHTML='<a id="'+n+'"></a>',f.isHTMLDocument=!!a.getElementById(n)}catch(q){}if(f.isHTMLDocument){o.style.display="none",o.appendChild(a.createComment("")),i=o.getElementsByTagName("*").length>1;try{o.innerHTML="foo</foo>",m=o.getElementsByTagName("*"),h=m&&!!m.length&&m[0].nodeName.charAt(0)=="/"}catch(q){}f.brokenStarGEBTN=i||h;try{o.innerHTML='<a name="'+n+'"></a><b id="'+n+'"></b>',f.idGetsName=a.getElementById(n)===o.firstChild}catch(q){}if(o.getElementsByClassName){try{o.innerHTML='<a class="f"></a><a class="b"></a>',o.getElementsByClassName("b").length,o.firstChild.className="b",k=o.getElementsByClassName("b").length!=2}catch(q){}try{o.innerHTML='<a class="a"></a><a class="f b a"></a>',j=o.getElementsByClassName("a").length!=2}catch(q){}f.brokenGEBCN=k||j}if(o.querySelectorAll){try{o.innerHTML="foo</foo>",m=o.querySelectorAll("*"),f.starSelectsClosedQSA=m&&!!m.length&&m[0].nodeName.charAt(0)=="/"}catch(q){}try{o.innerHTML='<a class="MiX"></a>',f.brokenMixedCaseQSA=!o.querySelectorAll(".MiX").length}catch(q){}try{o.innerHTML='<select><option selected="selected">a</option></select>',f.brokenCheckedQSA=o.querySelectorAll(":checked").length==0}catch(q){}try{o.innerHTML='<a class=""></a>',f.brokenEmptyAttributeQSA=o.querySelectorAll('[class*=""]').length!=0}catch(q){}}try{o.innerHTML='<form action="s"><input id="action"/></form>',l=o.firstChild.getAttribute("action")!="s"}catch(q){}f.nativeMatchesSelector=d.matchesSelector||d.mozMatchesSelector||d.webkitMatchesSelector;if(f.nativeMatchesSelector)try{f.nativeMatchesSelector.call(d,":slick"),f.nativeMatchesSelector=null}catch(q){}}try{d.slick_expando=1,delete d.slick_expando,f.getUID=this.getUIDHTML}catch(q){f.getUID=this.getUIDXML}p.removeChild(o),o=m=p=null,f.getAttribute=f.isHTMLDocument&&l?function(a,b){var c=this.attributeGetters[b];if(c)return c.call(a);var d=a.getAttributeNode(b);return d?d.nodeValue:null}:function(a,b){var c=this.attributeGetters[b];return c?c.call(a):a.getAttribute(b)},f.hasAttribute=d&&this.isNativeCode(d.hasAttribute)?function(a,b){return a.hasAttribute(b)}:function(a,b){a=a.getAttributeNode(b);return!(!a||!a.specified&&!a.nodeValue)},f.contains=d&&this.isNativeCode(d.contains)?function(a,b){return a.contains(b)}:d&&d.compareDocumentPosition?function(a,b){return a===b||!!(a.compareDocumentPosition(b)&16)}:function(a,b){if(b)do if(b===a)return!0;while(b=b.parentNode);return!1},f.documentSorter=d.compareDocumentPosition?function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition)return 0;return a.compareDocumentPosition(b)&4?-1:a===b?0:1}:"sourceIndex"in d?function(a,b){if(!a.sourceIndex||!b.sourceIndex)return 0;return a.sourceIndex-b.sourceIndex}:a.createRange?function(a,b){if(!a.ownerDocument||!b.ownerDocument)return 0;var c=a.ownerDocument.createRange(),d=b.ownerDocument.createRange();c.setStart(a,0),c.setEnd(a,0),d.setStart(b,0),d.setEnd(b,0);return c.compareBoundaryPoints(Range.START_TO_END,d)}:null,d=null;for(g in f)this[g]=f[g]}};var d=/^([#.]?)((?:[\w-]+|\*))$/,e=/\[.+[*$^]=(?:""|'')?\]/,f={};a.search=function(a,b,c,g){var h=this.found=g?null:c||[];if(!a)return h;if(a.navigator)a=a.document;else if(!a.nodeType)return h;var i,j,l=this.uniques={},m=!!c&&!!c.length,n=a.nodeType==9;this.document!==(n?a:a.ownerDocument)&&this.setDocument(a);if(m)for(j=h.length;j--;)l[this.getUID(h[j])]=!0;if(typeof b=="string"){var o=b.match(d);simpleSelectors:if(o){var p=o[1],q=o[2],r,s;if(!p){if(q=="*"&&this.brokenStarGEBTN)break simpleSelectors;s=a.getElementsByTagName(q);if(g)return s[0]||null;for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r)}else if(p=="#"){if(!this.isHTMLDocument||!n)break simpleSelectors;r=a.getElementById(q);if(!r)return h;if(this.idGetsName&&r.getAttributeNode("id").nodeValue!=q)break simpleSelectors;if(g)return r||null;(!m||!l[this.getUID(r)])&&h.push(r)}else if(p=="."){if(!this.isHTMLDocument||(!a.getElementsByClassName||this.brokenGEBCN)&&a.querySelectorAll)break simpleSelectors;if(a.getElementsByClassName&&!this.brokenGEBCN){s=a.getElementsByClassName(q);if(g)return s[0]||null;for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r)}else{var t=new RegExp("(^|\\s)"+k.escapeRegExp(q)+"(\\s|$)");s=a.getElementsByTagName("*");for(j=0;r=s[j++];){className=r.className;if(!className||!t.test(className))continue;if(g)return r;(!m||!l[this.getUID(r)])&&h.push(r)}}}m&&this.sort(h);return g?null:h}querySelector:if(a.querySelectorAll){if(!this.isHTMLDocument||f[b]||this.brokenMixedCaseQSA||this.brokenCheckedQSA&&b.indexOf(":checked")>-1||this.brokenEmptyAttributeQSA&&e.test(b)||!n&&b.indexOf(",")>-1||k.disableQSA)break querySelector;var u=b,v=a;if(!n){var w=v.getAttribute("id"),x="slickid__";v.setAttribute("id",x),u="#"+x+" "+u,a=v.parentNode}try{if(g)return a.querySelector(u)||null;s=a.querySelectorAll(u)}catch(y){f[b]=1;break querySelector}finally{n||(w?v.setAttribute("id",w):v.removeAttribute("id"),a=v)}if(this.starSelectsClosedQSA)for(j=0;r=s[j++];)r.nodeName>"@"&&(!m||!l[this.getUID(r)])&&h.push(r);else for(j=0;r=s[j++];)(!m||!l[this.getUID(r)])&&h.push(r);m&&this.sort(h);return h}i=this.Slick.parse(b);if(!i.length)return h}else{if(b==null)return h;if(b.Slick)i=b;else{if(this.contains(a.documentElement||a,b)){h?h.push(b):h=b;return h}return h}}this.posNTH={},this.posNTHLast={},this.posNTHType={},this.posNTHTypeLast={},this.push=!m&&(g||i.length==1&&i.expressions[0].length==1)?this.pushArray:this.pushUID,h==null&&(h=[]);var z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.expressions;search:for(j=0;K=N[j];j++)for(z=0;L=K[z];z++){C="combinator:"+L.combinator;if(!this[C])continue search;D=this.isXMLDocument?L.tag:L.tag.toUpperCase(),E=L.id,F=L.classList,G=L.classes,H=L.attributes,I=L.pseudos,M=z===K.length-1,this.bitUniques={},M?(this.uniques=l,this.found=h):(this.uniques={},this.found=[]);if(z===0){this[C](a,D,E,G,H,I,F);if(g&&M&&h.length)break search}else if(g&&M)for(A=0,B=J.length;A<B;A++){this[C](J[A],D,E,G,H,I,F);if(h.length)break search}else for(A=0,B=J.length;A<B;A++)this[C](J[A],D,E,G,H,I,F);J=this.found}(m||i.expressions.length>1)&&this.sort(h);return g?h[0]||null:h},a.uidx=1,a.uidk="slick-uniqueid",a.getUIDXML=function(a){var b=a.getAttribute(this.uidk);b||(b=this.uidx++,a.setAttribute(this.uidk,b));return b},a.getUIDHTML=function(a){return a.uniqueNumber||(a.uniqueNumber=this.uidx++)},a.sort=function(a){if(!this.documentSorter)return a;a.sort(this.documentSorter);return a},a.cacheNTH={},a.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/,a.parseNTHArgument=function(a){var b=a.match(this.matchNTH);if(!b)return!1;var c=b[2]||!1,d=b[1]||1;d=="-"&&(d=-1);var e=+b[3]||0;b=c=="n"?{a:d,b:e}:c=="odd"?{a:2,b:1}:c=="even"?{a:2,b:0}:{a:0,b:d};return this.cacheNTH[a]=b},a.createNTHPseudo=function(a,b,c,d){return function(e,f){var g=this.getUID(e);if(!this[c][g]){var h=e.parentNode;if(!h)return!1;var i=h[a],j=1;if(d){var k=e.nodeName;do{if(i.nodeName!=k)continue;this[c][this.getUID(i)]=j++}while(i=i[b])}else do{if(i.nodeType!=1)continue;this[c][this.getUID(i)]=j++}while(i=i[b])}f=f||"n";var l=this.cacheNTH[f]||this.parseNTHArgument(f);if(!l)return!1;var m=l.a,n=l.b,o=this[c][g];if(m==0)return n==o;if(m>0){if(o<n)return!1}else if(n<o)return!1;return(o-n)%m==0}},a.pushArray=function(a,b,c,d,e,f){this.matchSelector(a,b,c,d,e,f)&&this.found.push(a)},a.pushUID=function(a,b,c,d,e,f){var g=this.getUID(a);!this.uniques[g]&&this.matchSelector(a,b,c,d,e,f)&&(this.uniques[g]=!0,this.found.push(a))},a.matchNode=function(a,b){if(this.isHTMLDocument&&this.nativeMatchesSelector)try{return this.nativeMatchesSelector.call(a,b.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'))}catch(c){}var d=this.Slick.parse(b);if(!d)return!0;var e=d.expressions,f,g=0,h;for(h=0;currentExpression=e[h];h++)if(currentExpression.length==1){var i=currentExpression[0];if(this.matchSelector(a,this.isXMLDocument?i.tag:i.tag.toUpperCase(),i.id,i.classes,i.attributes,i.pseudos))return!0;g++}if(g==d.length)return!1;var j=this.search(this.document,d),k;for(h=0;k=j[h++];)if(k===a)return!0;return!1},a.matchPseudo=function(a,b,c){var d="pseudo:"+b;if(this[d])return this[d](a,c);var e=this.getAttribute(a,b);return c?c==e:!!e},a.matchSelector=function(a,b,c,d,e,f){if(b){var g=this.isXMLDocument?a.nodeName:a.nodeName.toUpperCase();if(b=="*"){if(g<"@")return!1}else if(g!=b)return!1}if(c&&a.getAttribute("id")!=c)return!1;var h,i,j;if(d)for(h=d.length;h--;){j=a.getAttribute("class")||a.className;if(!j||!d[h].regexp.test(j))return!1}if(e)for(h=e.length;h--;){i=e[h];if(i.operator?!i.test(this.getAttribute(a,i.key)):!this.hasAttribute(a,i.key))return!1}if(f)for(h=f.length;h--;){i=f[h];if(!this.matchPseudo(a,i.key,i.value))return!1}return!0};var g={" ":function(a,b,c,d,e,f,g){var h,i,j;if(this.isHTMLDocument){getById:if(c){i=this.document.getElementById(c);if(!i&&a.all||this.idGetsName&&i&&i.getAttributeNode("id").nodeValue!=c){j=a.all[c];if(!j)return;j[0]||(j=[j]);for(h=0;i=j[h++];){var k=i.getAttributeNode("id");if(k&&k.nodeValue==c){this.push(i,b,null,d,e,f);break}}return}if(!i){if(this.contains(this.root,a))return;break getById}if(this.document!==a&&!this.contains(a,i))return;this.push(i,b,null,d,e,f);return}getByClass:if(d&&a.getElementsByClassName&&!this.brokenGEBCN){j=a.getElementsByClassName(g.join(" "));if(!j||!j.length)break getByClass;for(h=0;i=j[h++];)this.push(i,b,c,null,e,f);return}}getByTag:{j=a.getElementsByTagName(b);if(!j||!j.length)break getByTag;this.brokenStarGEBTN||(b=null);for(h=0;i=j[h++];)this.push(i,b,c,d,e,f)}},">":function(a,b,c,d,e,f){if(a=a.firstChild)do a.nodeType==1&&this.push(a,b,c,d,e,f);while(a=a.nextSibling)},"+":function(a,b,c,d,e,f){while(a=a.nextSibling)if(a.nodeType==1){this.push(a,b,c,d,e,f);break}},"^":function(a,b,c,d,e,f){a=a.firstChild,a&&(a.nodeType==1?this.push(a,b,c,d,e,f):this["combinator:+"](a,b,c,d,e,f))},"~":function(a,b,c,d,e,f){while(a=a.nextSibling){if(a.nodeType!=1)continue;var g=this.getUID(a);if(this.bitUniques[g])break;this.bitUniques[g]=!0,this.push(a,b,c,d,e,f)}},"++":function(a,b,c,d,e,f){this["combinator:+"](a,b,c,d,e,f),this["combinator:!+"](a,b,c,d,e,f)},"~~":function(a,b,c,d,e,f){this["combinator:~"](a,b,c,d,e,f),this["combinator:!~"](a,b,c,d,e,f)},"!":function(a,b,c,d,e,f){while(a=a.parentNode)a!==this.document&&this.push(a,b,c,d,e,f)},"!>":function(a,b,c,d,e,f){a=a.parentNode,a!==this.document&&this.push(a,b,c,d,e,f)},"!+":function(a,b,c,d,e,f){while(a=a.previousSibling)if(a.nodeType==1){this.push(a,b,c,d,e,f);break}},"!^":function(a,b,c,d,e,f){a=a.lastChild,a&&(a.nodeType==1?this.push(a,b,c,d,e,f):this["combinator:!+"](a,b,c,d,e,f))},"!~":function(a,b,c,d,e,f){while(a=a.previousSibling){if(a.nodeType!=1)continue;var g=this.getUID(a);if(this.bitUniques[g])break;this.bitUniques[g]=!0,this.push(a,b,c,d,e,f)}}};for(var h in g)a["combinator:"+h]=g[h];var i={empty:function(a){var b=a.firstChild;return(!b||b.nodeType!=1)&&!(a.innerText||a.textContent||"").length},not:function(a,b){return!this.matchNode(a,b)},contains:function(a,b){return(a.innerText||a.textContent||"").indexOf(b)>-1},"first-child":function(a){while(a=a.previousSibling)if(a.nodeType==1)return!1;return!0},"last-child":function(a){while(a=a.nextSibling)if(a.nodeType==1)return!1;return!0},"only-child":function(a){var b=a;while(b=b.previousSibling)if(b.nodeType==1)return!1;var c=a;while(c=c.nextSibling)if(c.nodeType==1)return!1;return!0},"nth-child":a.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":a.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":a.createNTHPseudo("firstChild","nextSibling","posNTHType",!0),"nth-last-of-type":a.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",!0),index:function(a,b){return this["pseudo:nth-child"](a,""+b+1)},even:function(a){return this["pseudo:nth-child"](a,"2n")},odd:function(a){return this["pseudo:nth-child"](a,"2n+1")},"first-of-type":function(a){var b=a.nodeName;while(a=a.previousSibling)if(a.nodeName==b)return!1;return!0},"last-of-type":function(a){var b=a.nodeName;while(a=a.nextSibling)if(a.nodeName==b)return!1;return!0},"only-of-type":function(a){var b=a,c=a.nodeName;while(b=b.previousSibling)if(b.nodeName==c)return!1;var d=a;while(d=d.nextSibling)if(d.nodeName==c)return!1;return!0},enabled:function(a){return!a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked||a.selected},focus:function(a){return this.isHTMLDocument&&this.document.activeElement===a&&(a.href||a.type||this.hasAttribute(a,"tabindex"))},root:function(a){return a===this.root},selected:function(a){return a.selected}};for(var j in i)a["pseudo:"+j]=i[j];a.attributeGetters={"class":function(){return this.getAttribute("class")||this.className},"for":function(){return"htmlFor"in this?this.htmlFor:this.getAttribute("for")},href:function(){return"href"in this?this.getAttribute("href",2):this.getAttribute("href")},style:function(){return this.style?this.style.cssText:this.getAttribute("style")},tabindex:function(){var a=this.getAttributeNode("tabindex");return a&&a.specified?a.nodeValue:null},type:function(){return this.getAttribute("type")}};var k=a.Slick=this.Slick||{};k.version="1.1.5",k.search=function(b,c,d){return a.search(b,c,d)},k.find=function(b,c){return a.search(b,c,null,!0)},k.contains=function(b,c){a.setDocument(b);return a.contains(b,c)},k.getAttribute=function(b,c){return a.getAttribute(b,c)},k.match=function(b,c){if(!b||!c)return!1;if(!c||c===b)return!0;a.setDocument(b);return a.matchNode(b,c)},k.defineAttributeGetter=function(b,c){a.attributeGetters[b]=c;return this},k.lookupAttributeGetter=function(b){return a.attributeGetters[b]},k.definePseudo=function(b,c){a["pseudo:"+b]=function(a,b){return c.call(a,b)};return this},k.lookupPseudo=function(b){var c=a["pseudo:"+b];if(c)return function(a){return c.call(this,a)};return null},k.override=function(b,c){a.override(b,c);return this},k.isXML=a.isXML,k.uidOf=function(b){return a.getUIDHTML(b)},this.Slick||(this.Slick=k)}.apply(typeof exports!="undefined"?exports:this),snack.wrap.defineEngine(function(a,b){typeof b=="string"&&(b=Slick.find(document,b));return Slick.search(b||document,a)})
View
32 builds/snack-slick.js
@@ -39,7 +39,7 @@ if (typeof Object.create != 'function'){
}
snack.extend({
- v: '1.2.2',
+ v: '1.2.3',
bind: function (fn, context, args) {
args = args || [];
@@ -391,19 +391,17 @@ if (typeof Object.create != 'function'){
var result
- switch (snack.isArray(value)){
- case 'object':
- result = snack.toQueryString(value, key)
- break
- case 'array':
- var qs = {}
- snack.each(value, function(val, i){
- qs[i] = val
- })
- result = snack.toQueryString(qs, key)
- break
- default: result = key + '=' + encodeURIComponent(value)
+ if (snack.isArray(value)){
+ var qs = {}
+ snack.each(value, function(val, i){
+ qs[i] = val
+ })
+ result = snack.toQueryString(qs, key)
}
+ else if (typeof value == 'object')
+ result = snack.toQueryString(value, key)
+ else
+ result = key + '=' + encodeURIComponent(value)
if (value !== null)
queryString.push(result)
@@ -658,8 +656,8 @@ if (typeof Object.create != 'function'){
return this
},
- fire: function (namespace, arguments){
- return listenerMethod(this, 'fire', namespace, arguments)
+ fire: function (namespace, args){
+ return listenerMethod(this, 'fire', namespace, args)
},
delegate: function (event, delegation, handler){
@@ -671,12 +669,12 @@ if (typeof Object.create != 'function'){
return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '')
}
- function listenerMethod(wrapper, method, namespace, arguments){
+ function listenerMethod(wrapper, method, namespace, args){
var data = wrapper.data(namespace)
if (data)
snack.each(data, function (listener){
- listener[method].apply(wrapper, arguments)
+ listener[method].apply(wrapper, args)
})
return wrapper
View
32 builds/snack.js
@@ -39,7 +39,7 @@ if (typeof Object.create != 'function'){
}
snack.extend({
- v: '1.2.2',
+ v: '1.2.3',
bind: function (fn, context, args) {
args = args || [];
@@ -391,19 +391,17 @@ if (typeof Object.create != 'function'){
var result
- switch (snack.isArray(value)){
- case 'object':
- result = snack.toQueryString(value, key)
- break
- case 'array':
- var qs = {}
- snack.each(value, function(val, i){
- qs[i] = val
- })
- result = snack.toQueryString(qs, key)
- break
- default: result = key + '=' + encodeURIComponent(value)
+ if (snack.isArray(value)){
+ var qs = {}
+ snack.each(value, function(val, i){
+ qs[i] = val
+ })
+ result = snack.toQueryString(qs, key)
}
+ else if (typeof value == 'object')
+ result = snack.toQueryString(value, key)
+ else
+ result = key + '=' + encodeURIComponent(value)
if (value !== null)
queryString.push(result)
@@ -658,8 +656,8 @@ if (typeof Object.create != 'function'){
return this
},
- fire: function (namespace, arguments){
- return listenerMethod(this, 'fire', namespace, arguments)
+ fire: function (namespace, args){
+ return listenerMethod(this, 'fire', namespace, args)
},
delegate: function (event, delegation, handler){
@@ -671,12 +669,12 @@ if (typeof Object.create != 'function'){
return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '')
}
- function listenerMethod(wrapper, method, namespace, arguments){
+ function listenerMethod(wrapper, method, namespace, args){
var data = wrapper.data(namespace)
if (data)
snack.each(data, function (listener){
- listener[method].apply(wrapper, arguments)
+ listener[method].apply(wrapper, args)
})
return wrapper
View
BIN  docs/snack.tar.gz
Binary file not shown
View
2  src/core.js
@@ -39,7 +39,7 @@ if (typeof Object.create != 'function'){
}
snack.extend({
- v: '1.2.3dev',
+ v: '1.2.4dev',
bind: function (fn, context, args) {
args = args || [];
View
8 src/element.js
@@ -68,8 +68,8 @@
return this
},
- fire: function (namespace, arguments){
- return listenerMethod(this, 'fire', namespace, arguments)
+ fire: function (namespace, args){
+ return listenerMethod(this, 'fire', namespace, args)
},
delegate: function (event, delegation, handler){
@@ -81,12 +81,12 @@
return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '')
}
- function listenerMethod(wrapper, method, namespace, arguments){
+ function listenerMethod(wrapper, method, namespace, args){
var data = wrapper.data(namespace)
if (data)
snack.each(data, function (listener){
- listener[method].apply(wrapper, arguments)
+ listener[method].apply(wrapper, args)
})
return wrapper
2  vendor/qwery
@@ -1 +1 @@
-Subproject commit 9c686fd53a0033e342fc0def68afdbda9efbfafd
+Subproject commit 284ef5c07b5d17d24caf7ecdf7183594590e4b71
2  vendor/sizzle
@@ -1 +1 @@
-Subproject commit 4bcc09702d6dadfd0b90c7de3c8b206e97ff97f4
+Subproject commit 3ba396e439a07c2a2facafbe07cdaa1b80a24c00
Please sign in to comment.
Something went wrong with that request. Please try again.