var BOT_URL = BOT_URL || {}; var LINK_LIST = { botlink_sr_os_review: '海外', botlink_sr_dm_review: '国内' }; var LINK_MODIFY_LIST = { botlink_dm_travelogue_list_sort_triptime: '旅行時期順', botlink_dm_travelogue_list_sort_vote: 'いいね順', botlink_dm_travelogue_list_sort_date: '新着順', botlink_dm_qa_list_sort_regdate: '新着順', botlink_dm_qa_list_sort_ans: '回答数が多い順', botlink_dm_qa_list_sort_accept: '回答受付中の質問', botlink_os_travelogue_list_sort_triptime: '旅行時期順', botlink_os_travelogue_list_sort_vote: 'いいね順', botlink_os_travelogue_list_sort_date: '新着順', botlink_os_qa_list_sort_new: '新着順', botlink_os_qa_list_sort_ans: '回答数が多い順', botlink_os_qa_list_status_all: 'すべて', botlink_os_qa_list_status_accept: '回答受付中の質問', botlink_os_review_dtl_sort_relevance: '標準', botlink_os_review_dtl_sort_time: '旅行時期順', botlink_os_review_dtl_sort_reference: 'いいね順', botlink_os_review_dtl_sort_evaluate: '満足度が高い順', botlink_os_review_dtl_sort_date: '新着順', botlink_dm_review_dtl_sort_time: '旅行時期順', botlink_dm_review_dtl_sort_reference: 'いいね順', botlink_dm_review_dtl_sort_evaluate: '満足度が高い順', botlink_dm_review_dtl_sort_date: '新着順', botlink_os_pict_dtl_sort_new: '新着順', botlink_os_pict_dtl_sort_time: '旅行時期順', botlink_dm_pict_dtl_sort_new: '新着順', botlink_dm_pict_dtl_sort_time: '旅行時期順', botlink_os_qa_dtl_sort_date: '新着順', botlink_os_qa_dtl_sort_ans: '回答数が多い順', botlink_dm_qa_dtl_sort_date: '新着順', botlink_dm_qa_dtl_sort_ans: '回答数が多い順' }; $(document).ready(function() { if ($('#travelogue_dm_condition').length) { BOT_URL.dm_travelog_list(); } if ($('#travelogue_os_condition').length) { BOT_URL.os_travelog_list(); } if ($('#search_menu_menu_list').length) { BOT_URL.dm_hotel_search_menu(); } if ($('#gloval_footer_link').length) { BOT_URL.gloval_footer_link(); } if ($('#gloval_footer_traveler').length) { BOT_URL.gloval_footer_traveler(); } if ($('#gloval_footer_going').length) { BOT_URL.gloval_footer_going(); } if ($('#gloval_footer_blogparts').length) { BOT_URL.gloval_footer_blogparts(); } if ($('#current_status_url, #current_url').length) { $.each(LINK_MODIFY_LIST, function(key, tag){ if ($('#' + key).length) { url = $('#current_url').val(); html = tag.replace('%%URL%%', url); $('#' + key).html(html); } }); } $.each(LINK_LIST, function(key, tag){ if ($('#' + key).length) { $('#' + key).html(tag); } }); if ($('[id ^= botlink_dm_replink-]').length) { $('[id ^= botlink_dm_replink-]').each(function() { inner_html = $('#' + this.id).html(); url = document.URL.replace('#contents_inner', ''); list=this.id.split("-"); html = '' + inner_html + ''; $('#' + this.id).html(html); }); } if ($('[id ^= toSearchAirticket_]').length) { $('[id ^= toSearchAirticket_]').each(function() { inner_html = $('#' + this.id).html(); id_name = this.id.split('_'); url = '/os_airticket_search/?f=area'; url += '®ion_cd1='; url += (id_name[1] != 0) ? id_name[1] : ''; url += '&country_cd1='; url += (id_name[2] != 0) ? id_name[2] : ''; url +='&city_cd1='; url += (id_name[3] !=0) ? id_name[3] : ''; url += (typeof id_name[4] != "undefined" && id_name[4] !=0) ? '&d_city=' + id_name[4] : ''; url += (typeof id_name[5] != "undefined" && id_name[5] !=0) ? '&carr_code[]=' + id_name[5] : ''; html = '' + inner_html + ''; $('#' + this.id).html(html); }); } if ($('#dm_hotel_top_rep_list').length) { BOT_URL.dm_hotel_top_rep_list(); } if ($('#guide_header_02 .header_nav').length) { BOT_URL.category_header(); } if ($('#catalog_stand_ajax').length) { BOT_URL.catalog_stand(); } // クチコミ BOT_URL.setPostFormSubmit( '#bot_tips_link_form', '.bot_tips_link', ['sort', 'page']); // 海外クチコミ BOT_URL.setPostFormSubmit( '#bot_os_tips_link_form', '.bot_os_tips_link', ['page', 'category1', 'category2', 'category3']); // 旅行記 BOT_URL.setPostFormSubmit( '#bot_travelogue_link_form', '.bot_travelogue_link', ['sort', 'page']); // 国内QA BOT_URL.setPostFormSubmit( '#bot_qa_link_form', '.bot_qa_link', ['sort', 'sta', 'page', 'category']); // 海外QA BOT_URL.setPostFormSubmit( '#bot_os_qa_link_form', '.bot_os_qa_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外QA Wi-Fiスポット BOT_URL.setPostFormSubmit( '#bot_os_qa_wifispot_link_form', '.bot_os_qa_wifispot_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外QA Wi-Fiレンタル BOT_URL.setPostFormSubmit( '#bot_os_qa_wifirental_link_form', '.bot_os_qa_wifirental_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外QA SIMカード BOT_URL.setPostFormSubmit( '#bot_os_qa_sim_link_form', '.bot_os_qa_sim_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外QA 国際ローミング(携帯電話) BOT_URL.setPostFormSubmit( '#bot_os_qa_roaming_link_form', '.bot_os_qa_roaming_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外QA その他通信事情 BOT_URL.setPostFormSubmit( '#bot_os_qa_netother_link_form', '.bot_os_qa_netother_link', ['sort', 'status', 'page', 'category1', 'category2', 'category3']); // 海外国階層ランキングページ BOT_URL.setPostFormSubmit( '#bot_os_category_ranking_form', '.bot_os_category_ranking', ['page']); // スポット周辺ホテル BOT_URL.setPostFormSubmit( '#bot_nearly_search_form', '.bot_nearly_search_link', ['sort']); }); BOT_URL.setPostFormSubmit = function(form_name, link_name, params) { var links = $(link_name); if (!links.length) { return; } $(links).click(function () { var target = $(this); $(params).each(function(index) { var param = params[index]; $(form_name + ">[name='" + param + "']").val(target.data(param)); }) $(form_name).submit(); }); } BOT_URL.dm_travelog_list = function() { path = BOT_URL.array_compact([(chiho_name_file) ? chiho_name_file : '', (todofuken_name_file) ? todofuken_name_file : '', (shigun_name_file) ? shigun_name_file : '', (kuchoson_name_file) ? kuchoson_name_file : '' ]); var base_url = 'http://sr.4travel.jp/domestic/area/' + path + '/search/travelogue/'; year_html = ""; for (i=0; i <5; i++) { var d = new Date(); trip_year = d.getFullYear() - i; last_tag = (i == 4) ? ' class="last"' : ''; year_html += '' + trip_year + '年'; } html = [ '

' + area_name + 'の旅行記を条件別に探す

', '
年別で探す
', '
    ', year_html, '
', '
', '
', '
', '
月別に探す
', '(旅行に出発した月)
', '
', '', '
', '
', '
', '
テーマから探す
', '
', '', '
', '
', '
', '
同行者から探す
', '
', '', '
', '
', ].join(''); $('#travelogue_dm_condition').html(html); } BOT_URL.os_travelog_list = function() { path = ""; if (area_type == 'CITY') { path = 'city' + '/' + city_url; } else if (area_type == 'COUNTRY') { path = 'country' + '/' + country_name_e; } else if (area_type == 'STATE') { path = 'state' + '/' + state_islands_url; } else if (area_type == 'STATE_ISLANDS') { path = 'state' + '/' + state_islands_url; } else if (area_type == 'SPOT') { path = 'spot' + '/' + spot_url; } var base_url = 'http://sr.4travel.jp/overseas/area/' + path + '/search/travelogue/'; year_html = ""; for (i=0; i <5; i++) { var d = new Date(); trip_year = d.getFullYear() - i; last_tag = (i == 4) ? ' class="last"' : ''; year_html += '' + trip_year + '年'; } html = [ '

' + area_name + 'の旅行記を条件別に探す

', '
', '
年別で探す
', '
', '
    ', year_html, '
', '
', '
', '
', '
月別に探す
', '(旅行に出発した月)
', '
', '', '
', '
', '
', '
テーマから探す
', '
', '', '
', '
', '
', '
同行者から探す
', '
', '', '
', '
' ].join(''); $('#travelogue_os_condition').html(html); } BOT_URL.array_compact = function(array_data) { ar =$.grep(array_data, function(value, i) { return (value != ""); }).join('/'); return ar; } BOT_URL.dm_hotel_search_menu = function() { var html = ""; for(var i in amenity_list){ if(amenity_list[i].current=="current"){ html = html +'
  • '; }else{ html = html +'
  • '; } html = html + amenity_list[i].name + '
  • ' } $('#search_menu_menu_list').html(html); } BOT_URL.gloval_footer_link = function() { html = ""; html = html + 'リンク集'; $('#gloval_footer_link').html(html); } BOT_URL.gloval_footer_traveler = function() { html = ""; html = html + 'トラベラーランキング '; $('#gloval_footer_traveler').html(html); } BOT_URL.gloval_footer_going = function() { html = ""; html = html + '行ってきま~す'; $('#gloval_footer_going').html(html); } BOT_URL.gloval_footer_blogparts = function() { html = ""; html = html + 'ブログパーツ '; $('#gloval_footer_blogparts').html(html); } BOT_URL.dm_hotel_top_rep_list = function() { var html = ""; html += ''; html += ''; for(var i in hotel_rep_list){ if (i == 0) { html += ''; } html += ''; html += ''; if (i == (hotel_rep_list.length - 1)) { html += ''; } else if((i % 2) == 1) { html += ''; } } html += '
    料金比較ができる宿泊予約サイト
    ' + hotel_rep_list[i].rep_name + ''; html += '

    '; switch (hotel_rep_list[i].rep_code) { case "HR001": html += '日本最大の宿泊予約サイトです。楽天ポイントで還元あり。'; break; case "HR002": html += '国内旅行雑誌でおなじみの「じゃらん」のネット版です。ポイント還元あり。'; break; case "HR006": html += '日本旅行が運営。ポイント還元あり。'; break; case "HR007": html += '全国のビジネスホテルに特化した予約サイトです。'; break; case "HR030": html += '近畿日本ツーリストが運営。ポイント還元あり。'; break; case "HR015": html += '業界最大手のJTBが運営しているので安心です。'; break; case "HR019": html += '全国約3000軒のホテル・旅館の予約が可能です。'; break; case "HR021": html += 'お得な宿・ホテル予約サイト。泊まって当たるキャンペーンを毎月実施中!'; break; case "HR013": html += '大手旅行会社ならではの充実の品揃え。憧れのあのお宿もご用意しています'; break; case "HR029": html += '阪急限定プラン満載!当社情報誌でご案内している人気施設もご案内!'; break; case "HR020": html += '高級ホテル・旅館を最大80%OFFで宿泊予約。'; break; case "HR004": html += '厳選のホテル・旅館の予約は一休.com。一休限定のお得なプラン満載!'; break; case "HR031": html += '全国のホテル・温泉旅館を簡単予約。旅行会社ならではのオリジナルプラン多数!'; break; case "HR033": html += '人気の高い湯布院・黒川温泉をはじめ九州各地にある予約可能な温泉宿を紹介'; break; case "HR034": html += '昨年百万超の旅行者が利用!'; break; case "HR035": html += 'ドコモ以外のお客様もポイントが貯まる・使える!当日限定や直前割プランも'; break; case "HR036": html += 'H.I.S.の宿泊予約サイト。会員登録すればポイントを即時利用できる!'; break; case "HR032": html += "ホテルはすべて最低価格保証!"; break; } html += '

    '; html += '
    '; $('#dm_hotel_top_rep_list').html(html); } BOT_URL.category_header = function() { if ((typeof HEADER_PARAMS == "undefined") || !HEADER_PARAMS) { return; } // area banner html = ""; html += '
    '; if (HEADER_PARAMS.dmos == 'dm') { html += ''; if (HEADER_PARAMS.use_header_link) { html += ''; } html += HEADER_PARAMS.search_area_name + ' クチコミガイド'; if (HEADER_PARAMS.use_header_link) { html += ''; } html += ''; } else { if (HEADER_PARAMS.country_img_url) { html += ''+ HEADER_PARAMS.country_name + ''; } html += ''+ HEADER_PARAMS.search_area_name + ' クチコミガイド'; } html += '
    '; $('#guide_header_02 .header_balloon').html(html); // menu html = ""; html += '
    '; html += ''; var add_class = ''; if (HEADER_PARAMS.kankospot_url || HEADER_PARAMS.restaurant_url || HEADER_PARAMS.shopping_url || HEADER_PARAMS.transport_url) { html += '
      '; if (HEADER_PARAMS.kankospot_url) { add_class = ''; if (!HEADER_PARAMS.restaurant_url && !HEADER_PARAMS.shopping_url && !HEADER_PARAMS.transport_url) { add_class = ' class="end"'; } html += '観光'; } if (HEADER_PARAMS.restaurant_url) { add_class = ''; if (!HEADER_PARAMS.shopping_url && !HEADER_PARAMS.transport_url) { add_class = ' class="end"'; } html += 'グルメ・レストラン'; } if (HEADER_PARAMS.shopping_url) { add_class = ''; if (!HEADER_PARAMS.transport_url) { add_class = ' class="end"'; } html += 'ショッピング'; } if (HEADER_PARAMS.transport_url) { html += '
    • 交通
    • '; } html += '
    '; } if (HEADER_PARAMS.hotel_url || HEADER_PARAMS.tour_url || HEADER_PARAMS.airticket_url) { html += '
      '; if (HEADER_PARAMS.hotel_url) { add_class = ''; if (!HEADER_PARAMS.tour_url && !HEADER_PARAMS.airticket_url) { add_class = ' class="end"'; } html += 'ホテル'; } if (HEADER_PARAMS.tour_url) { add_class = ''; if (!HEADER_PARAMS.airticket_url && HEADER_PARAMS.dmos == 'os') { add_class = ' class="end"'; } html += 'ツアー'; } if (HEADER_PARAMS.airticket_url) { html += '
    • 航空券
    • '; } if (HEADER_PARAMS.dmos == 'dm'){ html += '
    • 航空券
    • '; } html += '
    '; } if (HEADER_PARAMS.album_url || HEADER_PARAMS.question_url) { html += '
      '; if (HEADER_PARAMS.album_url) { add_class = ''; if (!HEADER_PARAMS.question_url) { add_class = ' class="end"'; } html += '旅行記'; } if (HEADER_PARAMS.question_url) { html += '
    • Q&A
    • '; } html += '
    '; } html += '
    '; $('#guide_header_02 .menu').html(html); // search form html = ""; html += '
    '; html += ''; html += '×'; html += ''; html += ''; html += ''; html += ''; html += '
    '; $('#guide_header_02 .search').html(html); } BOT_URL.catalog_stand = function() { html = ""; html = html + '

    ' + catalog_stand_val.alt + '

    '; html = html + '

    ' + catalog_stand_val.sup_name + '' + catalog_stand_val.sup_tile + '

    '; $('#catalog_stand_ajax').html(html); }