var _hn;$(function(){if(location.hostname){_hn="http://"+location.hostname+"/"}if(!location.hostname||_hn=="http://127.0.0.1/"){_hn="http://www.depachika.com/"}$("#hNav .nav1 .end").text(getNowDate());$("p#showSwitch a").toggle(showMoreTopics,hideMoreTopics);setUpNetworkMenu();var a=new Image();a.src=BASE_URI+"/img/extras/circle_ball.gif";$("input,textarea").each(function(b,c){$(c).focus(delKeyNav);$(c).blur(addKeyNav)});$("p.page_top").css({cursor:"pointer",color:"#333"}).hover(function(){$(this).css({color:"#777",textDecoration:"underline"})},function(){$(this).css({color:"#333",textDecoration:"none"})}).click(function(){pageScroll()});if($.browser.msie&&$.browser.version.indexOf("7")>-1){$("#headBanner .banner > object").css({marginTop:"10px",marginBottom:"10px"})}$("#headBanner .banner > div > embed").css({marginLeft:"auto",marginRight:"auto"});$("#report a").each(function(c,d){var b=$(d).attr("href");if(b!=undefined&&b.indexOf("jpg")>-1){$(this).lightBox({overlayBgColor:"#fff",overlayOpacity:0.6,imageLoading:BASE_URI+"/img/extras/circle_ball.gif",imageBtnClose:BASE_URI+"/img/extras/lightbox-btn-close.gif"})}});addKeyNav()});function addKeyNav(){$(document).keydown(keyNav)}function delKeyNav(){$(document).unbind("keydown")}function keyNav(b){if(!b.ctrlKey&&!b.metaKey){switch(b.keyCode){case 84:var a=decodeURIComponent(BASE_URI)+"/";location.href=a;break;case 72:pageScroll();break;case 65:if($("#showAllItems").attr("href")!=undefined){location.href=$("#showAllItems").attr("href")}break;case 80:if($("#prevItemLink").attr("href")!=undefined){location.href=$("#prevItemLink").attr("href")}break;case 78:if($("#nextItemLink").attr("href")!=undefined){location.href=$("#nextItemLink").attr("href")}break;case 73:if($("#thisItemLink").attr("href")!=undefined){location.href=$("#thisItemLink").attr("href")}break;case 66:if(location.href.indexOf("archives")<0){if($("#thisPhotoLink").attr("href")!=undefined){location.href=$("#thisPhotoLink").attr("href")}else{if(_photoID!=undefined){location.href=decodeURIComponent(BASE_URI)+"/headline/photo/"+_photoID+"/"}}}break;case 77:if($("#thisMapLink").attr("href")!=undefined){location.href=$("#thisMapLink").attr("href")}break;case 83:if($("ul#moreTopics").css("display")=="none"){showMoreTopics()}else{hideMoreTopics()}break}}}function setUpNetworkMenu(){$.each($("ul#network_list li a"),function(){var a=$(this).attr("href");if(a!=_hn){setMenu($(this).parent(),a)}else{$(this).parent().css("background-position","0 -20px").children().each(function(){$(this).css("color","#fff")})}})}function setMenu(b,a){$(b).css("cursor","pointer").hover(function(){$(this).css("background-position","0 -20px");$(this).children().each(function(c,d){$(d).css("color","#fff")})},function(){$(this).css("background-position","0 0");$(this).children().each(function(c,d){$(d).css("color","#333")})}).click(function(){location.href=a})}function getNowDate(){var a=new Array("（日）","（月）","（火）","（水）","（木）","（金）","（土）");var b=new Date();return b.getFullYear()+"年"+(b.getMonth()+1)*1+"月"+b.getDate()+"日"+a[b.getDay()]}function openWindow(d,c,a,b){options="width="+c+",height="+a+","+b;window.open(d,"",options)}function hideMoreTopics(){$("ul#moreTopics").slideUp("normal",function(){$("p#showSwitch a").html("もっと見る")})}function showMoreTopics(){$("ul#moreTopics").slideDown("slow",function(){$("p#showSwitch a").html("折りたたむ")})}function pageScroll(){$.scrollTo($("#base"),400)}function checkData(b){var a=$("input[name='search_word']");if(!a.val()){a.css("background-color","#ff6");return false}return true}function divDisplay(a){if(arguments.length<1){a="trackback_articles"}$("#"+a+":visible").fadeOut("normal");$("#"+a+":hidden").fadeIn("slow")}function checkTrackbackList(){var a="";var b=document.referrer;a=b.match("trackbacks.html$");$("div#trackback").ScrollTo(400)}function commentDisplay(c,a,b){$("#"+c).toggle("normal")}function commentInsert(a){window.open()};