jq(document).ready(function () {
  // find the elements to be eased and hook the hover event
  jq('div.jimgMenu ul li a span').hide();
  jq('div.jimgMenu ul li.saeuglinge_kleinkinder a').addClass("active");
  jq('div.jimgMenu ul li.saeuglinge_kleinkinder a span').show().css("display", "block");
  jq('div.jimgMenu ul li a').mouseover(function() {
    if(jq(this)!=jq('div.jimgMenu ul li.saeuglinge_kleinkinder a')) {
      jq('div.jimgMenu ul li.saeuglinge_kleinkinder a').trigger('mouseout');
    }
    // if the element is currently being animated
    if (jq(this).is(':animated')) {
      jq(this).stop().animate({width: "316px"}, {duration: 675, easing:"easeOutQuad", complete: rollUpText});
      jq(this).addClass("active");
    } else {
      // ease in quickly
      jq(this).stop().animate({width: "316px"}, {duration: 600, easing:"easeOutQuad", complete: rollUpText});
      jq(this).addClass("active");
    }
    // siblings
    // ease out slowly
    jq(this).parent().siblings().children('a').stop(':animated').animate({width: "89px"}, {duration: 675, easing:"easeInOutQuad", complete: "callback"});
    jq(this).parent().siblings().children('a').removeClass("active");
    jq(this).parent().siblings().children('a').children('span').hide();
  });
});

function rollUpText() {
  jq(this).children('span').fadeIn('slow').css("display", "block");
}
