/********************************************* * common.js * ------------------------------------------- * @namespace * - EPOS_CARD * @noConflict * - $ * @constructor * @module * - modal02 *********************************************/ /* ------------------------------------------- * @noConflict ------------------------------------------- */ $(function(){ var u = new EPOS_CARD.Util(); $.modal(); }); /* ------------------------------------------- * @module ------------------------------------------- */ (function($){ var u = new EPOS_CARD.Util(); /* * @method modal */ $.modal = function(config){ var c = $.extend({ elm: ".js-mindenModal", elm02: ".js-mindenModal02" },config); // vars var $elm = $(c.elm), $elm02 = $(c.elm02); if($elm.length === 0 && $elm02.length === 0){ return false; } // trigger if(!u.isRangeSP()){ $elm.colorbox({ inline: true, width: "100%", maxWidth: "1100px", maxHeight: "92%", fixed: true, onComplete: function(){ EPOS_CARD.module.equalHeight(true, true); EPOS_CARD.module.sizeFix(); } }); $elm02.colorbox({ inline: true, width: "100%", maxWidth: "1100px", maxHeight: "92%", fixed: true, onLoad: function() { $('#colorbox').addClass('type02'); }, onComplete: function(){ EPOS_CARD.module.equalHeight(true, true); EPOS_CARD.module.sizeFix(); }, onCleanup: function() { $('#colorbox').removeClass('type02'); } }); } else { $elm.colorbox({ inline: true, height: "", maxWidth: "100%", maxHeight: "100%", fixed: true, onComplete: function(){ EPOS_CARD.module.equalHeight(true, true); EPOS_CARD.module.sizeFix(); } }); $elm02.colorbox({ inline: true, height: "", maxWidth: "100%", maxHeight: "100%", fixed: true, onLoad: function() { $('#colorbox').addClass('type02'); }, onComplete: function(){ EPOS_CARD.module.equalHeight(true, true); EPOS_CARD.module.sizeFix(); }, onCleanup: function() { $('#colorbox').removeClass('type02'); } }); } } })(jQuery);