//Allows us to not replace certain elements
//see: http://wiki.novemberborn.net/sifr3/Tricks
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;
  }
}

//Where is our font embedded flash file?
var tradegothiclight = { src: '/assets/swf/tradegothiclight.swf' };

//Activate (Load) the font
sIFR.activate(tradegothiclight);

//Begin replacing our elements

// Global Footer
sIFR.replace(tradegothiclight, {
	selector: '#footerNav dl h4',
	css: '.sIFR-root { font-size: 18px; line-height: 25px; color: #92c9f6; text-transform: uppercase; letter-spacing: -.3 }',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Home Page
sIFR.replace(tradegothiclight, {
	selector: 'body#home #feature .panel.featureTwo h3',
	css: [
	    '.sIFR-root { font-size: 16px; color: #02517d; text-transform: uppercase; letter-spacing: -.5; leading: -1 }',
	    'a { color: #02517d; text-decoration: none; }',
  		'a:hover { color: #02517d; text-decoration: underline; }'
	],    
	wmode: 'transparent',
	antialiasType: 'advanced',
	thickness: '70'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#home #feature .panel.featureThree h3',
	css: [
	    '.sIFR-root { font-size: 21px; line-height: 38px; color: #ffffff; text-transform: uppercase; letter-spacing: -.3 }',
	    'a { color: #ffffff; text-decoration: none; }',
  		'a:hover { color: #ffffff; text-decoration: underline; }'
	],    
	wmode: 'transparent',
	antialiasType: 'advanced',
	thickness: '-100'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#home #feature .panel.featureThree blockquote',
	css: '.sIFR-root { font-size: 18px; color: #2c4078; letter-spacing: -.2; leading: 3}',
	wmode: 'transparent',
	antialiasType: 'advanced',
	thickness: '-50'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#home #feature .panel.featureFour h3',
	css: [
	    '.sIFR-root { font-size: 18px; line-height: 18px; color: #c65e03; text-transform: uppercase; letter-spacing: -.3 }',
	    'a { color: #c65e03; text-decoration: none; }',
  		'a:hover { color: #c65e03; text-decoration: underline; }'
	],    
	wmode: 'transparent',
	antialiasType: 'advanced',
	thickness: '40'
});

// All Products Page
sIFR.replace(tradegothiclight, {
	selector: 'body#allProducts #content #main .productListings h3',
	css: '.sIFR-root { font-size: 16px; color: #225C86; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Product Overview: Sport
sIFR.replace(tradegothiclight, {
	selector: 'body#productOverview.sport #content #main .listings .inner h3',
	css: '.sIFR-root { font-size: 16px; color: #d70074; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Product Ingredients Glossary Page
sIFR.replace(tradegothiclight, {
	selector: 'body#productIngredientsGlossary #content #glossaryOuter #glossaryContainer #pageTitle h2',
	css: '.sIFR-root { font-size: 18px; line-height: 20px; color: #643800; text-transform: uppercase; letter-spacing: -.6 }',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Product Detail Page
// Color Theme: Blue
sIFR.replace(tradegothiclight, {
	selector: 'body#productDetail.blue #main #infoTabContainer div.tabContent h3#intro',
	css: '.sIFR-root { font-size: 20px; color: #305A89; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

/*
sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.blue #content #productFooter dt',
    css: '.sIFR-root { font-size: 12px; color: #305A89; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});

sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.blue #content #productFooter h4',
    css: '.sIFR-root { font-size: 12px; color: #305A89; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});
*/

// Color Theme: Purple
sIFR.replace(tradegothiclight, {
	selector: 'body#productDetail.purple #main #infoTabContainer div.tabContent h3#intro',
	css: '.sIFR-root { font-size: 20px; color: #673089; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});



// Color Theme: Pink
sIFR.replace(tradegothiclight, {
	selector: 'body#productDetail.pink #main #infoTabContainer div.tabContent h3#intro',
	css: '.sIFR-root { font-size: 20px; color: #D70074; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

/*
sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.pink #content #productFooter dt',
    css: '.sIFR-root { font-size: 12px; color: #D70074; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});

sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.pink #content #productFooter h4',
    css: '.sIFR-root { font-size: 12px; color: #D70074; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});
*/

// Color Theme: Orange
sIFR.replace(tradegothiclight, {
	selector: 'body#productDetail.orange #main #infoTabContainer div.tabContent h3#intro',
	css: '.sIFR-root { font-size: 20px; color: #D77E00; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

/*
sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.orange #content #productFooter dt',
    css: '.sIFR-root { font-size: 12px; color: #D77E00; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});

sIFR.replace(tradegothiclight, {
    selector: 'body#productDetail.orange #content #productFooter h4',
    css: '.sIFR-root { font-size: 12px; color: #D77E00; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced',
    thickness: '70'
});
*/

// Product FAQ
sIFR.replace(tradegothiclight, {
	selector: 'body#productFAQ #content #main #faqContainer h2',
	css: '.sIFR-root { font-size: 18px; color: #643800; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Get Involved Page
sIFR.replace(tradegothiclight, {
	selector: 'body#getInvolved #content #main #getInvolvedMain h2',
	css: '.sIFR-root { font-size: 18px; color: #357295; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#newsletter #content #main #newsletterMain h2',
	css: '.sIFR-root { font-size: 18px; color: #357295; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#getInvolved #content #main #getInvolvedMain .contentBucket h3',
	css: '.sIFR-root { font-size: 15px; color: #357295; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

/*
sIFR.replace(tradegothiclight, {
	selector: '#crossLinks dl h3',
	css: '.sIFR-root { font-size: 12px; color: #357295; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced',
	thickness: '100'
});
*/

sIFR.replace(tradegothiclight, {
	selector: 'body#getInvolved.inspiration #content #main #getInvolvedMain #inner #dedicateInspiration #desc h3',
	css: '.sIFR-root { font-size: 20px; color: #19597E; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent',
	antialiasType: 'advanced'
});


// Our Story
sIFR.replace(tradegothiclight, {
    selector: 'body#ourStory #content #main #ourStoryMain h2',
    css: '.sIFR-root { font-size: 18px; color: #ffffff; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#ourStory #content #main #ourStoryMain h3',
	css: '.sIFR-root { font-size: 14px; font-weight: bold; color: #d77e00;letter-spacing: .4; leading: 3; }',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

sIFR.replace(tradegothiclight, {
    selector: 'body#contactBio h2',
    css: '.sIFR-root { font-size: 18px; color: #ffffff; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced'
});

// Giveaways
sIFR.replace(tradegothiclight, {
    selector: 'body#productOverview #content #main #newsletterMain h2',
    css: '.sIFR-root { font-size: 18px; color: #ffffff; text-transform: uppercase; letter-spacing: -.4;}',
    wmode: 'transparent',
    antialiasType: 'advanced'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#productOverview #content #main #newsletterMain h3',
	css: '.sIFR-root { font-size: 14px; font-weight: bold; color: #d77e00;letter-spacing: .4; leading: 3; }',
	wmode: 'transparent',
	antialiasType: 'advanced'
});

// Eating Well
sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.ourPhilosophy #content #main h2',
	css: '.sIFR-root { font-size: 18px; color: #FFFFFF; text-transform: uppercase; letter-spacing: -.4;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell #content #main h3',
	css: '.sIFR-root { font-size: 17px; color: #705b3f; letter-spacing: -.2; leading: 5}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell #content #main h4',
	css: '.sIFR-root { font-size: 11px; color: #d77e00; text-transform: uppercase; font-weight: bold; leading: 1}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.articles #content #main h3',
	css: '.sIFR-root { font-size: 12px; color: #d77e00; text-transform: uppercase; font-weight: bold; leading: 1}',
	wmode: 'transparent'
});
sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.articles #content #main h2',
	css: '.sIFR-root { font-size: 21px; color: #634e32; text-transform: none; leading: -.6}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: '#utilityBar #breadCrumbs p ',
	css: '.sIFR-root { font-size: 13px; color: #ffffff; text-transform: uppercase;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.bio #content #main h2',
	css: '.sIFR-root { font-size: 17px; color: #FFFFFF; text-transform: uppercase; letter-spacing: -.2;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.allArticles #content #main h2',
	css: '.sIFR-root { font-size: 17px; color: #FFFFFF; text-transform: uppercase; letter-spacing: -.2;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.allArticles #content #main #authorDesc h3',
	css: '.sIFR-root { font-size: 17px; color: #FFFFFF; letter-spacing: -.2;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#eatingWell.allArticles #content #main #eatingWellMain h4',
	css: '.sIFR-root { font-size: 14px; color: #d77e00; text-transform: uppercase; font-weight: bold; letter-spacing: -.2; leading: 1}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#shop #content #main h2',
	css: '.sIFR-root { font-size: 17px; color: #FFFFFF; text-transform: uppercase;}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#shop #content #main #shopMain form#zipSearch label',
	css: '.sIFR-root { font-size: 16px; color: #705b3f; letter-spacing: -.3; leading: 3}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#shop #content #main #shopMain form#zipSearch.results p',
	css: [
		'.sIFR-root { font-size: 14px; color: #e88400; text-transform: uppercase; letter-spacing: -.2;}',
		'a { color: #e88400; text-decoration: none; }',
  		'a:hover { color: #e88400; text-decoration: underline; }'
	],  	
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#shop #content #main #shopMain #otherProducts #storeListings h3',
	css: '.sIFR-root { font-size: 12px; color: #705b3f; text-transform: uppercase; font-weight: bold; letter-spacing: -.2; leading: -3}',
	wmode: 'transparent'
});

sIFR.replace(tradegothiclight, {
	selector: 'body#shop.shopOnline #content #main #shopMain #international h3',
	css: '.sIFR-root { font-size: 14px; color: #d77e00; text-transform: uppercase; letter-spacing: -.2;}',
	wmode: 'transparent'
});