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;
  }
}

/*****************************************************************************
It is adviced to place the sIFR JavaScript calls in this file, keeping it
separate from the `sifr.js` file. That way, you can easily swap the `sifr.js`
file for a new version, while keeping the configuration.

You must load this file *after* loading `sifr.js`.

That said, you're of course free to merge the JavaScript files. Just make sure
the copyright statement in `sifr.js` is kept intact.
*****************************************************************************/

// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
var bliss = { src: '/images/flash/bliss2b.swf' };

// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
sIFR.activate(bliss);

// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.

// SUBJECT LANDING PAGE CALLS TO ACTION

sIFR.replace(bliss, {
selector: 'div#subjCallsToAction div#ttt h3',
css: ['.sIFR-root { color: #ffffff; background-color: #A7003D; }',
'.sIFR-root a { color: #ffffff; background-color: #A7003D; text-decoration: underline; }',
'.sIFR-root a:hover { color: #ffffff; background-color: #A7003D; text-decoration: none;  }',
'.sIFR-root a:visited { color: #ffffff; background-color: #A7003D; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
    selector: 'div#subjCallsToAction div#signUp h3',
    css: ['.sIFR-root { color: #ffffff; background-color: #629900; }',
'.sIFR-root a { color: #ffffff; background-color: #629900; text-decoration: underline; }',
'.sIFR-root a:hover { color: #ffffff; background-color: #629900; text-decoration: none;  }',
'.sIFR-root a:visited { color: #ffffff; background-color: #629900; text-decoration: none;  }'],
    wmode: 'transparent',
    fixFocus: true
});

sIFR.replace(bliss, {
    selector: 'div#subjCallsToAction div#signUpWide h3',
    css: ['.sIFR-root { color: #ffffff; background-color: #629900; }',
'.sIFR-root a { color: #ffffff; background-color: #629900; text-decoration: underline; }',
'.sIFR-root a:hover { color: #ffffff; background-color: #629900; text-decoration: none;  }',
'.sIFR-root a:visited { color: #ffffff; background-color: #629900; text-decoration: none;  }'],
    wmode: 'transparent',
    fixFocus: true
});

// TABBED GET INTO TEACHING POD

sIFR.replace(bliss, {
  selector: 'div#tabbedContent h3',
  css:['.sIFR-root { color: #ffffff; background-color: #26000F; }',
'.sIFR-root a { color: #ffffff; background-color: #26000F; text-decoration: underline; }',
'.sIFR-root a:hover { color: #ffffff; background-color: #26000F; text-decoration: none;  }',
'.sIFR-root a:visited { color: #ffffff; background-color: #26000F; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

// CALL TO ACTION 

// INFO BOX 

sIFR.replace(bliss, {
  selector: 'div#infoBox h2',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

// MY CPD 

sIFR.replace(bliss, {
  selector: '.myCPD h5',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

// LEGACY PAGES

sIFR.replace(bliss, {
  selector: '#content .legacy .audienceGreyBLB div.lozBody div.lozInner h3',
  css:['.sIFR-root { color: #222222; background-color: #EEEEEE; }',
'.sIFR-root a { color: #222222; background-color: #EEEEEE; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #EEEEEE; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #EEEEEE; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});


sIFR.replace(bliss, {
  selector: '#content .subjects .audienceTint h2',
  css:['.sIFR-root { color: #A02444; background-color: #EDD4DA; }',
'.sIFR-root a { color: #A02444; background-color: #EDD4DA; text-decoration: underline; }',
'.sIFR-root a:hover { color: #A02444; background-color: #EDD4DA; text-decoration: none;  }',
'.sIFR-root a:visited { color: #A02444; background-color: #EDD4DA; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
  selector: '#content .legacy .audienceTint .lozInner h3',
  css:['.sIFR-root { color: #000000; background-color: #000000; }',
'.sIFR-root a { color: #000000; background-color: #000000; text-decoration: underline; }',
'.sIFR-root a:hover { color: #000000; background-color: #000000; text-decoration: none;  }',
'.sIFR-root a:visited { color: #000000; background-color: #000000; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});



sIFR.replace(bliss, {
  selector: '#content .legacy #landing h2, #content .legacy .lozInner h3, #content .legacy .bannertext h2, .pscwlinks .banner h2',
  css:['.sIFR-root { color: #FFFFFF; background-color: #FFFFFF; }',
'.sIFR-root a { color: #FFFFFF; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #FFFFFF; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #FFFFFF; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});



sIFR.replace(bliss, {
  selector: 'body.yellow #content .audience h2',
  css:['.sIFR-root { color: #000000; background-color: #000000; }',
'.sIFR-root a { color: #000000; background-color: #000000; text-decoration: underline; }',
'.sIFR-root a:hover { color: #000000; background-color: #000000; text-decoration: none;  }',
'.sIFR-root a:visited { color: #000000; background-color: #000000; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
  selector: '.iconsLoz h3',
  css:['.sIFR-root { color: #FFFFFF; background-color: #FFFFFF; }',
'.sIFR-root a { color: #FFFFFF; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #FFFFFF; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #FFFFFF; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

// FILTERS

sIFR.replace(bliss, {
  selector: 'div#filter h2',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: '#content #filter legend',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});


// FORMS

sIFR.replace(bliss, {
  selector: '#progressBar ol li h4',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: 'legend.formTitle',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: '#content fieldset.details > legend',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

// TERTIARY PAGE


sIFR.replace(bliss, {
  selector: '.tertiary #content dt',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

// SECONDARY PAGE


sIFR.replace(bliss, {
  selector: '#content .halfImage h2',
  css:['.sIFR-root { color: #FFFFFF; background-color: #0080c6; }',
'.sIFR-root a { color: #FFFFFF; background-color: #0080c6; text-decoration: underline; }',
'.sIFR-root a:hover { color: #FFFFFF; background-color: #0080c6; text-decoration: none;  }',
'.sIFR-root a:visited { color: #FFFFFF; background-color: #0080c6; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

// ROLE DASHBOARD

sIFR.replace(bliss, {
  selector: 'body.provider div#featuredPod div.horizSplit h2, a body.provider div#featuredPod div.horizSplit h2 a',
  css:['.sIFR-root { color: #222222; }',
'.sIFR-root a { color: #222222; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: 'div#featuredPod div.horizSplit h2',
  css:['.sIFR-root { color: #FFFFFF; }',
'.sIFR-root a { color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: 'body.provider div#featuredPod div.secFeature h2, a body.provider div#featuredPod div.secFeature h2 a',
  css:['.sIFR-root { color: #222222; }',
'.sIFR-root a { color: #222222; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: 'div#featuredPod div.secFeature h2',
  css:['.sIFR-root { color: #FFFFFF; }',
'.sIFR-root a { color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});



// HOME PAGE


sIFR.replace(bliss, {
  selector: 'body.home h2',
  css:['.sIFR-root { color: #222222; background-color: #fff; }',
'.sIFR-root a { color: #222222; }',
'.sIFR-root a:hover { color: #222222;}',
'.sIFR-root a:visited { color: #222222;}'],
  wmode:'transparent',
fixFocus: true 
  
});

sIFR.replace(bliss, {
  selector: 'div#keyRoles ul li h3',
  css:['.sIFR-root { color: #ffffff; background-color: #4B7100; }',
'.sIFR-root a { color: #ffffff; background-color: #4B7100; text-decoration: underline; }',
'.sIFR-root a:hover { color: #ffffff; background-color: #4B7100; text-decoration: none;  }',
'.sIFR-root a:visited { color: #ffffff; background-color: #4B7100; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: 'div#otherRoles ul li h3',
  css:['.sIFR-root { color: #222222; background-color: #ffffff; }',
'.sIFR-root a { color: #222222; background-color: #ffffff; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #ffffff; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #ffffff; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

sIFR.replace(bliss, {
  selector: '#tasks li h4',
  css:['.sIFR-root { color: #2a1502; background-color: #E6DCC1; }',
'.sIFR-root a { color: #2a1502; background-color: #E6DCC1; text-decoration: underline; }',
'.sIFR-root a:hover { color: #2a1502; background-color: #E6DCC1; text-decoration: none;  }',
'.sIFR-root a:visited { color: #2a1502; background-color: #E6DCC1; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true 
});

// HEADINGS

sIFR.replace(bliss, {
  selector: '#content h1',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
  selector: '#content h2, div:not(.contentArea) h2"',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
  selector: '#content h3',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
  fixFocus: true
});

sIFR.replace(bliss, {
  selector: '#content h4',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

sIFR.replace(bliss, {
  selector: '#content h5',
  css:['.sIFR-root { color: #222222; background-color: #FFFFFF; }',
'.sIFR-root a { color: #222222; background-color: #FFFFFF; text-decoration: underline; }',
'.sIFR-root a:hover { color: #222222; background-color: #FFFFFF; text-decoration: none;  }',
'.sIFR-root a:visited { color: #222222; background-color: #FFFFFF; text-decoration: none;  }'],
  wmode:'transparent',
fixFocus: true
});

