parseSelector.pseudoClasses = {
  'not': function(nodes, selector) {
    var result = [];
    each: for(var i = 0, node; i < nodes.length; i++) {
      node = nodes[i];
      var ignore = parseSelector(selector, node.parentNode);
      for(var j = 0; j < ignore.length; j++) {
        if(ignore[j] == node) continue each;
      }
      result.push(node);
    }
    return result;
  }
}

var basefont = {src: strThemeDir + 'swf/museo.swf'};
var ratioArr 	= [8, 1.41, 10, 1.33, 14, 1.31, 16, 1.26, 20, 1.27, 24, 1.26, 25, 1.24, 26, 1.25, 35, 1.24, 49, 1.23, 74, 1.22, 75, 1.21, 79, 1.22, 80, 1.21, 81, 1.22, 1.21];

initSifr();

function initSifr() {
    sIFR.activate(basefont);

    sIFR.replace(basefont, {
        selector: '#patient-steps .d-step .step-lcol h3',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #255391; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '#patient-steps .d-step h2',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #255391; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '#patient-steps .p-step h2',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #255391; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });


    sIFR.replace(basefont, {
        selector: '.c #dashboard .actions em',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #255391; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr,
        forceSingleLine: true,
        tuneHeight: '-3'
    });

    sIFR.replace(basefont, {
        selector: '.c #dashboard .next-5-days h1',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #255391; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr,
        tuneHeight: '-3'
    });

    sIFR.replace(basefont, {
        selector: '.content h1#pageName',
        css: ['.sIFR-root { color:#000000; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '.content h1',
        css: ['.sIFR-root { color:#000000; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '.c #booking h2',
        css: ['.sIFR-root { color:#255391; font-weight:normal }', 'a:link { color: #072c5e; text-decoration:underline}', 'a:hover {color: #255391; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '.content h2',
        css: ['.sIFR-root { color:#333333; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, { selector: "h1, div:not(.example) h2" });

    sIFR.replace(basefont, {
        selector: '.content h3, div:not(.bkng-tab-summary) h3',
        css: ['.sIFR-root { color:#333333; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , ratios: ratioArr
    });


    sIFR.replace(basefont, {
        selector: '.content .appStep strong',
        css: ['.sIFR-root { color:#ffffff; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , tuneWidth: '10'
  , forceClear: 'true'
  , ratios: ratioArr
    });

    sIFR.replace(basefont, {
        selector: '.content .appStage strong',
        css: ['.sIFR-root { color:#333333; font-weight:normal }', 'a:link { color: #333333; text-decoration:underline}', 'a:hover {color: #333333; text-decoration:none}']
  , wmode: 'transparent'
  , fitExactly: 'true'
  , tuneWidth: '10'
  , ratios: ratioArr
    });

}
