/*****************************************************************************
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.
*****************************************************************************/

var helveticaultralight = { src: '/flash/helveticaultralight.swf' };
var helveticalight = { src: '/flash/helveticalight.swf' };
var helveticathin = { src: '/flash/helveticathin.swf' };
var didot = { src: '/flash/didot.swf' };
// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

// Let's set up a selector for "not" certain selectors
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;
    }
}

sIFR.useStyleCheck = true;

// Next, activate sIFR:
sIFR.activate(helveticaultralight, helveticalight, helveticathin, didot);

// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.

sIFR.replace(helveticathin, {
    selector: '#content .headerarea h1#conversionheader'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#4a4a4a }"
	, offsetTop: '4'
});

sIFR.replace(helveticathin, {
    selector: '#tipscontent #hero h1:not(.nosifr)'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#ffffff }"
	, offsetTop: '4'
});

sIFR.replace(helveticaultralight, {
    selector: '#content .headerarea h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#000000 }"
	, tuneHeight: '-6'
});

sIFR.replace(helveticaultralight, {
    selector: '#subcategorylist h2:not(.nosifr)'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#000000 }"
	, tuneHeight: '-6'
});

sIFR.replace(helveticathin, {
    selector: '#detailcolormatch h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333 }"
	, tuneHeight: '-6'
	, offsetTop: '1'
	, fitExactly: true
});

sIFR.replace(helveticaultralight, {
    selector: '#hotitems h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#000000 }"
	, tuneHeight: '-6'
});

sIFR.replace(helveticathin, {
    selector: '#productdetails h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { color:#333333 }"
	, tuneHeight: '-4' /*change done from Mind Tree from "tuneHeight:-6 to -4" as legthier texts like g, y, t was getting cut"*/
	, offsetTop: '1'
});


sIFR.replace(helveticathin, {
    selector: '.tipform h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { color:#333333 }"
	, tuneHeight: '-4'
	, offsetTop: '1'
});


/*sIFR.replace(helveticaultralight, {
    selector: '#registersignin #registerblock h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; text-align:right }"
	, tuneHeight: '-1'
});

sIFR.replace(helveticaultralight, {
    selector: '#registersignin #signinblock h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-1'
});*/

sIFR.replace(helveticathin, {
    selector: '#mollyintro h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#666666; }"
	, tuneHeight: '-6'
});

sIFR.replace(helveticathin, {
    selector: '#registersignin #registerblock h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#CC0000; text-align:right }",
		"em { font-style:normal; color: #333333; }"
	]
	, tuneHeight: '-3'
	, offsetTop: '1'
});
/*sIFR.replace(helveticathin, {
    selector: '#registersignin #signinblock h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#CC0000; }",
		"em { font-style:normal; color: #333333; }"
	]
	, tuneHeight: '-3'
	, offsetTop: '1'
});*/
sIFR.replace(helveticaultralight, {
    selector: '#register .section h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
	, ratios: [6, 1.45, 7, 1.35, 11, 1.31, 14, 1.24, 19, 1.23, 27, 1.2, 29, 1.19, 37, 1.18, 57, 1.17, 62, 1.16, 63, 1.17, 89, 1.16, 90, 1.15, 95, 1.16, 97, 1.15, 100, 1.16, 104, 1.15, 106, 1.16, 111, 1.15, 112, 1.16, 118, 1.15, 119, 1.16, 1.15]
});



sIFR.replace(helveticaultralight, {
    selector: '#mcgcolormatchcontent h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
});
sIFR.replace(helveticaultralight, {
    selector: '#mcgcolormatchcontent .section p.calltoaction'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#CC0000; }",
		"em { font-style:normal; color: #333333; }"
	]
	, tuneHeight: '-5'
});
sIFR.replace(helveticaultralight, {
    selector: '#mcgtipscontent .section p.calltoaction'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#CC0000; }",
		"em { font-style:normal; color: #333333; }"
	]
	, tuneHeight: '-1'
});
sIFR.replace(helveticathin, {
    selector: '.colormatchpage #quizheader p'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { leading: 4; color:#000000; }"
	]
	, offsetTop: '1'
});
sIFR.replace(helveticathin, {
    selector: '#quizcontent .quizquestionheader h3'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#333333; }"
	]
	, offsetTop: '5'
});
sIFR.replace(helveticathin, {
    selector: '#quizcontent .quizquestionheader h4'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#333333; }"
	]
	, offsetTop: '1'
});

sIFR.replace(helveticaultralight, {
    selector: '#quizcontent h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
});
sIFR.replace(helveticathin, {
    selector: '#conversioncallouts h3'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-align:right; text-transform:uppercase; color:#333333; }"
	]
	, offsetTop: '1'
	, tuneHeight: '-3'
});
sIFR.replace(helveticathin, {
    selector: '.conversiontoolpage h2#matchHead'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-align:right; text-transform:uppercase; color:#000000; }"
	]
	, offsetTop: '1'
	, tuneHeight: '-3'
});
sIFR.replace(helveticaultralight, {
    selector: '.conversion-product-content h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { color:#000000; }"
	, tuneHeight: '20'
});
sIFR.replace(helveticathin, {
    selector: '#beautybuzzfabfives .section h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { leading: 4; color:#333333; }"
	]
	, offsetTop: '1'
	, tuneHeight: '-3'
});
sIFR.replace(helveticalight, {
    selector: '#beautybuzzwelcome #welcomecontent .header p.tagline'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-align:right; leading: 4; color:#333333; }"
	]
	, offsetTop: '1'
});

sIFR.replace(helveticathin, {
    selector: '.awardproduct .productcontent h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { leading: 4; color:#4f4f4f; }"
	]
	, offsetTop: '1'
	, tuneHeight: '0'
});
sIFR.replace(didot, {
    selector: '#mollytips h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#323232; }"
	]
	, tuneHeight: '-5'
});
sIFR.replace(helveticathin, {
    selector: '.tipsection .tipresults p'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { color:#cc0000; }"
	]
	, offsetTop: '1'
	, tuneHeight: '-3'
});

//For Error Page text
sIFR.replace(helveticaultralight, {
    selector: 'h1.oops_txt'
      , wmode: 'transparent'
      , css: [
            ".sIFR-root { color:#333333; }"
      ]
      , offsetTop: '5'
});

sIFR.replace(helveticaultralight, {
    selector: 'h2.sorry_txt'
      , wmode: 'transparent'
      , css: [
            ".sIFR-root { color:#333333; }"
      ]
      , offsetTop: '5'
});

/* COVER GIRL PRODUCTS*/
sIFR.replace(helveticaultralight, {
    selector: '.products-title-cls  h1'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root {font-weight:bold;color:#333333; text-align:left; }"
                ]
                , offsetTop: '5'
});

sIFR.replace(helveticaultralight, {
    selector: '.sidebar-title-cls  p.ptitle'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root {font-weight:bold; color:#333333; text-align:left; }"
                ]
                , offsetTop: '5'
});

//For Store Locator page title heads
sIFR.replace(helveticaultralight, {
    selector: '#storeloc_menuouter #storeloc_menu p'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root { color:#333333; text-align:center; }"
                ]
                , offsetTop: '5'
});

//DISCONTINUED PAGEs
sIFR.replace(helveticaultralight, {
    selector: '.disselectedcolor h2'
	, wmode: 'transparent'
	, css: ".sIFR-root {text-transform:none;color:#333333 }"
	, tuneHeight: '5'
	, ratios: [6, 1.45, 7, 1.35, 11, 1.31, 14, 1.24, 19, 1.23, 27, 1.2, 29, 1.19, 37, 1.18, 57, 1.17, 62, 1.16, 63, 1.17, 89, 1.16, 90, 1.15, 95, 1.16, 97, 1.15, 100, 1.16, 104, 1.15, 106, 1.16, 111, 1.15, 112, 1.16, 118, 1.15, 119, 1.16, 1.15]
});


//MYTIPS PAGE
sIFR.replace(helveticaultralight, {
    selector: '#mcgtipscontent h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
});

//SITEMAP PAGEs
/* MindTree has updated this call */
sIFR.replace(helveticathin, {
    selector: '#sitemapwrapper h1'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root { text-transform:uppercase; color:#000000; }"
                ]
                , offsetTop: '1',
    tuneHeight: '1'
});
/* MindTree has added this call */
sIFR.replace(helveticathin, {
    selector: '#sitemapwrapper ul.mainheadtxt li'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root { text-transform:uppercase; color:#000000; }",
                                "a { text-decoration:none; color: #333333 }",
		                        "a:link { color: #333333; }",
		                        "a:hover { color: #cc0000; }"
                ]
                , offsetTop: '1',
    tuneHeight: '1'
});



//For Contact Us page title heads
sIFR.replace(helveticaultralight, {
    selector: '#contactpageouter #contactpageright p'
                , wmode: 'transparent'
                , css: [
                                ".sIFR-root { color:#333333; }"
                ]
                , offsetTop: '5'
});

sIFR.replace(helveticathin, {
    selector: '#tips-cond-outer h1'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333 }"
	, offsetTop: '4'
});

//For Looks
sIFR.replace(helveticathin, {
    selector: '#looksdetailcontent #welcomenav ul li h2:not(.nosifr)'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#cc0000; }",
		"a { text-decoration:none; color: #cc0000 }",
		"a:link { color: #cc0000; }",
		"a:hover { color: #cc0000; }"
	]
	, tuneHeight: '-4'
	, offsetTop: '1'
	, ratios: [7, 1.18, 8, 1.06, 9, 1.05, 16, 0.99, 25, 0.97, 28, 0.94, 29, 0.95, 43, 0.93, 47, 0.92, 48, 0.93, 67, 0.92, 76, 0.91, 77, 0.92, 0.91]
});
sIFR.replace(helveticathin, {
    selector: '#welcomenav ul li h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#333333; }",
		"a { text-decoration:none; color: #333333 }",
		"a:link { color: #333333; }",
		"a:hover { color: #cc0000; }"
	]
	, tuneHeight: '-7'
	, offsetTop: '1'
});

sIFR.replace(helveticathin, {
    selector: '#looksdetailcontent .lookessentials h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#000000; }"
	]
	, tuneHeight: '2'
	, ratios: [6, 1.1, 7, 1.07, 8, 1.06, 9, 1.05, 16, 0.99, 25, 0.97, 28, 0.94, 29, 0.95, 43, 0.93, 47, 0.92, 48, 0.93, 67, 0.92, 76, 0.91, 77, 0.92, 0.91]
});

sIFR.replace(didot, {
    selector: '.seasonallooksdetail #looksdetailcontent h1'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#323232; letter-spacing:-2 }"
	]
	, offsetTop: '-2'
	, tuneHeight: '-10'
	, ratios: [6, 1.68, 7, 1.58, 9, 1.49, 11, 1.39, 13, 1.33, 23, 1.32, 29, 1.29, 34, 1.28, 37, 1.27, 41, 1.28, 47, 1.27, 76, 1.26, 79, 1.25, 80, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25]
});

sIFR.replace(helveticaultralight, {
    selector: '#looksdetailcontent h1:not(.nosifr)'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#000000 }"
	, tuneHeight: '0'
	, ratios: [6, 1.57, 7, 1.46, 8, 1.4, 10, 1.34, 13, 1.25, 15, 1.21, 20, 1.22, 22, 1.19, 27, 1.2, 29, 1.19, 37, 1.18, 57, 1.17, 62, 1.16, 63, 1.17, 89, 1.16, 90, 1.15, 95, 1.16, 97, 1.15, 100, 1.16, 104, 1.15, 106, 1.16, 111, 1.15, 112, 1.16, 118, 1.15, 119, 1.16, 1.15]
});



sIFR.replace(helveticaultralight, {
    selector: '.seasonallooksdetail #looksdetailcontent h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
	, ratios: [6, 1.45, 7, 1.35, 11, 1.31, 14, 1.24, 19, 1.23, 27, 1.2, 29, 1.19, 37, 1.18, 57, 1.17, 62, 1.16, 63, 1.17, 89, 1.16, 90, 1.15, 95, 1.16, 97, 1.15, 100, 1.16, 104, 1.15, 106, 1.16, 111, 1.15, 112, 1.16, 118, 1.15, 119, 1.16, 1.15]
});

sIFR.replace(didot, {
    selector: '#looksdetailcontent h2.modelname'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#323232; letter-spacing:-2 }"
	]
	, offsetTop: '-2'
	, tuneHeight: '-6'
	, ratios: [6, 1.52, 8, 1.43, 11, 1.38, 13, 1.33, 23, 1.32, 29, 1.29, 34, 1.28, 37, 1.27, 41, 1.28, 47, 1.27, 76, 1.26, 79, 1.25, 80, 1.26, 83, 1.25, 84, 1.26, 87, 1.25, 88, 1.26, 1.25]
});

sIFR.replace(helveticathin, {
    selector: '#looksdetailcontent .lookessentials h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { text-transform:uppercase; color:#000000; }"
	]
	, tuneHeight: '2'
	, ratios: [6, 1.1, 7, 1.07, 8, 1.06, 9, 1.05, 16, 0.99, 25, 0.97, 28, 0.94, 29, 0.95, 43, 0.93, 47, 0.92, 48, 0.93, 67, 0.92, 76, 0.91, 77, 0.92, 0.91]
});
sIFR.replace(helveticathin, {
    selector: '.servicelist .serviceitem h2'
	, wmode: 'transparent'
	, css: [
		".sIFR-root { leading:3; text-transform:uppercase; color:#333333; }"
	]
	, tuneHeight: '-4'
});
sIFR.replace(helveticaultralight, {
    selector: '#mcgtipscontent h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
});
sIFR.replace(helveticaultralight, {
    selector: '#mylookspart h2'
	, wmode: 'transparent'
	, css: ".sIFR-root { text-transform:uppercase; color:#333333; }"
	, tuneHeight: '-6'
});



