jQuery.fn.imgHover = function(passive, active) {
  /* JQuery plugin by Tuomo Riekki */
  this.not('.active').each(function() {
    $(this).find('img').hover(function() {
      this.src = this.src.replace(passive, active);
    }, function() {
      this.src = this.src.replace(active, passive);
    }).each(function() {
      preload = new Image(); preload.src = this.src.replace(passive, active);
    });
  });
  return this;
};

$(document).ready(function() {
  $('#headNavi a').imgHover('P.gif', 'A.gif');
  
  $('.bluebox').prepend('<img src="files/img/blueboxtop.gif" alt="" />');
  $('.bluebox a.luelisaa').click(function() {
    $(this).parent().find('p.luelisaa').toggle();
    
    return false;
  });
  
  $('.bluebox').hover(function() {
    $(this).find('p.hidden').show().slideDown('normal');
  }, function() {
    $(this).find('p.hidden').slideUp('fast');
  });
});