/*! matchmedia() polyfill - test a css media type/query in js. authors & copyright (c) 2012: scott jehl, paul irish, nicholas zakas. dual mit/bsd license */ /*! note: if you're already including a window.matchmedia polyfill via modernizr or otherwise, you don't need this part */ window.matchmedia=window.matchmedia||function(a){"use strict";var c,d=a.documentelement,e=d.firstelementchild||d.firstchild,f=a.createelement("body"),g=a.createelement("div");return g.id="mq-test-1",g.style.csstext="position:absolute;top:-100em",f.style.background="none",f.appendchild(g),function(a){return g.innerhtml='­',d.insertbefore(f,e),c=42===g.offsetwidth,d.removechild(f),{matches:c,media:a}}}(document); /*! respond.js v1.1.0: min/max-width media query polyfill. (c) scott jehl. mit/gplv2 lic. j.mp/respondjs */ (function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaqueriessupported=a.matchmedia&&a.matchmedia("only all").matches,b.mediaqueriessupported;var q,r,t,c=a.document,d=c.documentelement,e=[],f=[],g=[],h={},i=30,j=c.getelementsbytagname("head")[0]||d,k=c.getelementsbytagname("base")[0],l=j.getelementsbytagname("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.tolowercase();d&&f&&!h[d]&&(c.stylesheet&&c.stylesheet.rawcsstext?(p(c.stylesheet.rawcsstext,d,e),h[d]=!0):(!/^([a-za-z:]*\/\/)/.test(d)&&!k||d.replace(regexp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,settimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastindexof("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\s\s]+?)$/)&®exp.$1,f.push(regexp.$2&&h(regexp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-za-z]+)\s?/)&®exp.$2||"all",rules:f.length-1,hasquery:l.indexof("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parsefloat(regexp.$1)+(regexp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parsefloat(regexp.$1)+(regexp.$2||"")})}u()},s=function(){var a,b=c.createelement("div"),e=c.body,f=!1;return b.style.csstext="position:absolute;font-size:1em;width:1em",e||(e=f=c.createelement("body"),e.style.background="none"),e.appendchild(b),d.insertbefore(e,d.firstchild),a=b.offsetwidth,f?d.removechild(e):e.removechild(b),a=t=parsefloat(a)},u=function(a){var b="clientwidth",h=d[b],k="css1compat"===c.compatmode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new date).gettime();if(a&&q&&i>o-q)return cleartimeout(r),r=settimeout(u,i),void 0;q=o;for(var p in e)if(e.hasownproperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,a="em";w&&(w=parsefloat(w)*(w.indexof(a)>-1?t||s():1)),x&&(x=parsefloat(x)*(x.indexof(a)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var b in g)g.hasownproperty(b)&&g[b]&&g[b].parentnode===j&&j.removechild(g[b]);for(var c in m)if(m.hasownproperty(c)){var d=c.createelement("style"),e=m[c].join("\n");d.type="text/css",d.media=c,j.insertbefore(d,n.nextsibling),d.stylesheet?d.stylesheet.csstext=e:d.appendchild(c.createtextnode(e)),g.push(d)}},v=function(a,b){var c=w();c&&(c.open("get",a,!0),c.onreadystatechange=function(){4!==c.readystate||200!==c.status&&304!==c.status||b(c.responsetext)},4!==c.readystate&&c.send(null))},w=function(){var b=!1;try{b=new a.xmlhttprequest}catch(c){b=new a.activexobject("microsoft.xmlhttp")}return function(){return b}}();n(),b.update=n,a.addeventlistener?a.addeventlistener("resize",x,!1):a.attachevent&&a.attachevent("onresize",x)})(this);