コード例 #1
0
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); })();
コード例 #2
0
ファイル: main.min.js プロジェクト: earaya/blog.earaya.com
;window.Modernizr=function(a,b,c){function D(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+o.join(c+" ")+c).split(" ");return C(d,b)}function C(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function B(a,b){return!!~(""+a).indexOf(b)}function A(a,b){return typeof a===b}function z(a,b){return y(n.join(a+";")+(b||""))}function y(a){k.cssText=a}var d="2.0.4",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l,m=Object.prototype.toString,n=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),o="Webkit Moz O ms Khtml".split(" "),p={},q={},r={},s=[],t=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["&shy;","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},u=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;t("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},v,w={}.hasOwnProperty,x;!A(w,c)&&!A(w.call,c)?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],c)},p.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c};for(var E in p)x(p,E)&&(v=E.toLowerCase(),e[v]=p[E](),s.push((e[v]?"":"no-")+v));y(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=n,e._domPrefixes=o,e.mq=u,e.testProp=function(a){return C([a])},e.testAllProps=D,e.testStyles=t,g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+s.join(" "):"");return e}(this,this.document),function(a,b){function u(){r(!0)}a.respond={},respond.update=function(){},respond.mediaQueriesSupported=b;if(!b){var c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=j.getElementsByTagName("link"),l=[],m=function(){var b=k,c=b.length,d=0,e,f,g,i;for(;d<c;d++)e=b[d],f=e.href,g=e.media,i=e.rel&&e.rel.toLowerCase()==="stylesheet",!!f&&i&&!h[f]&&(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(f)||f.replace(RegExp.$1,"").split("/")[0]===a.location.host?l.push({href:f,media:g}):h[f]=!0);n()},n=function(){if(l.length){var a=l.shift();s(a.href,function(b){o(b,a.href,a.media),h[a.href]=!0,n()})}},o=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),g=d&&d.length||0,b=b.substring(0,b.lastIndexOf("/")),h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c,j=0,k,l,m,n,o;b.length&&(b+="/"),i&&(g=1);for(;j<g;j++){k=0,i?(l=c,f.push(h(a))):(l=d[j].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),n=l.split(","),o=n.length;for(;k<o;k++)m=n[k],e.push({media:m.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:f.length-1,minw:m.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:m.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}r()},p,q,r=function(a){var b="clientWidth",h=d[b],l=c.compatMode==="CSS1Compat"&&h||c.body[b]||h,m={},n=c.createDocumentFragment(),o=k[k.length-1],s=(new Date).getTime();if(a&&p&&s-p<i)clearTimeout(q),q=setTimeout(r,i);else{p=s;for(var t in e){var u=e[t];if(!u.minw&&!u.maxw||(!u.minw||u.minw&&l>=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css",!a.e&&(w||r)?function a(b){m(function(){if(!d)try{b.sheet.cssRules.length?(d=1,j()):a(b)}catch(c){c.code==1e3||c.message=="security"||c.message=="denied"?(d=1,m(function(){j()},0)):a(b)}},0)}(c):(c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload()),m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return typeof a=="object"},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};