function getNav(){var e=$("nav[role=navigation] fieldset[role=search]").after('<fieldset class="mobile-nav"></fieldset>').next().append("<select></select>");e.children("select").append('<option value="">Navigate…</option>');$("ul[role=main-navigation]").addClass("main-navigation");$("ul.main-navigation a").each(function(t){e.children("select").append('<option value="'+t.href+'">» '+t.text+"</option>")});$("ul.subscription a").each(function(t){e.children("select").append('<option value="'+t.href+'">» '+t.text+"</option>")});e.children("select").bind("change",function(e){if(e.target.value){window.location.href=e.target.value}})}function addSidebarToggler(){if(!$("body").hasClass("sidebar-footer")){$("#content").append('<span class="toggle-sidebar"></span>');$(".toggle-sidebar").bind("click",function(e){e.preventDefault();if($("body").hasClass("collapse-sidebar")){$("body").removeClass("collapse-sidebar")}else{$("body").addClass("collapse-sidebar")}})}var e=$("aside.sidebar > section");if(e.length>1){e.each(function(t,n){if(e.length>=3&&n%3===0){$(t).addClass("first")}var r=(n+1)%2?"odd":"even";$(t).addClass(r)})}if(e.length>=3){$("aside.sidebar").addClass("thirds")}}function testFeatures(){var e=["maskImage"];$(e).map(function(e){if(Modernizr.testAllProps(e)){$("html").addClass(e)}else{$("html").addClass("no-"+e)}});if("placeholder"in document.createElement("input")){$("html").addClass("placeholder")}else{$("html").addClass("no-placeholder")}}function addCodeLineNumbers(){if(navigator.appName==="Microsoft Internet Explorer"){return}$("div.gist-highlight").each(function(e){var t='<table><tbody><tr><td class="gutter">',n='<pre class="line-numbers">',r='</pre></td><td class="code">',i="</td></tr></tbody></table>",s=$(".line",e).length;for(var o=1;o<=s;o++){n+='<span class="line-number">'+o+"</span>\n"}var u=t+n+r+"<pre>"+$("pre",e).html()+"</pre>"+i;$(e).html(u)})}function flashVideoFallback(){var e="/assets/jwplayer/player.swf",t="/assets/jwplayer/glow/glow.xml";$("video").each(function(n){n=$(n);if(!Modernizr.video.h264&&swfobject.getFlashPlayerVersion()||window.location.hash.indexOf("flash-test")!==-1){n.children("source[src$=mp4]").first().map(function(r){var i=$(r).attr("src"),s="video_"+Math.round(1+Math.random()*1e5),o=n.attr("width"),u=parseInt(n.attr("height"),10)+30;n.after('<div class="flash-video"><div><div id='+s+">");swfobject.embedSWF(e,s,o,u+30,"9.0.0",{file:i,image:n.attr("poster"),skin:t},{movie:i,wmode:"opaque",allowfullscreen:"true"})});n.remove()}})}function wrapFlashVideos(){$("object").each(function(e){e=$(e);if($("param[name=movie]",e).length){var t=e.before('<div class="flash-video"><div>').previous();$(t).children().append(e)}});$("iframe[src*=vimeo],iframe[src*=youtube]").each(function(e){e=$(e);var t=e.before('<div class="flash-video"><div>').previous();$(t).children().append(e)})}function renderDeliciousLinks(e){var t="<ul>";for(var n=0,r=e.length;n<r;n++){t+='<li><a href="'+e[n].u+'" title="Tags: '+(e[n].t==""?"":e[n].t.join(", "))+'">'+e[n].d+"</a></li>"}t+="</ul>";$("#delicious").html(t)}function prettyDate(e){if(navigator.appName==="Microsoft Internet Explorer"){return"<span>8</span>"}var t={just_now:" now",minute_ago:"1m",minutes_ago:"m",hour_ago:"1h",hours_ago:"h",yesterday:"1d",days_ago:"d",last_week:"1w",weeks_ago:"w"};var n=new Date,r=n.getTime(),i=r+1*6e4,s=new Date(e),o=(i-s.getTime())/1e3,u=Math.floor(o/86400);if(isNaN(u)||u<0){return"<span>8</span>"}return u===0&&(o<60&&t.just_now||o<120&&t.minute_ago||o<3600&&Math.floor(o/60)+t.minutes_ago||o<7200&&t.hour_ago||o<86400&&Math.floor(o/3600)+t.hours_ago)||u===1&&t.yesterday||u<7&&u+t.days_ago||u===7&&t.last_week||u>7&&Math.ceil(u/7)+t.weeks_ago}window.Modernizr=function(e,t,n){function r(e,t){var n=e.charAt(0).toUpperCase()+e.substr(1),r=(e+" "+w.join(n+" ")+n).split(" ");return i(r,t)}function i(e,t){for(var r in e)if(m[e[r]]!==n)return t=="pfx"?e[r]:!0;return!1}function s(e,t){return!!~(""+e).indexOf(t)}function o(e,t){return typeof e===t}function u(e,t){return a(b.join(e+";")+(t||""))}function a(e){m.cssText=e}var f="2.0.4",l={},c=!0,h=t.documentElement,p=t.head||t.getElementsByTagName("head")[0],d="modernizr",v=t.createElement(d),m=v.style,g,y=Object.prototype.toString,b=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),w="Webkit Moz O ms Khtml".split(" "),E={},S={},x={},T=[],N=function(e,n,r,i){var s,o,u,a=t.createElement("div");if(parseInt(r,10))while(r--)u=t.createElement("div"),u.id=i?i[r]:d+(r+1),a.appendChild(u);s=["­","<style>",e,"</style>"].join(""),a.id=d,a.innerHTML+=s,h.appendChild(a),o=n(a,e),a.parentNode.removeChild(a);return!!o},C=function(t){if(e.matchMedia)return matchMedia(t).matches;var n;N("@media "+t+" { #"+d+" { position: absolute; } }",function(t){n=(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"});return n},k,L={}.hasOwnProperty,A;!o(L,n)&&!o(L.call,n)?A=function(e,t){return L.call(e,t)}:A=function(e,t){return t in e&&o(e.constructor.prototype[t],n)},E.video=function(){var e=t.createElement("video"),n=!1;try{if(n=!!e.canPlayType){n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"');var r='video/mp4; codecs="avc1.42E01E';n.h264=e.canPlayType(r+'"')||e.canPlayType(r+', mp4a.40.2"'),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(i){}return n};for(var O in E)A(E,O)&&(k=O.toLowerCase(),l[k]=E[O](),T.push((l[k]?"":"no-")+k));a(""),v=g=null,e.attachEvent&&function(){var e=t.createElement("div");e.innerHTML="<elem></elem>";return e.childNodes.length!==1}()&&function(e,t){function r(e){var t=-1;while(++t<u)e.createElement(o[t])}e.iepp=e.iepp||{};var i=e.iepp,s=i.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",o=s.split("|"),u=o.length,a=new RegExp("(^|\\s)("+s+")","gi"),f=new RegExp("<(/*)("+s+")","gi"),l=/^\s*[\{\}]\s*$/,c=new RegExp("(^|[^\\n]*?\\s)("+s+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),h=t.createDocumentFragment(),p=t.documentElement,d=p.firstChild,v=t.createElement("body"),m=t.createElement("style"),g=/print|all/,y;i.getCSS=function(e,t){if(e+""===n)return"";var r=-1,s=e.length,o,u=[];while(++r<s){o=e[r];if(o.disabled)continue;t=o.media||t,g.test(t)&&u.push(i.getCSS(o.imports,t),o.cssText),t="all"}return u.join("")},i.parseCSS=function(e){var t=[],n;while((n=c.exec(e))!=null)t.push(((l.exec(n[1])?"\n":n[1])+n[2]+n[3]).replace(a,"$1.iepp_$2")+n[4]);return t.join("\n")},i.writeHTML=function(){var e=-1;y=y||t.body;while(++e<u){var n=t.getElementsByTagName(o[e]),r=n.length,i=-1;while(++i<r)n[i].className.indexOf("iepp_")<0&&(n[i].className+=" iepp_"+o[e])}h.appendChild(y),p.appendChild(v),v.className=y.className,v.id=y.id,v.innerHTML=y.innerHTML.replace(f,"<$1font")},i._beforePrint=function(){m.styleSheet.cssText=i.parseCSS(i.getCSS(t.styleSheets,"all")),i.writeHTML()},i.restoreHTML=function(){v.innerHTML="",p.removeChild(v),p.appendChild(y)},i._afterPrint=function(){i.restoreHTML(),m.styleSheet.cssText=""},r(t),r(h);i.disablePP||(d.insertBefore(m,d.firstChild),m.media="print",m.className="iepp-printshim",e.attachEvent("onbeforeprint",i._beforePrint),e.attachEvent("onafterprint",i._afterPrint))}(e,t),l._version=f,l._prefixes=b,l._domPrefixes=w,l.mq=C,l.testProp=function(e){return i([e])},l.testAllProps=r,l.testStyles=N,h.className=h.className.replace(/\bno-js\b/,"")+(c?" js "+T.join(" "):"");return l}(this,this.document),function(e,t){function n(){y(!0)}e.respond={},respond.update=function(){},respond.mediaQueriesSupported=t;if(!t){var r=e.document,i=r.documentElement,s=[],o=[],u=[],a={},f=30,l=r.getElementsByTagName("head")[0]||i,c=l.getElementsByTagName("link"),h=[],p=function(){var t=c,n=t.length,r=0,i,s,o,u;for(;r<n;r++)i=t[r],s=i.href,o=i.media,u=i.rel&&i.rel.toLowerCase()==="stylesheet",!!s&&u&&!a[s]&&(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(s)||s.replace(RegExp.$1,"").split("/")[0]===e.location.host?h.push({href:s,media:o}):a[s]=!0);d()},d=function(){if(h.length){var e=h.shift();b(e.href,function(t){v(t,e.href,e.media),a[e.href]=!0,d()})}},v=function(e,t,n){var r=e.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),i=r&&r.length||0,t=t.substring(0,t.lastIndexOf("/")),u=function(e){return e.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+t+"$2$3")},a=!i&&n,f=0,l,c,h,p,d;t.length&&(t+="/"),a&&(i=1);for(;f<i;f++){l=0,a?(c=n,o.push(u(e))):(c=r[f].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,o.push(RegExp.$2&&u(RegExp.$2))),p=c.split(","),d=p.length;for(;l<d;l++)h=p[l],s.push({media:h.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:o.length-1,minw:h.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:h.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}y()},m,g,y=function(e){var t="clientWidth",n=i[t],a=r.compatMode==="CSS1Compat"&&n||r.body[t]||n,h={},p=r.createDocumentFragment(),d=c[c.length-1],v=(new Date).getTime();if(e&&m&&v-m<f)clearTimeout(g),g=setTimeout(y,f);else{m=v;for(var b in s){var w=s[b];if(!w.minw&&!w.maxw||(!w.minw||w.minw&&a>=w.minw)&&(!w.maxw||w.maxw&&a<=w.maxw))h[w.media]||(h[w.media]=[]),h[w.media].push(o[w.rules])}for(var b in u)u[b]&&u[b].parentNode===l&&l.removeChild(u[b]);for(var b in h){var E=r.createElement("style"),S=h[b].join("\n");E.type="text/css",E.media=b,E.styleSheet?E.styleSheet.cssText=S:E.appendChild(r.createTextNode(S)),p.appendChild(E),u.push(E)}l.insertBefore(p,d.nextSibling)}},b=function(e,t){var n=w();if(!!n){n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState==4&&(n.status==200||n.status==304)&&t(n.responseText)};if(n.readyState==4)return;n.send()}},w=function(){var e=!1,t=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],n=t.length;while(n--){try{e=t[n]()}catch(r){continue}break}return function(){return e}}();p(),respond.update=p,e.addEventListener?e.addEventListener("resize",n,!1):e.attachEvent&&e.attachEvent("onresize",n)}}(this,Modernizr.mq("only all")),function(e,t,n){function r(e){return!e||e=="loaded"||e=="complete"}function i(){var e=1,t=-1;while(v.length- ++t)if(v[t].s&&!(e=v[t].r))break;e&&u()}function s(e){var n=t.createElement("script"),s;n.src=e.s,n.onreadystatechange=n.onload=function(){!s&&r(n.readyState)&&(s=1,i(),n.onload=n.onreadystatechange=null)},h(function(){s||(s=1,i())},D.errorTimeout),e.e?n.onload():p.parentNode.insertBefore(n,p)}function o(e){var n=t.createElement("link"),r;n.href=e.s,n.rel="stylesheet",n.type="text/css",!e.e&&(S||g)?function s(e){h(function(){if(!r)try{e.sheet.cssRules.length?(r=1,i()):s(e)}catch(t){t.code==1e3||t.message=="security"||t.message=="denied"?(r=1,h(function(){i()},0)):s(e)}},0)}(n):(n.onload=function(){r||(r=1,h(function(){i()},0))},e.e&&n.onload()),h(function(){r||(r=1,i())},D.errorTimeout),!e.e&&p.parentNode.insertBefore(n,p)}function u(){var e=v.shift();m=1,e?e.t?h(function(){e.t=="c"?o(e):s(e)},0):(e(),i()):m=0}function a(e,n,s,o,a,f){function l(){!d&&r(c.readyState)&&(g.r=d=1,!m&&i(),c.onload=c.onreadystatechange=null,h(function(){w.removeChild(c)},0))}var c=t.createElement(e),d=0,g={t:s,s:n,e:f};c.src=c.data=n,!y&&(c.style.display="none"),c.width=c.height="0",e!="object"&&(c.type=s),c.onload=c.onreadystatechange=l,e=="img"?c.onerror=l:e=="script"&&(c.onerror=function(){g.e=g.r=1,u()}),v.splice(o,0,g),w.insertBefore(c,y?null:p),h(function(){d||(w.removeChild(c),g.r=g.e=d=1,i())},D.errorTimeout)}function f(e,t,n){var r=t=="c"?N:T;m=0,t=t||"j",L(e)?a(r,e,t,this.i++,c,n):(v.splice(this.i++,0,e),v.length==1&&u());return this}function l(){var e=D;e.loader={load:f,i:0};return e}var c=t.documentElement,h=e.setTimeout,p=t.getElementsByTagName("script")[0],d={}.toString,v=[],m=0,g="MozAppearance"in c.style,y=g&&!!t.createRange().compareNode,b=g&&!y,w=y?c:p.parentNode,E=e.opera&&d.call(e.opera)=="[object Opera]",S="webkitAppearance"in c.style,x=S&&"async"in t.createElement("script"),T=g?"object":E||x?"img":"script",N=S?"img":T,C=Array.isArray||function(e){return d.call(e)=="[object Array]"},k=function(e){return typeof e=="object"},L=function(e){return typeof e=="string"},A=function(e){return d.call(e)=="[object Function]"},O=[],M={},_,D;D=function(e){function t(e){var t=e.split("!"),n=O.length,r=t.pop(),i=t.length,s={url:r,origUrl:r,prefixes:t},o,u;for(u=0;u<i;u++)o=M[t[u]],o&&(s=o(s));for(u=0;u<n;u++)s=O[u](s);return s}function r(e,r,i,s,o){var u=t(e),a=u.autoCallback;if(!u.bypass){r&&(r=A(r)?r:r[e]||r[s]||r[e.split("/").pop().split("?")[0]]);if(u.instead)return u.instead(e,r,i,s,o);i.load(u.url,u.forceCSS||!u.forceJS&&/css$/.test(u.url)?"c":n,u.noexec),(A(r)||A(a))&&i.load(function(){l(),r&&r(u.origUrl,o,s),a&&a(u.origUrl,o,s)})}}function i(e,t){function n(e){if(L(e))r(e,u,t,0,i);else if(k(e))for(a in e)e.hasOwnProperty(a)&&r(e[a],u,t,a,i)}var i=!!e.test,s=i?e.yep:e.nope,o=e.load||e.both,u=e.callback,a;n(s),n(o),e.complete&&t.load(e.complete)}var s,o,u=this.yepnope.loader;if(L(e))r(e,0,u,0);else if(C(e))for(s=0;s<e.length;s++)o=e[s],L(o)?r(o,0,u,0):C(o)?D(o):k(o)&&i(o,u);else k(e)&&i(e,u)},D.addPrefix=function(e,t){M[e]=t},D.addFilter=function(e){O.push(e)},D.errorTimeout=1e4,t.readyState==null&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",_=function(){t.removeEventListener("DOMContentLoaded",_,0),t.readyState="complete"},0)),e.yepnope=l()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};!function(e){function t(e){var t=o[e]||window[e];if(!t)throw new Error("Requested module '"+e+"' has not been defined.");return t}function n(e,t){return o[e]=t}function r(e,t){for(var n in t)n!="noConflict"&&n!="_VERSION"&&(e[n]=t[n]);return e}function i(e,t,n){return s._select&&(typeof e=="string"||e.nodeName||e.length&&"item"in e||e==window)?(n=s._select(e,t),n.selector=e):n=isFinite(e.length)?e:[e],r(n,i)}function s(e,t){return i(e,t)}e.global=e;var o={},u=e.$;e.provide=n,e.require=t,r(s,{_VERSION:"0.3.4",fn:e.$&&e.$.fn||{},ender:function(e,t){r(t?i:s,e)},_select:function(e,t){return(t||document).querySelectorAll(e)}}),r(i,{forEach:function(e,t,n){for(n=0,l=this.length;n<l;++n)n in this&&e.call(t||this[n],this[n],n,this);return this},$:s}),s.noConflict=function(){return e.$=u,this},typeof module!="undefined"&&module.exports&&(module.exports=s),e.ender=e.$=e.ender||s}(this),!function(){var module={exports:{}},exports=module.exports;!function(e,t){typeof define=="function"?define(t):typeof module!="undefined"?module.exports=t():this[e]=t()}("reqwest",function(){function handleReadyState(e,t,n){return function(){e&&e[readyState]==4&&(twoHundo.test(e.status)?t(e):n(e))}}function setHeaders(e,t){var n=t.headers||{};n.Accept=n.Accept||"text/javascript, text/html, application/xml, text/xml, */*",t.crossOrigin||(n["X-Requested-With"]=n["X-Requested-With"]||"XMLHttpRequest"),n[contentType]=n[contentType]||"application/x-www-form-urlencoded";for(var r in n)n.hasOwnProperty(r)&&e.setRequestHeader(r,n[r])}function getCallbackName(e,t){var n=e.jsonpCallback||"callback";if(e.url.slice(-(n.length+2))==n+"=?"){var r="reqwest_"+t;return e.url=e.url.substr(0,e.url.length-1)+r,r}var i=new RegExp(n+"=([\\w]+)");return e.url.match(i)[1]}function generalCallback(e){lastValue=e}function getRequest(e,t,n){if(e.type!="jsonp"){var r=xhr(),i=(e.method||"GET").toUpperCase(),s=typeof e=="string"?e:e.url,o=e.processData!==!1&&e.data&&typeof e.data!="string"?reqwest.toQueryString(e.data):e.data||null;return i=="GET"&&o&&o!==""&&(s+=(/\?/.test(s)?"&":"?")+o)&&(o=null),r.open(i,s,!0),setHeaders(r,e),r.onreadystatechange=handleReadyState(r,t,n),e.before&&e.before(r),r.send(o),r}var u=doc.createElement("script"),a=0,f=uniqid++;win[getCallbackName(e,f)]=generalCallback,u.type="text/javascript",u.src=e.url,u.async=!0,typeof u.onreadystatechange!="undefined"&&(u.event="onclick",u.htmlFor=u.id="_reqwest_"+f),u.onload=u.onreadystatechange=function(){if(u[readyState]&&u[readyState]!=="complete"&&u[readyState]!=="loaded"||a)return!1;u.onload=u.onreadystatechange=null,u.onclick&&u.onclick(),e.success&&e.success(lastValue),lastValue=undefined,head.removeChild(u),a=1},head.appendChild(u)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){return/\.json$/.test(e)?"json":/\.jsonp$/.test(e)?"jsonp":/\.js$/.test(e)?"js":/\.html?$/.test(e)?"html":/\.xml$/.test(e)?"xml":"js"}function init(o,fn){function complete(e){o.timeout&&clearTimeout(self.timeout),self.timeout=null,o.complete&&o.complete(e)}function success(resp){var r=resp.responseText;if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r}fn(resp),o.success&&o.success(resp),complete(resp)}function error(e,t,n){o.error&&o.error(e,t,n),complete(e)}this.url=typeof o=="string"?o:o.url,this.timeout=null;var type=o.type||setType(this.url),self=this;fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),this.request=getRequest(o,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var n=e.name,r=e.tagName.toLowerCase(),i;if(e.disabled||!n)return;switch(r){case"input":if(!/reset|button|image|file/i.test(e.type)){var s=/checkbox/i.test(e.type),o=/radio/i.test(e.type),u=e.value;(!s&&!o||e.checked)&&t(n,normalize(s&&u===""?"on":u))}break;case"textarea":t(n,normalize(e.value));break;case"select":if(e.type.toLowerCase()==="select-one")i=e.selectedIndex<0?null:e.options[e.selectedIndex],i&&!i.disabled&&t(n,normalize(i.value||i.text));else for(var a=0;e.length&&a<e.length;a++)i=e.options[a],i.selected&&!i.disabled&&t(n,normalize(i.value||i.text))}}function eachFormElement(){var e=this,t=function(t,n){for(var r=0;r<n.length;r++){var i=t[byTag](n[r]);for(var s=0;s<i.length;s++)serial(i[s],e)}};for(var n=0;n<arguments.length;n++){var r=arguments[n];/input|select|textarea/i.test(r.tagName)&&serial(r,e),t(r,["input","select","textarea"])}}function serializeQueryString(){return reqwest.toQueryString(reqwest.serializeArray.apply(null,arguments))}function serializeHash(){var e={};return eachFormElement.apply(function(t,n){t in e?(e[t]&&!isArray(e[t])&&(e[t]=[e[t]]),e[t].push(n)):e[t]=n},arguments),e}var context=this,win=window,doc=document,old=context.reqwest,twoHundo=/^20\d$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",head=doc[byTag]("head")[0],uniqid=0,lastValue,xhr="XMLHttpRequest"in win?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")};Reqwest.prototype={abort:function(){this.request.abort()},retry:function(){init.call(this,this.o,this.fn)}};var isArray=typeof Array.isArray=="function"?Array.isArray:function(e){return Object.prototype.toString.call(e)=="[object Array]"};return reqwest.serializeArray=function(){var e=[];return eachFormElement.apply(function(t,n){e.push({name:t,value:n})},arguments),e},reqwest.serialize=function(){if(arguments.length===0)return"";var e,t,n=Array.prototype.slice.call(arguments,0);return e=n.pop(),e&&e.nodeType&&n.push(e)&&(e=null),e&&(e=e.type),e=="map"?t=serializeHash:e=="array"?t=reqwest.serializeArray:t=serializeQueryString,t.apply(null,n)},reqwest.toQueryString=function(e){var t="",n,r=encodeURIComponent,i=function(e,n){t+=r(e)+"="+r(n)+"&"};if(isArray(e))for(n=0;e&&n<e.length;n++)i(e[n].name,e[n].value);else for(var s in e){if(!Object.hasOwnProperty.call(e,s))continue;var o=e[s];if(isArray(o))for(n=0;n<o.length;n++)i(s,o[n]);else i(s,e[s])}return t.replace(/&$/,"").replace(/%20/g,"+")},reqwest.noConflict=function(){return context.reqwest=old,this},reqwest}),provide("reqwest",module.exports),!function(e){var t=require("reqwest"),n=function(e){return function(){var n=(this&&this.length>0?this:[]).concat(Array.prototype.slice.call(arguments,0));return t[e].apply(null,n)}},r=n("serialize"),i=n("serializeArray");e.ender({ajax:t,serialize:r,serializeArray:i,toQueryString:t.toQueryString}),e.ender({serialize:r,serializeArray:i},!0)}(ender)}(),!function(){var e={exports:{}},t=e.exports;!function(t,n){typeof define=="function"?define(n):typeof e!="undefined"?e.exports=n():this[t]=n()}("bean",function(){function e(e){var t=e.relatedTarget;return t?t!=this&&t.prefix!="xul"&&!/document/.test(this.toString())&&!m(this,t):t===null}var t=window,n=1,r={},i={},s=/over|out/,o=/[^\.]*(?=\..*)\.|.*/,u=/\..*/,a="addEventListener",f="attachEvent",l="removeEventListener",c="detachEvent",h=document||{},p=h.documentElement||{},d=p[a],v=d?a:f,m=function(e,t){var n=t.parentNode;while(n!==null){if(n==e)return!0;n=n.parentNode}},g=function(e,t){return e.__uid=t&&t+"::"+n++||e.__uid||n++},y=function(e){var t=g(e);return r[t]=r[t]||{}},b=d?function(e,t,n,r){e[r?a:l](t,n,!1)}:function(e,t,n,r,i){i&&r&&e["_on"+i]===null&&(e["_on"+i]=0),e[r?f:c]("on"+t,n)},w=function(e,n,r){return function(i){return i=O(i||((this.ownerDocument||this.document||this).parentWindow||t).event),n.apply(e,[i].concat(r))}},E=function(e,n,r,i,s){return function(o){if(i?i.apply(this,arguments):d?!0:o&&o.propertyName=="_on"+r||!o)o=o?O(o||((this.ownerDocument||this.document||this).parentWindow||t).event):null,n.apply(e,Array.prototype.slice.call(arguments,o?0:1).concat(s))}},S=function(e,t,n,r){var s=t.replace(u,""),a=y(e),f=a[s]||(a[s]={}),l=n,c=g(n,t.replace(o,""));if(f[c])return e;var h=_[s];h&&(n=h.condition?E(e,n,s,h.condition):n,s=h.base||s);var p=M[s];n=p?w(e,n,r):E(e,n,s,!1,r),p=d||p;if(s=="unload"){var m=n;n=function(){x(e,s,n)&&m()}}return e[v]&&b(e,p?s:"propertychange",n,!0,!p&&s),f[c]=n,n.__uid=c,n.__originalFn=l,s=="unload"?e:i[g(e)]=e},x=function(e,t,n){function r(t){n=l[c][t];if(!n)return;delete l[c][t];if(e[v]){c=_[c]?_[c].base:c;var r=d||M[c];b(e,r?c:"propertychange",n,!1,!r&&c)}}var i,s,a,f,l=y(e),c=t.replace(u,"");if(!l||!l[c])return e;s=t.replace(o,""),a=s?s.split("."):[n.__uid],r(s);for(f=a.length;f--;r(a[f]));return e},T=function(e,t,n){return function(r){var i=typeof e=="string"?n(e,this):e;for(var s=r.target;s&&s!=this;s=s.parentNode)for(var o=i.length;o--;)if(i[o]==s)return t.apply(s,arguments)}},N=function(e,t,n,r,i){if(typeof t=="object"&&!n)for(var s in t)t.hasOwnProperty(s)&&N(e,s,t[s]);else{var o=typeof n=="string",u=(o?n:t).split(" ");n=o?T(t,r,i):n;for(var a=u.length;a--;)S(e,u[a],n,Array.prototype.slice.call(arguments,o?4:3))}return e},C=function(e,t,n){var r,i,s,a,f,l=typeof t=="string",c=l&&t.replace(o,""),h=x,p=y(e);c=c&&c.split(".");if(l&&/\s/.test(t)){t=t.split(" "),f=t.length-1;while(C(e,t[f])&&f--);return e}a=l?t.replace(u,""):t;if(!p||c||l&&!p[a]){for(r in p)if(p.hasOwnProperty(r))for(f in p[r])for(i=c.length;i--;)p[r].hasOwnProperty(f)&&(new RegExp("^"+c[i]+"::\\d*(\\..*)?$")).test(f)&&h(e,[r,f].join("."));return e}if(typeof n=="function")h(e,a,n);else if(c)h(e,t);else{h=a?h:C,s=l&&a,a=a?n||p[a]||a:p;for(r in a)a.hasOwnProperty(r)&&(h(e,s||r,a[r]),delete a[r])}return e},k=function(e,t,n){var r,i,s,a,f=t.split(" ");for(s=f.length;s--;){t=f[s].replace(u,"");var l=M[t],c=f[s].replace(o,""),h=y(e)[t];if(c){c=c.split(".");for(i=c.length;i--;)for(a in h)h.hasOwnProperty(a)&&(new RegExp("^"+c[i]+"::\\d*(\\..*)?$")).test(a)&&h[a].apply(e,[!1].concat(n))}else if(!n&&e[v])L(l,t,e);else for(i in h)h.hasOwnProperty(i)&&h[i].apply(e,[!1].concat(n))}return e},L=d?function(e,n,r){evt=document.createEvent(e?"HTMLEvents":"UIEvents"),evt[e?"initEvent":"initUIEvent"](n,!0,!0,t,1),r.dispatchEvent(evt)}:function(e,t,n){e?n.fireEvent("on"+t,document.createEventObject()):n["_on"+t]++},A=function(e,t,n){var r=y(t),i,s,o=g(e);i=n?r[n]:r;for(s in i)i.hasOwnProperty(s)&&(n?N:A)(e,n||t,n?i[s].__originalFn:s);return e},O=function(e){var t={};if(!e)return t;var n=e.type,r=e.target||e.srcElement;t.preventDefault=O.preventDefault(e),t.stopPropagation=O.stopPropagation(e),t.target=r&&r.nodeType==3?r.parentNode:r;if(~n.indexOf("key"))t.keyCode=e.which||e.keyCode;else if(/click|mouse|menu/i.test(n)){t.rightClick=e.which==3||e.button==2,t.pos={x:0,y:0};if(e.pageX||e.pageY)t.clientX=e.pageX,t.clientY=e.pageY;else if(e.clientX||e.clientY)t.clientX=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.clientY=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;s.test(n)&&(t.relatedTarget=e.relatedTarget||e[(n=="mouseover"?"from":"to")+"Element"])}for(var i in e)i in t||(t[i]=e[i]);return t};O.preventDefault=function(e){return function(){e.preventDefault?e.preventDefault():e.returnValue=!1}},O.stopPropagation=function(e){return function(){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}};var M={click:1,dblclick:1,mouseup:1,mousedown:1,contextmenu:1,mousewheel:1,DOMMouseScroll:1,mouseover:1,mouseout:1,mousemove:1,selectstart:1,selectend:1,keydown:1,keypress:1,keyup:1,orientationchange:1,touchstart:1,touchmove:1,touchend:1,touchcancel:1,gesturestart:1,gesturechange:1,gestureend:1,focus:1,blur:1,change:1,reset:1,select:1,submit:1,load:1,unload:1,beforeunload:1,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1},_={mouseenter:{base:"mouseover",condition:e},mouseleave:{base:"mouseout",condition:e},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}},D={add:N,remove:C,clone:A,fire:k},P=function(e){var t=C(e).__uid;t&&(delete i[t],delete r[t])};return t[f]&&N(t,"unload",function(){for(var e in i)i.hasOwnProperty(e)&&P(i[e]);t.CollectGarbage&&CollectGarbage()}),D.noConflict=function(){return context.bean=old,this},D}),provide("bean",e.exports),!function(e){var t=require("bean"),n=function(n,r,i){var s=r?[r]:[];return function(){for(var i,o=0,u=this.length;o<u;o++)i=[this[o]].concat(s,Array.prototype.slice.call(arguments,0)),i.length==4&&i.push(e),!arguments.length&&n=="add"&&r&&(n="fire"),t[n].apply(this,i);return this}},r=n("add"),i=n("remove"),s=n("fire"),o={on:r,addListener:r,bind:r,listen:r,delegate:r,unbind:i,unlisten:i,removeListener:i,undelegate:i,emit:s,trigger:s,cloneEvents:n("clone"),hover:function(e,n,r){for(r=this.length;r--;)t.add.call(this,this[r],"mouseenter",e),t.add.call(this,this[r],"mouseleave",n);return this}},u,a=["blur","change","click","dblclick","error","focus","focusin","focusout","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mouseout","mouseover","mouseup","mousemove","resize","scroll","select","submit","unload"];for(u=a.length;u--;)o[a[u]]=n("add",a[u]);e.ender(o,!0)}(ender)}(),!function(){var e={exports:{}},t=e.exports;!function(t,n){typeof define=="function"?define(n):typeof e!="undefined"?e.exports=n():this[t]=n()}("bonzo",function(){function e(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function t(e,t,n){for(var r=0,i=e.length;r<i;r++)t.call(n||e[r],e[r],r,e);return e}function n(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function r(e){return e&&e.nodeName&&e.nodeType==1}function i(e,t,n,r){for(r=0,j=e.length;r<j;++r)if(t.call(n,e[r],r,e))return!0;return!1}function s(e,n,r){var i=0,s=n||this,o=[],u=E&&typeof e=="string"&&e.charAt(0)!="<"?E(e):e;return t(c(u),function(e){t(s,function(t){var n=!t[w]||t[w]&&!t[w][w]?function(){var e=t.cloneNode(!0);return s.$&&s.cloneEvents&&s.$(e).cloneEvents(t),e}():t;r(e,n),o[i]=n,i++})},this),t(o,function(e,t){s[t]=e}),s.length=i,s}function o(e,t,n){var r=v(e),i=r.css("position"),s=r.offset(),o="relative",u=i==o,a=[parseInt(r.css("left"),10),parseInt(r.css("top"),10)];i=="static"&&(r.css("position",o),i=o),isNaN(a[0])&&(a[0]=u?0:e.offsetLeft),isNaN(a[1])&&(a[1]=u?0:e.offsetTop),t!=null&&(e.style.left=t-s.left+a[0]+M),n!=null&&(e.style.top=n-s.top+a[1]+M)}function u(t,n){return e(n).test(t.className)}function a(e,t){e.className=F(e.className+" "+t)}function f(t,n){t.className=F(t.className.replace(e(n)," "))}function l(e){this.length=0;if(e){e=typeof e!="string"&&!e.nodeType&&typeof e.length!="undefined"?e:[e],this.length=e.length;for(var t=0;t<e.length;t++)this[t]=e[t]}}function c(e){return typeof e=="string"?v.create(e):r(e)?[e]:e}function h(e,t,n){var r=this[0];return e==null&&t==null?(p(r)?d():{x:r.scrollLeft,y:r.scrollTop})[n]:(p(r)?g.scrollTo(e,t):(e!=null&&(r.scrollLeft=e),t!=null&&(r.scrollTop=t)),this)}function p(e){return e===g||/^(?:body|html)$/i.test(e.tagName)}function d(){return{x:g.pageXOffset||b.scrollLeft,y:g.pageYOffset||b.scrollTop}}function v(e,t){return new l(e,t)}var m=this,g=window,y=g.document,b=y.documentElement,w="parentNode",E=null,S=/^checked|value|selected$/,x=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,T="table",N={thead:T,tbody:T,tfoot:T,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"},C=/^checked|selected$/,k=/msie/i.test(navigator.userAgent),L=[],A=0,O=/^-?[\d\.]+$/,M="px",_="setAttribute",D="getAttribute",P=/(^\s*|\s*$)/g,H={lineHeight:1,zoom:1,zIndex:1,opacity:1},B=function(){var e=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],t;for(t=0;t<e.length;t++)if(e[t]in y.createElement("a").style)return e[t]}(),F=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(P,"")},I=y.defaultView&&y.defaultView.getComputedStyle?function(e,t){t=t=="transform"?B:t,t=t=="transform-origin"?B+"Origin":t;var r=null;t=="float"&&(t="cssFloat");var i=y.defaultView.getComputedStyle(e,"");return i&&(r=i[n(t)]),e.style[t]||r}:k&&b.currentStyle?function(e,t){t=n(t),t=t=="float"?"styleFloat":t;if(t=="opacity"){var r=100;try{r=e.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(i){try{r=e.filters("alpha").opacity}catch(s){}}return r/100}var o=e.currentStyle?e.currentStyle[t]:null;return e.style[t]||o}:function(e,t){return e.style[n(t)]};l.prototype={get:function(e){return this[e]},each:function(e,n){return t(this,e,n)},map:function(e,t){var n=[],r,i;for(i=0;i<this.length;i++)r=e.call(this,this[i],i),t?t(r)&&n.push(r):n.push(r);return n},first:function(){return v(this[0])},last:function(){return v(this[this.length-1])},html:function(e,n){function r(n){while(n.firstChild)n.removeChild(n.firstChild);t(c(e),function(e){n.appendChild(e)})}var i=n?b.textContent===null?"innerText":"textContent":"innerHTML",s;return typeof e!="undefined"?this.each(function(t){(s=t.tagName.match(x))?r(t,s[0]):t[i]=e}):this[0]?this[0][i]:""},text:function(e){return this.html(e,1)},addClass:function(e){return this.each(function(t){u(t,e)||a(t,e)})},removeClass:function(e){return this.each(function(t){u(t,e)&&f(t,e)})},hasClass:function(e){return i(this,function(t){return u(t,e)})},toggleClass:function(e,t){return this.each(function(n){typeof t!="undefined"?t?a(n,e):f(n,e):u(n,e)?f(n,e):a(n,e)})},show:function(e){return this.each(function(t){t.style.display=e||""})},hide:function(e){return this.each(function(e){e.style.display="none"})},append:function(e){return this.each(function(n){t(c(e),function(e){n.appendChild(e)})})},prepend:function(e){return this.each(function(n){var r=n.firstChild;t(c(e),function(e){n.insertBefore(e,r)})})},appendTo:function(e,t){return s.call(this,e,t,function(e,t){e.appendChild(t)})},prependTo:function(e,t){return s.call(this,e,t,function(e,t){e.insertBefore(t,e.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(e){return this.map(function(t){t=t[e];while(t&&t.nodeType!==1)t=t[e];return t||0},function(e){return e})},before:function(e){return this.each(function(n){t(v.create(e),function(e){n[w].insertBefore(e,n)})})},after:function(e){return this.each(function(n){t(v.create(e),function(e){n[w].insertBefore(e,n.nextSibling)})})},insertBefore:function(e,t){return s.call(this,e,t,function(e,t){e[w].insertBefore(t,e)})},insertAfter:function(e,t){return s.call(this,e,t,function(e,t){var n=e.nextSibling;n?e[w].insertBefore(t,n):e[w].appendChild(t)})},replaceWith:function(e){return this.each(function(t){t.parentNode.replaceChild(v.create(e)[0],t)})},css:function(e,t,r){function i(e,t,r){for(var i in s)s.hasOwnProperty(i)&&(r=s[i],(t=n(i))&&O.test(r)&&!(t in H)&&(r+=M),t=t=="transform"?B:t,t=t=="transformOrigin"?B+"Origin":t,e.style[t]=r)}if(t===undefined&&typeof e=="string")return t=this[0],t?t==y||t==g?(r=t==y?v.doc():v.viewport(),e=="width"?r.width:e=="height"?r.height:""):I(t,e):null;var s=e;typeof e=="string"&&(s={},s[e]=t),k&&s.opacity&&(s.filter="alpha(opacity="+s.opacity*100+")",s.zoom=e.zoom||1,delete s.opacity);if(t=s["float"])k?s.styleFloat=t:s.cssFloat=t,delete s["float"];return this.each(i)},offset:function(e,t){if(typeof e=="number"||typeof t=="number")return this.each(function(n){o(n,e,t)});var n=this[0],r=n.offsetWidth,i=n.offsetHeight,s=n.offsetTop,u=n.offsetLeft;while(n=n.offsetParent)s+=n.offsetTop,u+=n.offsetLeft;return{top:s,left:u,height:i,width:r}},attr:function(e,t){var n=this[0];if(typeof e=="string"||e instanceof String)return typeof t=="undefined"?S.test(e)?C.test(e)&&typeof n[e]=="string"?!0:n[e]:n[D](e):this.each(function(n){S.test(e)?n[e]=t:n[_](e,t)});for(var r in e)e.hasOwnProperty(r)&&this.attr(r,e[r]);return this},val:function(e){return typeof e=="string"?this.attr("value",e):this[0].value},removeAttr:function(e){return this.each(function(t){C.test(e)?t[e]=!1:t.removeAttribute(e)})},data:function(e,t){var n=this[0];if(typeof t=="undefined"){n[D]("data-node-uid")||n[_]("data-node-uid",++A);var r=n[D]("data-node-uid");return L[r]||(L[r]={}),L[r][e]}return this.each(function(n){n[D]("data-node-uid")||n[_]("data-node-uid",++A);var r=n[D]("data-node-uid"),i=L[r]||(L[r]={});i[e]=t})},remove:function(){return this.each(function(e){e[w]&&e[w].removeChild(e)})},empty:function(){return this.each(function(e){while(e.firstChild)e.removeChild(e.firstChild)})},detach:function(){return this.map(function(e){return e[w].removeChild(e)})},scrollTop:function(e){return h.call(this,null,e,"y")},scrollLeft:function(e){return h.call(this,e,null,"x")},toggle:function(e){return this.each(function(e){e.style.display=e.offsetWidth||e.offsetHeight?"none":"block"}),e&&e(),this}},v.setQueryEngine=function(e){E=e,delete v.setQueryEngine},v.aug=function(e,t){for(var n in e)e.hasOwnProperty(n)&&((t||l.prototype)[n]=e[n])},v.create=function(e){return typeof e=="string"?function(){var t=/^<([^\s>]+)/.exec(e),n=y.createElement(t&&N[t[1].toLowerCase()]||"div"),r=[];n.innerHTML=e;var i=n.childNodes;n=n.firstChild,r.push(n);while(n=n.nextSibling)n.nodeType==1&&r.push(n);return r}():r(e)?[e.cloneNode(!0)]:[]},v.doc=function(){var e=this.viewport();return{width:Math.max(y.body.scrollWidth,b.scrollWidth,e.width),height:Math.max(y.body.scrollHeight,b.scrollHeight,e.height)}},v.firstChild=function(e){for(var t=e.childNodes,n=0,r=t&&t.length||0,i;n<r;n++)t[n].nodeType===1&&(i=t[r=n]);return i},v.viewport=function(){return{width:k?b.clientWidth:self.innerWidth,height:k?b.clientHeight:self.innerHeight}},v.isAncestor="compareDocumentPosition"in b?function(e,t){return(e.compareDocumentPosition(t)&16)==16}:"contains"in b?function(e,t){return e!==t&&e.contains(t)}:function(e,t){while(t=t[w])if(t===e)return!0;return!1};var q=m.bonzo;return v.noConflict=function(){return m.bonzo=q,this},v}),provide("bonzo",e.exports),!function(e){function t(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function n(e){var t=[],n,r;e:for(n=0;n<e.length;n++){for(r=0;r<t.length;r++)if(t[r]==e[n])continue e;t[t.length]=e[n]}return t}function r(e,t,n){return e?t.css(n,e):function(e){return e=parseInt(t.css(n),10),isNaN(e)?t[0]["offset"+n.replace(/^\w/,function(e){return e.toUpperCase()})]:e}()}var i=require("bonzo");i.setQueryEngine(e),e.ender(i),e.ender(i(),!0),e.ender({create:function(t){return e(i.create(t))}}),e.id=function(t){return e([document.getElementById(t)])},e.ender({parents:function(r,i){var s=e(r),o,u,f,l=[];for(o=0,u=this.length;o<u;o++){f=this[o];while(f=f.parentNode)if(~t(s,f)){l.push(f);if(i)break}}return e(n(l))},closest:function(e){return this.parents(e,!0)},first:function(){return e(this[0])},last:function(){return e(this[this.length-1])},next:function(){return e(i(this).next())},previous:function(){return e(i(this).previous())},appendTo:function(e){return i(this.selector).appendTo(e,this)},prependTo:function(e){return i(this.selector).prependTo(e,this)},insertAfter:function(e){return i(this.selector).insertAfter(e,this)},insertBefore:function(e){return i(this.selector).insertBefore(e,this)},siblings:function(){var t,n,r,i=[];for(t=0,n=this.length;t<n;t++){r=this[t];while(r=r.previousSibling)r.nodeType==1&&i.push(r);r=this[t];while(r=r.nextSibling)r.nodeType==1&&i.push(r)}return e(i)},children:function(){var t,r,s=[];for(t=0,l=this.length;t<l;t++){if(!(r=i.firstChild(this[t])))continue;s.push(r);while(r=r.nextSibling)r.nodeType==1&&s.push(r)}return e(n(s))},height:function(e){return r(e,this,"height")},width:function(e){return r(e,this,"width")}},!0)}(ender)}(),!function(){var e={exports:{}},t=e.exports;!function(t,n){typeof define=="function"?define(n):typeof e!="undefined"?e.exports=n():this[t]=this.domReady=n()}("domready",function(e){function t(e){c=1;while(e=n.shift())e()}var n=[],r,i=!1,s=document,o=s.documentElement,u=o.doScroll,a="DOMContentLoaded",f="addEventListener",l="onreadystatechange",c=/^loade|c/.test(s.readyState);return s[f]&&s[f](a,r=function(){s.removeEventListener(a,r,i),t()},i),u&&s.attachEvent(l,r=function(){/^c/.test(s.readyState)&&(s.detachEvent(l,r),t())}),e=u?function(t){self!=top?c?t():n.push(t):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){e(t)},50)}t()}()}:function(e){c?e():n.push(e)}}),provide("domready",e.exports),!function(e){var t=require("domready");e.ender({domReady:t}),e.ender({ready:function(e){return t(e),this}},!0)}(ender)}(),!function(){var e={exports:{}},t=e.exports;!function(t,n){typeof define=="function"?define(n):typeof e!="undefined"?e.exports=n():this[t]=n()}("qwery",function(){function e(){this.c={}}function t(e){T=[];for(g=0,w=e.length;g<w;g++)l(e[g])?T=T.concat(e[g]):T.push(e[g]);return T}function n(e){while(e=e.previousSibling)if(e.nodeType==1)break;return e}function r(e){return e.match(K)}function i(e,t,n,r,i,s,u,a,f,l,c){var p,d,v;if(t&&this.tagName.toLowerCase()!==t)return!1;if(n&&(p=n.match(P))&&p[1]!==this.id)return!1;if(n&&(A=n.match(H)))for(g=A.length;g--;){d=A[g].slice(1);if(!(G.g(d)||G.s(d,new RegExp("(^|\\s+)"+d+"(\\s+|$)"))).test(this.className))return!1}if(f&&h.pseudos[f]&&!h.pseudos[f](this,c))return!1;if(r&&!u){S=this.attributes;for(v in S)if(Object.prototype.hasOwnProperty.call(S,v)&&(S[v].name||v)==i)return this}return r&&!o(s,this.getAttribute(i)||"",u)?!1:this}function s(e){return Y.g(e)||Y.s(e,e.replace(z,"\\$1"))}function o(e,t,n){switch(e){case"=":return t==n;case"^=":return t.match(Z.g("^="+n)||Z.s("^="+n,new RegExp("^"+s(n))));case"$=":return t.match(Z.g("$="+n)||Z.s("$="+n,new RegExp(s(n)+"$")));case"*=":return t.match(Z.g(n)||Z.s(n,new RegExp(s(n))));case"~=":return t.match(Z.g("~="+n)||Z.s("~="+n,new RegExp("(?:^|\\s+)"+s(n)+"(?:\\s+|$)")));case"|=":return t.match(Z.g("|="+n)||Z.s("|="+n,new RegExp("^"+s(n)+"(-|$)")))}return 0}function u(e){var t=[],n=[],s,o=0,u,a,f,l,c,h,p,v,m,g,y,b=et.g(e)||et.s(e,e.split(J)),w=e.match($),E;b=b.slice(0);if(!b.length)return t;c=b.pop(),v=b.length&&(f=b[b.length-1].match(B))?d.getElementById(f[1]):d;if(!v)return t;m=r(c),p=w&&/^[+~]$/.test(w[w.length-1])?function(e){while(v=v.nextSibling)v.nodeType==1&&(m[1]?m[1]==v.tagName.toLowerCase():1)&&e.push(v);return e}([]):v.getElementsByTagName(m[1]||"*");for(s=0,a=p.length;s<a;s++)if(g=i.apply(p[s],m))t[o++]=g;if(!b.length)return t;for(o=0,a=t.length,u=0;o<a;o++){l=t[o];for(s=b.length;s--;)while(l=Q[w[s]](l,t[o]))if(L=i.apply(l,r(b[s])))break;L&&(n[u++]=t[o])}return n}function a(e){return e&&e.nodeType&&(e.nodeType==1||e.nodeType==9)}function f(e){var t=[],n,r;e:for(n=0;n<e.length;n++){for(r=0;r<t.length;r++)if(t[r]==e[n])continue e;t[t.length]=e[n]}return t}function l(e){return typeof e=="object"&&isFinite(e.length)}function c(e){return e?typeof e=="string"?h(e)[0]:l(e)?e[0]:e:d}function h(e,n){var r=c(n);return!r||!e?[]:e===window||a(e)?!n||e!==window&&a(r)&&tt(e,r)?[e]:[]:e&&l(e)?t(e):(E=e.match(B))?(C=d.getElementById(E[1]))?[C]:[]:(E=e.match(F))?t(r.getElementsByTagName(E[1])):rt(e,r)}var p=this,d=document,v=p.qwery,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D=d.documentElement,P=/#([\w\-]+)/,H=/\.[\w\-]+/g,B=/^#([\w\-]+$)/,j=/^\.([\w\-]+)$/,F=/^([\w\-]+)$/,I=/^([\w]+)?\.([\w\-]+)$/,q=/\s*([\s\+\~>])\s*/g,R=/[\s\>\+\~]/,U=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,z=/([.*+?\^=!:${}()|\[\]\/\\])/g,W=/^([a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,X=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,V=/:([\w\-]+)(\(['"]?([\s\w\+\-]+)['"]?\))?/,$=new RegExp("("+R.source+")"+U.source,"g"),J=new RegExp(R.source+U.source),K=new RegExp(W.source+"("+X.source+")?"+"("+V.source+")?"),Q={" ":function(e){return e&&e!==D&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,r,i){return e?(r=n(e),i=n(t),r&&i&&r==i&&r):!1}};e.prototype={g:function(e){return this.c[e]||undefined},s:function(e,t){return this.c[e]=t,t}};var G=new e,Y=new e,Z=new e,et=new e,tt="compareDocumentPosition"in D?function(e,t){return(t.compareDocumentPosition(e)&16)==16}:"contains"in D?function(e,t){return t=t==d||t==window?D:t,t!==e&&t.contains(e)}:function(e,t){while(e=e.parentNode)if(e===t)return 1;return 0},nt=function(){if(!d.querySelector||!d.querySelectorAll)return!1;try{return d.querySelectorAll(":nth-of-type(1)").length}catch(e){return!1}}(),rt=nt?function(e,n){return d.getElementsByClassName&&(E=e.match(j))?t(n.getElementsByClassName(E[1])):t(n.querySelectorAll(e))}:function(e,t){e=e.replace(q,"$1");var n=[],r,i,s=[],o;if(E=e.match(I)){M=t.getElementsByTagName(E[1]||"*"),T=G.g(E[2])||G.s(E[2],new RegExp("(^|\\s+)"+E[2]+"(\\s+|$)"));for(o=0,w=M.length,y=0;o<w;o++)T.test(M[o].className)&&(n[y++]=M[o]);return n}for(o=0,M=e.split(","),w=M.length;o<w;o++)s[o]=u(M[o]);for(o=0,w=s.length;o<w&&(i=s[o]);o++){var a=i;if(t!==d){a=[];for(y=0,E=i.length;y<E&&(r=i[y]);y++)tt(r,t)&&a.push(r)}n=n.concat(a)}return f(n)};return h.uniq=f,h.pseudos={},h.noConflict=function(){return p.qwery=v,this},h}),provide("qwery",e.exports),!function(e,t){function n(t,n){var r=/^\s*<([^\s>]+)\s*/.exec(t)[1],i=(n||e).createElement(s[r]||"div"),o=[];i.innerHTML=t;var u=i.childNodes;i=i.firstChild,i.nodeType==1&&o.push(i);while(i=i.nextSibling)i.nodeType==1&&o.push(i);return o}var r=require("qwery"),i="table",s={thead:i,tbody:i,tfoot:i,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"};t._select=function(e,t){return/^\s*</.test(e)?n(e,t):r(e,t)},t.pseudos=r.pseudos,t.ender({find:function(e){var n=[],i,s,o,u,a;for(i=0,s=this.length;i<s;i++){a=r(e,this[i]);for(o=0,u=a.length;o<u;o++)n.push(a[o])}return t(r.uniq(n))},and:function(e){var n=t(e);for(var r=this.length,i=0,s=this.length+n.length;r<s;r++,i++)this[r]=n[i];return this}},!0)}(document,ender)}();$.domReady(function(){testFeatures();wrapFlashVideos();flashVideoFallback();addCodeLineNumbers();getNav();addSidebarToggler()});(function(e){function o(){s.content="width=device-width,minimum-scale="+i[0]+",maximum-scale="+i[1];e.removeEventListener(n,o,true)}var t="addEventListener",n="gesturestart",r="querySelectorAll",i=[1,1],s=r in e?e[r]("meta[name=viewport]"):[];if((s=s[s.length-1])&&t in e){o();i=[.25,1.6];e[t](n,o,true)}})(document);var swfobject=function(){function e(e,n,r){var u,f=t(r);if(l.wk&&l.wk<312)return u;if(f){if(typeof e.id==i)e.id=r;if(l.ie&&l.win){var c="",h;for(h in e)if(e[h]!=Object.prototype[h])h.toLowerCase()=="data"?n.movie=e[h]:h.toLowerCase()=="styleclass"?c+=' class="'+e[h]+'"':h.toLowerCase()!="classid"&&(c+=" "+h+'="'+e[h]+'"');h="";for(var p in n)n[p]!=Object.prototype[p]&&(h+='<param name="'+p+'" value="'+n[p]+'" />');f.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+c+">"+h+"</object>";u=t(e.id)}else{p=a.createElement(s);p.setAttribute("type",o);for(var d in e)e[d]!=Object.prototype[d]&&(d.toLowerCase()=="styleclass"?p.setAttribute("class",e[d]):d.toLowerCase()!="classid"&&p.setAttribute(d,e[d]));for(c in n)n[c]!=Object.prototype[c]&&c.toLowerCase()!="movie"&&(e=p,h=c,d=n[c],r=a.createElement("param"),r.setAttribute("name",h),r.setAttribute("value",d),e.appendChild(r));f.parentNode.replaceChild(p,f);u=p}}return u}function t(e){var t=null;try{t=a.getElementById(e)}catch(n){}return t}function n(e){var t=l.pv,e=e.split(".");e[0]=parseInt(e[0],10);e[1]=parseInt(e[1],10)||0;e[2]=parseInt(e[2],10)||0;return t[0]>e[0]||t[0]==e[0]&&t[1]>e[1]||t[0]==e[0]&&t[1]==e[1]&&t[2]>=e[2]?!0:!1}function r(e){return/[\\\"<>\.;]/.exec(e)!=null&&typeof encodeURIComponent!=i?encodeURIComponent(e):e}var i="undefined",s="object",o="application/x-shockwave-flash",u=window,a=document,f=navigator,l=function(){var e=typeof a.getElementById!=i&&typeof a.getElementsByTagName!=i&&typeof a.createElement!=i,t=f.userAgent.toLowerCase(),n=f.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),n=n?/mac/.test(n):/mac/.test(t),t=/webkit/.test(t)?parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,l=!+"1",c=[0,0,0],h=null;if(typeof f.plugins!=i&&typeof f.plugins["Shockwave Flash"]==s){if((h=f.plugins["Shockwave Flash"].description)&&!(typeof f.mimeTypes!=i&&f.mimeTypes[o]&&!f.mimeTypes[o].enabledPlugin))l=!1,h=h.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),c[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10),c[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10),c[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof u.ActiveXObject!=i)try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(p&&(h=p.GetVariable("$version")))l=!0,h=h.split(" ")[1].split(","),c=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]}catch(d){}return{w3:e,pv:c,wk:t,ie:l,win:r,mac:n}}();return{embedSWF:function(t,r,o,u,a,f,c,h,p){var d={success:!1,id:r};if(l.w3&&!(l.wk&&l.wk<312)&&t&&r&&o&&u&&a){o+="";u+="";var v={};if(h&&typeof h===s)for(var m in h)v[m]=h[m];v.data=t;v.width=o;v.height=u;t={};if(c&&typeof c===s)for(var y in c)t[y]=c[y];if(f&&typeof f===s)for(var b in f)typeof t.flashvars!=i?t.flashvars+="&"+b+"="+f[b]:t.flashvars=b+"="+f[b];if(n(a))r=e(v,t,r),d.success=!0,d.ref=r}p&&p(d)},ua:l,getFlashPlayerVersion:function(){return{major:l.pv[0],minor:l.pv[1],release:l.pv[2]}},hasFlashPlayerVersion:n,createSWF:function(t,n,r){if(l.w3)return e(t,n,r)},getQueryParamValue:function(e){var t=a.location.search||a.location.hash;if(t){/\?/.test(t)&&(t=t.split("?")[1]);if(e==null)return r(t);for(var t=t.split("&"),n=0;n<t.length;n++)if(t[n].substring(0,t[n].indexOf("="))==e)return r(t[n].substring(t[n].indexOf("=")+1))}return""}}}();$.domReady(function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();
Example #2
0
(function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()})("bonzo",function(){function G(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function H(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function I(a,b,c){for(var d=0,e=a.length;d<e;d++)if(O(a[d])){I(a[d].childNodes,b,c);b.call(c||a[d],a[d],d,a)}return a}function J(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function K(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function L(a){a[y]("data-node-uid")||a[x]("data-node-uid",++t);uid=a[y]("data-node-uid");return s[uid]||(s[uid]={})}function M(a){uid=a[y]("data-node-uid");uid&&delete s[uid]}function N(a,b){try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function O(a){return a&&a.nodeName&&a.nodeType==1}function P(a,b,c,d,e){for(d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function Q(a){a=="transform"&&(a=A.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=A.transform+"Origin")||a=="float"&&(a=A.cssFloat);return a?J(a):null}function S(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;H(W(i),function(a){H(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0),c,d;if(g.$&&g.cloneEvents){g.$(a).cloneEvents(b);c=g.$(a).find("*");d=g.$(b).find("*");for(var e=0;e<d.length;e++)g.$(c[e]).cloneEvents(d[e])}return a}():b;c(a,f);h[d]=f;d++})},this);H(h,function(a,b){g[b]=a});g.length=d;return g}function T(a,b,c){var d=$(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];if(e=="static"){d.css("position",g);e=g}isNaN(i[0])&&(i[0]=h?0:a.offsetLeft);isNaN(i[1])&&(i[1]=h?0:a.offsetTop);b!=null&&(a.style.left=b-f.left+i[0]+w);c!=null&&(a.style.top=c-f.top+i[1]+w)}function U(a,b){return typeof b=="function"?b(a):b}function V(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a];this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function W(a){return typeof a=="string"?$.create(a):O(a)?[a]:a}function X(a,c,d){var e=this[0];if(!e)return this;if(a==null&&c==null)return(Y(e)?Z():{x:e.scrollLeft,y:e.scrollTop})[d];if(Y(e))b.scrollTo(a,c);else{a!=null&&(e.scrollLeft=a);c!=null&&(e.scrollTop=c)}return this}function Y(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function Z(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function $(a,b){return new V(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^(checked|value|selected)$/i,h=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,i=["<table>","</table>",1],j=["<table><tbody><tr>","</tr></tbody></table>",3],k=["<select>","</select>",1],l=["_","",0,1],m={thead:i,tbody:i,tfoot:i,colgroup:i,caption:i,tr:["<table><tbody>","</tbody></table>",2],th:j,td:j,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:k,optgroup:k,script:l,style:l,link:l,param:l,base:l},n=/^(checked|selected)$/,o=/msie/i.test(navigator.userAgent),p,q,r,s={},t=0,u=/^-?[\d\.]+$/,v=/^data-(.+)$/,w="px",x="setAttribute",y="getAttribute",z="getElementsByTagName",A=function(){var a=c.createElement("p");a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>';return{hrefExtended:a[z]("a")[0][y]("href")!="#x",autoTbody:a[z]("tbody").length!==0,computedStyle:c.defaultView&&c.defaultView.getComputedStyle,cssFloat:a[z]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a}}(),B=/(^\s*|\s*$)/g,C=/\s+/,D=String.prototype.toString,E={lineHeight:1,zoom:1,zIndex:1,opacity:1,boxFlex:1,WebkitBoxFlex:1,MozBoxFlex:1},F=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(B,"")},R=A.computedStyle?function(a,b){var d=null,e=c.defaultView.getComputedStyle(a,"");e&&(d=e[b]);return a.style[b]||d}:o&&d.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};if(A.classList){p=function(a,b){return a.classList.contains(b)};q=function(a,b){a.classList.add(b)};r=function(a,b){a.classList.remove(b)}}else{p=function(a,b){return G(b).test(a.className)};q=function(a,b){a.className=F(a.className+" "+b)};r=function(a,b){a.className=F(a.className.replace(G(b)," "))}}V.prototype={get:function(a){return this[a]||null},each:function(a,b){return H(this,a,b)},deepEach:function(a,b){return I(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++){d=a.call(this,this[e],e);b?b(d)&&c.push(d):c.push(d)}return c},html:function(a,b){function e(b){H(W(a),function(a){b.appendChild(a)})}var c=b?d.textContent===undefined?"innerText":"textContent":"innerHTML";return typeof a!="undefined"?this.empty().each(function(d){!b&&h.test(d.tagName)?e(d):function(){try{d[c]=a}catch(b){e(d)}}()}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},append:function(a){return this.each(function(b){H(W(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;H(W(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return S.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return S.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},before:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return S.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return S.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){this.deepEach(M);return this.each(function(b){b.parentNode.replaceChild($.create(a)[0],b)})},addClass:function(a){a=D.call(a).split(C);return this.each(function(b){H(a,function(a){a&&!p(b,U(b,a))&&q(b,U(b,a))})})},removeClass:function(a){a=D.call(a).split(C);return this.each(function(b){H(a,function(a){a&&p(b,U(b,a))&&r(b,U(b,a))})})},hasClass:function(a){a=D.call(a).split(C);return P(this,function(b){return P(a,function(a){return a&&p(b,a)})})},toggleClass:function(a,b){a=D.call(a).split(C);return this.each(function(c){H(a,function(a){a&&(typeof b!="undefined"?b?q(c,a):r(c,a):p(c,a)?r(c,a):q(c,a))})})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""});a&&a();return this},first:function(){return $(this.length?this[0]:[])},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(e)},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},focus:function(){this.length&&this[0].focus();return this},blur:function(){return this.each(function(a){a.blur()})},css:function(a,d,e){function g(a,b,c){for(var d in f)if(f.hasOwnProperty(d)){c=f[d];(b=Q(d))&&u.test(c)&&!(b in E)&&(c+=w);a.style[b]=U(a,c)}}if(d===undefined&&typeof a=="string"){d=this[0];if(!d)return null;if(d===c||d===b){e=d===c?$.doc():$.viewport();return a=="width"?e.width:a=="height"?e.height:""}return(a=Q(a))?R(d,a):null}var f=a;if(typeof a=="string"){f={};f[a]=d}if(o&&f.opacity){f.filter="alpha(opacity="+f.opacity*100+")";f.zoom=a.zoom||1;delete f.opacity}return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){T(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent){f+=c.offsetTop;g+=c.offsetLeft}return{top:f,left:g,height:e,width:d}},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""};b.first().css({position:"absolute",visibility:"hidden",display:"block"});return c}(this):null,c=a.offsetWidth,d=a.offsetHeight;b&&this.first().css(b);return{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?g.test(a)?n.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!A.hrefExtended?c[y](a):c[y](a,2):null:this.each(function(c){g.test(a)?c[a]=U(c,b):c[x](a,U(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){n.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e,f;if(typeof b=="undefined"){if(!c)return null;e=L(c);if(typeof a=="undefined"){H(c.attributes,function(a){(f=(""+a.name).match(v))&&(e[J(f[1])]=N(a.value))});return e}typeof e[a]=="undefined"&&(e[a]=N(this.attr("data-"+K(a))));return e[a]}return this.each(function(c){L(c)[a]=b})},remove:function(){this.deepEach(M);return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){I(a.childNodes,M);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return X.call(this,null,a,"y")},scrollLeft:function(a){return X.call(this,a,null,"x")}};$.setQueryEngine=function(a){f=a;delete $.setQueryEngine};$.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||V.prototype)[c]=a[c])};$.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),d=c.createElement("div"),f=[],g=b?m[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=g&&g[3],j=e,k=A.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);d.innerHTML=g?g[0]+a+g[1]:a;while(h--)d=d.firstChild;i&&d&&d.nodeType!==1&&(d=d.nextSibling);do(!b||d.nodeType==1)&&(!k||d.tagName.toLowerCase()!="tbody")&&f.push(d);while(d=d.nextSibling);H(f,function(a){a[j]&&a[j].removeChild(a)});return f}():O(a)?[a.cloneNode(!0)]:[]};$.doc=function(){var a=$.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}};$.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e};$.viewport=function(){return{width:o?d.clientWidth:self.innerWidth,height:o?d.clientHeight:self.innerHeight}};$.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};return $});provide("bonzo",a.exports);(function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a);a.ender(b);a.ender(b(),!0);a.ender({create:function(c){return a(b.create(c))}});a.id=function(b){return a([document.getElementById(b)])};a.ender({parents:function(b,e){if(!this.length)return this;var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)})(ender)})();(function(){var a={exports:{}},b=a.exports;
Example #3
0
!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()}("bonzo",function(){function E(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function F(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function G(a,b,c){for(var d=0,e=a.length;d<e;d++)M(a[d])&&(G(a[d].childNodes,b,c),b.call(c||a[d],a[d],d,a));return a}function H(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function I(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function J(a){return a[y]("data-node-uid")||a[x]("data-node-uid",++t),uid=a[y]("data-node-uid"),s[uid]||(s[uid]={})}function K(a){uid=a[y]("data-node-uid"),uid&&delete s[uid]}function L(a){try{return a==="true"?!0:a==="false"?!1:a==="null"?null:isNaN(a)?a:parseFloat(a)}catch(b){}return undefined}function M(a){return a&&a.nodeName&&a.nodeType==1}function N(a,b,c,d){for(d=0,j=a.length;d<j;++d)if(b.call(c,a[d],d,a))return!0;return!1}function O(a){return a=="transform"&&(a=A.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=A.transform+"Origin")||a=="float"&&(a=A.cssFloat),a?H(a):null}function Q(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;return F(U(i),function(a){F(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);return g.$&&g.cloneEvents&&g.$(a).cloneEvents(b),a}():b;c(a,f),h[d]=f,d++})},this),F(h,function(a,b){g[b]=a}),g.length=d,g}function R(a,b,c){var d=Y(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+w),c!=null&&(a.style.top=c-f.top+i[1]+w)}function S(a,b){return typeof b=="function"?b(a):b}function T(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function U(a){return typeof a=="string"?Y.create(a):M(a)?[a]:a}function V(a,c,d){var e=this[0];return a==null&&c==null?(W(e)?X():{x:e.scrollLeft,y:e.scrollTop})[d]:(W(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this)}function W(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function X(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function Y(a,b){return new T(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^checked|value|selected$/,h=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,i=["<table>","</table>",1],k=["<table><tbody><tr>","</tr></tbody></table>",3],l=["<select>","</select>",1],m={thead:i,tbody:i,tfoot:i,colgroup:i,caption:i,tr:["<table><tbody>","</tbody></table>",2],th:k,td:k,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:l,optgroup:l},n=/^checked|selected$/,o=/msie/i.test(navigator.userAgent),p,q,r,s={},t=0,u=/^-?[\d\.]+$/,v=/^data-(.+)$/,w="px",x="setAttribute",y="getAttribute",z="getElementsByTagName",A=function(){var a=c.createElement("p");return a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>',{hrefExtended:a[z]("a")[0][y]("href")!="#x",autoTbody:a[z]("tbody").length!==0,computedStyle:c.defaultView&&c.defaultView.getComputedStyle,cssFloat:a[z]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a}}(),B=/(^\s*|\s*$)/g,C={lineHeight:1,zoom:1,zIndex:1,opacity:1},D=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(B,"")},P=A.computedStyle?function(a,b){var d=null,e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[b]),a.style[b]||d}:o&&d.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};return A.classList?(p=function(a,b){return N(b.toString().split(" "),function(b){return a.classList.contains(b)})},q=function(a,b){F(b.toString().split(" "),function(b){a.classList.add(b)})},r=function(a,b){a.classList.remove(b)}):(p=function(a,b){return E(b).test(a.className)},q=function(a,b){a.className=D(a.className+" "+b)},r=function(a,b){a.className=D(a.className.replace(E(b)," "))}),T.prototype={get:function(a){return this[a]||null},each:function(a,b){return F(this,a,b)},deepEach:function(a,b){return G(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},html:function(a,b){function f(b){F(U(a),function(a){b.appendChild(a)})}var c=b?d.textContent===undefined?"innerText":"textContent":"innerHTML",e;return typeof a!="undefined"?this.empty().each(function(d){!b&&(e=d.tagName.match(h))?f(d,e[0]):!function(){try{d[c]=a}catch(b){f(d)}}()}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},append:function(a){return this.each(function(b){F(U(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;F(U(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return Q.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return Q.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},before:function(a){return this.each(function(b){F(Y.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){F(Y.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return Q.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return Q.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){return this.deepEach(K),this.each(function(b){b.parentNode.replaceChild(Y.create(a)[0],b)})},addClass:function(a){return this.each(function(b){p(b,S(b,a))||q(b,S(b,a))})},removeClass:function(a){return this.each(function(b){p(b,S(b,a))&&r(b,S(b,a))})},hasClass:function(a){return N(this,function(b){return p(b,a)})},toggleClass:function(a,b){return this.each(function(c){typeof b!="undefined"?b?q(c,a):r(c,a):p(c,a)?r(c,a):q(c,a)})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""}),a&&a(),this},first:function(){return Y(this.length?this[0]:[])},last:function(){return Y(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related("parentNode")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},focus:function(){return this.length>0?this[0].focus():null},blur:function(){return this.each(function(a){a.blur()})},css:function(a,d,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=O(d))&&u.test(c)&&!(b in C)&&(c+=w),a.style[b]=S(a,c))}if(d===undefined&&typeof a=="string")return d=this[0],d?d===c||d===b?(e=d===c?Y.doc():Y.viewport(),a=="width"?e.width:a=="height"?e.height:""):(a=O(a))?P(d,a):null:null;var f=a;return typeof a=="string"&&(f={},f[a]=d),o&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity),this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){R(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f+=c.offsetTop,g+=c.offsetLeft;return{top:f,left:g,height:e,width:d}},dim:function(){var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){return c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""},b.first().css({position:"absolute",visibility:"hidden",display:"block"}),c}(this):null,c=a.offsetWidth,d=a.offsetHeight;return b&&this.first().css(b),{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?g.test(a)?n.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!A.hrefExtended?c[y](a):c[y](a,2):this.each(function(c){g.test(a)?c[a]=S(c,b):c[x](a,S(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){n.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},data:function(a,b){var c=this[0],d,e,f;return typeof b=="undefined"?(e=J(c),typeof a=="undefined"?(F(c.attributes,function(a){(f=(""+a.name).match(v))&&(e[H(f[1])]=L(a.value))}),e):typeof e[a]=="undefined"?e[a]=L(this.attr("data-"+I(a))):e[a]):this.each(function(c){J(c)[a]=b})},remove:function(){return this.deepEach(K),this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){G(a.childNodes,K);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return V.call(this,null,a,"y")},scrollLeft:function(a){return V.call(this,a,null,"x")}},Y.setQueryEngine=function(a){f=a,delete Y.setQueryEngine},Y.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||T.prototype)[c]=a[c])},Y.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),d=c.createElement("div"),f=[],g=b?m[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=e,j=A.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);d.innerHTML=g?g[0]+a+g[1]:a;while(h--)d=d.firstChild;do(!b||d.nodeType==1)&&(!j||d.tagName.toLowerCase()!="tbody")&&f.push(d);while(d=d.nextSibling);return F(f,function(a){a[i]&&a[i].removeChild(a)}),f}():M(a)?[a.cloneNode(!0)]:[]},Y.doc=function(){var a=Y.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},Y.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},Y.viewport=function(){return{width:o?d.clientWidth:self.innerWidth,height:o?d.clientHeight:self.innerHeight}},Y.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1},Y}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,b,c){return a?b.css(c,a):function(a){return b[0]?(a=parseInt(b.css(c),10),isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a):0}()}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
Example #4
0
!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=c()}("bonzo",function(){function x(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function z(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function A(a){return a&&a.nodeName&&a.nodeType==1}function B(a,b,c,d){for(d=0,j=a.length;d<j;++d)if(b.call(c,a[d],d,a))return!0;return!1}function D(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;return y(J(i),function(a){y(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);return g.$&&g.cloneEvents&&g.$(a).cloneEvents(b),a}():b;c(a,f),h[d]=f,d++})},this),y(h,function(a,b){g[b]=a}),g.length=d,g}function E(a,b,c){var d=N(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+q),c!=null&&(a.style.top=c-f.top+i[1]+q)}function F(a,b){return x(b).test(a.className)}function G(a,b){a.className=w(a.className+" "+b)}function H(a,b){a.className=w(a.className.replace(x(b)," "))}function I(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function J(a){return typeof a=="string"?N.create(a):A(a)?[a]:a}function K(a,c,d){var e=this[0];return a==null&&c==null?(L(e)?M():{x:e.scrollLeft,y:e.scrollTop})[d]:(L(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this)}function L(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function M(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function N(a,b){return new I(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^checked|value|selected$/,h=/select|fieldset|table|tbody|tfoot|td|tr|colgroup/i,i="table",k={thead:i,tbody:i,tfoot:i,tr:"tbody",th:"tr",td:"tr",fieldset:"form",option:"select"},l=/^checked|selected$/,m=/msie/i.test(navigator.userAgent),n=[],o=0,p=/^-?[\d\.]+$/,q="px",r="setAttribute",s="getAttribute",t=/(^\s*|\s*$)/g,u={lineHeight:1,zoom:1,zIndex:1,opacity:1},v=function(){var a=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],b;for(b=0;b<a.length;b++)if(a[b]in c.createElement("a").style)return a[b]}(),w=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(t,"")},C=c.defaultView&&c.defaultView.getComputedStyle?function(a,b){b=b=="transform"?v:b,b=b=="transform-origin"?v+"Origin":b;var d=null;b=="float"&&(b="cssFloat");var e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[z(b)]),a.style[b]||d}:m&&d.currentStyle?function(a,b){b=z(b),b=b=="float"?"styleFloat":b;if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[z(b)]};I.prototype={get:function(a){return this[a]},each:function(a,b){return y(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},first:function(){return N(this[0])},last:function(){return N(this[this.length-1])},html:function(a,b){function f(b){while(b.firstChild)b.removeChild(b.firstChild);y(J(a),function(a){b.appendChild(a)})}var c=b?d.textContent===null?"innerText":"textContent":"innerHTML",e;return typeof a!="undefined"?this.each(function(b){(e=b.tagName.match(h))?f(b,e[0]):b[c]=a}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},addClass:function(a){return this.each(function(b){F(b,a)||G(b,a)})},removeClass:function(a){return this.each(function(b){F(b,a)&&H(b,a)})},hasClass:function(a){return B(this,function(b){return F(b,a)})},toggleClass:function(a,b){return this.each(function(c){typeof b!="undefined"?b?G(c,a):H(c,a):F(c,a)?H(c,a):G(c,a)})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(a){return this.each(function(a){a.style.display="none"})},append:function(a){return this.each(function(b){y(J(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;y(J(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return D.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return D.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},before:function(a){return this.each(function(b){y(N.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){y(N.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return D.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return D.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){return this.each(function(b){b.parentNode.replaceChild(N.create(a)[0],b)})},css:function(a,d,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=z(d))&&p.test(c)&&!(b in u)&&(c+=q),b=b=="transform"?v:b,b=b=="transformOrigin"?v+"Origin":b,a.style[b]=c)}if(d===undefined&&typeof a=="string")return d=this[0],d?d==c||d==b?(e=d==c?N.doc():N.viewport(),a=="width"?e.width:a=="height"?e.height:""):C(d,a):null;var f=a;typeof a=="string"&&(f={},f[a]=d),m&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity);if(d=f["float"])m?f.styleFloat=d:f.cssFloat=d,delete f["float"];return this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){E(c,a,b)});var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f+=c.offsetTop,g+=c.offsetLeft;return{top:f,left:g,height:e,width:d}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?g.test(a)?l.test(a)&&typeof c[a]=="string"?!0:c[a]:c[s](a):this.each(function(c){g.test(a)?c[a]=b:c[r](a,b)});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},val:function(a){return typeof a=="string"?this.attr("value",a):this[0].value},removeAttr:function(a){return this.each(function(b){l.test(a)?b[a]=!1:b.removeAttribute(a)})},data:function(a,b){var c=this[0];if(typeof b=="undefined"){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid");return n[d]||(n[d]={}),n[d][a]}return this.each(function(c){c[s]("data-node-uid")||c[r]("data-node-uid",++o);var d=c[s]("data-node-uid"),e=n[d]||(n[d]={});e[a]=b})},remove:function(){return this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return K.call(this,null,a,"y")},scrollLeft:function(a){return K.call(this,a,null,"x")},toggle:function(a){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":"block"}),a&&a(),this}},N.setQueryEngine=function(a){f=a,delete N.setQueryEngine},N.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||I.prototype)[c]=a[c])},N.create=function(a){return typeof a=="string"?function(){var b=/^<([^\s>]+)/.exec(a),d=c.createElement(b&&k[b[1].toLowerCase()]||"div"),e=[];d.innerHTML=a;var f=d.childNodes;d=d.firstChild,e.push(d);while(d=d.nextSibling)d.nodeType==1&&e.push(d);return e}():A(a)?[a.cloneNode(!0)]:[]},N.doc=function(){var a=this.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},N.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},N.viewport=function(){return{width:m?d.clientWidth:self.innerWidth,height:m?d.clientHeight:self.innerHeight}},N.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1};var O=a.bonzo;return N.noConflict=function(){return a.bonzo=O,this},N}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c,d;e:for(c=0;c<a.length;c++){for(d=0;d<b.length;d++)if(b[d]==a[c])continue e;b[b.length]=a[c]}return b}function e(a,b,c){return a?b.css(c,a):function(a){return a=parseInt(b.css(c),10),isNaN(a)?b[0]["offset"+c.replace(/^\w/,function(a){return a.toUpperCase()})]:a}()}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this[0])},last:function(){return a(this[this.length-1])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e(a,this,"height")},width:function(a){return e(a,this,"width")}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;!function(b,c){typeof define=="function"?define(c):typeof a!="undefined"?a.exports=c():this[b]=this.domReady=c()}("domready",function(a){function l(a){k=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k=/^loade|c/.test(e.readyState);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),l()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e.readyState)&&(e.detachEvent(j,c),l())}),a=g?function(c){self!=top?k?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){k?a():b.push(a)}}),provide("domready",a.exports),!function(a){var b=require("domready");a.ender({domReady:b}),a.ender({ready:function(a){return b(a),this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;