
// 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;
  }
}

// Fonts ----------------------------------------

var didotlp = { src: '/assets/flash/didotlp.swf' };
var georgia = { src: '/assets/flash/georgia.swf' };
  

  sIFR.activate(didotlp, georgia);


  // h1 replaced ----------------------

  sIFR.replace(didotlp, {
    selector: 'body.checkout h1.second-h1'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #bb88ab; font-size: 36px; text-align: left; text-transform: lowercase; leading: -5;}'
      ,'a { color: #bb88ab; text-decoration: none; }'
      ,'a:link { color: #bb88ab; }'
      ,'a:hover { color: #bb88ab; }'
    ]
  }); 
  
    sIFR.replace(didotlp, {
    selector: 'h1'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #69445c; font-size: 36px; text-align: left; text-transform: lowercase; leading: -5;}'
      ,'a { color: #69445c; text-decoration: none; }'
      ,'a:link { color: #69445c; }'
      ,'a:hover { color: #69445c; }'
    ]
  }); 
  
  // h2 replaced ----------------------

  sIFR.replace(georgia, {
    selector: '.primary-content-right-secondary h2 '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #69445c; font-size: 20px; text-align: left; leading: 0;}'
      ,'a { color: #69445c; text-decoration: none; }'
      ,'a:link { color: #69445c; }'
      ,'a:hover { color: #69445c; }'
    ]
  }); 

  sIFR.replace(georgia, {
    selector: 'body.login .primary-content-right h2, body.register .primary-content-right h2 '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #69445c; font-size: 16px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #69445c; text-decoration: none; }'
      ,'a:link { color: #69445c; }'
      ,'a:hover { color: #69445c; }'
    ]
  }); 

  sIFR.replace(georgia, {
    selector: 'h2'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #b986a9; font-size: 16px; text-align: left; text-transform: none; leading: 0;}'
      ,'a { color: #b986a9; text-decoration: none; }'
      ,'a:link { color: #b986a9; }'
      ,'a:hover { color: #b986a9; }'
    ]
  }); 
  
  // h3 replaced ----------------------

/*  sIFR.replace(georgia, {
    selector: 'h3:not(.non-sifr)'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #69445c; font-size: 16px; text-align: left; text-transform: none; leading: 0;}'
      ,'a { color: #69445c; text-decoration: none; }'
      ,'a:link { color: #69445c; }'
      ,'a:hover { color: #69445c; }'
    ]
  }); 
*/
  // h4 replaced ----------------------

  sIFR.replace(didotlp, {
    selector: '.collection-block h4, .secondary-navigation ul li.parent, #gallery .gallery-header h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #69445c; font-size: 22px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #69445c; text-decoration: none; }'
      ,'a:link { color: #69445c; }'
      ,'a:hover { color: #69445c; }'
    ]
  }); 

  sIFR.replace(didotlp, {
    selector: '.our-brands h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ffffff; font-size: 20px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #ffffff; text-decoration: none; }'
      ,'a:link { color: #ffffff; }'
      ,'a:hover { color: #ffffff; }'
    ]
  }); 
  
    sIFR.replace(didotlp, {
    selector: '.keep-updated h4, .tips-block h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #768460; font-size: 22px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #768460; text-decoration: none; }'
      ,'a:link { color: #768460; }'
      ,'a:hover { color: #768460; }'
    ]
  }); 

  // other replaced ----------------------

    sIFR.replace(didotlp, {
    selector: '.footer-links ul li.parent '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #b986a9; font-size: 20px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #b986a9; text-decoration: none; }'
      ,'a:link { color: #b986a9; }'
      ,'a:hover { color: #b986a9; }'
    ]
  }); 