var helium={callback:undefined,data:{},init:function(){helium.callback=arguments.length>0?arguments[0]:helium.report;if(window.localStorage){helium.load();helium.data.timeout=3E3;helium.save();helium.checkstatus()}},checkstatus:function(){if(typeof helium.data.status==="undefined")helium.data.status=0;if(helium.data.status===0){var k=document.createDocumentFragment();k.appendChild(document.createElement("div"));k.lastChild.setAttribute("id","cssdetectID");k.lastChild.innerHTML='
Paste a list of pages on your site you want to test: ';
document.getElementsByTagName("body")[0].appendChild(k);helium.on(Sizzle("#cssdetectStart"),"click",function(){var q=document.getElementById("cssdetectTextarea").value.split("\n");helium.setPageList(q);helium.data.status=1;helium.data.findinglist=helium.data.pagelist.slice(0);helium.save();helium.nav(helium.data.findinglist)},false);helium.on(Sizzle("#cssdetectRestart"),"click",function(){document.getElementById("cssdetectTextarea").value="";helium.reset()},false);return false}if(helium.data.status===
1){helium.findstylesheets();return false}if(helium.data.status===2){helium.getcss();return false}if(helium.data.status===3){helium.checkcss();return false}helium.data.status===4&&helium.callback()},report:function(){var k=document.createDocumentFragment();k.appendChild(document.createElement("div"));k.lastChild.setAttribute("id","cssdetectID");var q=k.lastChild,n=false,i="CSS Detection Report ";i+=' ';
i+=' **Green: unmatched selectors , **Black: matched selectors that are defined with non-matched selectors , **Red: a malformed selector **Blue: a selector with a pseudo-class. You must test these manually.
';for(var s=0;s'+helium.data.stylesheets[s].url+" ";var o=helium.data.stylesheets[s].selectors;
if(o.length>0){i+="";for(var r=0;r1){if(j>0)t+=", ";t+=''+o[r][j].s+" ";u++}if(o[r][j].v==="pseudo_class"){if(j>0)t+=", ";t+=''+o[r][j].s+" "}if(o[r][j].v==="broken_selector"){if(j>0)t+=", ";t+=''+o[r][j].s+" "}if(o[r][j].v===
false){if(j>0)t+=", ";t+=''+o[r][j].s+" "}}if(u===o[r].length)t="";u=0;if(t!==""){if(n){u=' class="alternate"';n=false}else{u="";n=true}i+=""+t+" "}}i+=" "}else i+="No unmatched selectors found."}i+="";q.innerHTML=i;document.getElementsByTagName("body")[0].appendChild(k);o=Sizzle("#cssdetectID ul li");for(var l=0;l0)helium.nav();else{helium.data.status=
4;helium.save();helium.callback()}},helium.data.timeout)},find:function(k){try{if(Sizzle(k).length>0)return true}catch(q){return"broken_selector"}k=k.match(/\:+[\w-]+/gi);return k!==null&&k.hasOwnProperty("length")&&k.length>0?"pseudo_class":false},findstylesheets:function(){for(var k={url:helium.data.currenturl,links:[]},q=Sizzle("link[rel='stylesheet']"),n=0;n0?window.location.pathname.substring(0,s+1):"/";i=directory+i}i=window.location.protocol+"//"+window.location.hostname+":"+window.location.port+i}if(i.indexOf(window.location.hostname)!==-1){k.links.push(i);if(typeof helium.data.stylesheets==="undefined")helium.data.stylesheets=[];helium.data.stylesheets.push(i)}}if(typeof helium.data.pages==="undefined")helium.data.pages=[];helium.data.pages.push(k);helium.save();if(helium.data.findinglist.length>0)helium.nav(helium.data.findinglist);
else{helium.data.stylesheets.sort();for(n=0;n0){for(var t=[],u=0;u0){p=g;break}}g=g[a]}d[e]=p}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=0,s=Object.prototype.toString,o=false,r=true,t=/\\/g,u=/\W/;[0,0].sort(function(){r=false;return 0});var j=function(a,b,c,d){c=c||[];var e=b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return c;var f,h,g,p,y,v=true,w=j.isXML(b),m=[],z=a;do if(n.exec(""),f=n.exec(z))if(z=f[3],m.push(f[1]),
f[2]){p=f[3];break}while(f);if(m.length>1&&G.exec(a))if(m.length===2&&l.relative[m[0]])h=E(m[0]+m[1],b);else for(h=l.relative[m[0]]?[b]:j(m.shift(),b);m.length;){a=m.shift();l.relative[a]&&(a+=m.shift());h=E(a,h)}else if(!d&&m.length>1&&b.nodeType===9&&!w&&l.match.ID.test(m[0])&&!l.match.ID.test(m[m.length-1])&&(f=j.find(m.shift(),b,w),b=f.expr?j.filter(f.expr,f.set)[0]:f.set[0]),b){f=d?{expr:m.pop(),set:x(d)}:j.find(m.pop(),m.length===1&&(m[0]==="~"||m[0]==="+")&&b.parentNode?b.parentNode:b,w);h=
f.expr?j.filter(f.expr,f.set):f.set;for(m.length>0?g=x(h):v=false;m.length;){f=y=m.pop();l.relative[y]?f=m.pop():y="";f==null&&(f=b);l.relative[y](g,f,w)}}else g=[];g||(g=h);g||j.error(y||a);if(s.call(g)==="[object Array]")if(v)if(b&&b.nodeType===1)for(a=0;g[a]!=null;a++)g[a]&&(g[a]===true||g[a].nodeType===1&&j.contains(b,g[a]))&&c.push(h[a]);else for(a=0;g[a]!=null;a++)g[a]&&g[a].nodeType===1&&c.push(h[a]);else c.push.apply(c,g);else x(g,c);p&&(j(p,e,c,d),j.uniqueSort(c));return c};j.uniqueSort=
function(a){if(C&&(o=r,a.sort(C),o))for(var b=1;b0};j.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!u.test(b))for(b=b.toLowerCase();e=0)?c||d.push(h):c&&(b[f]=false));return false},ID:function(a){return a[1].replace(t,"")},TAG:function(a){return a[1].replace(t,"").toLowerCase()},CHILD:function(a){if(a[1]===
"nth"){a[2]||j.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&j.error(a[0]);a[0]=i++;return a},ATTR:function(a,b,c,d,e,f){b=a[1]=a[1].replace(t,"");!f&&l.attrMap[b]&&(a[1]=l.attrMap[b]);a[4]=(a[4]||a[5]||"").replace(t,"");a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,c,d,e){if(a[1]==="not")if((n.exec(a[3])||"").length>1||
/^\w/.test(a[3]))a[3]=j(a[3],null,null,b);else return a=j.filter(a[3],b,c,1^e),c||d.push.apply(d,a),false;else if(l.match.POS.test(a[0])||l.match.CHILD.test(a[0]))return true;return a},POS:function(a){a.unshift(true);return a}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden"},disabled:function(a){return a.disabled===true},checked:function(a){return a.checked===true},selected:function(a){return a.selected===true},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},
has:function(a,b,c){return!!j(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()===
"input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){return a.nodeName.toLowerCase()==="input"&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},
setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);else if(e==="contains")return(a.textContent||a.innerText||j.getText([a])||"").indexOf(b[3])>=0;else if(e==="not"){b=
b[3];c=0;for(d=b.length;c=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1];c=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c);var d=c+"",e=b[2],f=b[4];return c==null?e==="!=":e==="="?d===f:e==="*="?d.indexOf(f)>=
0:e==="~="?(" "+d+" ").indexOf(f)>=0:!f?d&&c!==false:e==="!="?d!==f:e==="^="?d.indexOf(f)===0:e==="$="?d.substr(d.length-f.length)===f:e==="|="?d===f||d.substr(0,f.length+1)===f+"-":false},POS:function(a,b,c,d){var e=l.setFilters[b[2]];if(e)return e(a,c,b,d)}}},G=l.match.POS,H=function(a,b){return"\\"+(b-0+1)},A;for(A in l.match){l.match[A]=RegExp(l.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);l.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[A].source.replace(/\\(\d+)/g,H))}var x=function(a,
b){a=Array.prototype.slice.call(a,0);if(b)return b.push.apply(b,a),b;return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(I){x=function(a,b){var c=0,d=b||[];if(s.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c ";c.insertBefore(a,c.firstChild);if(document.getElementById(b)){l.find.ID=function(d,e,f){if(typeof e.getElementById!=="undefined"&&!f)return(e=e.getElementById(d[1]))?e.id===d[1]||typeof e.getAttributeNode!==
"undefined"&&e.getAttributeNode("id").nodeValue===d[1]?[e]:void 0:[]};l.filter.ID=function(d,e){var f=typeof d.getAttributeNode!=="undefined"&&d.getAttributeNode("id");return d.nodeType===1&&f&&f.nodeValue===e}}c.removeChild(a);c=a=null})();(function(){var a=document.createElement("div");a.appendChild(document.createComment(""));if(a.getElementsByTagName("*").length>0)l.find.TAG=function(b,c){var d=c.getElementsByTagName(b[1]);if(b[1]==="*"){for(var e=[],f=0;d[f];f++)d[f].nodeType===1&&e.push(d[f]);
d=e}return d};a.innerHTML=" ";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#")l.attrHandle.href=function(b){return b.getAttribute("href",2)};a=null})();document.querySelectorAll&&function(){var a=j,b=document.createElement("div");b.innerHTML="
";if(!(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)){j=function(d,e,f,h){e=e||document;if(!h&&!j.isXML(e)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(d);
if(g&&(e.nodeType===1||e.nodeType===9))if(g[1])return x(e.getElementsByTagName(d),f);else if(g[2]&&l.find.CLASS&&e.getElementsByClassName)return x(e.getElementsByClassName(g[2]),f);if(e.nodeType===9){if(d==="body"&&e.body)return x([e.body],f);else if(g&&g[3]){var p=e.getElementById(g[3]);if(p&&p.parentNode){if(p.id===g[3])return x([p],f)}else return x([],f)}try{return x(e.querySelectorAll(d),f)}catch(y){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){g=e;var v=(p=e.getAttribute("id"))||
"__sizzle__",w=e.parentNode,m=/^\s*[+~]/.test(d);p?v=v.replace(/'/g,"\\$&"):e.setAttribute("id",v);if(m&&w)e=e.parentNode;try{if(!m||w)return x(e.querySelectorAll("[id='"+v+"'] "+d),f)}catch(z){}finally{p||g.removeAttribute("id")}}}return a(d,e,f,h)};for(var c in a)j[c]=a[c];b=null}}();(function(){var a=document.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(document.createElement("div"),"div"),d=false;try{b.call(document.documentElement,
"[test!='']:sizzle")}catch(e){d=true}j.matchesSelector=function(f,h){h=h.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!j.isXML(f))try{if(d||!l.match.PSEUDO.test(h)&&!/!=/.test(h)){var g=b.call(f,h);if(g||!c||f.document&&f.document.nodeType!==11)return g}}catch(p){}return j(h,null,null,[f]).length>0}}})();(function(){var a=document.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0&&(a.lastChild.className=
"e",a.getElementsByClassName("e").length!==1)){l.order.splice(1,0,"CLASS");l.find.CLASS=function(b,c,d){if(typeof c.getElementsByClassName!=="undefined"&&!d)return c.getElementsByClassName(b[1])};a=null}})();j.contains=document.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):true)}:document.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return false};j.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?
a.nodeName!=="HTML":false};var E=function(a,b){for(var c,d=[],e="",f=b.nodeType?[b]:b;c=l.match.PSEUDO.exec(a);){e+=c[0];a=a.replace(l.match.PSEUDO,"")}a=l.relative[a]?a+"*":a;c=0;for(var h=f.length;c