/** * @fileOverview ************************* * @version 0.0.5 */ /* ----------------------------------------------------------------------------------- */ /** * @namespace */ var MAXCo = {}; MAXCo.previewWindowName = "ContentPrintPreviewWindow"; /* ----------------------------------------------------------------------------------- */ /* ----------------------------------------------------------------------------------- */ /** * スムーススクロール処理。 * @class スムーススクロール * @constructor */ MAXCo.SmoothScroll = function () { this.selector = $('a[href^=#], area[href^=#]'); this.goToPageTop = "#pageWrap";// 配列化が必要? this.speed = 1000; this.easing = "easeOutExpo"; this.noScrollCName = "no-scroll"; if (this.selector.length && window.name != MAXCo.previewWindowName) { this.init(); } } /** */ MAXCo.SmoothScroll.prototype.init = function () { var _this = this; this.selector.each(function () { if (!$(this).hasClass(_this.noScrollCName)) { var fi = $(this).attr("href"); if (fi == "#") return false; var el = ($(fi).length) ? $(fi) : $("a[name="+fi.replace(/#/,"")+"]"); if (el.length) { $(this).click(function() { //e.preventDefault(); var target = el[0]; $.scrollTo(target, { speed: _this.speed, easing: _this.easing/*, onAfter: function() { return (fi == _this.goToPageTop) ? false : true; }*/ }); return (fi == _this.goToPageTop) ? false : true; }); } } }); } /* ----------------------------------------------------------------------------------- */ $(function() { /* for IE6 background image flicker */ if (jQuery.browser.msie && jQuery.browser.version == 6) { try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {} } /* Setup RolloverImages */ var roi = new RolloverImages('rollover', 'on'); /* Setup MAXCo */ for (module in MAXCo) { var obj = MAXCo[module]; if (obj && typeof obj == "function") { new MAXCo[module](); } } }); //デジタルカタログ用 function open_book(url, name, option){ if (navigator.userAgent.indexOf("Android") != -1)option = ''; window.open(url, name, option); }