hover image switch

hover image switch

Wondering if I could have written this more efficiently.

Three images.  Hover one, the other two switch.

  1. <script>
  2. $(document).ready(function() {
  3. $(".imgc").hover(function(){
  4.      $(".imgr").hide();
  5.      $(".imga").hide();
  6.    },function(){
  7.      $(".imgr").show();
  8.      $(".imga").show();
  9. });
  10. $(".imgr").hover(function(){
  11.      $(".imgc").hide();
  12.      $(".imga").hide();
  13.    },function(){
  14.      $(".imgc").show();
  15.      $(".imga").show();
  16. });
  17. $(".imga").hover(function(){
  18.      $(".imgr").hide();
  19.      $(".imgc").hide();
  20.    },function(){
  21.      $(".imgr").show();
  22.      $(".imgc").show();
  23. });
  24. });
  25. </script>