// // window解像度に比例してデバイスフォントのQ数を変化させる (2013-08-22:yagi) // (function($){ $.fn.fitText = function( kompressor, options ) { var settings = { 'minFontSize' : Number.NEGATIVE_INFINITY, 'maxFontSize' : Number.POSITIVE_INFINITY }; return this.each(function(){ var $this = $(this); var compressor = kompressor || 1; if ( options ) { $.extend( settings, options ); } var resizer = function () { $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); }; resizer(); $(window).resize(resizer); }); }; })(jQuery); $(function() { // CommonTitle $(".commonTitle").fitText(2.8); $("#page_title h2").fitText(2.8); // CommonNavigation $(".oneColumnNavi-withIcon ul li").fitText(2.6); $(".accordionNavi .category a").fitText(2.8); // Unused // $("#siteFooter li").fitText(2.2); // $(".twoColumnNavi li").fitText(2.2); // $("#latestNews li").fitText(2.8); // $(".article .title").fitText(3.8); }); // // フッターアコーディオンナビゲーション (2013-08-22:yagi) // $(function() { Accordion = function(){}; Accordion.prototype = { // ナビ一部初期開示用 getHash : function() { var flag = []; var hash; var hashes = window.location.href.slice(window.location.href.indexOf("?") + 1).split("&"); for ( var i = 0; i < hashes.length; i += 1 ) { hash = hashes[i].split("="); flag.push(hash[0]); } if ( flag == "bland" ) { var $flag = $(".flag-bland"); $flag.find(this.target).css({ "display":"block" }); $(window).scrollTop($flag.offset().top); } }, // ナビ開閉 openAndClose : function() { var that = this; this.$button.click(function() { var o = $(this).next(this.target); o.slideToggle(that.speed, that.switchArrow); }); }, // アロー表示切替 switchArrow : function() { var o = $(this).prev(this.button); if ( $(this).css("display") === "none" ) { o.css({ "background-image":"url(/smt/common/images/re/arrow3.png)" }); } else if ( $(this).css("display") === "block" ) { o.css({ "background-image":"url(/smt/common/images/re/arrow3_on.png)" }); } }, // 初期化 init : function( model, button, target, speed ) { this.model = model; this.button = button; this.target = target; this.$model = $(this.model); this.$button = this.$model.find(this.button); this.$target = this.$model.find(this.target); this.speed = speed; this.openAndClose(); this.getHash(); } }; var accordion = new Accordion(); accordion.init( "section.accordionNavi", "div.category", "div.toggleList", 1000 ); }); // // 追記 (2012-06-04:yamashita) // function getRequest(){ if(location.search.length > 1) { var get = new Object(); var ret = location.search.substr(1).split("&"); for(var i = 0; i < ret.length; i++) { var r = ret[i].split("="); get[r[0]] = r[1]; } return get; } else { return false; } } $(function() { var Ua = navigator.userAgent; var get = getRequest(); if(get['app'] != '1') { if(Ua.search(/Android/) != -1){ $('ローソン公式アプリダウンロード').appendTo($('#siteFooter p')); } if(Ua.search(/iPod/) != -1){ $('#siteFooter p').remove(); } // iphoneのみアプリ不具合発生 // if(Ua.search(/iPhone/) != -1){ // $('ローソン公式アプリダウンロード').appendTo($('#siteFooter p')); // } } else { if(Ua.search(/Android/) != -1){ //オブジェクトの表示非表示を制御する document.getElementById('explanation_app').style.display ='none'; } if(Ua.search(/iPhone/) != -1){ //オブジェクトの表示非表示を制御する document.getElementById('explanation_app').style.display ='none'; } if(Ua.search(/iPod/) != -1){ //オブジェクトの表示非表示を制御する document.getElementById('explanation_app').style.display ='none'; } } });