/***************************************************************************************
* comon function
***************************************************************************************/
function i18n_error(e){
if('object' != typeof e){
return '';
}
if(window.console && window.console.log){
window.console.log(e.stack);
}
return '';
}
function load_i18n(pName, pLang) {
if (!pLang || pLang == 'ko') {
return;
}
try{
jQuery.i18n.properties({
name : pName,
path : '/common/js/i18n/files/',
mode : 'both',
language : pLang,
async : false
});
}catch(e){
return i18n_error(e);
}
}
function i18n(msg) {
try{
var args = msg.split(':');
var pLang = __SUB_SITE_LANG_TYPE__ || 'ko';
if (pLang == 'ko') {
return args[1] || args[0];
}
var key_name = args[0];
var key_prop = "\""+ args[0] + "\"";
var result = eval("jQuery.i18n.prop(" + key_prop + ")");
if (result == '' || result == key_name || result == '['+ key_name +']') {
if (args.length > 1) {
args.splice(0, 1);
result = args.join(':');
}
}
return result;
}catch(e){
return i18n_error(e);
}
}
try{
if('undefined' != typeof __SUB_SITE_LANG_TYPE__){
load_i18n("durian.common", __SUB_SITE_LANG_TYPE__);
}else{
load_i18n("durian.common", 'ko');
}
}catch(e){}
var Durian = {
dialogForm: function(args) {
var defaultVal = {
target: '',
title: '',
width: 300
};
var opt = jQuery.extend(defaultVal, args);
jQuery(opt.target).dialog({
modal: true,
width: opt.width,
title: opt.title,
buttons: {
'확인': function() {
if( jQuery.isFunction(opt.callBack) ) {
opt.callBack.call();
}
},
'취소': function() {
jQuery( this ).dialog( "close" );
}
},
close: function(event, ui) {
}
});
var cssData= {
'.ui-dialog-title': {'font-weight':'bold', 'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-content': {'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset': {'height':'30px','font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset button': {'height':'25px', 'padding':'0'},
'.ui-dialog-buttonset button span': {'line-height':'12px'}
};
Durian.setTargetCss(cssData);
},
dialogPopup: function(args) {
var defaultVal = {
'target': '',
'title': '',
'width': 300
};
var opt = jQuery.extend(defaultVal, args);
jQuery(opt.target).dialog({
modal: true,
width: opt.width,
title: opt.title,
buttons: {
'닫기': function() {
jQuery( this ).dialog( "close" );
}
},
close: function(event, ui) {
if( jQuery.isFunction(opt.closeCallBack) ) {
opt.closeCallBack.call(this);
}
},
open : function(event, ui) {
if( jQuery.isFunction(opt.openCallBack) ) {
opt.openCallBack.call(this);
}
}
});
var cssData= {
'.ui-dialog-title': {'font-weight':'bold', 'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-content': {'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset': {'height':'30px','font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset button': {'height':'25px', 'padding':'0'},
'.ui-dialog-buttonset button span': {'line-height':'12px'}
};
Durian.setTargetCss(cssData);
},
imageViewer: function(src, args) {
var defaultVal = {
objID: '__imgViwer__',
minSize: 230,
title: i18n('lang.durian.common.look_image:이미지 보기'),
useZoom: true
};
var opt = jQuery.extend(defaultVal, args);
/*
opt.width = jQuery(document).width()-100;
opt.height = jQuery(document).height()-100;
*/
// fixed size
opt.width = 980;
opt.height = 720;
var initUI = function() {
if( !jQuery('#'+opt.objID).length ) {
var zoomControl = '';
var cssData= {
'#__imgViwer__': {'display':'','width': opt.minSize+'px', 'z-index':'9999', 'top':'0', 'left':'0', 'position':'absolute'},
'#__imgViwer__ b': {'display':'block', 'height':'1px', 'overflow':'hidden'},
'#__imgViwer__ b, #__imgViwer__ .r5': {'background': '#F5F5F5'},
'#__imgViwer__ .r1': {'background': '#B4B4B4', 'margin':'0px 5px 0px 5px'},
'#__imgViwer__ .r2': {'border-left':'2px solid #B4B4B4','border-right':'2px solid #B4B4B4','margin':'0px 3px 0px 3px'},
'#__imgViwer__ .r3, #__imgViwer__ .r4, #__imgViwer__ .r5': {'border-left':'1px solid #B4B4B4','border-right':'1px solid #B4B4B4'},
'#__imgViwer__ .r3' : {'margin':'0px 2px 0px 2px'},
'#__imgViwer__ .r4': {'height':'2px', 'margin': '0px 1px 0px 1px'},
'#__imgViwer__ .r5': {'padding':'5px','font-family':'dotum,Verdana,Arial,sans-serif', 'font-size':'11px', 'color':'#7f7f7f', 'position':'relative'},
'#__imgViwer__ .msg': {'padding': '0', 'background':'#FFFFFF', 'text-align':'center', 'vertical-align':'middle', 'position':'relative'},
'#__imgViwer__ .title': {'color':'#000000','height':'20px', 'cursor':'move'},
'#__imgViwer__ .buttons': { 'position':'absolute', 'top':'0', 'right':'0'},
'#__imgViwer__ .buttons .close': {'width': '16px', 'height': '16px', 'margin':'3px 10px 0 0', 'background': 'transparent url(/common/js/jquery/theme/base/images/ui-icons_454545_256x240.png) no-repeat', 'background-position':'-95px -130px', 'cursor': 'pointer', 'border':'0'},
'#__imgViwer__ .buttons .zoom': {'width': '16px', 'height': '16px', 'margin':'3px 5px 0 0', 'background': 'transparent url(/common/js/jquery/theme/base/images/ui-icons_454545_256x240.png) no-repeat', 'background-position':'-175px -193px', 'cursor': 'pointer', 'border':'0'}
};
if( opt.useZoom ) {
zoomControl = '';
}
jQuery('body').append(jQuery('
'));
jQuery('#'+opt.objID+' .msg').append(' '+ i18n('lang.durian.common.load_image_info:이미지 정보를 불러오고있습니다.') +'
');
Durian.setCenter('#'+opt.objID+' .msg', '#'+opt.objID+' .msg .loading');
Durian.setTargetCss(cssData);
jQuery('#'+opt.objID).draggable({ cancel: '#'+opt.objID+' .msg' });
jQuery('#'+opt.objID+' .close').click(closeViewer);
jQuery('#'+opt.objID+' .zoom').click(function() {
closeViewer();
var winInnerHtml = '';
if(typeof(SITE_RIGHT_CLICK) != 'undefined') {
winInnerHtml += '';
}
win = window.open();
win.document.write(winInnerHtml);
});
}
};
var initViewer = function() {
jQuery('#'+opt.objID).hide();
jQuery('#'+opt.objID+' .titleTxt').html(opt.title);
jQuery('#'+opt.objID+' .zoom').hide();
jQuery('#'+opt.objID+' .contentImg').remove();
jQuery('#'+opt.objID+' .loading').hide();
jQuery('#'+opt.objID).css({'top':'0', 'left':'0', 'width': opt.minSize+'px'});
Durian.setCenter(document, '#'+opt.objID, true);
};
var loadBegin = function() {
jQuery('#'+opt.objID).show();
jQuery('#'+opt.objID+' .loading').show();
};
var loadEnd = function() {
if( opt.useZoom ) {
jQuery('#'+opt.objID+' .zoom').show();
}
jQuery('#'+opt.objID+' .loading').hide();
};
var closeViewer = function() {
Durian.imageViewerClose();
};
initUI();
initViewer();
loadBegin();
jQuery('#'+opt.objID+' .msg').append('');
var loadHandle = jQuery('#'+opt.objID+' .contentImg').bind('load', function() {
loadEnd();
jQuery(this).click(closeViewer).css({'cursor': 'pointer'}).show();
jQuery('#'+opt.objID).show();
mod.gallery.reSize('#'+opt.objID+' .contentImg', opt.width, opt.height);
width = jQuery('#'+opt.objID+' .contentImg').width();
width = width < opt.minSize ? opt.minSize : width;
jQuery('#'+opt.objID).css({
'top':0,
'left':0,
'width': (width + 15)+'px'
});
Durian.setCenter(document, '#'+opt.objID, true);
});
},
imageViewerClose: function() {
var opt = {
objID: '__imgViwer__'
};
jQuery('#'+opt.objID).hide();
jQuery('#'+opt.objID+' .contentImg').unbind('load');
},
smallNotice: function(msg) {
var target='body';
var cssData= {
'.__snotice__': {'width': '170px', 'z-index':'9999', 'display':'none', 'bottom':'10px', 'left':'10px', 'position':'fixed'},
'.__snotice__ b': {'display':'block', 'height':'1px', 'overflow':'hidden'},
'.__snotice__ b, .__snotice__ .r5': {'background': '#F5F5F5'},
'.__snotice__ .r1': {'background': '#B4B4B4', 'margin':'0px 5px 0px 5px'},
'.__snotice__ .r2': {'border-left':'2px solid #B4B4B4','border-right':'2px solid #B4B4B4','margin':'0px 3px 0px 3px'},
'.__snotice__ .r3, .__snotice__ .r4, .__snotice__ .r5': {'border-left':'1px solid #B4B4B4','border-right':'1px solid #B4B4B4'},
'.__snotice__ .r3' : {'margin':'0px 2px 0px 2px'},
'.__snotice__ .r4': {'height':'2px', 'margin': '0px 1px 0px 1px'},
'.__snotice__ .r5': {'padding':'5px','font-family':'dotum,Verdana,Arial,sans-serif', 'font-size':'11px', 'color':'#7f7f7f', 'position':'relative'},
'.__snotice__ .msg': {'padding': '5px 0 0 0'},
'.__snotice__ .title': {'color':'#000000'},
'.__snotice__ .close': { 'position':'absolute', 'top':'0', 'left': '148px'},
'.__snotice__ .close input': {'width': '16px','height': '16px', 'margin':'0 5px 0 0', 'background':'transparent url(/common/js/jquery/theme/base/images/ui-icons_454545_256x240.png) no-repeat', 'background-position': '-80px -130px', 'cursor':'pointer', 'border':'0' }
};
var html = ''+ i18n('lang.durian.common.notice_msg:알림 메시지') +'
';
if( !jQuery(target).children().is('.__snotice__') ) {
jQuery(target).append(jQuery(html));
Durian.setTargetCss(cssData);
}
clearTimeout(this.smallNoticeTimer);
jQuery('.__snotice__ .msg').html(msg);
jQuery('.__snotice__ .close input').click(function() {
clearTimeout(this.smallNoticeTimer);
jQuery('.__snotice__').hide();
});
if( jQuery('.__snotice__').css('position') != 'fixed' ) {
var topSize = jQuery(window).height() - jQuery('.__snotice__').height() - 20 + jQuery(window).scrollTop();
jQuery('.__snotice__').css({
'position':'absolute',
'top': topSize+'px',
'left':'10px'
});
}
jQuery('.__snotice__').fadeIn();
this.smallNoticeTimer = setTimeout(function (){
jQuery('.__snotice__').fadeOut();
},3000);
},
loadingSmallWhite: function(obj) {
jQuery.blockUI.defaults.overlayCSS.color = '#fff';
var options = {
'msg': '',
'backgroundColor':'',
'opacity': 0.5,
'overlay_backgroundColor': '#fff'
};
Durian.loading(obj, options);
},
loadingSmallWhite13: function(obj) {
jQuery.blockUI.defaults.overlayCSS.color = '#fff';
var options = {
'msg': '',
'backgroundColor':'',
'opacity': 0.5,
'overlay_backgroundColor': '#fff'
};
Durian.loading(obj, options);
},
loadingSmallWhiteMsg: function(obj, msg) {
jQuery.blockUI.defaults.overlayCSS.color = '#fff';
var options = {
'msg': msg,
'backgroundColor':'',
'opacity': 0.5,
'overlay_backgroundColor': '#fff',
'padding':5,
'margin':0,
'width': '95%',
'color': '#000000'
};
Durian.loading(obj, options);
},
loadingSmallBlack: function(obj) {
jQuery.blockUI.defaults.overlayCSS.color = '#fff';
var options = {
'msg': '',
'backgroundColor':'',
'opacity': 0.7,
'overlay_backgroundColor': '#000'
};
Durian.loading(obj, options);
},
loadingProgressTxt: function(count, total) {
jQuery('.blockMsg .progress').html(count+'/'+total+'');
},
loading: function(obj, options) {
var defaultVal = {
'zIndex': '999999',
'msg': ' 처리 중입니다. 잠시만 기다려주십시오.',
'border': '0',
'padding': '15px',
'backgroundColor': '#000',
'radius': '8px',
'opacity': 0.7,
'color': '#fff',
'overlay_backgroundColor': '#000',
'overlay_opacity': 0.6
}
var opt = jQuery.extend(defaultVal, options);
if( obj ) {
jQuery(obj).block({
message: opt.msg,
css: {
'zIndex': opt.zIndex,
'border': opt.border,
'width': opt.width,
'padding': opt.padding,
'backgroundColor': opt.backgroundColor,
'-webkit-border-radius': opt.radius,
'-moz-border-radius': opt.radius,
'border-radius': opt.radius,
'opacity': opt.opacity,
'color': opt.color
},
overlayCSS: {
backgroundColor: opt.overlay_backgroundColor,
opacity: opt.overlay_opacity
}
});
} else {
jQuery.blockUI.defaults.baseZ = '1000000';
jQuery.blockUI({
message: opt.msg,
css: {
'zIndex': opt.zIndex,
'border': opt.border,
'width': opt.width,
'padding': opt.padding,
'backgroundColor': opt.backgroundColor,
'-webkit-border-radius': opt.radius,
'-moz-border-radius': opt.radius,
'border-radius': opt.radius,
'opacity': opt.opacity,
'color': opt.color
},
overlayCSS: {
backgroundColor: opt.overlay_backgroundColor,
opacity: opt.overlay_opacity
}
});
}
},
loadingClose: function(obj) {
if( obj ) {
jQuery(obj).unblock();
} else {
jQuery.unblockUI();
}
},
alert : function(msg, type, callBack) {
if( Durian.isMobile() ) {
msg = msg.replace(/\
/gi, '\n').stripTags();
alert(msg);
if( Durian.alertCloseMode ) {
Durian.alertClose();
}
return;
}
if( !jQuery('#__dlgAlert__').length ) {
jQuery('body').append("");
}
jQuery('#__dlgAlert__').attr('title',i18n('lang.durian.common.notice_msg:알림 메시지'));
jQuery('#__dlgAlert__ p').html(msg);
jQuery('#__dlgAlert__').dialog({
modal: true,
minHeight: 230,
buttons: {
'확인': function() {
jQuery( this ).dialog( "close" );
}
},
close: function(event, ui) {
if( jQuery.isFunction(callBack) ) {
callBack.call();
} else {
Durian.alertClose();
}
}
});
var cssData= {
'.ui-dialog-title': {'font-weight':'bold', 'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-content': {'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset': {'height':'30px','font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset button': {'height':'25px', 'padding':'0'},
'.ui-dialog-buttonset button span': {'line-height':'12px'}
};
Durian.setTargetCss(cssData);
},
confirm : function(msg, callBackDone, callBackCancel) {
if( Durian.isMobile() ) {
msg = msg.replace(/\
/gi, '\n').stripTags();
if( confirm(msg) ) {
if( jQuery.isFunction(callBackDone) ) {
callBackDone.call();
}
} else {
if( jQuery.isFunction(callBackCancel) ) {
callBackCancel.call();
}
}
return;
}
if( !jQuery('#__dlgConfirm__').length ) {
jQuery('body').append("
");
}
jQuery('#__dlgConfirm__').attr('title',i18n('lang.durian.common.notice_msg:알림 메시지'));
jQuery('#__dlgConfirm__ p').html(msg);
jQuery('#__dlgConfirm__').dialog({
modal: true,
minHeight: 200,
buttons: {
'확인': function() {
if( jQuery.isFunction(callBackDone) ) {
callBackDone.call();
}
try{
jQuery( this ).dialog( "close" );
} catch(e){}
},
'취소': function() {
if( jQuery.isFunction(callBackCancel) ) {
callBackCancel.call();
}
try{
jQuery( this ).dialog( "close" );
} catch(e){}
}
},
close: function(event, ui) {
Durian.alertClose();
}
});
var cssData= {
'.ui-dialog-title': {'font-weight':'bold', 'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-content': {'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset': {'height':'30px','font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset button': {'height':'25px', 'padding':'0'},
'.ui-dialog-buttonset button span': {'line-height':'12px'}
};
Durian.setTargetCss(cssData);
},
confirmShopLogin : function(msg, callBackDone, callBackCancel) {
/*
if( Durian.isMobile() ) {
msg = msg.replace(/\
/gi, '\n').stripTags();
if( confirm(msg) ) {
if( jQuery.isFunction(callBackDone) ) {
callBackDone.call();
}
} else {
if( jQuery.isFunction(callBackCancel) ) {
callBackCancel.call();
}
}
return;
}
*/
if( !jQuery('#__dlgConfirm__').length ) {
jQuery('body').append("
");
}
jQuery('#__dlgConfirm__').attr('title',i18n('lang.durian.common.notice_msg:알림 메시지'));
jQuery('#__dlgConfirm__ p').html(msg);
jQuery('#__dlgConfirm__').dialog({
modal: true,
minHeight: 200,
buttons: {
'로그인': function() {
if( jQuery.isFunction(callBackDone) ) {
callBackDone.call();
}
try{
jQuery( this ).dialog( "close" );
} catch(e){}
},
'비회원 구매': function() {
if( jQuery.isFunction(callBackCancel) ) {
callBackCancel.call();
}
try{
jQuery( this ).dialog( "close" );
} catch(e){}
}
},
close: function(event, ui) {
Durian.alertClose();
}
});
var cssData= {
'.ui-dialog-title': {'font-weight':'bold', 'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-content': {'font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset': {'height':'30px','font-size':'12px', 'font-family':'Verdana,Arial,sans-serif'},
'.ui-dialog-buttonset button': {'height':'25px', 'padding':'0'},
'.ui-dialog-buttonset button span': {'line-height':'12px'}
};
Durian.setTargetCss(cssData);
},
alertLayer : function(layer, msg) {
Durian.showLayer(layer, {
center : true,
key : true,
block : true
})
$id('__alert_msg__').innerHTML = msg;
},
alertCloseMode : 0,
alertCloseFocusObject : null,
block : true,
alertClose : function() {
if (/^[+-]?[0-9]$/.test(Durian.alertCloseMode)) {
Durian.alertCloseMode = parseInt(Durian.alertCloseMode, 10);
}
if (typeof Durian.alertCloseMode == 'string' && Durian.alertCloseMode != '') {
location.href = Durian.alertCloseMode;
} else if (typeof Durian.alertCloseMode == 'number') {
switch (Durian.alertCloseMode) {
case -2 : self.close(); break;
case -1 : history.back(); break;
case 1 : location.reload(true); break;
case 2 : opener.location.reload(); self.close(); break;
}
//jQuery.unblockUI();
if (Durian.alertCloseFocusObject) {
try { Durian.alertCloseFocusObject.focus(); } catch (e) {}
Durian.alertCloseFocusObject = null;
}
}
},
alertCallback : function(r) {
if (r.isSuccess()) {
var layer = $c('div');
layer.id = '__alert__';
Element.setStyle(layer, {
padding : '0 0 0 0'
})
document.body.appendChild(layer);
layer.innerHTML = r.value;
Durian.alertLayer(layer, this.param.msg);
} else {
alert(this.param.msg);
}
},
showIf : function(obj, value) {
if (value) {
Element.show(obj);
} else {
Element.hide(obj);
}
},
showHide : function(show, hide, display) {
if (hide) {
hide = $array(hide);
for (var i=0; i
';
obj.iframe = obj.childNodes[0];
// show layer
this.showLayer(obj, option);
// url
if (typeof option.url == 'string') {
obj.iframe.src = option.url;
}
}
},
closeFrameLayer : function(id) {
id = '__frame_layer_' + (id || 'common');
var obj = $id(id);
Durian.showLayerClose(obj);
},
autoResizeIframe : function(iframe) {
Util.autoResizeIframe(iframe);
var obj = iframe.parentNode;
if (obj.option) {
if (obj.option.center) {
var pos = Element.getCenter(obj);
Element.moveTo(obj, pos);
}
}
},
// iframe resizing
resizeIframe : function(iframe, height) {
var iframe = $id(iframe);
if (typeof iframe != 'undefined') {
if (height > 0) {
Element.setStyle(iframe, 'height', height);
} else {
Util.autoResizeIframe(iframe, true, false);
//Durian.autoResizeIframe(iframe);
}
}
},
resizeImage : function(image, width, index) {
var list = $array(image).filter(function(img) {
img.style.display = "";
img.size = Element.getSize(img);
if (img.size.width > 0 && img.size.width > width) {
var rate = width / img.size.width;
img.style.width = width + 'px';
img.style.height = Math.round(img.size.height * rate) + 'px';
return false;
}
return true;
});
index = index || 0;
index++;
if (list.length && index <= 10) {
setTimeout(function() {
Durian.resizeImage(list, width, index);
}, 200);
}
},
// parent : 1 base offset
searchParentTag : function(obj, tag, offset) {
tag = tag.toLowerCase();
var count = 0;
var p = obj.parentNode;
while (p != document.body) {
if (p.tagName.toLowerCase() == tag) {
count++;
if (count == offset) {
return p;
}
}
p = p.parentNode;
}
return false;
},
// child : 1 base offset
searchChildTag : function(obj, tag, offset) {
var list = obj.getElementsByTagName(tag);
if (typeof list[offset-1] != 'undefined') {
return list[offset-1];
} else {
return false;
}
},
// prev : 1 base offset
searchPrevSameTag : function(obj, offset, parent) {
var tag = obj.tagName;
var list = (parent || document).getElementsByTagName(tag);
var key = -1;
for (var i=0; i -1 && key >= offset) {
return list[key - offset];
} else {
return false;
}
},
// next : 1 base offset
searchNextSameTag : function(obj, offset, parent) {
var tag = obj.tagName;
var list = (parent || document).getElementsByTagName(tag);
var key = -1;
for (var i=0; i -1 && key + offset < list.length) {
return list[key + offset];
} else {
return false;
}
},
searchByClassName : function(obj, className) {
var list = obj.getElementsByTagName('*');
var result = [];
for (var i=0; i 2) {
var winl = (screen.width - x) / 2;
var wint = (screen.height - y) / 2;
var w = window.open(url, name, 'scrollbars=' + sc + ', resizable=yes, width=' + x + ', height=' + y + ', top='+wint+', left='+winl);
} else {
var w = window.open(url, name);
}
this.win[name] = w;
}
if (w) {
w.focus();
}
return w;
},
// modal window
openModalWin : function(url, x, y, resize, arg) {
if (window.showModalDialog) {
return Durian.openWin('', url, x, y, resize);
} else {
return window.showModalDialog(url, arg || self, 'dialogHeight: '+y+'px; dialogWidth: '+x+'px; edge: Raised; center: Yes; help: No; resizable: '+resize+'; status: No; scroll: No;');
}
},
// clipboard copy - clipboard.js
attachClipCopy : function(obj, attr, message) {
if (!jQuery(obj).length) {
return;
}
if (typeof ClipboardJS == 'undefined' && !jQuery('script[src*="clipboard.min.js"]').length) {
// load js
jQuery('head').append('');
}else{
document.write('');
}
}else{
document.write('');
}
},
css : function(src) {
if('function' == typeof jQuery){
if(jQuery('head').size() > 0){
jQuery('head').eq(0).append(jQuery(''));
}else{
document.write('');
}
}else{
document.write('');
}
}
}
/***************************************************************************************
* normal function
***************************************************************************************/
// for flash wizard
function flashInfo(id, w, h)
{
var area = $id(id + '_area');
if (area) {
if (id == 'L_CATEGORY_flash' && area.getAttribute('design_type') == '03') {
Element.setSize(area, w, h);
} else {
if (area.getAttribute('inited') != '1') {
Element.setSize(area, w, h);
area.setAttribute('inited', '1');
}
}
}
var box = $id(id + '_box');
if (box) {
Element.setSize(box, w, h);
}
if (Util.isIE) {
Element.setSize(id, w, h);
} else {
Element.setSize(id + '_embed', w, h);
}
}
/***************************************************************************************
* load event
***************************************************************************************/
$l(window, 'load', Durian.initCommon.init);
/***************************************************************************************/
/***************************************************************************************
* module js Import
***************************************************************************************/
Durian.importFile.js('/common/js/module/mod.gallery.js');
Durian.importFile.js('/common/js/module/mod.smscounsel.js');
/***************************************************************************************/
mod.gallery.widgetResizeLoad = function(a, b, c) {
jQuery(document).ready(function() {
jQuery(a).each(function() {
var src = jQuery(this).attr('src');
jQuery(this).load(function() {
mod.gallery.reSize(this, b, c);
jQuery(this).show()
}).attr('src',src);
})
})
}