if ($.browser.msie && $.browser.version < 7) {
    //Version 1.3.0.1
    /*
    SUPPORTED
    - ID selectors
    - Class selectors
    - Multiple class definitions (i.e. LI.red.level)
    - Tag selectors
    - Selector groups
    - Child selectors
    - descendants
    - Adjacent selectors
    - Attribute selectors
    - @import
    LIMITED SUPPORT
    - Pseudo classes/elements (Must specify in element get properties method), only first pseudo identifier recognized
    NOT SUPPORTED

- Specificity / ! important (would need to check order of definition, determine doc location of LINK vs STYLE tags and parse in order)
    - - current order assumption: STYLE, LINK, INLINE (last with most precedence, parsed last)
    - Inherited properties (TODO? - if so, need to define those properties inherited)

-------------------

// TODO:
    // NEED TO CHECK COMBINATOR

// TESTING

// CHECK FOR NULL/EMPTY STRING PARSING
		
*/

    cssParser.DELIM1 = "##DELIM1##";
    cssParser.DELIM2 = "##DELIM2##";
    cssParser.regUrl = /(\/[^\/\.]+\/\.\.)|(\.\/)/;
    cssParser.regTrim = /^\s*|\s*$/g;
    cssParser.regwhiteSpaceToSpaces = /\s+/g;
    cssParser.regremoveComments = /<!--|-->|\/\*(\r|\n|.)*?\*\//g;

    cssParser.trim = function(str) {
        return str.replace(cssParser.regTrim, "");
    };
    cssParser.whiteSpaceToSpaces = function(str) {
        return str.replace(cssParser.regwhiteSpaceToSpaces, " ");
    };
    cssParser.removeComments = function(str) {
        return str.replace(cssParser.regremoveComments, "");
    };

    function cssParser(style_str, handler, dom) {
        this.data = "";
        this.sheets = [];
        this.fire = handler;
        if (style_str && typeof style_str == "object") {
            dom = style_str;
            style_str = "all";
        } else if (!dom) dom = document;
        switch (style_str) {
            case "*":
            case "all":
            case "document":
                style_str = this.getEmbeddedCSSStyle(dom);
                if (style_str[0])
                    this.sheets[this.sheets] = new cssParser.cssSheetGroup(style_str[0]);
                this.getLinkedCSSSheet(dom);
                break;
            case "styles":
                style_str = this.getEmbeddedCSSStyle(dom);
                this.parseData(style_str);
                break;
            case "links":
                this.getLinkedCSSSheet(dom);
                break;
            default:
                style_str = [(style_str == "" ? ["", "", ""] : [style_str, "", ""])];
                this.parseData(style_str);
        }
        //this.parseData(style_str);
    }

    cssParser.prototype.parseData = function(sheets) {
        for (var j = 0, l = sheets.length, sheet; j < l; j++)
            if ((sheet = sheets[j]))
            this.sheets[this.sheets] = new cssParser.cssSheetGroup(sheet);
        if (this.fire)
            this.fire();
    };

    cssParser.cssSheetGroup = function(styleSheet) {
        var cssText = styleSheet[0];
        this.cssText = cssText;
        this.href = styleSheet[1];
        this.url = styleSheet[2];
        this.rules = [];
        this.imports = [];
        this.parseData(cssText);
    };
    cssParser.cssSheetGroup.regImport = /@import\s+(url\()?["'\s]?([-\w:\.\/]+)["'\s]?\)?\s*;/i;
    cssParser.cssSheetGroup.prototype.parseData = function(style_str) {
        style_str = this.cssText = !style_str ? "" : style_str;
        style_str = cssParser.trim(cssParser.removeComments(style_str));
        var m = style_str.match(cssParser.cssSheetGroup.regImport);
        if (m)
            while (cssParser.cssSheetGroup.regImport.test(style_str)) {
                this.imports[this.imports.length] = new cssParser.cssSheetGroup(cssParser.getLinkedCSSStyle(m[2], this.url));
                style_str = style_str.replace(cssParser.cssSheetGroup.regImport, "");
                m = style_str.match(cssParser.cssSheetGroup.regImport);
            }
        var blocks = style_str.split(/{|}/);
        for (var i = 0, len = blocks.length, p; i < len; i = i + 2)
            if (p = blocks[i + 1])
            this.rules[this.rules.length] = new cssParser.cssStyleGroup(blocks[i], p, [this.href, this.url]);
    };
    cssParser.cssStyleGroup = function(style_str, properties_str, urlsStyleSheet) {
        this.data = style_str;
        this.selectors = [];
        this.urlsStyleSheet = urlsStyleSheet;
        this.parseData(style_str, properties_str);
    };
    cssParser.cssStyleGroup.prototype.parseData = function(style_str, properties_str) {
        this.selectors = style_str.split(",");
        this.properties = new CSSProperties(properties_str);

        for (var i = 0, len = this.selectors.length, s; i < len; i++) {
            s = (this.selectors[i] = new CSSSelectorDefinition(this.selectors[i], this.properties));
            //this.parseSelector(s);
        }
    };
    cssParser.getStyleSheet = function(href, url, arrSheets) {
        if (!arrSheets) arrSheets = document.styleSheets;
        if (arrSheets)
            for (var i = 0, styleSheet, r; i < arrSheets.length; i++) {
            styleSheet = arrSheets[i];
            if (styleSheet.href == href || styleSheet.href == url)
                return styleSheet;
            if (styleSheet.imports) {
                if (styleSheet.imports.length > 0)
                    if (r = cssParser.getStyleSheet(href, url, styleSheet.imports)) return r;
            }
            else {
                var cssRules = styleSheet.cssRules;
                if (cssRules) {
                    for (var j = 0, m = cssRules.length; j < m; ++j) {
                        if ((styleSheet = cssRules[j].styleSheet) && (styleSheet.href == href || styleSheet.href == url))
                            return styleSheet;
                    }
                }
            }
        }
    };
    cssParser.getRules = function(domStyleSheet) {
        var rules = "rules";
        if (domStyleSheet) {
            if (!domStyleSheet[rules])
                rules = "cssRules";
            return domStyleSheet[rules];
        }
    };
    cssParser.getRule = function(CSSParseSelector, domStyleSheet) {
        var rules = cssParser.getRules(domStyleSheet);
        if (rules) {
            for (var i = 0, selectorText = cssParser.getSelectorText(CSSParseSelector), l = rules.length, rule; i < l; i++) {
                rule = rules[i];
                if (rule.selectorText == selectorText)
                    return rule;
            }
        }
    };
    cssParser.getSelectorText = function(CSSParseSelector) {
        var selectorText = CSSParseSelector.data;
        //Modification pour ie
        if (/MSIE /.test(navigator.userAgent)) {
            if (selectorText == "*")
                selectorText = "";
            else
                for (var j = 0, l = CSSParseSelector.singleSelectors.length, singleSelector; j < l; j++) {
                singleSelector = CSSParseSelector.singleSelectors[j];
                if (singleSelector.type != "*")
                    selectorText = selectorText.replace(new RegExp("(^|\\s)" + singleSelector.type + "($|\\s|\\.|:|#|\\[)"), "$1" + singleSelector.type.toUpperCase() + "$2");
            }
        }
        //***
        return selectorText;
    };

    function CSSSelectorDefinition(selector_str, properties_obj) {
        this.data = "";
        this.singleSelectors = [];
        this.properties = properties_obj;
        if (selector_str)
            this.parseData(selector_str);
    }
    CSSSelectorDefinition.regComb = /\s*(\+|>)\s*/g;
    CSSSelectorDefinition.regComb2 = /([ \+>])/g;
    CSSSelectorDefinition.prototype.parseData = function(selector_str) {
        selector_str = cssParser.trim(selector_str);
        selector_str = cssParser.whiteSpaceToSpaces(selector_str);
        selector_str = selector_str.replace(CSSSelectorDefinition.regComb, "$1");
        this.data = selector_str;
        selector_str = selector_str.replace(CSSSelectorDefinition.regComb2, cssParser.DELIM1 + "$1" + cssParser.DELIM1);
        var sels = selector_str.split(cssParser.DELIM1);
        var sel_comb = null;
        for (var i = 0, len = sels.length; i < len; i += 2) {
            if (i)
                sel_comb = sels[i - 1];
            this.singleSelectors.push(new CSSSingleSelector(sels[i], sel_comb));
        }
    };

    function CSSSingleSelector(selector_str, selector_comb) {
        this.data = selector_str;
        this.combinator = selector_comb; //:String; either " ", ">", or "+"; can be null/undefined
        this.type = "*"; //:String; <E>
        this.classes = "*"; //:Array; E.name
        this.id = "*"; //:String; E#name
        this.pseudoclass = "*"; //:String; E:link
        this.attributes = "*"; //:CSSAttributeSelector; E[attribute], E[attribute=value]

        this.parseData(selector_str);
    }
    CSSSingleSelector.regPseudo = /([^:]*):(.+)/;
    CSSSingleSelector.regAttrib = /\[[^\[\]]+\]/g;
    CSSSingleSelector.regId = /([^#]*)#(.+)/;
    CSSSingleSelector.regClass = /(?:[^\.]*)\.(.+)/;
    CSSSingleSelector.prototype.parseData = function(selector_str) {
        var pcs;
        if (pcs = selector_str.match(CSSSingleSelector.regPseudo)) { // .indexOf(":") != -1){
            selector_str = pcs[1]; //0];
            this.pseudoclass = pcs[2]; //1];
        }
        if (pcs = selector_str.match(CSSSingleSelector.regAttrib)) { //(selector_str.indexOf("[") != -1){
            this.attributes = new CSSAttributeSelector(pcs.join(""));
            selector_str = selector_str.replace(CSSSingleSelector.regAttrib, "");
        }
        if (pcs = selector_str.match(CSSSingleSelector.regId)) {//(selector_str.indexOf("#") != -1){
            selector_str = pcs[1];
            this.id = pcs[2];
        }
        if (pcs = selector_str.match(CSSSingleSelector.regClass)) {//(selector_str.indexOf(".") != -1){
            this.classes = new CSSClassSelector(pcs[1]);
            selector_str = pcs[1]
        }
        if (selector_str) this.type = selector_str.toLowerCase();
    };


    function CSSAttributeSelector(attrib_str) {
        this.attributeNames = [];
        this.attributeValues = [];

        this.includes = []; //
        this.dashMatch = []; // "(?:\\|=)";
        this.prefixMatch = []; //"(?:\\^=)";
        this.suffixMatch = []; //"(?:\\$=)";
        this.substringMatch = []; //= "(?:\\*=)";

        this.parseData(attrib_str);
    }
    CSSAttributeSelector.regAttr = /\[([^~\|\^\$\*=]+)(?:([~\|\^\$\*]?)=+(["']?([^"']+)["']?))?\]/;
    CSSAttributeSelector.regAttrGlobal = /\[[^~\|\^\$\*=]+[~\|\^\$\*]?=?["']?([^"']*)["']?\]/g;
    CSSAttributeSelector.prototype.parseData = function(attrib_str) {
        var attr_ary = attrib_str.match(CSSAttributeSelector.regAttrGlobal);
        for (var i = 0, len = attr_ary.length, attr, p, v; i < len; ++i) {
            attr = attr_ary[i].match(CSSAttributeSelector.regAttr);
            if (v = attr[3] == "")
                this.attributeNames.push(new CSSAttribute(attr[1], null));
            else if (p = attr[2] == "~")
                this.includes.push(new CSSAttribute(attr[1], v));
            else if (p == "|")
                this.dashMatch.push(new CSSAttribute(attr[1], v));
            else
                this.attributeValues.push(new CSSAttribute(attr[1], v));
        }
    };

    function CSSAttribute(name, value) {
        this.name = name;
        this.value = value;
    }
    function CSSClassSelector(class_str) {
        this.values = [];

        this.parseData(class_str);
    }
    CSSClassSelector.prototype.parseData = function(class_str) {
        this.values = class_str.split(".");
    };

    function CSSProperties(properties_str) {
        this.values = new Object();

        this.parseData(properties_str);
    }
    CSSProperties.regPropBlockGlobal = /[^:]+:[^;\r\n]+[;\r\n]/g;
    CSSProperties.regPropBlock = /\s*([^:\s]+)\s*:\s*([^;\r\n]+)\s*[;\r\n]?/;
    Function.prototype._bind = function(object) {
        var __method = this;

        return function() {
            var a = "";
            for (var i = 0, l = arguments.length; i < l; ++i) {
                a += ",arguments[" + i + "]";
            }
            return eval("__method.call(object" + a + ")");
        };
    };
    CSSProperties.prototype.parseData = function(properties_str) {
        var m;
        if (!properties_str || !(m = properties_str.match(CSSProperties.regPropBlockGlobal))) return;

        for (var i = 0, l = m.length, v; i < l; ++i) {
            v = m[i].match(CSSProperties.regPropBlock);
            this.values[v[1].toLowerCase()] = v[2];
        }
    };
    cssParser.prototype.getLinkedCSSSheet = function(dom) {
        var domW3cStyleSheets = [], href, s;
        for (var j = 0, styleSheets = dom.styleSheets, m = styleSheets.length, i = 0; j < m; ++j) {
            //if ((href = (s = styleSheets[j]).href).indexOf("w3c") != -1)
            href = (s = styleSheets[j]).href;
            domW3cStyleSheets.push(s);
        }

        handler = function(a, b) {
            this.sheets.push(new cssParser.cssSheetGroup(a));
            this._linkCount++;
            if (this._linkCount == b) {
                delete this._linkCount;
                if (this.fire)
                    this.fire();
            }
        } ._bind(this);

        for (var k = 0, n = domW3cStyleSheets.length; k < n; ++k) {
            if (!k)
                this._linkCount = 0;
            href = (s = domW3cStyleSheets[k]).href;

            if (s.cssText && !s.cssText.match(/unknown/i))
                handler([s.cssText, href, dom.URL], n);
            else
                cssParser.getLinkedCSSStyle(href, dom.URL, k, n, handler);
        }


        //	var links = $("LINK[href*='w3c']");
        //	if (links.length){
        //	    cssParser._linkCount=0;
        //		for (var i=0,l=links.length,href;i<l;++i){
        //	        href = links[i].href;
        //            cssParser.getLinkedCSSStyle(href,dom.URL,i,l,
        //                function(a,d){
        //                    cssParser._linkCount++
        //                    this.sheets.push(new cssParser.cssSheetGroup(a));
        //                    if(cssParser._linkCount==l){
        //                            delete cssParser._linkCount;
        //                          	if(this.fire)
        //	                            this.fire();
        //	                }
        //                }._bindAsEventListener(this)
        //            );
        //		}
        //	}
    };
    cssParser.regToParse = /w3c/;
    cssParser.getLinkedCSSStyle = function(href, location, i, l, fn) {
        var style_str = "", contents, xmlhttp, r = this.regUrl;
        var url = (href.indexOf("://") == -1 ? (href.indexOf("/", 0) == 0 ? location.substr(0, location.indexOf("/", 9)) : location.substr(0, location.lastIndexOf("/") + 1)) : "") + href;
        var async = false; //i!=0;//i==cssParser._linkCount&&(i<l-1);

        if (async) {


            $.ajax
                (
                    {
                        url: url,
                        success: function(css) {

                            contents = css;
                            while (r.test(url))
                                url = url.replace(r, "");
                            if (contents) style_str += contents;
                            fn([style_str, href, url], l);
                                //return [style_str, href, url];      
                        }
                         , async: async
                    }
                );

        }
        else {

            contents = $.ajax({
                url: url,
                async: false
            }).responseText;
            while (r.test(url))
                url = url.replace(r, "");
            if (contents) style_str += contents;
            if (!fn)  return [style_str, href, url];
            fn([style_str, href, url], l);
        }

    };
    cssParser.prototype.getEmbeddedCSSStyle = function(dom) {
        var styles = $("style");
        var style_str = "";
        if (styles.length) {
            var i, len = styles.length;
            for (i = 0; i < len; i++)
                style_str += styles.get(i).innerHTML;
        }
        return [(style_str == "" ? undefined : [style_str, "", dom.URL])];
    };

    cssParser.getInlineCSSStyle = function(element) {
        return (element.style == undefined) ? "" : element.style;
    };


    // -------------------------------------------
    // cssHacker
    // -------------------------------------------

    //Version 1.1.0.0
    function cssHacker() {
        this._parser;
        this.currentSheet;
        this._isRuleToReplace = false;
        this.hoverEvents = [];
        this.currentSelector;
        this.currentSelectorData;
        this.currentIndexSelector;
        this.currentIndexRule;
        this.currentStyle;
        this.currentDomStyleSheet;
        this.activators = {
            onhover: { on: "mouseover", off: "mouseout" },
            onactive: { on: "mousedown", off: "mouseup" },
            onfocus: { on: "focus", off: "blur" }
        };
        this._isAlReadyParsed = false;
        this._isParsed = false;
        this._isReady = false;
    };
    cssHacker.prototype.hookHoverEvent = function(node, type, handler) {
        $(node).bind(type, handler);

        this.hoverEvents[this.hoverEvents.length] = {
            node: node, type: type, handler: handler
        };
    };
    cssHacker.prototype.HoverElement = function(node, className, events) {
        if (!node.hovers) node.hovers = {};
        if (node.hovers[className]) return;
        node.hovers[className] = true;
        this.hookHoverEvent(node, events.on, function() { $(node).addClass(className); });
        if (events.off) this.hookHoverEvent(node, events.off, function() { $(node).removeClass(className); });
    };
    cssHacker.prototype.unhookHoverEvents = function() {
        for (var e, i = 0, l = this.hoverEvents.length; i < l; i++) {
            e = this.hoverEvents[i];
            $(e.node).unbind(e.type, e.handler);
        }
    };
    cssHacker.prototype.parseStylesheets = function(prefixeFunction) {
        var self = this;
        if (!prefixeFunction) {
            prefixeFunction = "_css";

            if (this._isAlReadyParsed) {
                this.unhookHoverEvents();
                this.hoverEvents = [];
            }
            else {
                if (!this._parser)
                    this._parser = new cssParser(document,
                    function() {
                        self._isParsed = true;
                        self._parseStylesheets(this.sheets, prefixeFunction);
                    }
                );
                this._isAlReadyParsed = true;

                $(window).bind("unload", this.unhookHoverEvents._bind(this));
            }
        } else {
            this._parseStylesheets(this._parser.sheets, prefixeFunction);
        }
    };
    cssHacker.prototype._parseStylesheets = function(CSSSheets, prefixeFunction) {
        var f = [];
        for (var b in this)
            if (new RegExp(prefixeFunction, "i").test(b) && $.isFunction(this[b])) f.push(new this[b](this));
        for (var k = 0, styleSheet, m = CSSSheets.length, sheet, limports; k < m; k++) {
            sheet = CSSSheets[k];
            var a = sheet.imports, q = a.length, sr;
            if (q > 0) this._parseStylesheets(a, prefixeFunction);
            this.currentSheet = sheet;
            this.currentDomStyleSheet = this._getStyleSheet();
            this.currentIndexSelector = 0;
            this.currentIndexRule = 0;
            sr = null;
            for (var i = 0, n = this.currentSheet.rules.length, rule, ruleData; i < n; ++i) {
                rule = this.currentSheet.rules[i];
                ruleData = rule.data;
                this.currentStyle = "";
                for (var j = 0, o = rule.selectors.length; j < o; ++j) {
                    this.currentSelector = rule.selectors[j];
                    if (this.currentStyle == "")
                        for (var value in this.currentSelector.properties.values)
                        this.currentStyle += value + ":" + this.currentSelector.properties.values[value] + ";";
                    if (this.currentStyle == "") {
                        this.currentIndexSelector++;
                        continue;
                    }
                    this.currentSelectorData = this.currentSelector.data;
                    values = this.currentSelector.properties.values;
                    for (var l = 0, p = f.length; l < p; ++l)
                        f[l].parseData(this.currentSelector);
                    //                if(!this.isRuleToReplace&&Prototype.Browser.IE&&this._getRules()[this.currentIndexSelector-j].selectorText=="UNKNOWN")
                    //                    alert(this.currentDomStyleSheet.href+"\n"+ruleData);
                    if (this.isRuleToReplace) {//||(Prototype.Browser.IE)&&((sr)?sr:(sr=this._getRules()))[this.currentIndexSelector-j].selectorText=="UNKNOWN")){

                        //var styleSheet = this._getStyleSheet();
                        if ($.browser.msie) {
                            //                        supportIE6.toReplace=this._pattern.getToReplace();
                            //                       if(!supportIE6.test(this.currentSelectorData)){
                            if (j == 0)
                                this.currentDomStyleSheet.removeRule(this.currentIndexSelector);
                            this.currentDomStyleSheet.addRule(this.currentSelectorData, this.currentStyle, this.currentIndexSelector);
                            //                        }
                        }
                        else
                            if (jQuery.browser.mozilla || jQuery.browser.safari)
                            this.currentDomStyleSheet.insertRule(this.currentSelectorData + " {" + this.currentStyle + "}", this.currentIndexRule);
                        this.isRuleToReplace = false;
                    }
                    this.currentIndexSelector++;
                }
                this.currentIndexRule++;
            }
        }
    };
    cssHacker.prototype._getStyleSheet = function(arrSheets) {
        if (!arrSheets) arrSheets = document.styleSheets;
        if (arrSheets)
            for (var i = 0, styleSheet, r; i < arrSheets.length; i++) {
            styleSheet = arrSheets[i];
            if (styleSheet.href == this.currentSheet.href || styleSheet.href == this.currentSheet.url)
                return styleSheet;
            if (styleSheet.imports) {
                if (styleSheet.imports.length > 0)
                    if (r = this._getStyleSheet(styleSheet.imports)) return r;
            }
            else {
                var cssRules = styleSheet.cssRules;
                if (cssRules) {
                    for (var j = 0, m = cssRules.length; j < m; ++j) {
                        if ((styleSheet = cssRules[j].styleSheet) && (styleSheet.href == this.currentSheet.href || styleSheet.href == this.currentSheet.url))
                            return styleSheet;
                    }
                }
            }
        }
    };

    cssHacker.prototype._getRules = function() {
        var styleSheet = this.currentDomStyleSheet, rules = "rules";
        if (styleSheet) {
            if (!styleSheet[rules])
                rules = "cssRules";
            return styleSheet[rules];
        }
    };
    cssHacker.prototype._getRule = function(CSSParseSelector) {
        var rules = this._getRules();
        if (rules) {
            for (var i = 0, selectorText = this._getSelectorText(CSSParseSelector), l = rules.length, rule; i < l; i++) {
                rule = rules[i];
                if (rule.selectorText == selectorText)
                    return rule;
            }
        }
    };
    cssHacker.prototype._replaceRule = function(selector, style) {
        this.currentStyle = style;
        this.currentSelectorData = selector;
        this.isRuleToReplace = true;
    };
    cssHacker.prototype._getSelectorText = function(CSSParseSelector) {
        var selectorText = CSSParseSelector.data;
        //Modification pour ie
        if (/MSIE /.test(navigator.userAgent)) {
            if (selectorText == "*")
                selectorText = "";
            else
                for (var j = 0, l = CSSParseSelector.singleSelectors.length, singleSelector; j < l; j++) {
                singleSelector = CSSParseSelector.singleSelectors[j];
                if (singleSelector.type != "*")
                    selectorText = selectorText.replace(new RegExp("(^|\\s)" + singleSelector.type + "($|\\s|\\.|:|#|\\[)"), "$1" + singleSelector.type.toUpperCase() + "$2");
            }
        }
        //***
        return selectorText;
    };


    cssHacker.prototype._cssUserActionPseudo = function(c) {
        this.context = c;
        this._regPseudo = /[^:]+:([a-z-]+).*/i;
        this._regTarg = /([\.a-z-]*(\[[a-z-]+=["'][a-z-]+["']\])*)([:\.][a-z-]+)*(\[+>]([a-z-]+))+/i;
        this._regNewSel = /(\.([a-z0-9_-]+):[a-z]+(\+[a-z]+)*)|(:[a-z]+)(\+?[a-z]+)*/gi;
        this._regClassName = /\.([a-z0-9_-]*on(hover|active|focus))/i;
        this._regAff = /:(hover|active|focus).*$/;
        this._regNav = /MSIE (5|6)/;
        this._uapcReg = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active))|((a|input|textarea)([#.][^ ]+)?:focus)/i;
        this.typeEvent = "load"
    };
    cssHacker.prototype._cssUserActionPseudo.prototype.parseData = function(selector) {
        if (this._regNav.test(navigator.userAgent)) {
            var select = this.context.currentSelectorData;
            if (!this._uapcReg.test(select) || !this.context.currentStyle) return;

            var domStyleSheet = this.context.currentDomStyleSheet
	            , indexSelector = this.context.currentIndexSelector
	            , style = this.context.currentStyle
	            , indexRule = this.context.currentIndexRule
	            , self = this
	            , handler
	            ;


            handler = function() {
                var pseudo = select.replace(self._regPseudo, "on$1"); //new RegExp(".*("+this.context._pseudo_class+").*","i"),"on$2");
                var target = select.replace(self._regTarg, "$5$3");
                var newSelect = target.replace(self._regNewSel, ".$2" + pseudo);
                var className = self._regClassName.exec(newSelect)[1];
                var affected = select.replace(self._regAff, "");

                var elements = $(affected);
                if (elements.length != 0) {
                    var ef = true;
                    for (var i = 0, e, f, l = elements.length; i < l; ++i) {
                        if ((f = (e = elements[i]).nodeName != "A")) self.context.HoverElement(e, className, self.context.activators[pseudo]);
                        ef = ef && f;
                    }
                    if (ef) {

                        if (jQuery.browser.msie) {
                            //                            if(j==0)
                            domStyleSheet.removeRule(indexSelector);
                            domStyleSheet.addRule(newSelect, style, indexSelector);
                        }
                        else
                            if (jQuery.browser.mozilla || jQuery.browser.safari)
                            domStyleSheet.insertRule(newSelect + " {" + style + "}", indexRule);

                        //                    this.context._replaceRule(newSelect,this.context.currentStyle);

                    }
                    else
                        domStyleSheet.addRule(newSelect, style);
                }




            };
            if (this.context._isReady) {
                handler();
            }
            else
                $(window).load(handler);
        }
    };
	    

cssHacker.prototype._cssPngFix = function(c) {
    this.context = c;
};
cssHacker.prototype._cssPngFix.prototype.parseData = function(selector) {
    if (/(MSIE (5|6))/.test(navigator.userAgent)) {
        var select = this.context.currentSelectorData, style = "", url = "",
        values = selector.properties.values,
        vValue, isRepeat = true;
        for (var value in values) {
            vValue = values[value];
            if (/^background/i.test(value)) {
                (url = vValue.match(/url\(\s*("|')?(.*?\-trans\.png)("|')?\s*\)/i)) == null ? url = "" : url = url[2];
                isRepeat = isRepeat && !vValue.match(/\bno-repeat\b/);
            }
            else
                style += value + ":" + vValue + ";";
        }
        if (url == "") return;
        var l = this.context.currentSheet.href.match(/^https?:\/\//) ? this.context.currentSheet.href : this.context.currentSheet.url;
        if (!l) l = window.location.href;
        url = (url.indexOf("://") == -1 ? (url.indexOf("/", 0) == 0 ? l.substr(0, l.indexOf("/", 9)) : l.substr(0, l.lastIndexOf("/") + 1)) : "") + url;
        style += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ((isRepeat) ? "scale" : "crop") + " src='" + url + "');background-image: none;";
        this.context._replaceRule(select, style);
    }
};

cssHacker = new cssHacker();
cssHacker.parseStylesheets();
//$(function(e) { cssHacker.parseStylesheets(); });
$(window).load(function() {
   cssHacker._isReady = true
   });
    $(window).unload(function(){
        try{
            delete cssHacker._parser;
            cssHacker = null;
        }
        catch(except){}
    });
}