// 팝업데이터 var mainPopup = {"win":[],"layerMove":[],"layer":[]}; var tmp = window.location.href; var skinQuery = tmp.match(/tplSkin=[^&]*/); // 일반팝업창 if (mainPopup.win != null && mainPopup.win.length > 0) { if (self.name != 'easy') { $.each(mainPopup.win, function(idx, v) { if ($.cookie('blnCookie_'+v.code) != 'true') { main_popup_window(v); } }); } } $(document).ready(function(){ $(window).load(function () { if (self.name != 'easy') { // 고정레이어 $.each(mainPopup.layer, function(idx, v) { if ($.cookie('blnCookie_'+v.code) != 'true') { main_popup_layer(v); } }); // 이동레이어 $.each(mainPopup.layerMove, function(idx, v) { if ($.cookie('blnCookie_'+v.code) != 'true') { main_popup_layer(v, 'layerMove'); } }); } }); }); /** * 일반팝업창 */ function main_popup_window(v) { var property = new Array(); property.push('scrollbars=no, toolbar=no'); if (v.popupSizew != '') { property.push('width='+v.popupSizew); } if (v.popupSizeh != '') { property.push('height='+v.popupSizeh); } if (v.popupSpotw != '') { property.push('top='+v.popupSpotw); } if (v.popupSpoth != '') { property.push('left='+v.popupSpoth); } var property = property.join(','); var win = window.open('../main/popup.php?group=popup&id='+v.code+'&'+skinQuery, v.code, property); if (win) { win.focus(); } } /** * 고동레이어 & 이동레이어 */ function main_popup_layer(v, type) { var cssAttr = {'position':'absolute','overflow':'hidden','z-index':'2000'}; if (v.popupSizew != null && v.popupSizew != '') { cssAttr.width = v.popupSizew+'px'; } if (v.popupSizeh != null && v.popupSizeh != '') { cssAttr.height = v.popupSizeh+'px'; } if (v.popupSpotw != null && v.popupSpotw != '') { cssAttr.top = v.popupSpotw+'px'; } else { cssAttr.top = '0px'; } if (v.popupSpoth != null && v.popupSpoth != '') { cssAttr.left = v.popupSpoth+'px'; } else { cssAttr.left = '0px'; } var ele = $('
').attr('id','blnCookie_'+v.code).css(cssAttr); $.ajax({ type: 'GET' , url: '../main/popup.php?group=popup&id='+v.code+'&'+skinQuery , async: false , success: function(data) { ele.append(data); } }); ele.appendTo($('body')); if (type == 'layerMove') { ele.css('cursor','move').draggable(); } }