On tab hover

On tab hover

hello

On tab hover

After the click I lose the scc over,

On the below code I get the hover on all the elements at ones but I need to get hover per 1 element

  1.  
  2. <style type="text/css">
  3.         div.tabArea { font-size: 80%; font-weight: bold; z-index:199; position:relative;}
  4.         a.tab { background-color: #f0f0f0; border: 1px solid #000000; border-bottom-width: 0px; padding: 2px 1em 2px 1em; text-decoration: none; color: #808080;}
  5.         /*.activeTab { color: White; }*/
  6.         a.tab:hover { background-color: #d0d0d0; color: #606060; }
  7.         .div_contantRapper{ border: solid 1px black; border-collapse: collapse; border-radius: 5px; -moz-border-radius: 5px; padding: 5px; width: 500px; height: 300px; display: inline-block; background-color: #d0d0d0; }
  8.         .divContent{display:none; height:275px;  border:inset 1px gray; margin:5px;padding:5px; background-color:White;}
  9.     </style>
  10. <div class="tabArea">
  11.         <a id="tab1" class="tab" href="#">Tab A</a> 
  12.         <a id="tab2" class="tab">Tab B</a> 
  13.         <a id="tab3" class="tab">Tab C</a> 
  14.         <a id="tab4" class="tab">Tab D</a>
  15.     </div>
  16.     
  17. <script type="text/javascript">
  18.     $(".tab").click(function()
  19.     {
  20.         $('a[id*="tab"]').css("color", "#808080").css("background-color", "#f0f0f0")
  21. //        .hover(function()
  22. //        {
  23. //            $('a[id*="tab"]').css("background-color", "#d0d0d0")
  24. //        },
  25. //        function() { $('a[id*="tab"]').css("background-color", "#f0f0f0") }
  26.         //        )
  27. ;
  28.         

  29.         $(this).css("color", "White").css("background-color", "#d0d0d0")