1 $(document).ready(function(){
2 SwitchItem("logs_tab");
5 $("#tabs li[name=logs]").click(function(e){
6 SwitchItem("logs_tab");
9 $("#tabs li[name=banlist]").click(function(e){
10 SwitchItem("banlist_tab");
13 $("#tabs li[name=roomlist]").click(function(e){
14 SwitchItem("roomlist_tab");
15 SwitchTab("roomlist");
19 function SwitchTab(name)
21 $("#tabs ul").children().each(function(){
23 if(item.attr("name") == name)
25 item.removeClass("inactive_tab");
26 item.addClass("active_tab");
28 item.addClass("inactive_tab");
29 item.removeClass("active_tab");
34 function SwitchItem(id)
36 $("#items").children().each(function(){
38 if(item.attr("id") == id)
40 item.css("display","block");
42 item.css("display","none");