/*****************************************************************************
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 Amasis_MT_font = { src: '/Media/Assets/sIFR/Amasis_MT.swf' };
var Trajan_Pro_font = { src: '/Media/Assets/sIFR/BerkleyOldITC.swf' };
var berkleyoldm_font = { src: '/Media/Assets/sIFR/BerkleyOldMITC.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(Amasis_MT_font, Trajan_Pro_font, berkleyoldm_font);

// 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(Trajan_Pro_font, {
                selector: '.WeddingText',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:14px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.TrainingText',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:14px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #e0922f }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: 'h2.flashHeader',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:14px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });



sIFR.replace(Trajan_Pro_font, {
                selector: '.VoucherMessage',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:18px; text-align:center; line-height:1em; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.thankyouMessage',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:16px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(berkleyoldm_font, {
                selector: '.PageSectionTitle',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:16px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });



sIFR.replace(Trajan_Pro_font, {
                selector: '.RecentBlogPostTitle',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#ffffff; font-size:24px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#999999 }',
                'a:hover { color:#999999 }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '#BlogPostsMain',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#ffffff; font-size:12px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#ffffff }',
                'a:hover { color:#464646 }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleWedding',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#ffffff; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#ffffff }',
                'a:hover { color:#ffffff }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleCommercial',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#9ddcf8; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#9ddcf8 }',
                'a:hover { color:#9ddcf8 }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleLifeStyle',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#01a8b0; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#01a8b0 }',
                'a:hover { color:#01a8b0 }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleFashion',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#c6d92c; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#c6d92c }',
                'a:hover { color:#c6d92c }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleTraining',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#8e418b; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#8e418b }',
                'a:hover { color:#8e418b }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleTravel',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#d0242b; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#d0242b }',
                'a:hover { color:#d0242b }'
                ],
                wmode: 'transparent'
            });

sIFR.replace(Trajan_Pro_font, {
                selector: '.BlogContentTitleDiscover',
                css: [
                '.sIFR-root { text-indent: 0px; margin-bottom: 0; font-weight:normal; color:#f7941d; font-size:32px; line-height:1em; text-align: justify; }',
		'a { text-decoration: none }',
                'a:link { color:#f7941d }',
                'a:hover { color:#f7941d }'
                ],
                wmode: 'transparent'
            });



	    sIFR.replace(Trajan_Pro_font, {
                selector: '.TextSifr18',
                css: [
                '.sIFR-root { text-indent: 0px; margin-left:30px;font-weight:normal; color:#ffffff; font-size:18px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

	    sIFR.replace(Trajan_Pro_font, {
                selector: '.aboutus',
                css: [
                '.sIFR-root { text-indent: 0px; font-weight:normal; color:#ffffff; font-size:14px; line-height:1em; text-align: justify; }',
                'a { text-decoration: none }',
                'a:link { color: #999999 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

            //Replace header <h2> which inside XSLTSearch
            sIFR.replace(Amasis_MT_font, {
                selector: '#xsltsearch h2',
                css: [
                '.sIFR-root { font-weight:normal; color:#f49ac1; leading:-3; letter-spacing:-1; }'
                ],
                wmode: 'transparent'
            });

            //Replace header <h4> that is inside a DIV which is inside a div with a class of newsList
            sIFR.replace(Amasis_MT_font, {
                selector: 'div.newsList div h4',
                css: [
                '.sIFR-root { font-weight:normal; color:#619ca7; leading:-3; letter-spacing:-1; }',
                'a { text-decoration: none }',
                'a:link { color: #619ca7 }',
                'a:hover { color: #FFFFFF }'
                ],
                wmode: 'transparent'
            });

        }
        else {
            //Lets REMOVE the CSS class that sIFR adds
            sIFR.removeFlashClass();
        }
    });

