$(document).ready(function() {
    
    $("input#un").click(function(){  
        $(this).val("");        
         $(this).css("color", "#000000")        
    });

    $("input#pw").click(function(){  
        $(this).val("");  
        $(this).css("color", "#000000")        
    });

/*    
    $("span.team_descr").each(function(){  
        $(this).hide();
    });
    $("span.team_descr:first").show();
    $("li.team_group:first").addClass('team_active');
    
    $("div.team_contact").each(function(){  
        $(this).hide();
    });
    $("div.team_contact:first").show();
*/
    
/*
    $("span.team_title").hover(
      function () {
        if (!$(this).parent().hasClass('team_group_active')) {
            $(this).css('text-decoration', 'underline');
        }
      }, 
      function () {
        $(this).css('text-decoration', 'none');
      }
    );
*/

    $("li.team_group").click(function(){
        if (!$(this).hasClass('team_group_active')) {
            $("li.team_group").children(".team_title").each(function(i){
                $(this).replaceWith("<a class='team_title' href=''>" + $(this).text() + "</a>");
            });
         
            $anchor = $(this).children("a");
            $anchor.replaceWith("<span class='team_title'>" + $anchor.text() + "</span>");

            $objLeft = $(this);
            $("span.team_descr:visible").each(function(){  
                $(this).parent().removeClass('team_group_active');
                $(this).slideUp('fast',function(){  
                    $objLeft.children().slideDown('fast');   
                });
            });
            $(this).addClass('team_group_active');
             
            $thisID = $(this).attr("id");
            $objID = 'team_contact_'+$thisID.replace(/team_group_/, "");
            $objRight = $('div#'+$objID);
            $("div.team_contact:visible").each(function(){  
                $(this).removeClass('team_contact_active');
                $(this).fadeOut('fast',function(){  
                    $objRight.fadeIn('fast');   
                });
            });
        }
        return false;
    });
    
    $("li.team_group a").click(function(){

//return false;
    });


    $("button.submit").hover(
      function () {
            $(this).children().css('text-decoration', 'none');
      }, 
      function () {
        $(this).children().css('text-decoration', 'underline');
      }
    );
   

});
