

function removeSifr(p_sSelector) {
    $(p_sSelector).each(function() {
        if (this.className.indexOf('sIFR-replaced') >= 0)
        {
            var oChildToGetText;
            for (var iCount = 0; iCount < this.childNodes.length; iCount++)
            {
                if (this.childNodes[iCount])
                {
                    if (this.childNodes[iCount].tagName && this.childNodes[iCount].id)
                    {
                        if (this.childNodes[iCount].tagName.toLowerCase() == 'span' && this.childNodes[iCount].id.indexOf('_alternate') >= 0)
                        {
                            oChildToGetText = this.childNodes[iCount];
                            break;
                        }
                    }
                }
            }
            
            if (oChildToGetText != null)
                $this.html(oChildToGetText.innerHTML);

            this.className = this.className.replace('sIFR-replaced', '');
        }
    });
}


$(document).ready(function() {
    runSifrPageLoad();
    runSifrAjaxLoad();
});

function runSifrPageLoad() {
}

function runSifrAjaxLoad() {
    var saTitoliH2Selectors = new Array('.scheda-visual-home h2',
                                        '.frase-contesto h2');
    for (var iCount = 0; iCount < saTitoliH2Selectors.length; iCount++)
    {
        sIFR.replace(bookAntiqua,
                     {
                         selector: saTitoliH2Selectors[iCount],
                         css: '.sIFR-root { color: #ffffff; font-size: 80px; }',
                         filters: {
                             BevelFilter: {
                                 distance: -.3,
                                 angle: 180,
                                 shadowColor: '#111111',
                                 shadowAlpha: .8,
                                 blurX: 1.5,
                                 blurY: 1.5,
                                 strength: 5,
                                 quality: 3,
                                 type: 'outer',
                                 knockout: false
                             }
                         },
                         transparent: true
                     });
    }

    sIFR.replace(bookAntiqua,
                 {
                     selector: '.scheda-visual-home p',
                     css: '.sIFR-root { color: #ffffff; } .sIFR-root a { color: #736F6E; font-weight: bold; text-decoration: none; } .sIFR-root a:hover { color: #736F6E; }',
                     transparent: true
                 });

    /*sIFR.replace(bookAntiqua,
                 {
                     selector: '.scheda-visual-home .testo-pulsante',
                     css: '.sIFR-root { color: #736F6E; }',
                     transparent: true
                 });*/
}

