I did some googling and found the following code:
function getcss( selector, property ) {
var i, r, s=document.styleSheets && document.styleSheets[0]; if(s) {
r = s.rules ? s.rules : s.cssRules; if(r) {
i = r.length; while (i--) {
if(r[i].selectorText.toLowerCase() === selector.toLowerCase()) {...