$(document).ready(function() {
    $(".www").mouseover(function() {
        var id = $(this).attr("id");
        $(this).attr("src", "images/" + id + "up.jpg");
    });

    $(".www").mouseout(function() {
        var id = $(this).attr("id");
        $(this).attr("src", "images/" + id + ".jpg");
    });

    $(".www").livequery("click", function() {
        var id = $(this).attr("id");
        $("#distancelearningspan").hide("slow",function(){
            $("#othertext").load("getwhatwhywho.jsp",{"which":id},function(){
                $("#othertext").show("fast");
            });            
        });
        $("#othertext").parent().addClass("whatwhywhoback");
    });
    
    $("#closeme").livequery("click", function(){
        $("#othertext").hide("fast",function(){
            $("#distancelearningspan").show("fast");
            $("#othertext").parent().removeClass("whatwhywhoback");
        });
    });
    
    $(".common").livequery("click", function(){
         var id = $(this).attr("id");
         var area = $(this).attr("alt");
         if (id != null && id != undefined && id.indexOf(".jsp") < 0 && area != null && area != undefined ){
             document.location = area+".jsp?page="+id;
         }
         if (id.indexOf(".jsp") >= 0) document.location = id;         
    });
            
});