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

// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
var cochin = {
      src: '/assets/flash/cochin.swf'
      ,ratios: [7, 1.32, 11, 1.31, 13, 1.24, 14, 1.25, 19, 1.23, 27, 1.2, 34, 1.19, 42, 1.18, 47, 1.17, 48, 1.18, 69, 1.17, 74, 1.16, 75, 1.17, 1.16]
    };
    var segoe = {
      src: '/assets/flash/segoe.swf'
      ,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
    };
// 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>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
/*sIFR.activate(cochin);
sIFR.activate(segoe);*/

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

    // 2011/05/10 : modif bad -> reconnaissance de navigateur mobile
	if (!(navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/iemobile/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)))
		sIFR.activate(cochin, segoe);
		
    sIFR.replace(segoe, {
      selector: '#contenuGauche h1'
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:24px; color: #544E41;}'
      ]
    });  
	
    sIFR.replace(segoe, {
      selector: '.title_page h2',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:25px; color: #544E41;}'
      ]
    });	
	
	//sIFR.replace(segoe, {
//      selector: '.contentEncartCarteDetailZone .titrepar h3',
//	  wmode: "transparent"
//      ,css: [
//        '.sIFR-root {font-weight: normal; font-size:20px; color: #544E41;}'
//      ]
//    });	
	
    sIFR.replace(segoe, {
      selector: '#contenuDroite h2',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:16px; color: #b00000;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.content_right h2',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #b00000;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '#menuLef_trav .title_active_parent h2',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #383838;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '#annuaires h2',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #3e3e3e; text-align:center; line-height:15px; }'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.sifr_actu',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-size:19px; color:#bb2222; border-bottom:1px solid #bb2222;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '.contentCarteStNazaire .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #600A0B;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteMontoir .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #A89A39;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteDonges .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #6D8CA1;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCartePaimboeuf .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #88664A;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteCarnet .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #901D20;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteCordemais .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #C39F24;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCartePellerin .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #0E8282;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteIndre .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #661F3D;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentCarteSiteAmont .contentRepere .titrepar h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #35709C;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '.contentEncartMiniActu h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #b00000;}'
      ]
    });
	
	
	sIFR.replace(segoe, {
      selector: '.contentBlocCarrefour h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #b00000;}'
      ]
    });
	sIFR.replace(segoe, {
      selector: '.contentBlocCarrefourCouleur h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #FFFFFF;}'
      ]
    });
	
	sIFR.replace(segoe, {
      selector: '.content_center .boxtext h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; color: #b00000;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '#contenuDroite .blocFocus h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; color: #ffffff;}'
      ]
    });
		
    sIFR.replace(segoe, {
      selector: '#contenuDroite h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:18px; color: #554e41;}'
      ]
    });
		
    sIFR.replace(segoe, {
      selector: '#content_right .sidebarI h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:18px; color: #554e41;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '.blocFocusA h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:20px; color: #B00000;}'
      ]
    });
    sIFR.replace(segoe, {
      selector: '.contentBlocSidebarDirect h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:16px; color: #FFFFFF;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '#contenuGauche .blocSimplanter .titreH h6',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; color: #b10304;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '#loopedSlider #focus h4',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; color: #ffffff;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '#contenuGauche .blocProjet .titreH h6',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; color: #b10304;}'
      ]
    });
	
    sIFR.replace(segoe, {
      selector: '.annuaire h5',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:17px; leading :-8; text-align:center; color: #3e3e3e;}'
      ]
    });
	
	sIFR.replace(segoe, {
      selector: '.presse h3',
	  wmode: "transparent"
      ,css: [
        '.sIFR-root {font-weight: normal; font-size:19px; color:#bb2222; border-bottom:1px solid #bb2222;}'
      ]
    });

