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;
    }
}

// Fixes the issue with links not working in IE8 & Chrome if targetting the a href directly
function fixLink(FlashInteractor) {
    window.location = FlashInteractor.getAncestor().href;
}

function resetMovie(fi) {
    // JQUERY CHECK BROWSER VERSION - IF IE9 BROWSER THEN RESET FLASH MOVIE //
    if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) == 9) {
        fi.resetMovie();
    }
}


var gothamBold = {
    src: 'swf/GothamBold.swf'
};

var gothamBook = {
    src: 'swf/GothamBook.swf'
};

// You probably want to switch this on, but read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad> first.
// sIFR.useStyleCheck = true;
sIFR.activate(gothamBold, gothamBook);

sIFR.replace(gothamBold, {
onReplacement: function(fi) { resetMovie(fi); },
selector: '.home_pane_inner_1 h1'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 44px; leading: -8; text-transform: uppercase; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
onReplacement: function(fi) { resetMovie(fi); },
selector: '#general2 h1, #generalSubNav h1'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
      , css: [
        '.sIFR-root { text-align: left; leading:-10; color: #AC192D; font-size: 26px; text-transform: uppercase; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #AC192D; }'
        , 'a:hover { color: #AC192D; }'
      ]
});

sIFR.replace(gothamBold, {
onReplacement: function(fi) { resetMovie(fi); },
    selector: 'h1'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '-10'
      , css: [
        '.sIFR-root { text-align: left; leading:-10; color: #AC192D; font-size: 44px; text-transform: uppercase; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #AC192D; }'
        , 'a:hover { color: #AC192D; }'
      ]
});

sIFR.replace(gothamBook, {
onReplacement: function(fi) { resetMovie(fi); },
    selector: '.home_pane_inner_1 .intro'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 26px; leading: -4; letter-spacing: 2; text-transform: uppercase; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold10'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 10px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold12'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 12px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold14, .newsletterLink'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 14px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold16'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 16px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold18'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 18px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold20'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 20px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold22'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; color: #FFFFFF; font-size: 22px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold24'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
	, onRelease: fixLink
      , css: [
        '.sIFR-root { text-align: left; leading:-4; color: #FFFFFF; font-size: 24px; leading: -4; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});

sIFR.replace(gothamBold, {
    onReplacement: function(fi) { resetMovie(fi); },
    selector: '.gothamBold24Span'
	, wmode: 'transparent'
    , fitExactly: true
	, tuneHeight: '0'
      , css: [
        '.sIFR-root { text-align: left; leading:-4; color: #FFFFFF; font-size: 24px; cursor: pointer; }'
        , 'a { text-decoration: none; }'
        , 'a:link { color: #FFFFFF; }'
        , 'a:hover { color: #FFFFFF; }'
      ]
});



