If-statement dosnt work

If-statement dosnt work

Hello,

What I want to do: If I hover over a tab (there are 3) all other tabs will close.Below is the code for the first tab

  1. if($("#box1").mouseover)
     {(function () {
       $("#box1").animate({ width: "500px" }, 400 )
       $("#underbox1").delay(350).slideDown("slow").css("width","500px")
       $("#underbox2").slideUp("slow")
       $("#box2").delay(550).animate({ width: "200px" }, 400 )
       $("#underbox3").slideUp("slow");
       $("#box3").delay(550).animate({ width: "200px" }, 400 );
        });}







 

What is the mistake on that?

Kind Regards