jindo.Component=jindo.$Class({_htEventHandler:null,_htOption:null,$init:function(){var t=this.constructor.getInstance();t.push(this),this._htEventHandler={},this._htOption={},this._htOption._htSetter={}},option:function(t,e){switch(typeof t){case"undefined":return this._htOption;case"string":if("undefined"==typeof e)return this._htOption[t];if("htCustomEventHandler"==t){if("undefined"!=typeof this._htOption[t])return this;this.attach(e)}this._htOption[t]=e,"function"==typeof this._htOption._htSetter[t]&&this._htOption._htSetter[t](e);break;case"object":for(var n in t){if("htCustomEventHandler"==n){if("undefined"!=typeof this._htOption[n])continue;this.attach(t[n])}this._htOption[n]=t[n],"function"==typeof this._htOption._htSetter[n]&&this._htOption._htSetter[n](t[n])}}return this},optionSetter:function(t,e){switch(typeof t){case"undefined":return this._htOption._htSetter;case"string":if("undefined"==typeof e)return this._htOption._htSetter[t];this._htOption._htSetter[t]=jindo.$Fn(e,this).bind();break;case"object":for(var n in t)this._htOption._htSetter[n]=jindo.$Fn(t[n],this).bind()}return this},fireEvent:function(t,e){e=e||{};var n=this["on"+t],i=this._htEventHandler[t]||[],s="function"==typeof n,a=i.length>0;if(!s&&!a)return!0;i=i.concat(),e.sType=t,"undefined"==typeof e._aExtend&&(e._aExtend=[],e.stop=function(){e._aExtend.length>0&&(e._aExtend[e._aExtend.length-1].bCanceled=!0)}),e._aExtend.push({sType:t,bCanceled:!1});var o,r,h=[e];for(o=2,r=arguments.length;r>o;o++)h.push(arguments[o]);if(s&&n.apply(this,h),a){var l;for(o=0,l;l=i[o];o++)l.apply(this,h)}return!e._aExtend.pop().bCanceled},attach:function(t,e){if(1==arguments.length)return jindo.$H(arguments[0]).forEach(jindo.$Fn(function(t,e){this.attach(e,t)},this).bind()),this;var n=this._htEventHandler[t];return"undefined"==typeof n&&(n=this._htEventHandler[t]=[]),n.push(e),this},detach:function(t,e){if(1==arguments.length)return jindo.$H(arguments[0]).forEach(jindo.$Fn(function(t,e){this.detach(e,t)},this).bind()),this;var n=this._htEventHandler[t];if(n)for(var i,s=0;i=n[s];s++)if(i===e){n=n.splice(s,1);break}return this},detachAll:function(t){var e=this._htEventHandler;if(arguments.length)return"undefined"==typeof e[t]?this:(delete e[t],this);for(var n in e)delete e[n];return this}}),jindo.Component.factory=function(t,e){var n,i=[];"undefined"==typeof e&&(e={});for(var s,a=0;s=t[a];a++)n=new this(s,e),i[i.length]=n;return i},jindo.Component.getInstance=function(){return"undefined"==typeof this._aInstance&&(this._aInstance=[]),this._aInstance},jindo.UIComponent=jindo.$Class({$init:function(){this._bIsActivating=!1},isActivating:function(){return this._bIsActivating},activate:function(){return this.isActivating()?this:(this._bIsActivating=!0,arguments.length>0?this._onActivate.apply(this,arguments):this._onActivate(),this)},deactivate:function(){return this.isActivating()?(this._bIsActivating=!1,arguments.length>0?this._onDeactivate.apply(this,arguments):this._onDeactivate(),this):this}}).extend(jindo.Component),jindo.RolloverArea=jindo.$Class({$init:function(t,e){this.option({sClassName:"rollover",sClassPrefix:"rollover-",bCheckMouseDown:!0,bActivateOnload:!0,htStatus:{sOver:"over",sDown:"down"}}),this.option(e||{}),this._elArea=jindo.$(t),this._aOveredElements=[],this._aDownedElements=[],this._wfMouseOver=jindo.$Fn(this._onMouseOver,this),this._wfMouseOut=jindo.$Fn(this._onMouseOut,this),this._wfMouseDown=jindo.$Fn(this._onMouseDown,this),this._wfMouseUp=jindo.$Fn(this._onMouseUp,this),this.option("bActivateOnload")&&this.activate()},_addOvered:function(t){this._aOveredElements.push(t)},_removeOvered:function(t){this._aOveredElements.splice(jindo.$A(this._aOveredElements).indexOf(t),1)},_addStatus:function(t,e){jindo.$Element(t).addClass(this.option("sClassPrefix")+e)},_removeStatus:function(t,e){jindo.$Element(t).removeClass(this.option("sClassPrefix")+e)},_isInnerElement:function(t,e){return t===e?!0:jindo.$Element(t).isParentOf(e)},_onActivate:function(){this._wfMouseOver.attach(this._elArea,"mouseover"),this._wfMouseOut.attach(this._elArea,"mouseout"),this.option("bCheckMouseDown")&&(this._wfMouseDown.attach(this._elArea,"mousedown"),this._wfMouseUp.attach(document,"mouseup"))},_onDeactivate:function(){this._wfMouseOver.detach(this._elArea,"mouseover"),this._wfMouseOut.detach(this._elArea,"mouseout"),this._wfMouseDown.detach(this._elArea,"mousedown"),this._wfMouseUp.detach(document,"mouseup"),this._aOveredElements.length=0,this._aDownedElements.length=0},_findRollover:function(t){var e=this.option("sClassName");return jindo.$$.test(t,"."+e)?t:jindo.$$.getSingle("! ."+e,t)},_onMouseOver:function(t){for(var e,n=t.element,i=t.relatedElement;n=this._findRollover(n);n=n.parentNode)i&&this._isInnerElement(n,i)||(this._addOvered(n),e={element:n,htStatus:this.option("htStatus"),weEvent:t},this.fireEvent("over",e)&&this._addStatus(e.element,e.htStatus.sOver))},_onMouseOut:function(t){for(var e,n=t.element,i=t.relatedElement;n=this._findRollover(n);n=n.parentNode)i&&this._isInnerElement(n,i)||(this._removeOvered(n),e={element:n,htStatus:this.option("htStatus"),weEvent:t},this.fireEvent("out",e)&&this._removeStatus(e.element,e.htStatus.sOver))},_onMouseDown:function(t){for(var e,n=t.element;n=this._findRollover(n);)e={element:n,htStatus:this.option("htStatus"),weEvent:t},this._aDownedElements.push(n),this.fireEvent("down",e)&&this._addStatus(e.element,e.htStatus.sDown),n=n.parentNode},_onMouseUp:function(t){var e,n,i,s=t.element,a=[],o=this._aDownedElements;for(i=0;n=o[i];i++)a.push({element:n,htStatus:this.option("htStatus"),weEvent:t});for(;s=this._findRollover(s);s=s.parentNode)jindo.$A(o).indexOf(s)>-1||a.push({element:s,htStatus:this.option("htStatus"),weEvent:t});for(i=0;e=a[i];i++)this.fireEvent("up",e)&&this._removeStatus(e.element,e.htStatus.sDown);this._aDownedElements=[]}}).extend(jindo.UIComponent),jindo.Calendar=jindo.$Class({$init:function(t,e){this._htToday=this.constructor.getDateHashTable(new Date),this._elLayer=jindo.$(t),this.htDefaultOption={sClassPrefix:"calendar-",nYear:this._htToday.nYear,nMonth:this._htToday.nMonth,nDate:this._htToday.nDate,sTitleFormat:"yyyy-mm",sYearTitleFormat:"yyyy",sMonthTitleFormat:"m",aMonthTitle:["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],bDrawOnload:!0},this.option(this.htDefaultOption),this.option(e||{}),this._assignHTMLElements(),this.activate(),this.setDate(this.option("nYear"),this.option("nMonth"),this.option("nDate")),this.option("bDrawOnload")&&this.draw()},getBaseElement:function(){return this._elLayer},getDate:function(){return this._htDate},getDateOfElement:function(t){var e=jindo.$A(this._aDateContainerElement).indexOf(t);return e>-1?this._aMetaData[e]:null},getToday:function(){return this._htToday},setDate:function(t,e,n){this._htDate={nYear:t,nMonth:1*e,nDate:1*n}},getShownDate:function(){return this._getShownDate()},_getShownDate:function(){return this.htShownDate||this.getDate()},_setShownDate:function(t,e){this.htShownDate={nYear:t,nMonth:1*e,nDate:1}},_assignHTMLElements:function(){var t=this.option("sClassPrefix"),e=this.getBaseElement();(this.elBtnPrevYear=jindo.$$.getSingle("."+t+"btn-prev-year",e))&&(this.wfPrevYear=jindo.$Fn(function(t){t.stop(jindo.$Event.CANCEL_DEFAULT),this.draw(-1,0,!0)},this)),(this.elBtnPrevMonth=jindo.$$.getSingle("."+t+"btn-prev-mon",e))&&(this.wfPrevMonth=jindo.$Fn(function(t){t.stop(jindo.$Event.CANCEL_DEFAULT),this.draw(0,-1,!0)},this)),(this.elBtnNextMonth=jindo.$$.getSingle("."+t+"btn-next-mon",e))&&(this.wfNextMonth=jindo.$Fn(function(t){t.stop(jindo.$Event.CANCEL_DEFAULT),this.draw(0,1,!0)},this)),(this.elBtnNextYear=jindo.$$.getSingle("."+t+"btn-next-year",e))&&(this.wfNextYear=jindo.$Fn(function(t){t.stop(jindo.$Event.CANCEL_DEFAULT),this.draw(1,0,!0)},this)),this.elTitle=jindo.$$.getSingle("."+t+"title",e),this.elTitleYear=jindo.$$.getSingle("."+t+"title-year",e),this.elTitleMonth=jindo.$$.getSingle("."+t+"title-month",e);var n=jindo.$$.getSingle("."+t+"week",e);this.elWeekTemplate=n.cloneNode(!0),this.elWeekAppendTarget=n.parentNode},_setCalendarTitle:function(t,e,n){10>e&&(e=("0"+1*e).toString());var i,s=this.elTitle,a=this.option("sTitleFormat");if("undefined"!=typeof n)switch(n){case"year":s=this.elTitleYear,a=this.option("sYearTitleFormat"),i=a.replace(/yyyy/g,t).replace(/y/g,t.toString().substr(2,2));break;case"month":s=this.elTitleMonth,a=this.option("sMonthTitleFormat"),i=a.replace(/mm/g,e).replace(/m/g,1*e).replace(/M/g,this.option("aMonthTitle")[e-1])}else i=a.replace(/yyyy/g,t).replace(/y/g,t.toString().substr(2,2)).replace(/mm/g,e).replace(/m/g,1*e).replace(/M/g,this.option("aMonthTitle")[e-1]);jindo.$Element(s).text(i)},draw:function(t,e,n){var i=this.option("sClassPrefix"),s=this.getDate(),a=this._getShownDate();if(a&&"undefined"!=typeof n&&n){var o=this.constructor.getRelativeDate(t,e,0,a);t=o.nYear,e=o.nMonth}else"undefined"==typeof t&&"undefined"==typeof e&&"undefined"==typeof n?(t=s.nYear,e=s.nMonth):(t=t||a.nYear,e=e||a.nMonth);if(this.fireEvent("beforeDraw",{nYear:t,nMonth:e})){this.elTitle&&this._setCalendarTitle(t,e),this.elTitleYear&&this._setCalendarTitle(t,e,"year"),this.elTitleMonth&&this._setCalendarTitle(t,e,"month"),this._clear(jindo.Calendar.getWeeks(t,e)),this._setShownDate(t,e);var r,h,l,u,c,f,d,_,g,p=this.getToday(),v=this.constructor.getFirstDay(t,e),m=this.constructor.getLastDay(t,e),E=this.constructor.getLastDate(t,e),w=0,P=this.constructor.getRelativeDate(0,-1,0,{nYear:t,nMonth:e,nDate:1}),D=this.constructor.getRelativeDate(0,1,0,{nYear:t,nMonth:e,nDate:1}),L=this.constructor.getLastDate(P.nYear,P.nMonth),j=[],b=this.constructor.getWeeks(t,e);for(g=0;b>g;g++)_=this.elWeekTemplate.cloneNode(!0),jindo.$Element(_).appendTo(this.elWeekAppendTarget),this._aWeekElement.push(_);if(this._aDateElement=jindo.$$("."+i+"date",this.elWeekAppendTarget),this._aDateContainerElement=jindo.$$("."+i+"week > *",this.elWeekAppendTarget),v>0)for(g=L-v;L>g;g++)j.push(g+1);for(g=1;E+1>g;g++)j.push(g);for(d=j.length-1,g=1;7-m>g;g++)j.push(g);for(g=0;gg?(r=!0,l.addClass(i+"prev-mon"),u=P.nYear,c=P.nMonth):g>d?(h=!0,l.addClass(i+"next-mon"),u=D.nYear,c=D.nMonth):(u=t,c=e),0===w&&l.addClass(i+"sun"),6==w&&l.addClass(i+"sat"),u==p.nYear&&1*c==p.nMonth&&j[g]==p.nDate&&l.addClass(i+"today"),f={elDate:this._aDateElement[g],elDateContainer:l.$value(),nYear:u,nMonth:c,nDate:j[g],bPrevMonth:r,bNextMonth:h,sHTML:j[g]},jindo.$Element(f.elDate).html(f.sHTML.toString()),this._aMetaData.push({nYear:u,nMonth:c,nDate:j[g]}),w=(w+1)%7,this.fireEvent("draw",f);this.fireEvent("afterDraw",{nYear:t,nMonth:e})}},_clear:function(t){this._aMetaData=[],this._aWeekElement=[],jindo.$Element(this.elWeekAppendTarget).empty()},attachEvent:function(){this.activate()},detachEvent:function(){this.deactivate()},_onActivate:function(){this.elBtnPrevYear&&this.wfPrevYear.attach(this.elBtnPrevYear,"click"),this.elBtnPrevMonth&&this.wfPrevMonth.attach(this.elBtnPrevMonth,"click"),this.elBtnNextMonth&&this.wfNextMonth.attach(this.elBtnNextMonth,"click"),this.elBtnNextYear&&this.wfNextYear.attach(this.elBtnNextYear,"click")},_onDeactivate:function(){this.elBtnPrevYear&&this.wfPrevYear.detach(this.elBtnPrevYear,"click"),this.elBtnPrevMonth&&this.wfPrevMonth.detach(this.elBtnPrevMonth,"click"),this.elBtnNextMonth&&this.wfNextMonth.detach(this.elBtnNextMonth,"click"),this.elBtnNextYear&&this.wfNextYear.detach(this.elBtnNextYear,"click")}}).extend(jindo.UIComponent),jindo.Calendar.getDateObject=function(t){return 3==arguments.length?new Date(arguments[0],arguments[1]-1,arguments[2]):new Date(t.nYear,t.nMonth-1,t.nDate)},jindo.Calendar.getDateHashTable=function(t){return 3==arguments.length?{nYear:arguments[0],nMonth:arguments[1],nDate:arguments[2]}:(arguments.length<=1&&(t=t||new Date),{nYear:t.getFullYear(),nMonth:t.getMonth()+1,nDate:t.getDate()})},jindo.Calendar.getTime=function(t){return this.getDateObject(t).getTime()},jindo.Calendar.getFirstDay=function(t,e){return new Date(t,e-1,1).getDay()},jindo.Calendar.getLastDay=function(t,e){return new Date(t,e,0).getDay()},jindo.Calendar.getLastDate=function(t,e){return new Date(t,e,0).getDate()},jindo.Calendar.getWeeks=function(t,e){var n=this.getFirstDay(t,e),i=this.getLastDate(t,e);return Math.ceil((n+i)/7)},jindo.Calendar.getRelativeDate=function(t,e,n,i){return this.getDateHashTable(new Date(i.nYear+t,i.nMonth+e-1,i.nDate+n))},jindo.Calendar.isPast=function(t,e){return this.getTime(t)this.getTime(e)?!0:!1},jindo.Calendar.isSameDate=function(t,e){return this.getTime(t)==this.getTime(e)?!0:!1},jindo.Calendar.isBetween=function(t,e,n){return this.isFuture(t,n)||this.isPast(t,e)?!1:!0},jindo.LayerManager=jindo.$Class({_bIsActivating:!1,_bIsLayerVisible:!1,_bIsHiding:!1,_bIsShowing:!1,_aLink:null,$init:function(t,e){this.option({sCheckEvent:"click",nCheckDelay:100,nShowDelay:0,nHideDelay:100,sMethod:"show",nDuration:200,Transition:{fFadeIn:jindo.Effect.cubicEaseOut,fFadeOut:jindo.Effect.cubicEaseIn,fSlideDown:jindo.Effect.cubicEaseOut,fSlideUp:jindo.Effect.cubicEaseIn}}),this.option(e||{}),this.setLayer(t),this._aLink=[],this._oShowTimer=new jindo.Timer,this._oHideTimer=new jindo.Timer,this._oEventTimer=new jindo.Timer,this._wfOnEvent=jindo.$Fn(this._onEvent,this),this.getVisible(),this.activate()},_onActivate:function(){this._wfOnEvent.attach(document,this.option("sCheckEvent"))},_onDeactivate:function(){this._wfOnEvent.detach(document,this.option("sCheckEvent"))},getVisible:function(){return this._bIsLayerVisible=this._wel.visible()&&this._wel.opacity()>0},_check:function(t){for(var e,n=jindo.$Element(t),i=0;e=this._aLink[i];i++)if(e=jindo.$Element(e).$value(),e&&(t==e||n.isChildOf(e)))return!0;return!1},_find:function(t){for(var e,n=0;e=this._aLink[n];n++)if(e==t)return n;return-1},getLayer:function(){return this._el},setLayer:function(t){this._el=jindo.$(t),this._wel=jindo.$Element(t);var e=this._el.cloneNode(!0),n=jindo.$Element(e);return n.css({position:"absolute",left:"-5000px"}).appendTo(this._el.parentNode),n.show(),this._nLayerHeight=n.height(),n.height(this._nLayerHeight),this._sLayerCSSHeight=n.css("height"),this._sLayerCSSOverflowX=this._wel.css("overflowX"),this._sLayerCSSOverflowY=this._wel.css("overflowY"),n.css("overflow","hidden").height(0),this._nSlideMinHeight=n.height()+1,n.leave(),this},_transform:function(){this._wel.css({overflowX:"hidden",overflowY:"hidden"})},_restore:function(){this._wel.css({overflowX:this._sLayerCSSOverflowX,overflowY:this._sLayerCSSOverflowY})},getLinks:function(){return this._aLink},setLinks:function(t){return this._aLink=jindo.$A(t).unique().$value(),this},link:function(t){if(arguments.length>1){for(var e=0,n=arguments.length;n>e;e++)this.link(arguments[e]);return this}return-1!=this._find(t)?this:(this._aLink.push(t),this)},unlink:function(t){if(arguments.length>1){for(var e=0,n=arguments.length;n>e;e++)this.unlink(arguments[e]);return this}var i=this._find(t);return i>-1&&this._aLink.splice(i,1),this},_fireEventBeforeShow:function(){return this._transform(),this.fireEvent("beforeShow",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventAppear:function(){this.fireEvent("appear",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventShow:function(){this._bIsShowing=!1,this._restore(),this.fireEvent("show",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventBeforeHide:function(){return this._transform(),this.fireEvent("beforeHide",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventHide:function(){this._bIsHiding=!1,this._restore(),this.fireEvent("hide",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_show:function(t,e){this._oEventTimer.abort(),this._bIsShowing=!0,this._bIsHiding=!1,e>0?this._oShowTimer.start(t,e):(this._oHideTimer.abort(),t())},_hide:function(t,e){this._bIsShowing=!1,this._bIsHiding=!0,e>0?this._oHideTimer.start(t,e):(this._oShowTimer.abort(),t())},_getShowMethod:function(){switch(this.option("sMethod")){case"show":return"showIn";case"fade":return"fadeIn";case"slide":return"slideDown"}},_getHideMethod:function(){switch(this.option("sMethod")){case"show":return"hideOut";case"fade":return"fadeOut";case"slide":return"slideUp"}},show:function(t){return"undefined"==typeof t&&(t=this.option("nShowDelay")),this[this._getShowMethod()](t),this},hide:function(t){return"undefined"==typeof t&&(t=this.option("nHideDelay")),this[this._getHideMethod()](t),this},showIn:function(t){"undefined"==typeof t&&(t=this.option("nShowDelay"));var e=this;return this._show(function(){e._sAppliedMethod="show",e.getVisible()||e._fireEventBeforeShow()&&(e._wel.show(),e._fireEventAppear(),e._fireEventShow())},t),this},hideOut:function(t){"undefined"==typeof t&&(t=this.option("nHideDelay"));var e=this;return this._hide(function(){e._sAppliedMethod="show",e.getVisible()&&e._fireEventBeforeHide()&&(e._wel.hide(),e._fireEventHide())},t),this},_getTransition:function(){return this._oTransition?this._oTransition:this._oTransition=(new jindo.Transition).fps(30)},fadeIn:function(t){var e=this._getTransition();e.detachAll().abort(),"undefined"==typeof t&&(t=this.option("nShowDelay"));var n=this.option("nDuration"),i=this;return this._show(function(){i._sAppliedMethod="fade";var t=i.getLayer();i._wel.visible()&&1==i._wel.opacity()||i._fireEventBeforeShow()&&(i._wel.visible()||(i._wel.opacity(0),i._wel.show()),n*=1-i._wel.opacity(),e.attach({playing:function(t){1===t.nStep&&(this.detach("playing",arguments.callee),i._fireEventAppear())},end:function(t){this.detach("end",arguments.callee),i._fireEventShow()}}).start(n,t,{"@opacity":i.option("Transition").fFadeIn.apply(null,[1])}))},t),this},fadeOut:function(t){var e=this._getTransition();e.detachAll().abort(),"undefined"==typeof t&&(t=this.option("nHideDelay"));var n=this.option("nDuration"),i=this;return this._hide(function(){if(i._sAppliedMethod="fade",i.getVisible()){var t=i.getLayer();i._fireEventBeforeHide()&&(n*=i._wel.opacity(),e.attach({end:function(t){this.detach("end",arguments.callee),i._wel.hide(),i._wel.opacity(1),i._fireEventHide()}}).start(n,t,{"@opacity":i.option("Transition").fFadeOut.apply(null,[0])}))}},t),this},slideDown:function(t){var e=this._getTransition();e.detachAll().abort(),"undefined"==typeof t&&(t=this.option("nShowDelay"));var n=this.option("nDuration"),i=this;return this._show(function(){i._sAppliedMethod="slide";var t=i.getLayer();Math.ceil(i._wel.height())-1?!0:!1},_setLeftRight:function(t,e){var n=this.getElement(),i=this.getLayer(),s=n.offsetWidth,a=i.offsetWidth;n==document.body&&(s=jindo.$Document().clientSize().width);var o=this._isPosition(t,"left"),r=this._isPosition(t,"right"),h=this._isPosition(t,"inside");return o?h?e.nLeft+=t.nLeft:(e.nLeft-=a,e.nLeft-=t.nLeft):r?(e.nLeft+=s,h?(e.nLeft-=a,e.nLeft-=t.nLeft):e.nLeft+=t.nLeft):("left"==t.sAlign&&(e.nLeft+=t.nLeft),"center"==t.sAlign&&(e.nLeft+=(s-a)/2),"right"==t.sAlign&&(e.nLeft+=s-a,e.nLeft-=t.nLeft)),e},_setVerticalAlign:function(t,e){var n=this.getElement(),i=this.getLayer(),s=n.offsetHeight,a=i.offsetHeight;switch(n==document.body&&(s=jindo.$Document().clientSize().height),t.sValign){case"top":e.nTop+=t.nTop;break;case"middle":e.nTop+=(s-a)/2;break;case"bottom":e.nTop+=s-a-t.nTop}return e},_adjustScrollPosition:function(t){if(this.getElement()==document.body){var e=jindo.$Document().scrollPosition();t.nTop+=e.top,t.nLeft+=e.left}return t},getPosition:function(t){"object"!=typeof t&&(t=this.option()),"undefined"==typeof t.nTop&&(t.nTop=0),"undefined"==typeof t.nLeft&&(t.nLeft=0);var e,n=this._isPosition(t,"center"),i=this._isPosition(t,"inside"),s=this._isPosition(t,"top"),a=this._isPosition(t,"bottom"),o=this._isPosition(t,"left"),r=this._isPosition(t,"right");o&&(e="left"),r&&(e="right"),s&&(e="top"),a&&(e="bottom"),n&&(e="center");var h,l=this.getElement(),u=jindo.$Element(l),c=this.getLayer(),f=jindo.$Element(c),d=u.offset(),_=l.offsetWidth,g=l.offsetHeight,p=c.offsetWidth,v=c.offsetHeight,m={nTop:d.top,nLeft:d.left};switch(l==document.body&&(h=jindo.$Document().clientSize(),_=h.width,g=h.height),p+=parseInt(f.css("marginLeft"))+parseInt(f.css("marginRight"))||0,v+=parseInt(f.css("marginTop"))+parseInt(f.css("marginBottom"))||0,e){case"center":m.nTop+=(g-v)/2,m.nTop+=t.nTop,m.nLeft+=(_-p)/2,m.nLeft+=t.nLeft;break;case"top":i?m.nTop+=t.nTop:m.nTop-=t.nTop+v,m=this._setLeftRight(t,m);break;case"bottom":m.nTop+=g,i?m.nTop-=t.nTop+v:m.nTop+=t.nTop,m=this._setLeftRight(t,m);break;case"left":i?m.nLeft+=t.nLeft:m.nLeft-=t.nLeft+p,m=this._setVerticalAlign(t,m);break;case"right":m.nLeft+=_,i?m.nLeft-=t.nLeft+p:m.nLeft+=t.nLeft,m=this._setVerticalAlign(t,m)}return m=this._adjustScrollPosition(m)},setPosition:function(t){var e=jindo.$Element(this.getLayer());return e.css("left","-9999px").css("top","0px"),"undefined"==typeof t&&(t=this.getPosition()),this.option("bAuto")&&(t=this._adjustPosition(t)),e.css("left",t.nLeft+"px").css("top",t.nTop+"px"),this},getCurrentPosition:function(){var t=jindo.$Element(this.getLayer());return{nTop:parseInt(t.css("top")),nLeft:parseInt(t.css("left"))}},_isFullyVisible:function(t){var e=this.getLayer(),n=jindo.$Element(e),i=jindo.$Document().scrollPosition(),s=i.top,a=i.left,o=jindo.$Document().clientSize(),r=e.offsetWidth+(parseInt(n.css("marginLeft"))+parseInt(n.css("marginRight"))||0),h=e.offsetHeight+(parseInt(n.css("marginTop"))+parseInt(n.css("marginBottom"))||0);return t.nLeft>=0&&t.nTop>=0&&o.width>=t.nLeft-a+r&&o.height>=t.nTop-s+h?!0:!1},_mirrorHorizontal:function(t){if("center"==t.sAlign||"inside-center"==t.sPosition)return t;var e={};for(var n in t)e[n]=t[n];return this._isPosition(e,"right")?e.sPosition=e.sPosition.replace(/right/,"left"):this._isPosition(e,"left")?e.sPosition=e.sPosition.replace(/left/,"right"):"right"==e.sAlign?e.sAlign="left":"left"==e.sAlign&&(e.sAlign="right"),e},_mirrorVertical:function(t){if("middle"==t.sValign||"inside-center"==t.sPosition)return t;var e={};for(var n in t)e[n]=t[n];return this._isPosition(e,"top")?e.sPosition=e.sPosition.replace(/top/,"bottom"):this._isPosition(e,"bottom")?e.sPosition=e.sPosition.replace(/bottom/,"top"):"top"==e.sValign?e.sValign="bottom":"bottom"==e.sValign&&(e.sValign="top"),e},_adjustPosition:function(t){var e=this.option(),n=[];n.push(t),n.push(this.getPosition(this._mirrorHorizontal(e))),n.push(this.getPosition(this._mirrorVertical(e))),n.push(this.getPosition(this._mirrorVertical(this._mirrorHorizontal(e))));for(var i,s=0;i=n[s];s++)if(this._isFullyVisible(i)){t=i;break}return t}}).extend(jindo.Component),jindo.Timer=jindo.$Class({$init:function(){this._nTimer=null,this._nLatest=null,this._nRemained=0,this._nDelay=null,this._fRun=null,this._bIsRunning=!1},start:function(t,e){return this.abort(),this._nRemained=0,this._nDelay=e,this._fRun=t,this._bIsRunning=!0,this._nLatest=this._getTime(),this.fireEvent("wait"),this._excute(this._nDelay,!1),!0},isRunning:function(){return this._bIsRunning},_getTime:function(){return(new Date).getTime()},_clearTimer:function(){var t=!1;return this._nTimer&&(clearInterval(this._nTimer),this._bIsRunning=!1,t=!0),this._nTimer=null,t},abort:function(){var t=this._clearTimer();return t&&(this.fireEvent("abort"),this._fRun=null),t},pause:function(){var t=this._getTime()-this._nLatest;return this._nRemained=Math.max(this._nDelay-t,0),this._clearTimer()},_excute:function(t,e){var n=this;this._clearTimer(),this._bIsRunning=!0,this._nTimer=setInterval(function(){if(n._nTimer){n.fireEvent("run");var t=n._fRun();if(n._nLatest=n._getTime(),!t)return clearInterval(n._nTimer),n._nTimer=null,n._bIsRunning=!1,void n.fireEvent("end");n.fireEvent("wait"),e&&n._excute(n._nDelay,!1)}},t)},resume:function(){return!this._fRun||this.isRunning()?!1:(this._bIsRunning=!0,this.fireEvent("wait"),this._excute(this._nRemained,!0),this._nRemained=0,!0)}}).extend(jindo.Component),jindo.Transition=jindo.$Class({_nFPS:30,_aTaskQueue:null,_oTimer:null,_bIsWaiting:!0,_bIsPlaying:!1,$init:function(t){this._aTaskQueue=[],this._oTimer=new jindo.Timer,this.option({fEffect:jindo.Effect.linear,bCorrection:!1}),this.option(t||{})},fps:function(t){return arguments.length>0?(this._nFPS=t,this):this._nFPS},isPlaying:function(){return this._bIsPlaying},abort:function(){return this._aTaskQueue=[],this._oTimer.abort(),this._bIsPlaying&&this.fireEvent("abort"),this._bIsWaiting=!0,this._bIsPlaying=!1,this._htTaskToDo=null,this},start:function(t,e,n){return arguments.length>0&&this.queue.apply(this,arguments),this._prepareNextTask(),this},queue:function(t,e){var n;if("function"==typeof arguments[0])n={sType:"function",fTask:arguments[0]};else{var i=[];arguments.length;if(arguments[1]instanceof Array)i=arguments[1];else{var s=[];jindo.$A(arguments).forEach(function(t,e){e>0&&(s.push(t),e%2==0&&(i.push(s.concat()),s=[]))})}n={sType:"task",nDuration:t,aList:[]};for(var a=0;an;n++)for(var s=e[n].elTarget,a=0,o=e[n].aValue,r=o.length;r>a;a++){var h=o[a][0],l=o[a][2];if("function"!=typeof l&&(l=l instanceof Array?this.option("fEffect")(l[0],l[1]):this.option("fEffect")(l)),l.setStart)if(this._isHTMLElement(s)){var u=jindo.$Element(s);switch(h){case"style":l.setStart(u.css(o[a][1]));break;case"attr":l.setStart(u.$value()[o[a][1]])}}else l.setStart(s.getter(o[a][1]));o[a][2]=l}return t}return null},_prepareNextTask:function(){if(this._bIsWaiting){var t=this._dequeueTask();if(t)switch(t.sType){case"task":this._bIsPlaying||this.fireEvent("start");var e=1e3/this._nFPS,n=e/t.nDuration;this._htTaskToDo={aList:t.aList,nRatio:0,nInterval:e,nGap:n,nStep:0,nTotalStep:Math.ceil(t.nDuration/e)},this.resume();break;case"function":this._bIsPlaying||this.fireEvent("start"),t.fTask(),this._prepareNextTask();break;case"sleep":this._bIsPlaying&&(this.fireEvent("sleep",{nDuration:t.nDuration}),t.fCallback());var i=this;setTimeout(function(){i.fireEvent("awake"),i._prepareNextTask()},t.nDuration)}else this._bIsPlaying&&(this._bIsPlaying=!1,this.abort(),this.fireEvent("end"))}},_isHTMLElement:function(t){return"tagName"in t},_doTask:function(){for(var t=this._htTaskToDo,e=parseFloat(t.nRatio.toFixed(5),1),n=t.nStep,i=t.nTotalStep,s=t.aList,a={},o=this.option("bCorrection"),r=0,h=s.length;h>r;r++)for(var l=s[r].elTarget,u=0,c=s[r].aValue,f=c.length;f>u;u++){var d=c[u][0],_=c[u][1],g=c[u][2](e);if(this._isHTMLElement(l)){var p=jindo.$Element(l);if(o){var v=/^[0-9]*([^0-9]*)$/.test(g)&&RegExp.$1||"";if(v){var m,E=parseFloat(g);E+=a[_]||0,E=parseFloat(E.toFixed(5)),r==h-1?g=Math.round(E)+v:(m=parseFloat(/(\.[0-9]+)$/.test(E)&&RegExp.$1||0),g=parseInt(E,10)+v,a[_]=m)}}switch(d){case"style":p.css(_,g);break;case"attr":p.$value()[_]=g}}else l.setter(_,g);this._bIsPlaying&&this.fireEvent("playing",{element:l,sKey:_,sValue:g,nStep:n,nTotalStep:i})}return t.nRatio=Math.min(t.nRatio+t.nGap,1),t.nStep+=1,1!=e}}).extend(jindo.Component),function(){var t=jindo.$Element.prototype.css;jindo.$Element.prototype.css=function(e,n){return"opacity"==e?"undefined"!=typeof n?this.opacity(parseFloat(n)):this.opacity():"undefined"!=typeof n?t.call(this,e,n):t.call(this,e)}}(),jindo.Effect=function(t){if(this instanceof arguments.callee)throw new Error("You can't create a instance of this");var e=/^(\-?[0-9\.]+)(%|px|pt|em)?$/,n=/^rgb\(([0-9]+)\s?,\s?([0-9]+)\s?,\s?([0-9]+)\)$/i,i=/^#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,s=/^#([0-9A-F])([0-9A-F])([0-9A-F])$/i,a=function(t){var a,o=t;return e.test(t)?(o=parseFloat(t),a=RegExp.$2):n.test(t)?(o=[parseInt(RegExp.$1,10),parseInt(RegExp.$2,10),parseInt(RegExp.$3,10)],a="color"):i.test(t=t.replace(s,"#$1$1$2$2$3$3"))&&(o=[parseInt(RegExp.$1,16),parseInt(RegExp.$2,16),parseInt(RegExp.$3,16)],a="color"),{nValue:o,sUnit:a}};return function(e,n){var i;if(arguments.length>1?(e=a(e),n=a(n),i=n.sUnit):(n=a(e),e=null,i=n.sUnit),e&&n&&e.sUnit!=n.sUnit)throw new Error("unit error");e=e&&e.nValue,n=n&&n.nValue;var s=function(s){var a=t(s),o=function(t,e){return(e-t)*a+t+i};if("color"==i){var r=parseInt(o(e[0],n[0]),10)<<16;r|=parseInt(o(e[1],n[1]),10)<<8,r|=parseInt(o(e[2],n[2]),10), r=r.toString(16).toUpperCase();for(var h=0;6-r.length;h++)r="0"+r;return"#"+r}return o(e,n)};return null===e&&(s.setStart=function(t){if(t=a(t),t.sUnit!=i)throw new Error("unit eror");e=t.nValue}),s}},jindo.Effect.linear=jindo.Effect(function(t){return t}),jindo.Effect.easeIn=jindo.Effect(function(t){return 1-Math.sqrt(1-t*t)}),jindo.Effect.easeOut=jindo.Effect(function(t){return Math.sqrt((2-t)*t)}),jindo.Effect.bounce=jindo.Effect(function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),jindo.Effect._cubicBezier=function(t,e,n,i){return function(s){function a(t){return((u*t+l)*t+h)*t}function o(t){return((d*t+f)*t+c)*t}function r(t,e){for(var n,i,s=0,o=1,r=t,c=0;8>c;c++){if(n=a(r)-t,Math.abs(n)r)return s;if(r>o)return o;for(;o>s;){if(n=a(r),Math.abs(n-t)n?s=r:o=r,r=.5*(o-s)+s}return r}var h=3*t,l=3*(n-t)-h,u=1-h-l,c=3*e,f=3*(i-e)-c,d=1-c-f;return o(r(s,.001))}},jindo.Effect.cubicBezier=function(t,e,n,i){return jindo.Effect(jindo.Effect._cubicBezier(t,e,n,i))},jindo.Effect.overphase=jindo.Effect.cubicBezier(.25,.75,.8,1.3),jindo.Effect.easeInOut=jindo.Effect.cubicBezier(.75,0,.25,1),jindo.Effect.easeOutIn=jindo.Effect.cubicBezier(.25,.75,.75,.25),jindo.Effect.cubicEase=jindo.Effect.cubicBezier(.25,.1,.25,1),jindo.Effect.cubicEaseIn=jindo.Effect.cubicBezier(.42,0,1,1),jindo.Effect.cubicEaseOut=jindo.Effect.cubicBezier(0,0,.58,1),jindo.Effect.cubicEaseInOut=jindo.Effect.cubicBezier(.42,0,.58,1),jindo.Effect.cubicEaseOutIn=jindo.Effect.cubicBezier(0,.42,1,.58),jindo.Effect.pulse=function(t){return jindo.Effect(function(e){return-Math.cos(e*(t-.5)*2*Math.PI)/2+.5})},jindo.FileUploader=jindo.$Class({_bIsActivating:!1,_aHiddenInput:[],$init:function(t,e){var n={sUrl:"",sCallback:"",htData:{},sFiletype:"*",sMsgNotAllowedExt:"업로드가 허용되지 않는 파일형식입니다",bAutoUpload:!1,bAutoReset:!0,bActivateOnload:!0};this.option(n),this.option(e||{}),this._el=jindo.$(t),this._wel=jindo.$Element(this._el),this._elForm=this._el.form,this._aHiddenInput=[],this.constructor._oCallback={},this._wfChange=jindo.$Fn(this._onFileSelectChange,this),this._sFunctionName=null,this.option("bActivateOnload")&&this.activate()},_appendIframe:function(){var t="tmpFrame_"+this._makeUniqueId();this._welIframe=jindo.$Element(jindo.$('