if (document.images) {
  image1 = new Image();
  image1.src = "/userfiles/image/homepage/box-e-rollover.jpg";
  image2 = new Image();
  image2.src = "/userfiles/image/homepage/box-g-rollover.jpg";
  image3 = new Image();
  image3.src = "/userfiles/image/homepage/box-l-rollover.jpg";
  image4 = new Image();
  image4.src = "/userfiles/image/homepage/box-n-background.jpg";
  image5 = new Image();
  image5.src = "/userfiles/image/homepage/box-o-rollover.jpg";
  image6 = new Image();
  image6.src = "/userfiles/image/homepage/box-p-rollover.jpg";
  image7 = new Image();
  image7.src = "/userfiles/image/homepage/box-b-rollover-bg.png";
  image8 = new Image();
  image8.src = "/userfiles/image/homepage/box-i-rollover-bg.png";
  image9 = new Image();
  image9.src = "/userfiles/image/homepage/box-j-rollover-bg.png";
}

  $(document).ready(function(){
    $("#box-i").hoverIntent(
      function() {
        $('#box-i').css({zIndex: 101});
        $('#box-i-closed').fadeOut('fast');
        $('#box-i-open').fadeIn('fast');
        $('#box-i').animate({ width: "316px" }, "fast");
      },
      function() {
        $('#box-i').css({zIndex: 10});
        $('#box-i-open').fadeOut('fast');
        $('#box-i-closed').fadeIn('fast');
        $('#box-i').animate({ width: "208px" }, "fast");
      });
  
    $('#box-b').hoverIntent(
      function() {
        //$('#box-b').css({zIndex: $('#box-b').css("z-index")+10});
        $('#box-b-closed').fadeOut('fast');
        $('#box-b-open').fadeIn('fast');
        $('#box-b').animate({ height: "208px" }, "fast");
      },
      function() {
        //$('#box-b').css({zIndex: $('#box-b').css("z-index")-10});
        //$('#box-b').css({zIndex: 1});
        $('#box-b-open').fadeOut('fast');
        $('#box-b-closed').fadeIn('fast');
        $('#box-b').animate({ height: "99px" }, "fast");
      });
  
    $('#box-e').hoverIntent(
      function() {
        $('#box-e-rollover').css({zIndex: 101});
        $('#box-e-rollover').fadeIn('fast');
  
      },
      function() {
        $('#box-e-rollover').css({zIndex: 1});
        $('#box-e-rollover').fadeOut('fast');
      });
    
    $('#box-g').hoverIntent(
      function() {
        $('#box-g-rollover').css({zIndex: 101});
        $('#box-g-rollover').fadeIn('fast');
  
      },
      function() {
        $('#box-g-rollover').css({zIndex: 1});
        $('#box-g-rollover').fadeOut('fast');
      });
      
    $('#box-j').hoverIntent(
      function() {
        $('#box-j').css({zIndex: 101});
        $('#box-j-closed').fadeOut('fast');
        $('#box-j-open').fadeIn('fast');
        $('#box-j').animate({ width: "208px", height: "208px" }, "fast");
      },
      function() {
        $('#box-j').css({zIndex: 20});
        $('#box-j-open').fadeOut('fast');
        $('#box-j-closed').fadeIn('fast');
        $('#box-j').animate({ width: "99px", height: "99px" }, "fast");
      });
  
    $('#box-k').hoverIntent(
      function() {
        $('#box-k').css({zIndex: 101});
        $('#box-k-closed').fadeOut('fast');
        $('#box-k-open').fadeIn('fast');
        $('#box-k').animate({ width: "208px" }, "fast");
      },
      function() {
        $('#box-k').css({zIndex: 1});
        $('#box-k-open').fadeOut('fast');
        $('#box-k-closed').fadeIn('fast');
        $('#box-k').animate({ width: "99px" }, "fast");
      });
      
      $('#box-l').hoverIntent(
      function() {
        $('#box-l-rollover').css({zIndex: 101});
        $('#box-l-rollover').fadeIn('fast');

      },
      function() {
        $('#box-l-rollover').css({zIndex: 1});
        $('#box-l-rollover').fadeOut('fast');
      });
      
      $('#box-o').hoverIntent(
        function() {
          $('#box-o-rollover').css({zIndex: 101});
          $('#box-o-rollover').fadeIn('fast');
  
        },
        function() {
          $('#box-o-rollover').css({zIndex: 1});
          $('#box-o-rollover').fadeOut('fast');
        });

      $('#box-p').hoverIntent(
        function() {
          $('#box-p-rollover').css({zIndex: 101});
          $('#box-p-rollover').fadeIn('fast');
  
        },
        function() {
          $('#box-p-rollover').css({zIndex: 1});
          $('#box-p-rollover').fadeOut('fast');
        });

  
  });
