(function(c){var e=c('<style rel="stylesheet" type="text/css" />').appendTo("head"),a=e[0].sheet?"sheet":"styleSheet",b=e[0][a].rules?"rules":"cssRules",d=e[0][a].deleteRule?"deleteRule":"removeRule";c.cssRule=function(l,o){var m=l?(o?c(l,o):c(l)):e,h=/^([^{]+)(\{([^}]*)\})?/m,i=/([^:]+):([^;}]+)/,k=/-([a-z])/ig,g=[],n=function(r){for(var s=0;s<g.length;s++){var q=g[s];for(var t=0;t<q[b].length;t++){if(q[b][t].selectorText.toLowerCase()==r.toLowerCase()){return q[b][t]}}}},f=function(q,r,s){if(q.addRule){q.addRule(r,s||";")}else{if(q.insertRule){q.insertRule(r+"{"+s+"}",q[b].length)}}},p=function(q){return q.replace(k,function(s,r){return r.toUpperCase()})},j={addRule:function(q){var r=h.exec(q);j.setProp(r[1],r[3]);return this},delRule:function(t){var u=n(t),w=-1,q,s=false;for(var r=0;r<g.length;r++){var q=g[r];for(var v=0;v<q[b].length;v++){if(q[b][v].selectorText.toLowerCase()==t.toLowerCase()){g[r][d](v);s=true;break}}if(s){break}}return this},cleanRules:function(){for(var r=0;r<g.length;r++){var q=g[r][b];for(var s=0;s<q.length;s++){q[d](r)}}return this},setProp:function(v,s,r){v=c.trim(v);var w=n(v),u=typeof s,q={},t;if(!w){f(g[g.length-1],v);w=n(v)}if(s){if(u==="string"){s=c.trim(s);if(!r){c.each(s.split(";"),function(y,x){if(x){t=x.split(":");q[c.trim(t[0])]=t[1]}})}else{if(typeof r==="string"){q[s]=c.trim(r)}}}else{q=s}c.each(q,function(z,y){var x=p(z);cssProp=c.cssProps[x]||x;w.style[cssProp]=c.trim(y)})}return this},delProp:function(r,q){var s=n(r);if(s){if(s.style.removeProperty){s.style.removeProperty(q)}else{s.style.removeAttribute(p(q))}}return this},cleanProps:function(q){var r=n(q)},cssText:function(r,q){if(r){q&&j.cleanRules();var s=c.map(r.split("}"),function(v){if(v){return v+"}"}});for(var t=0;t<s.length;t++){var u=h.exec(s[t]);j.setProp(u[1],u[3])}return this}return cssText}};c.extend(m,j);m.each(function(){var q=this;q[a]&&g.push(q[a])});return m}})(jQuery);
