// murony.hu javascript functions

jQuery(document).ready (function ($) {
  /* menu */
  $("#menu a[class!=menu-active]").mouseenter (function () {
    var img = $(this).children ("img");
    img.attr ("src", img.attr ("src").replace (/.jpg$/, "-on.jpg"));
  });
  $("#menu a[class!=menu-active]").mouseleave (function () {
    var img = $(this).children ("img");
    img.attr ("src", img.attr ("src").replace (/-on.jpg$/, ".jpg"));
  });

  /* submenu */
  $("#submenu a[class!=menu-active]").mouseenter (function () {
    var img = $(this).children ("img");
    img.attr ("src", img.attr ("src").replace (/.png$/, "-on.png"));
  });
  $("#submenu a[class!=menu-active]").mouseleave (function () {
    var img = $(this).children ("img");
    img.attr ("src", img.attr ("src").replace (/-on.png$/, ".png"));
  });

  /* mailto */
  $("a.limailto").mouseenter (function () {
    $(this).attr ("href", $(this).attr ("href").replace (/\[kukac-jel\]/, "@"));
    $(this).text ($(this).text ().replace (/\[kukac-jel\]/, "@"));
  });
});

