/*****************************************************************************
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 apexbold = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbold.swf'
};

var apexbolditalic = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbolditalic.swf'
};

var apexbook = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbook.swf'
};

var apexbookitalic = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbookitalic.swf'
};

var apexextralight = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexextralight.swf'
};

var apexlight = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexlight.swf'
};

var apexlightitalic = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexlightitalic.swf'
};

var apexmedium = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexmedium.swf'
};

var apexlight_h1_maincontent = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexlight_h1_maincontent.swf'
};

var apexbook_h2_maincontent = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbook_h2_maincontent.swf'
};

var apexbook_h3_maincontent = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbook_h3_maincontent.swf'
};

var apexbook_h4_maincontent = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbook_h4_maincontent.swf'
};

var apexbookitalic_dt_sidebar = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbookitalic_dt_sidebar.swf'
};

var apexbook_h3_sidebar = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexbook_h3_sidebar.swf'
};

var apexlight_h2_privacy = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexlight_h2_privacy.swf'
};

var apexlight_h4_privacy = {
    src: 'http://www.melocontrolli.com/tivu/flash/sifr/apexlight_h4_privacy.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>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
sIFR.activate(apexbold,
              apexbolditalic,
              apexbook,
              apexbookitalic,
              apexextralight,
              apexlight,
              apexlightitalic,
              apexmedium,
              apexlight_h1_maincontent,
              apexbook_h2_maincontent,
              apexbook_h3_maincontent,
              apexbook_h4_maincontent,
              apexbookitalic_dt_sidebar,
              apexbook_h3_sidebar,
              apexlight_h2_privacy,
              apexlight_h4_privacy
              );

// 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.fitExactly = true;
sIFR.fixHover = false;


/*//////////////// HOMEPAGE ////////////////////////////////////////////////////////////////*/
sIFR.replace(apexbolditalic, {
    selector: '.hp_ricerca_risultato h4',
    css: ['.sIFR-root { color:#FFFFFF; font-size:14px; leading:-1; }',
    'a { text-decoration:none; color:#FFFFFF; }',
    'a:link { text-decoration:none; color:#FFFFFF; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#0E2A8D; }'
    ]
    , wmode: 'transparent'
});

sIFR.replace(apexbolditalic, {
    selector: '.hp_ricerca_risultato h2',
    css: ['.sIFR-root { color:#FFFFFF; font-size:22px; leading:-2; }',
    'a { text-decoration:none; color:#FFFFFF; }',
    'a:link { text-decoration:none; color:#FFFFFF; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#0E2A8D; }'
    ]
    , wmode: 'transparent'
});


/*//////////////// SIDEBAR ////////////////////////////////////////////////////////////////*/

sIFR.replace(apexbookitalic_dt_sidebar, {
    selector: '.sidebar dt.arancio',
    css: ['.sIFR-root { color:#FF821A; font-size:18px; }',
    'a { text-decoration:none; color:#FF821A; }',
    'a:link { text-decoration:none; color:#FF821A; }',
    'a:active { text-decoration:none; color:#FF821A; }',
    'a:hover { text-decoration:none; color:#FF821A; }'
    ]
    , linkAttivo: 1, wmode: 'transparent'
});

sIFR.replace(apexbookitalic_dt_sidebar, {
    selector: '.sidebar dt',
    css: ['.sIFR-root { color:#FFFFFF; font-size:18px; }',
    'a { text-decoration:none; color:#FFFFFF; }',
    'a:link { text-decoration:none; color:#FFFFFF; }',
    'a:active { text-decoration:none; color:#FF821A; }',
    'a:hover { text-decoration:none; color:#FF821A; }'
    ]
    , wmode: 'transparent'
});

sIFR.replace(apexbookitalic, {
    selector: '.sidebar h3.bookitalic',
    css: ['.sIFR-root { color:#FFFFFF; font-size:18px; leading:-3; }',
    'a { text-decoration:none; color:#333333; }',
    'a:link { text-decoration:none; color:#333333; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#0E2A8D; }'
    ]
    , wmode: 'transparent'
});

sIFR.replace(apexbook_h3_sidebar, {
    selector: '.sidebar h3.book',
    css: ['.sIFR-root { color:#FFFFFF; font-size:18px; leading:-3; }',
    'a { text-decoration:none; color:#FFFFFF; }',
    'a:link { text-decoration:none; color:#FFFFFF; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#0E2A8D; }'
    ]
    , wmode: 'transparent'
});


/*//////////////// MAIN CONTENT ////////////////////////////////////////////////////////*/

sIFR.replace(apexlight_h1_maincontent, {
    selector: '.main_content h1',
    css: ['.sIFR-root { color:#333333; font-size:58px; background-color:#E6E6E6; }',
    'a { text-decoration:none; color:#333333; }',
    'a:link { text-decoration:none; color:#333333; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#0E2A8D; }'
  ]
  , wmode: 'transparent'
});

sIFR.replace(apexbook_h2_maincontent, {
    selector: '.main_content h2',
    css: ['.sIFR-root { color:#F6921E; font-size:32px; background-color:#E6E6E6; }',
    'a { text-decoration:none; color:#F6921E; }',
    'a:link { text-decoration:none; color:#F6921E; }',
    'a:active { text-decoration:none; color:#333333; }',
    'a:hover { text-decoration:none; color:#333333; }'
  ]
});

sIFR.replace(apexbook_h3_maincontent, {
    selector: '.main_content h3',
    css: ['.sIFR-root { color:#0E2A8D; font-size:24px; background-color:#E6E6E6; }',
    'a { text-decoration:none; color:#0E2A8D; }',
    'a:link { text-decoration:none; color:#0E2A8D; }',
    'a:active { text-decoration:none; color:#333333; }',
    'a:hover { text-decoration:none; color:#333333; }'
  ]
  , wmode: 'transparent'
});


sIFR.replace(apexbook_h4_maincontent, {
    selector: '.main_content h4',
    css: ['.sIFR-root { color:#0E2A8D; font-size:16px; background-color:#E6E6E6; }',
    'a { text-decoration:none; color:#0E2A8D; }',
    'a:link { text-decoration:none; color:#0E2A8D; }',
    'a:active { text-decoration:none; color:#0E2A8D; }',
    'a:hover { text-decoration:none; color:#F6921E; }'
  ]
});


/*//////////////// POPUP PRIVACY ////////////////////////////////////////////////////////*/

sIFR.replace(apexlight_h2_privacy, {
    selector: '#content h2',
    css: ['.sIFR-root { color:#0E2A8D; font-size:30px; background-color:#FFFFFF; }',
    'a { text-decoration:none; color:#0E2A8D; }',
    'a:link { text-decoration:none; color:#0E2A8D; }',
    'a:active { text-decoration:none; color:#333333; }',
    'a:hover { text-decoration:none; color:#333333; }'
  ]
});

sIFR.replace(apexlight_h4_privacy, {
    selector: '#content h4',
    css: ['.sIFR-root { color:#0E2A8D; font-size:16px; background-color:#FFFFFF; }',
    'a { text-decoration:none; color:#0E2A8D; }',
    'a:link { text-decoration:none; color:#0E2A8D; }',
    'a:active { text-decoration:none; color:#333333; }',
    'a:hover { text-decoration:none; color:#333333; }'
  ]
});

