/*****************************************************************************
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.
*****************************************************************************/

var apex = { src: baseUrl+'/flash/apexnewmedium.swf' };
sIFR.activate(apex);

var replaceSifr = function() {
    sIFR.replace(apex, {
      selector: 'h1.pagetitle',
      css: [ '.sIFR-root {color: #eeeeee;}', 'a { color:#eeeeee; text-decoration:none; }', 'a:hover { color:#eeeeee; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6
    });
    
    sIFR.replace(apex, {
      selector: '.color1 h2',
      css: [ '.sIFR-root {color: #A5B51C;}', 'a { color:#A5B51C; text-decoration:none; }', 'a:hover { color:#A5B51C; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      tuneWidth: 5
    });

    sIFR.replace(apex, {
      selector: '#home-video #meta h3',
      css: [ '.sIFR-root {color: #DCDCDC;}', 'a { color:#DCDCDC; text-decoration:none; }', 'a:hover { color:#DCDCDC; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });    
    
    sIFR.replace(apex, {
      selector: '.color1 h3',
      css: [ '.sIFR-root {color: #A5B51C;}', 'a { color:#A5B51C; text-decoration:none; }', 'a:hover { color:#A5B51C; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color2 h2',
      css: [ '.sIFR-root {color: #CC3399;}', 'a { color:#CC3399; text-decoration:none; }', 'a:hover { color:#CC3399; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      tuneWidth: 5
    });

    sIFR.replace(apex, {
      selector: '.color2 #terms-container h3',
      css: [ '.sIFR-root {color: #CC3399;}', 'a { color:#CC3399; text-decoration:none; }', 'a:hover { color:#CC3399; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5,
      onReplacement: tuneResourcesHeight
    });
        
    sIFR.replace(apex, {
      selector: '.color2 h3',
      css: [ '.sIFR-root {color: #CC3399;}', 'a { color:#CC3399; text-decoration:none; }', 'a:hover { color:#CC3399; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });
    /*
    sIFR.replace(apex, {
      selector: '.color2 p.lead-in',
      css: [ '.sIFR-root {color: #CC3399;}', 'a { color:#CC3399; text-decoration:none; }', 'a:hover { color:#CC3399; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 0
    });
    */
    
    sIFR.replace(apex, {
      selector: '#calendar-month',
      css: [ '.sIFR-root {color: #FF9900;}', 'a { color:#FF9900; text-decoration:none; }', 'a:hover { color:#FF9900; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      /*tuneWidth: 10,*/
      forceSingleLine: true,
      onReplacement: tuneCalendarHeight
    });
    
    sIFR.replace(apex, {
      selector: '.color3 h2',
      css: [ '.sIFR-root {color: #FF9900;}', 'a { color:#FF9900; text-decoration:none; }', 'a:hover { color:#FF9900; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color3 h3',
      css: [ '.sIFR-root {color: #FF9900;}', 'a { color:#FF9900; text-decoration:none; }', 'a:hover { color:#FF9900; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color4 h2',
      css: [ '.sIFR-root {color: #33CCCC;}', 'a { color:#33CCCC; text-decoration:none; }', 'a:hover { color:#33CCCC; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color4 h3',
      css: [ '.sIFR-root {color: #33CCCC;}', 'a { color:#33CCCC; text-decoration:none; }', 'a:hover { color:#33CCCC; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color5 h2',
      css: [ '.sIFR-root {color: #E0DD1F;}', 'a { color:#E0DD1F; text-decoration:none; }', 'a:hover { color:#E0DD1F; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -6,
      tuneWidth: 5
    });
    
    sIFR.replace(apex, {
      selector: '.color5 h3',
      css: [ '.sIFR-root {color: #E0DD1F;}', 'a { color:#E0DD1F; text-decoration:none; }', 'a:hover { color:#E0DD1F; text-decoration:none; }' ],
      transparent: true,
      offsetTop: 5,
      tuneHeight: -5,
      tuneWidth: 5
    });
};

replaceSifr();

