$(window).load(function(){
if($('.tel_num')){
$('.tel_num').each(function(){
var $num = $(this).html(),
$_num = $(this).text(),
href = $_num.replace( /-/g , "").replace( / /g , "");
if(navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('Android') != -1){
$(this).html("" + $num + "");
}
});
}
});
$(function(){
//■■■■ ヘッダープルダウンOPEN&CLOSE ■■■■
$("#header_links ul li p").hide();
$("#header_links ul li").hover(function() {
if($(window).width() >= 800) $(this).children('p').slideToggle(300);
}, function() {
if($(window).width() >= 800) $(this).children('p').slideToggle(200);
});
//■■■■ スマホでのヘッダメニューOPEN&CLOSE ■■■■
$iconHead = $('.icon_headermenu');
$menuClose = $('.menu_close');
$headLinks = $('#header_links ul');
$iconHead.on('click', function(){
$headLinks.slideToggle(200);
});
$menuClose.on('click', function(){
$headLinks.slideToggle(200);
});
$headLogin = $(".head_login p");
$headLoginLinks = $(".head_login span span");
$headLoginClose = $(".head_login span span .close");
if($(window).width() < 800){
$headLoginLinks.hide();
}
$headLogin.on('click', function(){
$headLoginLinks.slideToggle(200);
$(".head_login span img").show();
});
$headLoginClose.on('click', function(){
$headLoginLinks.slideToggle(200);
});
$(window).resize(function(){
if($(window).width() < 800){
$headLoginLinks.hide();
}else{
$headLoginLinks.show();
}
});
//■■■■ カレンダーの移動 ■■■■
DefaultCalendar = 0;
CalWidth = 100;
calendarTimes = $("#calendar_all > div").length;
$calAll = $("#calendar_all");
$calPrev = $("#calendar_all div span.prev");
$calNext = $("#calendar_all div span.next");
$calAll.css("width", (calendarTimes*100) + "%" );
$("#calendar_all > div").css("width" ,(100 / calendarTimes) + "%" );
$calPrev.on('click', function(){
if( DefaultCalendar > 0){
DefaultCalendar--;
$calAll.animate({ left: -DefaultCalendar*CalWidth + "%" }, 800 );
}
});
$calNext.on('click', function(){
if( DefaultCalendar < calendarTimes - 1){
DefaultCalendar++;
$calAll.animate({ left: -DefaultCalendar*CalWidth + "%" }, 800 );
}
});
//■■■■ 左メニューカテゴリー表示 ■■■■
if($(window).width() >= 800){
$(".category span").hide();
}
$(".more_category").on('click', function(){
$(this).hide();
$(".category span").slideToggle(600);
});
//■■■■ スマホでの条件フォームOPEN ■■■■
$(".label_box h3").on('click', function(){
if($(window).width() < 800){
$(this).next("p").slideToggle(400);
if( $(this).hasClass("on") ) $(this).removeClass("on");
else $(this).addClass("on");
}
});
$(".label_box a.close").on('click', function(){
$(this).parent().slideToggle(400);
$(this).parent().prev("h3").removeClass("on");
});
//■■■■ スマホでの左メニューOPEN&CLOSE ■■■■
$(".smt_menu h2.smt").on('click', function(){
$(this).next(".side_links").slideToggle(400);
if( $(this).hasClass("on") ) $(this).removeClass("on");
else $(this).addClass("on");
});
$(".side_links h3.pulldown").on('click', function(){
$(this).next("p").slideToggle(400);
if( $(this).hasClass("on") ) $(this).removeClass("on");
else $(this).addClass("on");
});
$(".side_links a.close").on('click', function(){
$(this).parent().slideToggle(400);
if( $(this).parent().prev("h2").hasClass("on") ) $(this).parent().prev("h2").removeClass("on");
else $(this).parent().prev("h2").addClass("on");
});
/*
//■■■■ ページトップ ■■■■
var pagetop = $('#page-top');
pagetop.hide();
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
pagetop.fadeIn();
} else {
pagetop.fadeOut();
}
});
*/
});
// *******************************************************
// Link On
// *******************************************************
DomainURL = "https://www.partynavi.jp/";
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{
var location_url = location.href.match("(.+?)([\?#;].*)?$")[1];
if( location_url == menu_list[i].href ){
menu_list[i].className = "on";
if(ID == "header_links"){
menu_list[i].parentNode.style.display = "block";
}
// if(menu_list[i].parentNode.parentNode.getElementsByTagName("a")[0] && menu_list[i].href != "" ){
// menu_list[i].parentNode.parentNode.getElementsByTagName("a")[0].className = "on";
// }
}
}
}
}
// ■■■■■■■■■■■■■■■■■■■■■■■■■■■■
// 汎用ポップアップ
// ■■■■■■■■■■■■■■■■■■■■■■■■■■■■
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;
}
// ■■■■■■■■■■■■■■■■■■■■■■■■■■■■
// 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");
});