
// 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 frizQuadrata = { src: '/assets/flash/friz-quadrata.swf' };
  

  sIFR.activate(frizQuadrata);


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

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

  sIFR.replace(frizQuadrata, {
    selector: '.primary-content .primary-content-right-secondary h2 '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ef0076; font-size: 18px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'span { color: #000; }'
      ,'a { color: #ef0076; text-decoration: none; }'
      ,'a:link { color: #ef0076; }'
      ,'a:hover { color: #ef0076; }'
    ]
  }); 

  sIFR.replace(frizQuadrata, {
    selector: 'body.login h2'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ef0076; font-size: 18px; text-align: left; leading: 0;}'
      ,'a { color: #ef0076; text-decoration: none; }'
      ,'a:link { color: #ef0076; }'
      ,'a:hover { color: #ef0076; }'
    ]
  });

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

  sIFR.replace(frizQuadrata, {
    selector: '.our-brands h4, .keep-updated h4, .secondary-navigation ul li.parent'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ffffff; font-size: 18px; text-align: left; text-transform: none; leading: 0;}'
      ,'a { color: #ffffff; text-decoration: none; }'
      ,'a:link { color: #ffffff; }'
      ,'a:hover { color: #ffffff; }'
    ]
  }); 
  
  sIFR.replace(frizQuadrata, {
    selector: '.tips-block h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ffffff; font-size: 18px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #ffffff; text-decoration: none; }'
      ,'a:link { color: #ffffff; }'
      ,'a:hover { color: #ffffff; }'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '.collection-block h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #3c015a; font-size: 18px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #3c015a; text-decoration: none; }'
      ,'a:link { color: #3c015a; }'
      ,'a:hover { color: #3c015a; }'
    ]
  });
  sIFR.replace(frizQuadrata, {
    selector: '.collection-block ul li.parent'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #3c015a; font-size: 18px; text-align: left; leading: 0;}'
      ,'a { color: #3c015a; text-decoration: none; }'
      ,'a:link { color: #3c015a; }'
      ,'a:hover { color: #3c015a; }'
    ]
  });
    
  sIFR.replace(frizQuadrata, {
    selector: '.promo.category-link h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ef0076; font-size: 17px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #ef0076; text-decoration: none; }'
      ,'a:link { color: #ef0076; }'
      ,'a:hover { color: #ef0076; }'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '.promo h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ef0076; font-size: 18px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #ef0076; text-decoration: none; }'
      ,'a:link { color: #ef0076; }'
      ,'a:hover { color: #ef0076; }'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '#gallery .gallery-header h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #3c015a; font-size: 22px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #3c015a; text-decoration: none; }'
      ,'a:link { color: #3c015a; }'
      ,'a:hover { color: #3c015a; }'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '.shopping-bag h4'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ffffff; font-size: 17px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #ffffff; text-decoration: none; }'
      ,'a:link { color: #ffffff; }'
      ,'a:hover { color: #ffffff; }'
      ,'a strong { color: #ef0076; font-weight: normal;}'
      ,'a:link strong { color: #ef0076; font-weight: normal;}'
      ,'a:hover strong { color: #ef0076; font-weight: normal;}'
    ]
  }); 

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

  sIFR.replace(frizQuadrata, {
    selector: '.footer-links ul li.parent '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #676566; font-size: 22px; text-align: left; text-transform: lowercase; leading: 0;}'
      ,'a { color: #008C56; text-decoration: none; }'
      ,'a:link { color: #676566; }'
      ,'a:hover { color: #676566; }'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '.search-box span.search-label'
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #ffffff; font-size: 16px; leading: 0;}'
    ]
  });
  
  sIFR.replace(frizQuadrata, {
    selector: '.top-box span.delivery '
	,forceWidth: 'true'
	,wmode: 'transparent'
	,css: [
      '.sIFR-root { color: #bcbcbc; font-size: 28px; text-align: right; leading: 0;}'
      ,'strong { color: #ffffff; font-size: 160px; font-weight: normal;}'
    ]
  }); 