/*****************************************************************************
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`.
*/

/*Customisation */
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 formata = { src: '/_resx/sifr/formata.swf' };
sIFR.activate(formata);

sIFR.replace(formata, {
    selector: '#content h1',
    css: '.sIFR-root { color: #143d8d; leading: -3; }',
    transparent: true,
    selectable: false,
    tuneHeight: -4
});


sIFR.replace(formata, {
    selector: '#content h2:not(.sifr-skip), #secondary-content h2, #sidebar h2',
    css: '.sIFR-root { color: #143d8d; }  a{ color: #0072cf; text-decoration: none; } a:hover{ color: #0072cf; text-decoration: underline; }',
    transparent: true,
    selectable: false,
    tuneHeight: -5
});

sIFR.replace(formata, {
    selector: '.recipe_tool h3',
    css: '.sIFR-root { color: #143d8d; }',
    transparent: true,
    selectable: false,
    tuneHeight: -5
});

sIFR.replace(formata, {
    selector: '#welcome h1',
    css: '.sIFR-root { color: #eb5098; leading: -3; }',
    transparent: true,
    selectable: false,
    tuneHeight: -4
});

