The code is working slowly

The code is working slowly

Hello any idea why my jQuery code works slowly in browser??
  1. <body style="background-color:gray">

  2.  <div id="meniuCircle">
  3.     <img id='meniu' src="MeniuVizual.png" style="height:500px" />
  4.      <div id="opt1"> Optiune 1 </div>
  5.      <div id="opt2"> Optiune 2 </div>
  6.   </div>
  7.    <div id="content">
  8.            <img src="bug.jpg" /><img src="bumblebee.jpg" />
  9.    </div>
  10.     <script src="JavaScript1.js"></script> 
  11.     <script src="realshadow.js"></script>
  12.     <script src="Shadow.js"></script>

  13. </body>
  14. var height = $(window).height();
  15.     var $item = $('#content');
  16.     var $meniu = $('#meniu');
  17.     var $widget = $('#meniuCircle');
  18.     var positionToMoveMenu = 200;
  19.     var initialPosition = $('#meniuCircle').position().left;
  20.     var img1 = $('#content img:eq(0)');
  21.     var img2 = $('#content img:eq(1)');
  22.     img1.hide();
  23.     img2.hide();

  24.     $('#meniu').css('height', height);
  25.     //test = $meniu.position().top;
  26.     //test1 = $meniu.height() / 2;
  27.     //test3 = $item.height() / 2;

  28.     //setare pozitie content in cazul nostru imagini
  29.     $('#content img').each(function () {
  30.         $(this).realshadow();
  31.     });
  32.     $('#content img').each(function () {
  33.         $(this).css('top', $meniu.position().top + $meniu.innerHeight() / 2 - $(this).innerHeight() / 2);

  34.     });

  35.     //$('#meniu').realshadow();
  36.     //setare pozitii optiuni in functie de imagine
  37.     var pozitie = $('#meniu').position();
  38.     LeftOpt1 = pozitie.left + $meniu.innerWidth() / 3;//a treia parte
  39.     TopOpt1 = pozitie.top + $meniu.innerHeight() / 2 - $meniu.innerHeight() / 5 - $('#opt1 ').innerHeight();//a cincea parte
  40.     LeftOpt2 = pozitie.left + $meniu.innerWidth() / 3;
  41.     TopOpt2 = pozitie.top + $meniu.innerHeight() / 2 + $meniu.innerHeight() / 5;



  42.     $('#meniu').show("explode", { pieces: 100 }, 1000).promise();
  43.     $('#opt1 ').css({ 'left': -100, 'top': TopOpt1, 'font-size': $meniu.innerHeight() / 15 });
  44.     $('#opt2 ').css({ 'left': -100, 'top': TopOpt2, 'font-size': $meniu.innerHeight() / 15 });

  45.     $('#opt1 ').animate({ left: LeftOpt1 }, 2000).promise().done(addRealShadow);
  46.     $('#opt2 ').animate({ left: LeftOpt2 }, 2000).promise().done(addRealShadow);
  47.     function addRealShadow() {
  48.         //$('#opt1 ').realshadow();
  49.         //$('#opt2 ').realshadow();
  50.     }
  51.     var button1 = false;
  52.     var button2 = false;

  53.     $('#opt1 ').click(function () {

  54.         if (button1 == false && button2 == false) {
  55.             $widget.animate({ left: positionToMoveMenu }, 1000);
  56.             img1.show("explode", { pieces: 100 }, 1000);
  57.             button1 = true;
  58.             button2 = false;
  59.         } else if (button1 == true) {
  60.             //se aduna inapoi meniul
  61.             img1.hide("explode", { pieces: 100 }, 1000);
  62.             $widget.animate({ left: initialPosition }, 1000);
  63.             button1 = false;
  64.             button2 = false;
  65.         }
  66.         else {
  67.             //se afiseaza doar imaginea           
  68.             img1.show("explode", { pieces: 100 }, 1000);
  69.             img2.hide();
  70.             button1 = true;
  71.             button2 = false;
  72.         }
  73.     });
  74.     $('#opt2 ').click(function () {

  75.         if (button2 == false && button1 == false) {
  76.             $widget.animate({ left: positionToMoveMenu }, 1000);
  77.             img2.show("explode", { pieces: 100 }, 1000);
  78.             button2 = true;
  79.             button1 = false;
  80.         } else if (button2 == true) {
  81.             //se aduna inapoi meniul          
  82.             img2.hide("explode", { pieces: 100 }, 1000);
  83.             $widget.animate({ left: initialPosition }, 1000);
  84.             button1 = false;
  85.             button2 = false;
  86.         }
  87.         else {
  88.             //se afiseaza doar imaginea           
  89.             img2.show("explode", { pieces: 100 }, 1000);
  90.             img1.hide();
  91.             button2 = true;
  92.             button1 = false;
  93.         }
  94.     });