// ******************************************************* //   Link On // ******************************************************* DomainURL = "http://www.exeo-jichitai.com/"; function link_on(ID,FolderFlag){ menu_list = document.getElementById(ID).getElementsByTagName("a"); for(i=0; i if( FolderFlag ){ if( location.href == DomainURL && menu_list[i].href == DomainURL ){ menu_list[i].className = "on"; }else if( location.href.indexOf(menu_list[i].href) != -1 && menu_list[i].href != DomainURL ){ menu_list[i].className = "on"; } }else{ if( location.href == menu_list[i].href ){ menu_list[i].className = "on"; menu_list[i].parentNode.style.display = ""; if(menu_list[i].parentNode.parentNode.getElementsByTagName("h3")[0] && menu_list[i].href != "" ){ menu_list[i].parentNode.parentNode.getElementsByTagName("h3")[0].className = "on"; } } } } } // ******************************************************* //   トップページ 最新パーティー切り替え // ******************************************************* new_party_selectID = "party_touhoku"; function new_party_select(ID,ele){ Links = document.getElementById("new_party_links").getElementsByTagName("a"); for(var i in Links) Links[i].className = ""; document.getElementById(new_party_selectID).style.display = "none"; document.getElementById(ID).style.display = ""; ele.className = "on"; new_party_selectID = ID; } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //    窓 Open Close // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ function openclose(ID){ if(document.getElementById(ID).style.display == "none"){ document.getElementById(ID).style.overflow = "hidden"; document.getElementById(ID).style.display = ""; BoxHeight = document.getElementById(ID).offsetHeight; document.getElementById(ID).style.height = "0px"; for(i=1; i<=10; i++){ setTimeout("document.getElementById('" + ID + "').style.height='" + (BoxHeight/10)*i + "px'" , i*10 ); } setTimeout("document.getElementById('" + ID + "').style.height=''" , 110 ); }else{ BoxHeight = document.getElementById(ID).offsetHeight; document.getElementById(ID).style.overflow = "hidden"; for(i=1; i<=10; i++){ setTimeout("document.getElementById('" + ID + "').style.height='" + ((BoxHeight/10)*(10 - i)) + "px'" , i*10 ); } setTimeout("document.getElementById('" + ID + "').style.height=''" , 110 ); setTimeout("document.getElementById('" + ID + "').style.display='none'" , 110 ); } } function open_menu(Obj){ Parents = Obj.parentNode; Ptag = Parents.getElementsByTagName("p"); if(Ptag[0].style.display == "none"){ Ptag[0].style.overflow = "hidden"; Ptag[0].style.display = ""; BoxHeight = Ptag[0].offsetHeight -20; Ptag[0].style.height = "0px"; for(i=1; i<=10; i++){ setTimeout("Ptag[0].style.height='" + (BoxHeight/10)*i + "px'" , i*20 ); } setTimeout("Ptag[0].style.height=''" , 210 ); Obj.className = "on" }else{ BoxHeight = Ptag[0].offsetHeight -10; Ptag[0].style.overflow = "hidden"; for(i=1; i<=10; i++){ setTimeout("Ptag[0].style.height='" + ((BoxHeight/10)*(10 - i)) + "px'" , i*20 ); } setTimeout("Ptag[0].style.height=''" , 210 ); setTimeout("Ptag[0].style.display='none'" , 210 ); Obj.className = ""; } } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //   汎用ポップアップ // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ function w_open( URL , winX , winY ){ window.open( URL ,"_blank","width=" + winX + ",height=" + winY + ",location=no,menubar=no,scrollbars=yes,status=no,toolbar=no"); } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //    画像切り替え // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ function pic_change(selfID,targetID){ document.getElementById( targetID ).src = document.getElementById( selfID ).src; } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //   スケジュールページ 道案内切り替え // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ function route_change( Num,MaxNUM ){ document.getElementById("route_" + Num).style.display = ""; for( i = 1; i<=MaxNUM; i++ ){ if( i != Num ) document.getElementById("route_" + i).style.display = "none"; } } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //   周辺駐車場切り替え // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ function map_change( Num,MaxNUM ){ document.getElementById("parking_" + Num).style.display = ""; for( i = 1; i<=MaxNUM; i++ ){ if( i != Num ) document.getElementById("parking_" + i).style.display = "none"; } } // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //    jQuery スムーズスクロール // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (function($){ $.extend({ smoothAnchors : function(speed, easing, redirect){ speed = speed || "fast"; easing = easing || null; redirect = (redirect === true || redirect == null) ? true : false; $("a").each(function(i){ var url = $(this).attr("href"); if(url){ if(url.indexOf("#") != -1 && url.indexOf("#") == 0){ var aParts = url.split("#",2); var anchor = $("a[name='"+aParts[1]+"']"); if(anchor){ $(this).click(function(){ if($(document).height()-anchor.offset().top >= $(window).height() || anchor.offset().top > $(window).height() || $(document).width()-anchor.offset().left >= $(window).width() || anchor.offset().left > $(window).width()){ $('html, body').animate({ scrollTop: anchor.offset().top, scrollLeft: anchor.offset().left }, speed, easing, function(){ if(redirect){ window.location = url } }); } return false; }); } } } }); } }); })(jQuery); $(document).ready(function(){ $.smoothAnchors("fast"); });