/* 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(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); /* Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ (function(e){e.respond={};respond.update=function(){};respond.getMediaQueries=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var x=e.document,s=x.documentElement,i=[],k=[],q=[],o={},h=30,f=x.getElementsByTagName("head")[0]||s,g=x.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var E=b,z=E.length,C=0,B,A,D,y;for(;C-1,minw:G.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:G.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}if(JSON){window.respond_media=JSON.parse(JSON.stringify(i))}j()},l,r,w=function(){var A,B=x.createElement("div"),y=x.body,z=false;B.style.cssText="position:absolute;font-size:1em;width:1em";if(!y){y=z=x.createElement("body");y.style.background="none"}y.appendChild(B);s.insertBefore(y,s.firstChild);A=B.offsetWidth;if(z){s.removeChild(y)}else{y.removeChild(B)}A=p=parseFloat(A);return A},p,j=function(J){var y="clientWidth",C=s[y],I=x.compatMode==="CSS1Compat"&&C||x.body[y]||C,E={},H=b[b.length-1],A=(new Date()).getTime();if(J&&l&&A-l-1?(p||w()):1)}if(!!K){K=parseFloat(K)*(K.indexOf(z)>-1?(p||w()):1)}if(!L.hasquery||(!B||!M)&&(B||I>=D)&&(M||I<=K)){if(!E[L.media]){E[L.media]=[]}E[L.media].push(k[L.rules])}}for(var F in q){if(q[F]&&q[F].parentNode===f){f.removeChild(q[F])}}for(var F in E){var N=x.createElement("style"),G=E[F].join("\n");N.type="text/css";N.media=F;f.insertBefore(N,H.nextSibling);if(N.styleSheet){N.styleSheet.cssText=G}else{N.appendChild(x.createTextNode(G))}q.push(N)}},n=function(y,A){var z=c();if(!z){return}z.open("GET",y,true);z.onreadystatechange=function(){if(z.readyState!=4||z.status!=200&&z.status!=304){return}A(z.responseText)};if(z.readyState==4){return}z.send(null)},c=(function(){var y=false;try{y=new XMLHttpRequest()}catch(z){y=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return y}})();a();respond.update=a;respond.getMediaQueries=u;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);