/* * Copyright (c) DESIGN inc. All Rights Reserved. * http://www.design-inc.jp/ * */ jQuery(function($){ // liとtrの奇数・偶数・最初・最後にクラス付与(odd, even, first, last) $('li:nth-child(odd), tr:nth-child(odd)').addClass('odd'); $('li:nth-child(even), tr:nth-child(even)').addClass('even'); $('li:first-child, tr:first-child').addClass('first'); $('li:last-child, tr:last-child').addClass('last'); // ページ内スクロール $('a.scroll').click(function(){ $('html,body').animate({scrollTop: $($(this).attr('href')).offset().top }, {'duration': 400, 'easing': 'easeOutCubic', 'queue': false}); return false; }); // 外部リンクに「target="_blank"」付与(クラス「a.noblank以外」) $('a[href^=http]').not('[href*="'+location.hostname+'"]').not('a.noblank').attr('target', '_blank'); // jquery.rollOver.js $.fn.rollOver({ selectorFade: '.ro-fade img, .ro-fade input, a[rel$="shadowbox"] img', animateTime: 300, fadeOpacity: 0.7, easing: 'easeOutCubic' }); // jquery.fullSlide.js(メインイメージ) $('#slideshow').fullSlide({ animateTime: 600, interval: 5000, easing: 'easeOutCubic', transition: 'fade', // fade,vslide,hslide auto: 'on', // on,off(自動スライド) stop: 'on', // on,off(hover時に停止、autoがonの時のみ指定可) hslideLoop: 'on' // on,off(無限ループ、hslideのみ有効) }); // jquery.customScroll.js $('.scroll-area').customScroll({ animateTime: 300, easing: 'easeOutCubic', scrollTimes: 100 }); // jquery.droppy.js $('.gnav-ul').droppy(); // fixHeight.js $('.fixHeight').fixHeight(); // アコーディオン $('.level2').mouseover(function() { $('.level2').next().stop(true).slideUp(); $(this).next().slideToggle(); }).next().hide(); // パンクズ $('.bread').prependTo('#content-inner').show(); // blog-calendar取得 $('#blog-calendar').load($('#blog-calendar').attr('title')); // blog-calendar切替 $('#blog-calendar .calendar-head a').live('click', function(){ $('#blog-calendar').load($(this).attr('href')); return false; }); // jquery.slideImage.js(CUBE詳細ページ) $('.detailpage-left').slideImage({ thumbnailWidth: 60, animateTime: 300, easing: 'easeOutCubic' }); // jquery.bxSlider.min.js /* commented out by toguchi 2014-03-04 /* $('#slider1').bxSlider({ auto: true, autoControls: true, displaySlideQty: 6 }); */ // Googleマップを.googlemapに挿入 // カスタマイズこちらを参照(http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html) if($('.googlemap').length){ var lat = '35.621905'; var lng = '139.71932'; if (lat && lng) { var latlng = new google.maps.LatLng(lat, lng); var mapOptions = { zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, panControl: true, // 移動コントロール zoomControl: true, // ズームコントロール mapTypeControl: true, // マップタイプ scaleControl: false, // スケール streetViewControl: true // ストリートビューペグマン }; $('.googlemap').each(function(i){ var map = new google.maps.Map($('.googlemap').get(i), mapOptions); var marker = new google.maps.Marker({map: map, position: latlng}); var styleOptions = [{ featureType: 'all', // all, road, road.local, etc... elementType: 'labels', // all, labels, geometry, geometry.fill, etc… stylers: [ {visibility: 'on'} // 表示(on, simplified, off) ] }, { featureType: 'all', elementType: 'geometry', stylers: [ {visibility: 'on'}, // 表示(on, simplified, off) {saturation: '0'}, // 彩度(-100~100) {lightness: '0'}, // 明度(-100~100) {gamma: '1.0'} // ガンマ(0.01~10.0) ] }]; var lopanType = new google.maps.StyledMapType(styleOptions); map.mapTypes.set('noText', lopanType); map.setMapTypeId('noText'); }); } else { $('.googlemap').remove(); } } // PCサイトのフッターにスマホサイトへのリンク var userAgent = navigator.userAgent; if ((userAgent.indexOf('iPhone') > 0 && userAgent.indexOf('iPad') == -1) || userAgent.indexOf('iPod') > 0 || userAgent.indexOf('Android') > 0 ) { $('body').append(''); } });