(function(e){function C(){w(!0)}var d={};e.respond=d;d.update=function(){};var q=[],K=function(){var c=!1;try{c=new e.XMLHttpRequest}catch(b){c=new e.ActiveXObject("Microsoft.XMLHTTP")}return function(){return c}}(),D=function(c,b){var a=K();a&&(a.open("GET",c,!0),a.onreadystatechange=function(){4!==a.readyState||200!==a.status&&304!==a.status||b(a.responseText)},4!==a.readyState&&a.send(null))},E=function(c){return c.replace(d.regex.minmaxwh,"").match(d.regex.other)};d.ajax=D;d.queue=q;d.unsupportedmq=
E;d.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};d.mediaQueriesSupported=e.matchMedia&&null!==e.matchMedia("only all")&&e.matchMedia("only all").matches;if(!d.mediaQueriesSupported){var h=e.document,k=h.documentElement,r=[],t=[],m=[],x={},u=h.getElementsByTagName("head")[0]||k,L=h.getElementsByTagName("base")[0],v=u.getElementsByTagName("link"),y,F,z,A=function(){var c,b=h.createElement("div"),a=h.body,d=k.style.fontSize,f=a&&a.style.fontSize,g=!1;b.style.cssText="position:absolute;font-size:1em;width:1em";a||(a=g=h.createElement("body"),
a.style.background="none");k.style.fontSize="100%";a.style.fontSize="100%";a.appendChild(b);g&&k.insertBefore(a,k.firstChild);c=b.offsetWidth;g?k.removeChild(a):a.removeChild(b);k.style.fontSize=d;f&&(a.style.fontSize=f);return c=z=parseFloat(c)},w=function(c){var b=k.clientWidth,a="CSS1Compat"===h.compatMode&&b||h.body.clientWidth||b,b={},d=v[v.length-1],f=(new Date).getTime();if(c&&y&&30>f-y)e.clearTimeout(F),F=e.setTimeout(w,30);else{y=f;for(var g in r)if(r.hasOwnProperty(g)){c=r[g];var f=c.minw,
p=c.maxw,l=null===f,G=null===p;f&&(f=parseFloat(f)*(-1<f.indexOf("em")?z||A():1));p&&(p=parseFloat(p)*(-1<p.indexOf("em")?z||A():1));c.hasquery&&(l&&G||!(l||a>=f)||!(G||a<=p))||(b[c.media]||(b[c.media]=[]),b[c.media].push(t[c.rules]))}for(var n in m)m.hasOwnProperty(n)&&m[n]&&m[n].parentNode===u&&u.removeChild(m[n]);m.length=0;for(var B in b)b.hasOwnProperty(B)&&(g=h.createElement("style"),n=b[B].join("\n"),g.type="text/css",g.media=B,u.insertBefore(g,d.nextSibling),g.styleSheet?g.styleSheet.cssText=
n:g.appendChild(h.createTextNode(n)),m.push(g))}},H=function(c,b,a){var e=c.replace(d.regex.comments,"").replace(d.regex.keyframes,"").match(d.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=!f&&a;b.length&&(b+="/");g&&(f=1);for(var h=0;h<f;h++){var l,k,n;g?(l=a,t.push(c.replace(d.regex.urls,"$1"+b+"$2$3"))):(l=e[h].match(d.regex.findStyles)&&RegExp.$1,t.push(RegExp.$2&&RegExp.$2.replace(d.regex.urls,"$1"+b+"$2$3")));k=l.split(",");n=k.length;for(var m=0;m<n;m++)l=k[m],E(l)||
r.push({media:l.split("(")[0].match(d.regex.only)&&RegExp.$2||"all",rules:t.length-1,hasquery:-1<l.indexOf("("),minw:l.match(d.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(d.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}w()},I=function(){if(q.length){var c=q.shift();D(c.href,function(b){H(b,c.href,c.media);x[c.href]=!0;e.setTimeout(function(){I()},0)})}},J=function(){for(var c=0;c<v.length;c++){var b=v[c],a=b.href,d=b.media,f=b.rel&&"stylesheet"===b.rel.toLowerCase();if(a&&
f&&!x[a])if(b.styleSheet&&b.styleSheet.rawCssText)H(b.styleSheet.rawCssText,a,d),x[a]=!0;else if(!/^([a-zA-Z:]*\/\/)/.test(a)&&!L||a.replace(RegExp.$1,"").split("/")[0]===e.location.host)"//"===a.substring(0,2)&&(a=e.location.protocol+a),q.push({href:a,media:d})}I()};J();d.update=J;d.getEmValue=A;e.addEventListener?e.addEventListener("resize",C,!1):e.attachEvent&&e.attachEvent("onresize",C)}})(this);
