// レスポンシブ対応モーダル (ポップアップ単一)///////////////////////////////////////////////////////////////////////////////////// $(function () { $('.or_modalOpen').click(function () { var p = $(window).scrollTop(); var gatHref = $(this).attr('href'); var gatID = gatHref.replace(/#/g, ''); $('.or_modal').css('top', p + 'px'); $('.or_mask, .or_modal, .' + gatID).css({ 'display': 'block', 'opacity': '0' }); $('.or_mask').stop().animate({ opacity: 1 }, 500, function () { $(' .or_modal, .' + gatID).stop().animate({ opacity: 1 }, 500); }); return false; }); $('.or_mask, .or_close').click(function () { $('.or_mask, .or_modal, .or_modal .or_modalBox ').stop().animate({ opacity: 0 }, 300, function () { $(this).css({ 'display': 'none', 'opacity': '0' }); }); }); }); // 要素の高さを揃える ///////////////////////////////////////////////////////////////////////////////////// $(function () { $.fn.tile = function (columns) { var tiles, max, c, h, last = this.length - 1, s; if (!columns) columns = this.length; this.each(function () { s = this.style; if (s.removeProperty) s.removeProperty("height"); if (s.removeAttribute) s.removeAttribute("height"); }); return this.each(function (i) { c = i % columns; if (c == 0) tiles = []; tiles[c] = $(this); h = tiles[c].height(); if (c == 0 || h > max) max = h; if (i == last || c == columns - 1) $.each(tiles, function () { this.height(max); }); }); }; }); // Scroll ///////////////////////////////////////////////////////////////////////////////////// $(function () { //ページ上部へスクロール $(".tu_pagetop").click(function () { $('html,body').animate({ scrollTop: 0 }, '2000'); return false; }); });