/* Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl * Licensed under MIT * http://j.mp/respondjs */ /* 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 */ (function(a){a.matchMedia=a.matchMedia||function(f,g){var d,b=f.documentElement,c=b.firstElementChild||b.firstChild,e=f.createElement("body"),h=f.createElement("div");h.id="mq-test-1";h.style.cssText="position:absolute;top:-100em";e.style.background="none";e.appendChild(h);return function(i){h.innerHTML='­';b.insertBefore(e,c);d=h.offsetWidth===42;b.removeChild(e);return{matches:d,media:i}}}(a.document)})(this);(function(k){var u={};k.respond=u;u.update=function(){};var c=[],d=function(){var w=false;try{w=new k.XMLHttpRequest()}catch(A){w=new k.ActiveXObject("Microsoft.XMLHTTP")}return function(){return w}}(),n=function(w,B){var A=d();if(!A){return}A.open("GET",w,true);A.onreadystatechange=function(){if(A.readyState!==4||A.status!==200&&A.status!==304){return}B(A.responseText)};if(A.readyState===4){return}A.send(null)},r=function(w){return w.replace(u.regex.minmaxwh,"").match(u.regex.other)};u.ajax=n;u.queue=c;u.unsupportedmq=r;u.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g};u.mediaQueriesSupported=k.matchMedia&&k.matchMedia("only all")!==null&&k.matchMedia("only all").matches;if(u.mediaQueriesSupported){return}var z=k.document,t=z.documentElement,h=[],j=[],q=[],o={},g=30,e=z.getElementsByTagName("head")[0]||t,f=z.getElementsByTagName("base")[0],b=e.getElementsByTagName("link"),l,s,p,y=function(){var B,E=z.createElement("div"),w=z.body,D=t.style.fontSize,C=w&&w.style.fontSize,A=false;E.style.cssText="position:absolute;font-size:1em;width:1em";if(!w){w=A=z.createElement("body");w.style.background="none"}t.style.fontSize="100%";w.style.fontSize="100%";w.appendChild(E);if(A){t.insertBefore(w,t.firstChild)}B=E.offsetWidth;if(A){t.removeChild(w)}else{w.removeChild(E)}t.style.fontSize=D;if(C){w.style.fontSize=C}B=p=parseFloat(B);return B},i=function(L){var Q="clientWidth",C=t[Q],A=z.compatMode==="CSS1Compat"&&C||z.body[Q]||C,O={},P=b[b.length-1],B=new Date().getTime();if(L&&l&&B-l-1?p||y():1)}if(!!I){I=parseFloat(I)*(I.indexOf(w)>-1?p||y():1)}if(!M.hasquery||(!K||!N)&&(K||A>=F)&&(N||A<=I)){if(!O[M.media]){O[M.media]=[]}O[M.media].push(j[M.rules])}}}for(var H in q){if(q.hasOwnProperty(H)){if(q[H]&&q[H].parentNode===e){e.removeChild(q[H])}}}q.length=0;for(var G in O){if(O.hasOwnProperty(G)){var E=z.createElement("style"),D=O[G].join("\n");E.type="text/css";E.media=G;e.insertBefore(E,P.nextSibling);if(E.styleSheet){E.styleSheet.cssText=D}else{E.appendChild(z.createTextNode(D))}q.push(E)}}},m=function(K,w,B){var I=K.replace(u.regex.comments,"").replace(u.regex.keyframes,"").match(u.regex.media),L=I&&I.length||0;w=w.substring(0,w.lastIndexOf("/"));var A=function(M){return M.replace(u.regex.urls,"$1"+w+"$2$3")},C=!L&&B;if(w.length){w+="/"}if(C){L=1}for(var F=0;F-1,minw:H.match(u.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:H.match(u.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}i()},x=function(){if(c.length){var w=c.shift();n(w.href,function(A){m(A,w.href,w.media);o[w.href]=true;k.setTimeout(function(){x()},0)})}},a=function(){for(var C=0;C