function joshwurlencode(str){return str.replace(/\?/g,'%3F').replace(/\&/g,'%26');}
$(document).ready(function(){if(top.location.href==window.location.href&&!top.location.href.match(/\/bgm/)){window.location.replace('/bgm'+joshwurlencode(top.location.href.replace(/^https?:\/\/[^\/]+/,'')));}
if(top.framePlayer.document.body.innerHTML==''){return;}
$('<img id="bgmIcon" src="/common/images/pause.png" alt="Stop Music">').css('position','absolute').css('right','30px').css('top','30px').css('cursor','pointer').click(function(){top.framePlayer.document.body.innerHTML='';$(this).fadeOut('slow');}).appendTo('body');});;$(document).ready(function(){var size=300;while($('#logo').width()>400){size=size*.95;$('#logo').css('font-size',size+'%');if(size<10){break;}}
var totalHdrWidth=$('#site-title').width();var unusableHdrWidth=$('#logoImg').width()+$('#logo').width();var extraWidth=totalHdrWidth-unusableHdrWidth-35;var $hd=$('#header .headline');size=140;while($hd.width()>extraWidth){size=size*.95;$hd.css('font-size',size+'%');if(size<10){break;}}});;function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function recacheOddEven(){$('table.etable').each(function(){$(this).find('tr').removeClass('odd');$(this).find('tr:even').addClass('odd');});}
$(document).ready(function(){$('ul.menu').children().filter('LI').each(function(){$(this).mouseover(function(){$(this).addClass('over');}).mouseout(function(){$(this).removeClass('over');});});$('table.etable TR').hover(function(){$(this).find('td').addClass('etableHover');},function(){$(this).find('td').removeClass('etableHover');}).addClass('etableLineBetweenRows').filter(':first').removeClass('eTableLineBetweenRows');recacheOddEven();$('#breadcrumb A[href=/]').css('font-weight','bold');});