/** * @package WordPress * @subpackage Oakland * @since Oakland 1.0 */ /* * css3MediaQueries.js by Wouter van der Graaf * JavaScript library to make IE 5+, Firefox 1+ and Safari 2 transparently parse, test and apply CSS3 Media Queries * MIT License */ if(typeof Object.create!=="function"){Object.create=function(a){function b(){}b.prototype=a;return new b}}var ua={toString:function(){return navigator.userAgent},test:function(a){return this.toString().toLowerCase().indexOf(a.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var a=[];var b=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var b=0;b=200&&d.status<300||d.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof d.status==="undefined"){b(d.responseText)}else{c()}document.documentElement.style.cursor="";d=null}};d.send("")};var j=function(b){b=b.replace(a.REDUNDANT_COMPONENTS,"");b=b.replace(a.REDUNDANT_WHITESPACE,"$1");b=b.replace(a.MORE_WHITESPACE," ");b=b.replace(a.FINAL_SEMICOLONS,"}");return b};var k={mediaQueryList:function(b){var c={};var d=b.indexOf("{");var e=b.substring(0,d);b=b.substring(d+1,b.length-1);var f=[],g=[];var h=e.toLowerCase().substring(7).split(",");for(var i=0;i-1&&k.href&&k.href.length!==0&&!k.disabled){d[d.length]=k}}if(d.length>0){var n=0;var o=function(){n++;if(n===d.length){e()}};var p=function(b){var c=b.href;i(c,function(d){d=j(d).replace(a.RELATIVE_URLS,"url("+c.substring(0,c.lastIndexOf("/"))+"/$1)");b.cssHelperText=d;o()},o)};for(h=0;h=i||g&&k0}}else{if("device-height"===a.substring(d-13,d)){l=screen.height;if(c!==null){if(h==="length"){return e&&l>=i||g&&l0}}else{if("width"===a.substring(d-5,d)){k=document.documentElement.clientWidth||document.body.clientWidth;if(c!==null){if(h==="length"){return e&&k>=i||g&&k0}}else{if("height"===a.substring(d-6,d)){l=document.documentElement.clientHeight||document.body.clientHeight;if(c!==null){if(h==="length"){return e&&l>=i||g&&l0}}else{if("device-aspect-ratio"===a.substring(d-19,d)){return h==="aspect-ratio"&&screen.width*i[1]===screen.height*i[0]}else{if("color-index"===a.substring(d-11,d)){var m=Math.pow(2,screen.colorDepth);if(c!==null){if(h==="absolute"){return e&&m>=i||g&&m0}}else{if("color"===a.substring(d-5,d)){var n=screen.colorDepth;if(c!==null){if(h==="absolute"){return e&&n>=i||g&&n0}}else{if("resolution"===a.substring(d-10,d)){var o;if(j==="dpcm"){o=f("1cm")}else{o=f("1in")}if(c!==null){if(h==="resolution"){return e&&o>=i||g&&o0}}else{return false}}}}}}}}};var h=function(a){var b=a.getValid();var c=a.getExpressions();var d=c.length;if(d>0){for(var e=0;e0){f[g++]=","}f[g++]=i}}if(f.length>0){c[c.length]=cssHelper.addStyle("@media "+f.join("")+"{"+a.getCssText()+"}",false)}};var j=function(a){for(var b=0;bl||Math.abs(f-b)>l){a=c;b=f;clearTimeout(e);e=setTimeout(function(){if(!d()){k()}else{cssHelper.broadcast("cssMediaQueriesTested")}},500)}};window.onresize=function(){var a=window.onresize||function(){};return function(){a();f()}}()};var n=document.documentElement;n.style.marginLeft="-32767px";setTimeout(function(){n.style.marginTop=""},2e4);return function(){if(!d()){cssHelper.addListener("newStyleParsed",function(a){j(a.cssHelperParsed.mediaQueryLists)});cssHelper.addListener("cssMediaQueriesTested",function(){if(ua.ie){n.style.width="1px"}setTimeout(function(){n.style.width="";n.style.marginLeft=""},0);cssHelper.removeListener("cssMediaQueriesTested",arguments.callee)});e();k()}else{n.style.marginLeft=""}m()}}());try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}