/*****************************************************************************
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 typewriter = { src: '/assets/flash/amer-typewriter-medium.swf' };

sIFR.useStyleCheck = true;
// sIFR.useDomLoaded = false;

sIFR.activate(typewriter);


sIFR.replace(typewriter, {
    selector: '.form.gray-form p.new-text'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #000000; font-size: 16px; text-align: left; leading: -12;}'
    ]
});

// styling forms headers 

sIFR.replace(typewriter, {
    selector: '.form.green-form h2'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #ffffff; font-size: 33px; font-weight: bold; text-align: left; leading: -12; line-height:45px}'
    ]
});

sIFR.replace(typewriter, {
    selector: '.form.gray-form h2'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #ed1c24; font-size: 36px; font-weight: bold; text-align: left; leading: -12; line-height:45px}'
    ]
});

sIFR.replace(typewriter, {
    selector: 'h2.replaced'
    ,tuneHeight:'-5'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #000000; font-size: 16px; font-weight: bold; text-align: left; }'
    ]
});

sIFR.replace(typewriter, {
    selector: 'h3.replaced'
    ,forceWidth: 'true'
    ,wmode: 'transparent'
    ,css: [
        '.sIFR-root { color: #ed1c24; font-size: 26px; font-weight: bold; text-align: left; leading: -12;}'
    ]
});


