window.matchMedia=window.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=t.offsetWidth==42,i.removeChild(r),{matches:u,media:n}}}(document),function(n){function d(){a(!0)}if(n.respond={},respond.update=function(){},respond.mediaQueriesSupported=n.matchMedia&&n.matchMedia("only all").matches,!respond.mediaQueriesSupported){var t=n.document,i=t.documentElement,e=[],u=[],r=[],o={},v=30,f=t.getElementsByTagName("head")[0]||i,g=t.getElementsByTagName("base")[0],s=f.getElementsByTagName("link"),h=[],y=function(){for(var f=s,c=f.length,r=0,t,i,u,e;r<c;r++)t=f[r],i=t.href,u=t.media,e=t.rel&&t.rel.toLowerCase()==="stylesheet",!i||!e||o[i]||(t.styleSheet&&t.styleSheet.rawCssText?(w(t.styleSheet.rawCssText,i,u),o[i]=!0):(/^([a-zA-Z:]*\/\/)/.test(i)||g)&&i.replace(RegExp.$1,"").split("/")[0]!==n.location.host||h.push({href:i,media:u}));p()},p=function(){if(h.length){var n=h.shift();nt(n.href,function(t){w(t,n.href,n.media);o[n.href]=!0;p()})}},w=function(n,t,i){var o=n.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),s=o&&o.length||0,t=t.substring(0,t.lastIndexOf("/")),v=function(n){return n.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+t+"$2$3")},y=!s&&i,h=0,f,c,r,l,p;for(t.length&&(t+="/"),y&&(s=1);h<s;h++)for(f=0,y?(c=i,u.push(v(n))):(c=o[h].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,u.push(RegExp.$2&&v(RegExp.$2))),l=c.split(","),p=l.length;f<p;f++)r=l[f],e.push({media:r.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:u.length-1,hasquery:r.indexOf("(")>-1,minw:r.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});a()},c,b,k=function(){var u,r=t.createElement("div"),n=t.body,f=!1;return r.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=t.createElement("body")),n.appendChild(r),i.insertBefore(n,i.firstChild),u=r.offsetWidth,f?i.removeChild(n):n.removeChild(r),l=parseFloat(u)},l,a=function(n){var nt="clientWidth",tt=i[nt],it=t.compatMode==="CSS1Compat"&&tt||t.body[nt]||tt,d={},ot=s[s.length-1],rt=(new Date).getTime(),o,h,g;if(n&&c&&rt-c<v){clearTimeout(b);b=setTimeout(a,v);return}c=rt;for(o in e){var y=e[o],p=y.minw,w=y.maxw,ut=p===null,ft=w===null,et="em";!p||(p=parseFloat(p)*(p.indexOf(et)>-1?l||k():1));!w||(w=parseFloat(w)*(w.indexOf(et)>-1?l||k():1));y.hasquery&&(ut&&ft||!(ut||it>=p)||!(ft||it<=w))||(d[y.media]||(d[y.media]=[]),d[y.media].push(u[y.rules]))}for(o in r)r[o]&&r[o].parentNode===f&&f.removeChild(r[o]);for(o in d)h=t.createElement("style"),g=d[o].join("\n"),h.type="text/css",h.media=o,f.insertBefore(h,ot.nextSibling),h.styleSheet?h.styleSheet.cssText=g:h.appendChild(t.createTextNode(g)),r.push(h)},nt=function(n,t){var i=tt();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){i.readyState==4&&(i.status==200||i.status==304)&&t(i.responseText)},i.readyState!=4)&&i.send(null)},tt=function(){var n=!1;try{n=new XMLHttpRequest}catch(t){n=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return n}}();y();respond.update=y;n.addEventListener?n.addEventListener("resize",d,!1):n.attachEvent&&n.attachEvent("onresize",d)}}(this);window.matchMedia||(window.matchMedia=function(n){var t=n.document,h=t.documentElement,r=[],f=0,c="",i={},k=/\s*(only|not)?\s*(screen|print|[a-z\-]+)\s*(and)?\s*/i,d=/^\s*\(\s*(-[a-z]+-)?(min-|max-)?([a-z\-]+)\s*(:?\s*([0-9]+(\.[0-9]+)?|portrait|landscape)(px|em|dppx|dpcm|rem|%|in|cm|mm|ex|pt|pc|\/([0-9]+(\.[0-9]+)?))?)?\s*\)\s*$/,l=0,a=function(n){var w=-1!==n.indexOf(",")&&n.split(",")||[n],v=w.length-1,b=v,f=null,r=null,y="",l=0,p=!1,a="",t="",f=null,r=0,t=null,u="",o="",s="",e="",h="",u=!1;if(""===n)return!0;do if(f=w[b-v],p=!1,(r=f.match(k))&&(y=r[0],l=r.index),r&&(-1!==f.substring(0,l).indexOf("(")||!l&&(r[3]||y===r.input))){if(t=f,p="not"===r[1],l||(a=r[2],t=f.substring(y.length)),u=a===c||"all"===a||""===a,f=-1!==t.indexOf(" and ")&&t.split(" and ")||[t],r=f.length-1,u&&0<=r&&""!==t)do{if(t=f[r].match(d),!t||!i[t[3]]){u=!1;break}if(u=t[2],e=o=t[5],s=t[7],h=i[t[3]],s&&(e="px"===s?Number(o):"em"===s||"rem"===s?16*o:t[8]?(o/t[8]).toFixed(2):"dppx"===s?96*o:"dpcm"===s?.3937*o:Number(o)),u="min-"===u&&e?h>=e:"max-"===u&&e?h<=e:e?h===e:!!h,!u)break}while(r--);if(u)break}else u=!1;while(v--);return p?!u:u},v=function(){var t=n.innerWidth||h.clientWidth,r=n.innerHeight||h.clientHeight,f=n.screen.width,e=n.screen.height,o=n.screen.colorDepth,u=n.devicePixelRatio;i.width=t;i.height=r;i["aspect-ratio"]=(t/r).toFixed(2);i["device-width"]=f;i["device-height"]=e;i["device-aspect-ratio"]=(f/e).toFixed(2);i.color=o;i["color-index"]=Math.pow(2,o);i.orientation=r>=t?"portrait":"landscape";i.resolution=u&&96*u||n.screen.deviceXDPI||96;i["device-pixel-ratio"]=u||1},y=function(){clearTimeout(l);l=setTimeout(function(){var t=null,u=f-1,o=u,i=!1,e;if(0<=u){v();do if((t=r[o-u])&&((i=a(t.mql.media))&&!t.mql.matches||!i&&t.mql.matches)&&(t.mql.matches=i,t.listeners))for(i=0,e=t.listeners.length;i<e;i++)t.listeners[i]&&t.listeners[i].call(n,t.mql);while(u--)}},10)},p=t.getElementsByTagName("head")[0],t=t.createElement("style"),w=null,e="screen print speech projection handheld tv braille embossed tty".split(" "),u=0,g=e.length,o="#mediamatchjs { position: relative; z-index: 0; }",s="",b=n.addEventListener||(s="on")&&n.attachEvent;for(t.type="text/css",t.id="mediamatchjs",p.appendChild(t),w=n.getComputedStyle&&n.getComputedStyle(t)||t.currentStyle;u<g;u++)o+="@media "+e[u]+" { #mediamatchjs { position: relative; z-index: "+u+" } }";return t.styleSheet?t.styleSheet.cssText=o:t.textContent=o,c=e[1*w.zIndex||0],p.removeChild(t),v(),b(s+"resize",y),b(s+"orientationchange",y),function(n){var i=f,t={matches:!1,media:n,addListener:function(n){r[i].listeners||(r[i].listeners=[]);n&&r[i].listeners.push(n)},removeListener:function(n){var t=r[i],u=0,f=0;if(t)for(f=t.listeners.length;u<f;u++)t.listeners[u]===n&&t.listeners.splice(u,1)}};return""===n?(t.matches=!0,t):(t.matches=a(n),f=r.push({mql:t,listeners:null}),t)}}(window)),function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var t=window.matchMedia,u=t("only all").matches,i=!1,r=0,n=[],f=function(){clearTimeout(r);r=setTimeout(function(){for(var u,s,i=0,f=n.length;i<f;i++){var r=n[i].mql,e=n[i].listeners||[],o=t(r.media).matches;if(o!==r.matches)for(r.matches=o,u=0,s=e.length;u<s;u++)e[u].call(window,r)}},30)};window.matchMedia=function(r){var o=t(r),e=[],s=0;return o.addListener=function(t){u&&(i||(i=!0,window.addEventListener("resize",f,!0)),s===0&&(s=n.push({mql:o,listeners:e})),e.push(t))},o.removeListener=function(n){for(var t=0,i=e.length;t<i;t++)e[t]===n&&e.splice(t,1)},o}}()