/*****************************************************************************
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 helvetica = { src: 'http://wp1181212.vwp4309.webpack.hosteurope.de/wp-content/themes/ebertlang/flash/helvetica.swf' };
var century = { src: './flash/century.swf' };

// activate sIFR:
sIFR.activate(helvetica, century);

// menu items
sIFR.replace(helvetica, {
  selector: '#menu span.root',
  css: ['.sIFR-root {display: block;line-height: 35px; position: relative; z-index: 100; white-space: nowrap; font-size: 12px; font-weight: bold; letter-spacing: 0; text-decoration: none; color: #8c8c8e; cursor: pointer;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5'
});
sIFR.replace(helvetica, {
  selector: '#menu a.root',
  css: ['.sIFR-root {display: block;line-height: 35px; position: relative; z-index: 100; white-space: nowrap; font-size: 12px; font-weight: bold; letter-spacing: 0; text-decoration: none; color: #8c8c8e; cursor: pointer;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5',
  onRelease: function(fi) {
    window.location = fi.getAncestor();
  }
});

// menu clean item, login
sIFR.replace(helvetica, {
  selector: '#menu .clean',
  css: ['.sIFR-root {display: block;line-height: 35px; position: relative; z-index: 100; white-space: nowrap; font-size: 12px; font-weight: bold; letter-spacing: 0; text-decoration: none; color: #78787a; cursor: pointer;}'],
  transparent: true,
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5',
  onRelease: function() {
    var event = new jQuery.Event("click");
    event.sifr = 1;
    $('.login span:first').trigger(event);
  }
});

// content titles
sIFR.replace(helvetica, {
  selector: '#content h1',
  css: ['.sIFR-root {margin: 0; font-size: 26px; color: #333333;}', 'b {font-weight: bold;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5'
});
sIFR.replace(helvetica, {
  selector: '#primary h2',
  css: ['.sIFR-root {font-size: 20px; color: #333333;}', 'b {font-weight: bold;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5'
});


sIFR.replace(helvetica, {
  selector: '#primary h3',
  css: ['.sIFR-root {font-size: 16px; color: #333333;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
});

// content info
sIFR.replace(helvetica, {
  selector: '#content .info',
  css: ['.sIFR-root {margin-bottom: 15px; font-size: 14px; font-weight: normal; color: #666666;}'],
  wmode: 'transparent',
  fitExactly: true
});

// content subtitle
sIFR.replace(helvetica, {
  selector: '#content .subtitle',
  css: ['.sIFR-root {margin-bottom: 15px; font-size: 18px; font-weight: normal; color: #666666;}'],
  wmode: 'transparent',
  fitExactly: true
});

// side title
sIFR.replace(helvetica, {
  selector: '#side .detail h2',
  css: ['.sIFR-root {font-size: 18px; color: #333333;}', 'b {font-weight: bold;}'],
  wmode: 'transparent',
  forceSingleLine: true,
  fitExactly: true,
  tuneHeight: '-5'
});

