/*! 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(b){var l,k=b.documentElement,j=k.firstElementChild||k.firstChild,i=b.createElement("body"),h=b.createElement("div");return h.id="mq-test-1",h.style.cssText="position:absolute;top:-100em",i.style.background="none",i.appendChild(h),function(c){return h.innerHTML='&shy;<style media="'+c+'"> #mq-test-1 { width: 42px; }</style>',k.insertBefore(i,j),l=42===h.offsetWidth,k.removeChild(i),{matches:l,media:c}}}(document);
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs  */
(function(V){function y(){B(!0)}var U={};if(V.respond=U,U.update=function(){},U.mediaQueriesSupported=V.matchMedia&&V.matchMedia("only all").matches,!U.mediaQueriesSupported){var F,E,C,T=V.document,S=T.documentElement,R=[],Q=[],P=[],O={},N=30,M=T.getElementsByTagName("head")[0]||S,L=T.getElementsByTagName("base")[0],K=M.getElementsByTagName("link"),J=[],I=function(){for(var a=0;K.length>a;a++){var j=K[a],i=j.href,h=j.media,g=j.rel&&"stylesheet"===j.rel.toLowerCase();i&&g&&!O[i]&&(j.styleSheet&&j.styleSheet.rawCssText?(G(j.styleSheet.rawCssText,i,h),O[i]=!0):(!/^([a-zA-Z:]*\/\/)/.test(i)&&!L||i.replace(RegExp.$1,"").split("/")[0]===V.location.host)&&J.push({href:i,media:h}))}H()},H=function(){if(J.length){var a=J.shift();A(a.href,function(b){G(b,a.href,a.media),O[a.href]=!0,V.setTimeout(function(){H()},0)})}},G=function(X,W,x){var w=X.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),v=w&&w.length||0;W=W.substring(0,W.lastIndexOf("/"));var u=function(b){return b.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+W+"$2$3")},t=!v&&x;W.length&&(W+="/"),t&&(v=1);for(var s=0;v>s;s++){var r,q,p,f;t?(r=x,Q.push(u(X))):(r=w[s].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,Q.push(RegExp.$2&&u(RegExp.$2))),p=r.split(","),f=p.length;for(var e=0;f>e;e++){q=p[e],R.push({media:q.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:Q.length-1,hasquery:q.indexOf("(")>-1,minw:q.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:q.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}B()},D=function(){var d,c=T.createElement("div"),h=T.body,g=!1;return c.style.cssText="position:absolute;font-size:1em;width:1em",h||(h=g=T.createElement("body"),h.style.background="none"),h.appendChild(c),S.insertBefore(h,S.firstChild),d=c.offsetWidth,g?S.removeChild(h):h.removeChild(c),d=C=parseFloat(d)},B=function(Z){var Y="clientWidth",X=S[Y],W="CSS1Compat"===T.compatMode&&X||T.body[Y]||X,u={},t=K[K.length-1],s=(new Date).getTime();if(Z&&F&&N>s-F){return V.clearTimeout(E),E=V.setTimeout(B,N),void 0}F=s;for(var f in R){if(R.hasOwnProperty(f)){var e=R[f],d=e.minw,c=e.maxw,a=null===d,r=null===c,q="em";d&&(d=parseFloat(d)*(d.indexOf(q)>-1?C||D():1)),c&&(c=parseFloat(c)*(c.indexOf(q)>-1?C||D():1)),e.hasquery&&(a&&r||!(a||W>=d)||!(r||c>=W))||(u[e.media]||(u[e.media]=[]),u[e.media].push(Q[e.rules]))}}for(var l in P){P.hasOwnProperty(l)&&P[l]&&P[l].parentNode===M&&M.removeChild(P[l])}for(var j in u){if(u.hasOwnProperty(j)){var i=T.createElement("style"),g=u[j].join("\n");i.type="text/css",i.media=j,M.insertBefore(i,t.nextSibling),i.styleSheet?i.styleSheet.cssText=g:i.appendChild(T.createTextNode(g)),P.push(i)}}},A=function(e,d){var f=z();f&&(f.open("GET",e,!0),f.onreadystatechange=function(){4!==f.readyState||200!==f.status&&304!==f.status||d(f.responseText)},4!==f.readyState&&f.send(null))},z=function(){var a=!1;try{a=new V.XMLHttpRequest}catch(d){a=new V.ActiveXObject("Microsoft.XMLHTTP")}return function(){return a}}();I(),U.update=I,V.addEventListener?V.addEventListener("resize",y,!1):V.attachEvent&&V.attachEvent("onresize",y)}})(this);
