/* カスタマイズ用のJavaScriptコードをここに記述してください */
function searchGps() {
document.formGps.submit();
}
function searchAdcd(adcd) {
document.formAddrL.adcd.value = adcd;
document.formAddrL.submit();
}
function searchGps() {
/* custSearchTopSubmit(document.formGps); */
ZdcEmapMakeGPSCondParams(document.formGps);
document.formGps.submit();
}
/*
function searchAdcd(adcd) {
custSearchTopSubmit(document.formAddrL);
document.formAddrL.adcd.value = adcd;
document.formAddrL.submit();
}
*/
function searchAdcd(lat, lon) {
/* custSearchTopSubmit(document.formAddrL); */
document.formAddrL.lat.value = lat;
document.formAddrL.lon.value = lon;
document.formAddrL.submit();
}
function searchAdcdMdl(lat, lon) {
/* custSearchTopSubmit(document.formCond); */
document.formCond.lat.value = lat;
document.formCond.lon.value = lon;
document.formCond.submit();
}
/* 絞込み、再検索(地図画面) */
function custCondReSearchMap(lat, lon) {
/* custSearchTopSubmit(document.formCondModal); */
document.formCondModal.lat.value = lat;
document.formCondModal.lon.value = lon;
document.formCondModal.submit();
}
/* 絞込条件 */
function custSearchTopSubmit(frm) {
var cnd_chk,cnd_hid;
cnd_chk = "";
cnd_hid = "";
var frmCond = document.formCond;
if (frmCond) {
for (i=1; i<=(frmCond.length + 1); i++) {
cnd_chk = eval("frmCond.cond"+i);
cnd_hid = eval("frm.cond"+i);
if (cnd_chk && cnd_hid) {
if (cnd_chk.checked) cnd_hid.value = cnd_chk.value;
else cnd_hid.value = "";
}
}
}
var fil;
var fil_list = frmCond.plfilter;
if (fil_list) {
if (fil_list.type == "select-one") {
fil = fil_list.options[fil_list.selectedIndex].value;
} else {
fil = fil_list.value;
}
if (frm.plfilter) {
frm.plfilter.value = fil;
}
if (frm.filter) {
frm.filter.value = fil;
}
}
}
$(function(){
/*------------ TOPのタブ切り替え ------------*/
(function changeSearchType() {
var $nav_list = $(".local-nav-01 li");
if (!$nav_list.length) return;
var $contents = $(".wrap_tabs > section");
var idx = $nav_list.index($nav_list.filter(".is-current"));
if (idx < 0) idx = 0;
$contents.hide();
$contents.eq(idx).show();
$nav_list.on("click", function() {
var idx = $nav_list.index(this);
$nav_list.removeClass("is-current");
$(this).addClass("is-current");
$contents.hide();
$contents.eq(idx).show();
});
}());
/*------------ FW検索結果のタブ切り替え ------------*/
(function changeFWResult() {
var $nav_list = $(".local-nav-02 li");
if (!$nav_list.length) return;
var $contents = $(".wrap_tabs > section");
var idx = $nav_list.index($nav_list.filter(".is-current"));
if (idx < 0) idx = 0;
$contents.hide();
$contents.eq(idx).show();
$nav_list.on("click", function() {
var idx = $nav_list.index(this);
$nav_list.removeClass("is-current");
$(this).addClass("is-current");
$contents.hide();
$contents.eq(idx).show();
});
}());
/*------------ 条件で絞りこむのトグル/都道府県のトグル ------------*/
(function toggleList() {
var $list = $(".js-toggle-01 dd");
if (!$list.length) return;
$list.hide();
$(".js-toggle-01 dt").on("click", function() {
$(this).toggleClass("is-close");
$(this).next().toggle();
});
}());
});