var JsUtil = {
trim : function(p_str) {
return p_str.replace('/ /g', '');
}
}
/**
* - 마음껏 수정해서 사용하세요.
*/
jQuery.fn.extend({
/**
* 이미지 롤링. jCarouselLite 1.2 확장팩 사용.(1.2에서 이벤트 추가됨) http://www.gmarwaha.com/jquery/jcarousellite/?#doc 참조
*
* btnPrev : null // 네비게이션에서 사용할 [이전] 버튼을 위한 셀렉터. ex> '.btn_prev'
* ,btnNext : null // 네비게이션에서 사용할 [다음] 버튼을 위한 셀렉터. ex> '.btn_next'
* ,auto : null // 이미지 '자동' 슬라이드 시간. 기본 값은 null.(자동 슬라이드 되지 않음)
* ,speed : 0 // 이미지 슬라이딩 속도. ex> 800, 1500...
* ,easing : null, // jquery easing effect plugin 셋팅
* ,vertical : false // 가로-세로 롤링 여부. 기본 false.
* ,circular : false // 선형 데이터여부. true일 경우, 데이터가 순차적으로 순환됨
* ,visible : 3 // 화면에 몇 개의 이미지 아이템이 보이는지 숫자. 기본 3.
* ,start : 0 // 몇 번째 이미지 아이템부터 보여줄 지에 대한 값. 기본 0.
* ,beforeStart : null // 이미지 아이템이 슬라이드 이펙트가 이루어지기 전에 실행할 콜백 함수 지정. function(p_item) { ... }
* ,afterEnd : null // 이미지 아이템이 슬라이드 이펙트가 끝난 직후에 실행할 콜백 함수 지정. function(p_item) { ... }
* ,onClickItem : null // 이미지 아이템을 클릭했을 경우 실행할 함수 지정. function(p_event, p_item) { ... }
* ,scroll: 1
* ,pauseOnHover: false
**/
rollingImage : function(config) {
var config = $.extend({
btnPrev : null
,btnNext : null
,auto : null
,speed : 0
,easing : null
,vertical : false
,circular : false
,visible : 3
,start : 0
,beforeStart : null
,afterEnd : null
,onClickItem : null
,scroll: 1
,pauseOnHover: false
}, config);
var $this = $(this); // 컨테이너
if($this == undefined || $this.size() == 0) {
alert("An error occurred. Please contact the administrator. \n\n(Support > Contact Us) [Jsutil.js function : rollingImage']");
return false;
}
var $imageList = $this.children('ul:first-child'); // 리스트
if($imageList == undefined || $imageList.size() == 0) {
alert("An error occurred. Please contact the administrator. \n\n(Support > Contact Us) [Jsutil.js function : rollingImage']");
return false;
}
var $imageItems = $imageList.children('li'); // 리스트 아이템
// 컨텐츠 섬네일 이미지 롤러 사용 여부 결정
if($imageItems.size() > config.visible) {
$this.jCarouselLite(config);
$this.css('left', '63px');
$this.css('width', '781px');
} else {
$(config.btnPrev ).css('display', 'none');
$(config.btnNext ).css('display', 'none');
}
if($.isFunction(config.onClickItem)) {
$imageItems.click(function(p_event) { config.onClickItem(p_event, $(this)); });
}
},
/**
* date picker costomizing
*/
datepickerCustom : function() {
return this.each(function() {
try {
$(this).datepicker({ showMonthAfterYear :true, monthNamesShort:['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], changeMonth:true, changeYear:true ,dateFormat : 'yy-mm-dd',yearRange:'c-10:c+10' }).attr('readonly', true);
} catch(e) {
alert("[js/egovframework/tradekorea/www/common/jsutil.js's datepickerCustom] " + e.description);
}
});
},
addThisComponent : function() {
return this.each(function() {
try {
$(this).html('