/*****************************************************************************
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 bankgothicLtBt = { src: '/Scripts/sifr_bankgothicLtBt.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(bankgothicLtBt);

// 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()`!


/*
==============================================================
Warren: Use jQuery ready (DOM) to check if class name exists.
i.e the live editing toolbar (Canvas)
===============================================================
*/
$(document).ready(function () {
    if ($("div#LiveEditingToolbar").length <= 0) {
        //Canvas Editing is NOT enabled

        //Replace header <h1> with class of flashHeader	
        sIFR.replace(bankgothicLtBt, {
            selector: 'span.descriptionlabel',
            css: [
                '.sIFR-root { font-weight:normal; color:#359A46; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });

        sIFR.replace(bankgothicLtBt, {
            selector: 'span.info-label',
            css: [
                '.sIFR-root { font-weight:normal; color:#22205F; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });

        if ($(".master-wrapper-bigleft .block-info .title").length <= 0) {
            sIFR.replace(bankgothicLtBt, {
                selector: '.block-info .title',
                css: [
                '.sIFR-root { font-weight:normal; color:#344DA1; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
                wmode: 'transparent'
            });
        }

        sIFR.replace(bankgothicLtBt, {
            selector: '.one-variant .related-products-grid .title',
            css: [
                '.sIFR-root { font-weight:normal; color:#359A46; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.one-variant .also-purchased-products-grid .title',
            css: [
                '.sIFR-root { font-weight:normal; color:#359A46; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.category-page .page-title, .manufacturer-page .page-title',
            css: [
                '.sIFR-root { font-weight:normal; color:#0ba1ce; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.product-filters .filter-title',
            css: [
                '.sIFR-root { font-weight:normal; color:#0e9948; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.product-brand-filter .title',
            css: [
                '.sIFR-root { font-weight:normal; color:#0ba1ce; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.product-spec-filter .title',
            css: [
                '.sIFR-root { font-weight:normal; color:#d04c27; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
        sIFR.replace(bankgothicLtBt, {
            selector: '.price-range-filter .title',
            css: [
                '.sIFR-root { font-weight:normal; color:#0d9a48; leading:-10; letter-spacing:-2; text-transform: capitalize; }'
                ],
            wmode: 'transparent'
        });
		 sIFR.replace(bankgothicLtBt, {
            selector: '.htmlcontent-title .htmlcontent-header',
            css: [
                '.sIFR-root { font-weight:normal; color:#344DA1; leading:-10; letter-spacing:0; text-transform: capitalize;font-size:18px; }'
                ],
            wmode: 'transparent'
        });
		 sIFR.replace(bankgothicLtBt, {
            selector: 'h1',
            css: [
                '.sIFR-root { font-weight:normal; color:#344DA1; leading:-10; letter-spacing:0; text-transform: capitalize;font-size:18px; }'
                ],
            wmode: 'transparent'
        });
		 sIFR.replace(bankgothicLtBt, {
		     selector: 'h3, .boxtitle',
            css: [
                '.sIFR-root { font-weight:normal; color:#344DA1; leading:-10; letter-spacing:0; text-transform: capitalize;font-size:22px; }'
                ],
            wmode: 'transparent'
        });

    }
    else {
        //Lets REMOVE the CSS class that sIFR adds
        sIFR.removeFlashClass();
    }
});


