$(document).ready(function () {

$("#top-menu li:last-child").addClass("extend");
$("#mright .pos:last-of-type").addClass("remove");
$("#bottom ul:last-of-type").addClass("remove");

var addr_ar = document.location.toString().split('/');

$("#top-menu li a").each(function(){
	if($(this).attr("href")==addr_ar[addr_ar.length-1]){
		$(this).addClass("active");
	}
});

    $("#det-data-nav li a").click(function() {
    
        var curList = $("#det-data-nav li a.current").attr("rel");
        var curListHeight = $("#det-data-rotate").height();
        
        $("#det-data-rotate").height(curListHeight);
    
        $("#det-data-nav li a").removeClass("current");
        $(this).addClass("current");
        
        var listID = $(this).attr("rel");
        
        if (listID != curList) {
            $("#"+curList).fadeOut(200, function() {
    
                $("#"+listID).fadeIn();
                
                var newHeight = $("#"+listID).height();
                
                $("#det-data-rotate").animate({
                    height: newHeight
                });
            
            });
        }        
        
        return false;
    });	

});
