//zoom change if(navigator.userAgent.indexOf('Android') > 0) { document.writeln('') }else{ document.writeln('') } /** * scrollsmoothly.js * Copyright (c) 2008 KAZUMiX * http://d.hatena.ne.jp/KAZUMiX/20080418/scrollsmoothly * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * 更新履歴 * 2009/02/12 * スクロール先が画面左上にならない場合の挙動を修正 * 2008/04/18 * 公開 * */ (function(){ var easing = 0.25; var interval = 20; var d = document; var targetX = 0; var targetY = 0; var targetHash = ''; var scrolling = false; var splitHref = location.href.split('#'); var currentHref_WOHash = splitHref[0]; var incomingHash = splitHref[1]; var prevX = null; var prevY = null; var ua =navigator.userAgent; // ドキュメント読み込み完了時にinit()を実行する if(ua.indexOf('iPhone') > -1 || ua.indexOf('iPad') > -1 || ua.indexOf('iPod') > -1){ addEvent(window, 'load', init); } // ドキュメント読み込み完了時の処理 function init(){ // ページ内リンクにイベントを設定する setOnClickHandler(); // 外部からページ内リンク付きで呼び出された場合 if(incomingHash){ if(window.attachEvent && !window.opera){ // IEの場合はちょっと待ってからスクロール setTimeout(function(){scrollTo(0,0);setScroll2('#'+incomingHash);},50); }else{ setTimeout(function(){scrollTo(0,0);setScroll2('#'+incomingHash);},200); } } } // イベントを追加する関数 function addEvent(eventTarget, eventName, func){ if(eventTarget.addEventListener){ // モダンブラウザ eventTarget.addEventListener(eventName, func, false); }else if(window.attachEvent){ // IE eventTarget.attachEvent('on'+eventName, function(){func.apply(eventTarget);}); } } function setOnClickHandler(){ var links = jQuery151("a.scroll"); for(var i=0; i 1) { // op.columnごとの最大値を格納していく if (h > hListLine[n]) { hListLine[n] = h; } if ( (i > 0) && (((i+1) % op.column) == 0) ) { n++; hListLine[n] = 0; }; } }); // 取得した高さの数値を降順に並べ替え hList = hList.sort(op.descend); hMax = hList[0]; // 高さの最大値を要素に適用 var browser = $.browser.version; if (op.column > 1) { for (var j=0; j'), //$loadingImg: $(''), $overlay: $('
'), initialize: function() { var self = this; /*this.$loadingImg.attr({ 'src': this.options.loadingImgSrc, 'class': this.options.loadingImgClassName }).appendTo(this.$overlay);*/ this.$overlay.attr({ 'class': this.options.overlayClassName}).hide().appendTo(document.body); this.$modalContainer.attr({ 'class': this.options.modalContainerClassName }).appendTo(document.body); if (this.utils.isWebkit) { this.$modalContainer.bind('webkitAnimationEnd', function() { self.hideModalContentsComplete_(); }); } this.layoutLoadingImg_(); this.layoutOverlay_(); $(window).bind('resize', function() { self.layoutLoadingImg_(); self.layoutOverlay_(); }); $(this.element).bind(this.options.triggerEvent, function(e) { //add OD var url = $(this).attr("rel"); var _href = $(this).attr("href"); //cookieがあり、wifi.htmlでない場合はそのままリンク if(1 === parseInt($.cookies('modalAlert'))&&_href.indexOf("wi-fi.html") == -1) { $(this).attr("href",url); } else { self.showModalContents(url,_href); e.preventDefault(); } }); }, layoutLoadingImg_: function() { /*var scrollY = (window.scrollY || window.pageYOffset || document.documentElement.scrollTop), windowHeight = (window.innerHeight || document.documentElement.clientHeight); this.$loadingImg.css({ 'top': Math.floor(scrollY) + Math.floor(windowHeight / 2), 'left': '50%' });*/ }, layoutOverlay_: function() { var docHeight = ($(document.body).height() < this.$bodyContainer.height()) ? this.$bodyContainer.height() : $(document.body).height(); this.$overlay.originalHeight = docHeight; this.$overlay.css({ 'height': docHeight }); }, showModalContents: function(url,_href) { //それ以外はポップアップを開く var self = this; $("object.OoyalaVideoPlayer").css("visibility","hidden"); this.layoutLoadingImg_(); this.$overlay.show(); this.scrollTop = (document.documentElement.scrollTop || document.body.scrollTop || $(window).scrollTop()); // load contents on ajax this.$modalContainer.load(this.options.url, function() { // callback $(self.options.closeModalTriggerButton).bind(self.options.closeModalTriggerEvent, function(e) { self.hideModalContents_(); e.preventDefault(); }); $("#btnYes a").bind(self.options.closeModalTriggerEvent, function(e) { $.cookies("modalAlert", null); $.cookies("modalAlert",1,{path:'/'}); self.hideModalContents_(); setTimeout(function(){window.open(url, '_self');},300); return false; }).attr("href",url); var contentsHeight = self.$modalContainer.height(); self.$overlay.toggleClass(self.options.overlayEnableClassName)/*.css({ 'height': contentsHeight })*/; self.$bodyContainer.css({ 'height': contentsHeight, 'overflow': 'hidden' }); //self.$loadingImg.hide(); window.scrollTo(0, 0); setTimeout(function() { self.$modalContainer.addClass(self.options.enableClassName).removeClass(self.options.disableClassName).show(); }, 350); }); }, hideModalContents_: function() { this.$overlay.css({ 'height': this.$overlay.originalHeight }); this.$modalContainer.addClass(this.options.disableClassName).removeClass(this.options.enableClassName); if (!this.utils.isWebkit) { this.hideModalContentsComplete_(); } }, hideModalContentsComplete_: function() { var self = this; this.modalDisplayFlag = !!(this.modalDisplayFlag) ? 0 : 1; if (!this.utils.isWebkit || this.modalDisplayFlag === 0) { this.$modalContainer.hide(); this.$overlay.toggleClass(this.options.overlayEnableClassName).fadeOut(function() { self.$bodyContainer.css({ 'height': 'auto', 'overflow': self.$bodyContainer.cssOverflow }); window.scrollTo(0, self.scrollTop); $("object.OoyalaVideoPlayer").css("visibility","visible"); //self.$loadingImg.show(); }); } }, }; })(jQuery); jQuery151(window).bind('resize load', function(){ jQuery151("html").css("zoom" , jQuery151(window).width()/640); //ボタンの高さ揃え jQuery151(".btnHeight").each(function(){ jQuery151(this).find("a").autoHeight(); }); }); jQuery151(function(){ //menuList呼び出し jQuery151("#menuList").css("display","none"); jQuery151("#btnMenu01").click(function(){ if(jQuery151("#menuList").css("display") == "none"){ jQuery151("div.modal_overlay").fadeIn(); jQuery151("#menuList").slideDown(); }; return false; }); jQuery151("a.closeMenu").click(function(){ jQuery151("#menuList").slideUp(); jQuery151("div.modal_overlay").fadeOut(); }); //selectボタン jQuery151("div.uiSelect select").change(function(index, element) { var selectVal = $(":selected",this).text(); jQuery151(this).parent().find(".txt").text(selectVal); }).change(); //modal window 呼び出し jQuery151(".openModal").smartModalWindow(); /* パネルナビゲーション ------------------------------------------*/ //toggle jQuery151(".toggleBtn").click(function(){ if(jQuery151(this).next("div").css("display") == "none"){ jQuery151(this).addClass("active").next("div").slideDown(); return false; } else { jQuery151(this).removeClass("active").next("div").slideUp(); return false; } }); /* パネルナビゲーション02 ------------------------------------------*/ //toggle jQuery151(".toggleBtn02").click(function(){ if(jQuery151(this).next("div").css("display") == "none"){ jQuery151(this).addClass("active").next("div").show(); return false; } else { jQuery151(this).removeClass("active").next("div").hide(); return false; } }); });