var list=[[["00:00","니세모노가타리(2012.01.08.)"],["00:30","맹렬 우주해적(파이레츠)(2012.01.08.)"],["02:00","BRAVE 10(2012.01.08.)"],["02:20","도시락 전쟁"],["07:00","벨제부브"],["07:24","포요포요 관찰일기(2012.01.08.)"],["10:55","HUNTER×HUNTER 리메이크"],["17:00","기동전사 건담 AGE"],["17:30","파이 브레인 신의 퍼즐"],["22:00","윤회의 라그랑제"],["23:00","미래일기"]],[["01:35","아쿠에리온 EVOL(2012.01.09.)"]],[["01:30","나츠메 우인장 사(2012.01.03.)"],["01:30","그 여름에서 기다릴게(2012.01.10.)"],["01:35","Another(2012.01.10.)"],["02:00","남자 고교생의 일상(2012.01.10.)"]],[["00:59","치하야후루"],["01:30","아빠 말 좀 들어라!(2012.01.11.)"]],[["01:50","신 테니스의 왕자(2012.01.05.)"],["18:00","SKET DANCE"]
["23:00","탐정 오페라 밀키홈즈 제2막(2012.01.05.)"]],[["00:45","BLACK★ROCK SHOOTER(2012.02.03.)"],["01:00","리코더와 란도셀(2012.01.06.)"],["01:15","길티 크라운"],["01:25","킬미 베이비(2012.01.06.)"],["01:30","페르소나4 the ANIMATION "],["01:55","아마가미SS+ plus(2012.01.06.)"],["02:00","이누x보쿠 SS(시크릿 서비스)(2012.01.13.)"],["11:00","하이스쿨 DxD(2012.01.06.)"],["23:00","전희절창 심포기어(2012.01.06.)"]],[["01:30","작안의 샤나Ⅲ(Final)"],["02:00","라스트 엑자일 -은빛 날개의 팜-"],["06:00","에어리어의 기사(2012.01.07.)"],["08:30","제로의 사역마 4F"],["10:30","FAIRY TAIL"],["17:30","바쿠만 2기"]],[["--","---"]]];function tab_onair(n){if(!n){n=0;}
var out="";for(var i in list[n])out+="<div><span class='time'>"+list[n][i][0]+"</span><span class='name'>"+list[n][i][1]+"</span></div>";if(jQuery("div#onair_body").length)jQuery("div#onair_body").html(out);}
var menu_news_i=0;function menu_news(i){if(menu_news_i>=comments_x16.length-1)menu_news_i=0;if(!comments_x16[menu_news_i])return;jQuery('div#wrap div#menu div.css3pie.title').html("<a href='"+comments_x16[menu_news_i][0]+"'>"+comments_x16[menu_news_i][1]+"</a>");jQuery('div#wrap div#menu div.css3pie.nick').html(comments_x16[menu_news_i][2]);menu_news_i+=1;}
var hwindows=Array(0,0,0);function hwindow(h,w){if(w=='next'){w=(hwindows[h]==1?9:hwindows[h]-1);}
else if(w=='prev'){w=(hwindows[h]==9?1:hwindows[h]+1);}
hwindows[h]=w;var hwin_size=Array(Array(106,80),Array(146,110),Array(186,140),Array(226,170),Array(300,200),Array(226,170),Array(186,140),Array(146,110),Array(106,80));var hwin_left=Array(15,82,164,246,330,488,610,732,839);var hwin_index=Array(101,102,103,104,105,104,103,102,101);switch(w){default:case 1:var hwin_src=Array(6,7,8,9,1,2,3,4,5);break;case 2:var hwin_src=Array(7,8,9,1,2,3,4,5,6);break;case 3:var hwin_src=Array(8,9,1,2,3,4,5,6,7);break;case 4:var hwin_src=Array(9,1,2,3,4,5,6,7,8);break;case 5:var hwin_src=Array(1,2,3,4,5,6,7,8,9);break;case 6:var hwin_src=Array(2,3,4,5,6,7,8,9,1);break;case 7:var hwin_src=Array(3,4,5,6,7,8,9,1,2);break;case 8:var hwin_src=Array(4,5,6,7,8,9,1,2,3);break;case 9:var hwin_src=Array(5,6,7,8,9,1,2,3,4);break;}
for(l=0;l<=8;l++){jQuery('div#tab:eq('+h+') div#hwin_'+hwin_src[l]).css({zIndex:hwin_index[l],top:5,'display':'block'}).animate({width:hwin_size[l][0],height:hwin_size[l][1],left:hwin_left[l]},'fast').fadeTo(100,0.95);}
clearInterval(hwindow_timer);hwindow_timer=setTimeout("hwindow(0,'prev')",30*1000);}
var hwindow_timer;function rank_change(i){jQuery('div#aprank ul').hide();jQuery('div#aprank ul:eq('+i+')').show();}
function tab_change(tag,i){jQuery(tag).hide();jQuery(tag+':eq('+i+')').show();}
var updatetime;function twit_read(){jQuery.ajax({type:"GET",url:"http://www.aniplaza.net/api/twit_chat.php",data:{},dataType:"json",beforeSend:function(xmlHttpRequest){},success:function(xml){var index_twit=0;var chat_text="";jQuery('div.twit_chat').empty();for(index_twit=0;index_twit<=xml.length-1;index_twit++){temp=xml[index_twit].mass;temp=temp.split("[CODE_0A]").join("&lt;").split("[CODE_0Z]").join("&gt;");temp=temp.split("[CODE_27]").join("\'").split("[CODE_28]").join("\(");temp=temp.split("[CODE_29]").join("\)").split("[CODE_2A]").join("\*");temp=temp.split("[CODE_7E]").join("\~").split("[CODE_21]").join("\!");temp=temp.split("[CODE_26]").join("\&").split("[CODE_3F]").join("\?");jQuery('div.twit_chat').prepend("<div class='twit_body vfs"+index_twit+"'><div class='first'>"+temp+"</div><div class='last'><span class='nick'>"+xml[index_twit].nick+"</span><span class='time'>"+xml[index_twit].time+"</span></div></div>");}}});}
function twit_write(){if(!jQuery("div.twit_chat_input input").val())return;var temp=jQuery("div.twit_chat_input input").val();jQuery("div.twit_chat_input input").val("");if(temp=="/clear"){jQuery('div.twit_chat').html("<div>페이지가 청소되었습니다.</div>");return;}
temp=temp.replace(/\'/gi,"[CODE_27]");temp=temp.replace(/\(/gi,"[CODE_28]");temp=temp.replace(/\)/gi,"[CODE_29]");temp=temp.replace(/\*/gi,"[CODE_2A]");temp=temp.replace(/\~/gi,"[CODE_7E]");temp=temp.replace(/\!/gi,"[CODE_21]");temp=temp.replace(/\?/gi,"[CODE_3F]");temp=temp.replace(/\&/gi,"[CODE_26]");temp=temp.replace(/\</gi,"[CODE_0A]");temp=temp.replace(/\>/gi,"[CODE_0Z]");jQuery.ajax({type:"GET",url:"http://www.aniplaza.net/api/twit_chat.php",data:{mass:temp},dataType:"text",beforeSend:function(xmlHttpRequest){},success:function(xml){twit_read();if(jQuery(xml).find("war").text())alert(jQuery(xml).find("war").text());}});}
setInterval("twit_read()",10*1000);jQuery(document).ready(function(){var timers=null;jQuery("#menu li.onsub").mouseover(function(){if(!clearInterval(timers)){if(jQuery(this).find("div.second").css("display")=="none"){jQuery("#menu div.second").hide();jQuery(this).find("div.second").slideDown(250);}}});jQuery("#menu li.onsub").mouseout(function(){clearInterval(timers);timers=setInterval('jQuery("#menu div.second").slideUp();',500);});jQuery(".right_sub_menu li").mouseover(function(){jQuery(this).css({'background-color':'#eaf6ff'},'slow');});jQuery(".right_sub_menu li").mouseout(function(){jQuery(this).css({'background-color':'#ffffff'},'fast');});menu_news(0);setInterval("menu_news();",4000);if(jQuery("div#tab").length>=1)hwindow(0,1);if(jQuery("div#aprank ul").length>=1)jQuery('div#aprank ul:eq(0)').show();});jQuery(document).ready(function(){var b=new Date();if(jQuery("div#onair").length>=1)tab_onair(b.getDay()+1);});
