/*****************************************************************************
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.
*****************************************************************************/

// Specifically Don’t Replace Certain Text

parseSelector.pseudoClasses = {
  'not': function(nodes, selector) {
    var result = [];
    each: for(var i = 0, node; i < nodes.length; i++) {
      node = nodes[i];
      var ignore = parseSelector(selector, node.parentNode);
      for(var j = 0; j < ignore.length; j++) {
        if(ignore[j] == node) continue each;
      }
      result.push(node);
    }
    return result;
  }
}

var interstate_regular = { src: '/assets/flash/interstate-regular.swf' };

sIFR.useStyleCheck = true;
// sIFR.useDomLoaded = false;

sIFR.activate(interstate_regular);

// styling phone number

sIFR.replace(interstate_regular, {
    selector: '.contact'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #2093ca; font-size: 14px; text-align: right; leading: -5;}'
        , 'strong { color: #434343; font-size: 200%;}'
    ]
});

// styling blue-head-block

sIFR.replace(interstate_regular, {
selector: '.blue-head-block .head .head-inner span'
    , forceWidth: 'true'
    , wmode: 'transparent'
    , css: [
        '.sIFR-root { color: #ffffff; font-size: 16px; text-align: left; leading: -5;}'
    ]
});

// styling H1

sIFR.replace(interstate_regular, {
    selector: 'h1:not(.logo), .h1'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #175999; font-size: 24px; text-align: left; leading: -2;}'
        ,'a { text-decoration: none }'
        ,'a:link { color: #175999 }'
        ,'a:hover { color: #175999 }'
    ]
});

// styling H2

sIFR.replace(interstate_regular, {
    selector: 'h2'
    , forceWidth: 'true'
    , wmode: 'transparent'
    , css: [
        '.sIFR-root { color: #175999; font-size: 20px; text-align: left; leading: -2;}'
        , 'strong { color: #424242; font-size: 75%; }'
        , 'a { text-decoration: none }'
        , 'a:link { color: #175999 }'
        , 'a:hover { color: #175999 }'
    ]
});
