$(document).ready(function(){

    function waber(item)
    {
      $(item).animate(
      {
        "width":  "+=4px",
        "height": "+=4px",
        "left":   "-=2px",
        "top":    "-=2px"
      }, 300, "easeOutQuad")
      .animate(
        {
          "width": "-=4px",
          "height": "-=4px",
          "left": "+=2px",
          "top": "+=2px"
        }, 300, "easeOutQuad", function () {
          if (window.instances[this.id])
          {
            that = this;
            setTimeout(function() { waber(that); }, 0);
          }
      });
    }

    function endless(item, should_run) 
		{
      if (!item.id)
      {
        return false;
      }
      
      if (!window.instances)
      {
        window.instances = {};
      }

      var is_running = window.instances[item.id];
      instances[item.id] = should_run;
      if (should_run && !is_running)
      {
        waber(item);
      }
    }

    $('.short_navigation_showWithImages li img')
    .mouseover(function(){ endless(this, true); })
    .mouseout(function(){  endless(this, false); });

});