// Custom SIFR-config script

// Has element method
hasElement = function(obj,elem) {
    for(var i=0;i < obj.length;i++)
        if(obj[i]==elem)
            return true;
    return false;
}
var strLanguage = _page.locale.split("_")[1];

// Only use the CRSC gill sans flash if the locale is supported
if (!disableSIFR) {

    var header = {
        // Replace this, if required
        src: _page.crsc_server + '/crsc/images/sifr_gillsanslight.swf',
        forceSingleLine: true
    };

    // Replace heading
    sIFR.replace(header, {
        selector: 'h1.sifr'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#7CBD2A;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    sIFR.replace(header, {
        selector: 'h1.sifrbig'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#7CBD2A;}' // Put here your specific colours
        ,wmode: 'transparent'
    });


    sIFR.replace(header, {
        selector: 'h1.sifr-blue'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#005AFF;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    // Replace subheadings

    sIFR.replace(header, {
        selector: 'h2.sifr'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#7CBD2A;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    sIFR.replace(header, {
        selector: 'h2.sifr-blue'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#005AFF;}' // Put here your specific colours
        ,wmode: 'transparent'
    });


    sIFR.replace(header, {
        selector: 'h2.sifr-aqua'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#22B3C5;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    sIFR.replace(header, {
        selector: 'h3.sifr'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#7CBD2A;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    sIFR.replace(header, {
        selector: 'h3.sifr-blue'
        ,css: '.sIFR-root {background-color:#FFFFFF;color:#005AFF;}' // Put here your specific colours
        ,wmode: 'transparent'
    });

    sIFR.activate(header);
}