ilunabar.conf.dominio  = 'www.ilunabar.net';
ilunabar.conf.raiz_htm = '/v0/';
ilunabar.conf.app      = 'pub';
ilunabar.conf.idioma   = 'es';
ilunabar.conf.fiendly  = '/es/';
ilunabar.conf.candy    = '/v0/pub/';
ilunabar.conf.fondoPng = 'url('+ilunabar.conf.raiz_htm+'lib-js/ilunabar/img/punto.png) top left repeat';
// usamos el metodo loadEvent como sustituto del evento onload
ilunabar.loadEvent(function() {
  ilunabar.rollOver({selector: '._rollover', tiempo: 0.2, sufijo: '_hover'});
  ilunabar.rollOverMenu({selector: '#menu img', tiempo: 0.5, sufijo: '_hover', idHover: 'current'});
});


// usamos el metodo loadEvent como sustituto del evento onload
ilunabar.loadEvent(function () {
  // animacion de persiana para la sección trabajos
  var aparecer = $$('._mascara');
  for (var i = 0; i < aparecer.length; i++) {
    aparecer[i].observe('mouseover', function (evento) {
      Event.stop(evento);

      var idMascara = this.readAttribute('id').match(/_mascara(\d+)/);
      var idDetalle = '_detalles'+idMascara[1];
      var detalle   = $(idDetalle);

      new Effect.Morph(detalle, {
        style: 'top: 0;',
        duration: 0.3
      });

      this.observe('mouseout', function (evento) {
        Event.stop(evento);
        new Effect.Morph(detalle, {
          style: 'top: -80px;',
          duration: 0.3
        });
      });
    });
  }
});

  // animacion para los submenus
ilunabar.loadEvent(function () {
  var aumentar = $$('#col_menu li a');
  var fondo    = [];
  for (var i = 0; i < aumentar.length; i++) {
    fondo[i] = new Element('div').setStyle({width: '0'});
    aumentar[i].insert({before: fondo[i]});

    aumentar[i].observe('mouseover', function (evento) {
      Event.stop(evento);

      new Effect.Parallel([
        new Effect.Morph(this.previousSiblings()[0], {style: 'width: 240px; background: #B2DEE3;', sync: true}),
        new Effect.Morph(this, {style: 'padding-left: 30px', sync: true})
      ], {duration: 0.3});

    });

    aumentar[i].observe('mouseout', function (evento) {
      Event.stop(evento);

      new Effect.Parallel([
        new Effect.Morph(this.previousSiblings()[0], {style: 'width: 1px; background: #fff;', sync: true}),
        new Effect.Morph(this, {style: 'padding-left: 0', sync: true})
      ], {duration: 0.3});

    });
  }
});

