diff --git a/CHANGELOG.md b/CHANGELOG.md index 9799a0f..9aefcad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ -## 2.9.0 +## 2.9.1 +1. 버그 수정 + * font 태그 변환시 누락된 사이즈 변환 추가 (`` -> ``) + * 특정글에서 엔터 혹은 이미지삽입시 브라우저가 죽는 현상 수정 + +## 2.9.0 1. 버그 수정 * IE11 한정 > 엑셀 테이블 복사붙여넣기 후 폰트변경시 테이블이 깨짐 * IE_Edge 한정 > 텍스트 일부 선택 후 url 적용시 적용이 안되는 버그 수정 * FF > 인용구 삽입 후 커서가 사라지는 버그 수정 + * IE엣지/FF > ctrl+a로 전체선택 삭제 후 엔터시 바로 줄바꿈되지 않는 문제 수정 2. 기능 개선 * 다국어 처리 * 한 페이지에 짝수 개의 에디터를 생성하는 경우, 툴바의 '더보기' 버튼이 동작하지 않음 @@ -11,6 +17,7 @@ * $H.prototype.length 비교로직 오류 수정 * CORS Ajax 기능 추가 * Mac에서 ctrl조합 단축키 모두 meta조합으로 변경 + * 붙여넣기플러그인 개선 ※ 오픈소스 배포 재개 * 오픈소스 github 이전 diff --git a/dist/SmartEditor2Skin.html b/dist/SmartEditor2Skin.html index 3087cad..a640b47 100644 --- a/dist/SmartEditor2Skin.html +++ b/dist/SmartEditor2Skin.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2Skin_en_US.html b/dist/SmartEditor2Skin_en_US.html index 6b6b3f2..ebc5761 100644 --- a/dist/SmartEditor2Skin_en_US.html +++ b/dist/SmartEditor2Skin_en_US.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2Skin_ja_JP.html b/dist/SmartEditor2Skin_ja_JP.html index be35a64..066f3c7 100644 --- a/dist/SmartEditor2Skin_ja_JP.html +++ b/dist/SmartEditor2Skin_ja_JP.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2Skin_ko_KR.html b/dist/SmartEditor2Skin_ko_KR.html index 3087cad..a640b47 100644 --- a/dist/SmartEditor2Skin_ko_KR.html +++ b/dist/SmartEditor2Skin_ko_KR.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2Skin_zh_CN.html b/dist/SmartEditor2Skin_zh_CN.html index a0f53b9..2a54876 100644 --- a/dist/SmartEditor2Skin_zh_CN.html +++ b/dist/SmartEditor2Skin_zh_CN.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2Skin_zh_TW.html b/dist/SmartEditor2Skin_zh_TW.html index 90a3429..ae2d9be 100644 --- a/dist/SmartEditor2Skin_zh_TW.html +++ b/dist/SmartEditor2Skin_zh_TW.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/SmartEditor2noframe.html b/dist/SmartEditor2noframe.html index 5edc725..1e4797e 100644 --- a/dist/SmartEditor2noframe.html +++ b/dist/SmartEditor2noframe.html @@ -20,7 +20,7 @@ -Version: 2.9.0.4a256db +Version: 2.9.1.5caeebb
diff --git a/dist/js/lib/jindo2.all.js b/dist/js/lib/jindo2.all.js index c0baf9d..6dada90 100644 --- a/dist/js/lib/jindo2.all.js +++ b/dist/js/lib/jindo2.all.js @@ -1 +1,4 @@ -if(typeof window!="undefined"&&typeof window.nhn=="undefined"){window.nhn={}}if(typeof window!="undefined"){if(typeof window.jindo=="undefined"){window.jindo={}}}else{if(!jindo){jindo={}}}jindo.$Jindo=function(){var a=arguments.callee;var b=a._cached;if(b){return b}if(!(this instanceof a)){return new a()}if(!b){a._cached=this}this.version="1.5.2-SMART_EDITOR"};jindo.$=function(l){var h=[],o=arguments,n=o.length,g=o[n-1],m=document,c=null;var d=/^<([a-z]+|h[1-5])>$/i;var e=/^<([a-z]+|h[1-5])(\s+[^>]+)?>/i;if(n>1&&typeof g!="string"&&g.body){o=Array.prototype.slice.apply(o,[0,n-1]);m=g}for(var f=0;f-1){if(d.test(c)){c=m.createElement(RegExp.$1)}else{if(e.test(c)){var b={thead:"table",tbody:"table",tr:"tbody",td:"tr",dt:"dl",dd:"dl",li:"ul",legend:"fieldset",option:"select"};var r=RegExp.$1.toLowerCase();var q=jindo._createEle(b[r],c,m);for(var f=0,a=q.length;f1?h:(h[0]||null)};jindo._createEle=function(g,f,a,e){var c="R"+new Date().getTime()+parseInt(Math.random()*100000,10);var d=a.createElement("div");switch(g){case"select":case"table":case"dl":case"ul":case"fieldset":d.innerHTML="<"+g+' class="'+c+'">'+f+"";break;case"thead":case"tbody":case"col":d.innerHTML="<"+g+' class="'+c+'">'+f+"
";break;case"tr":d.innerHTML=''+f+"
";break;default:d.innerHTML='
'+f+"
";break}var b;for(b=d.firstChild;b;b=b.firstChild){if(b.className==c){break}}return e?b:b.childNodes};jindo.$Class=function(oDef){function typeClass(){var t=this;var a=[];var superFunc=function(m,superClass,func){if(m!="constructor"&&func.toString().indexOf("$super")>-1){var funcArg=func.toString().replace(/function[^\(]*\(([^\)]*)[\w\W]*/g,"$1").split(",");var funcStr=func.toString().replace(/function[^{]*{/,"").replace(/(\w|\.?)(this\.\$super|this)/g,function(m,m2,m3){if(!m2){return m3+".$super"}return m});funcStr=funcStr.substr(0,funcStr.length-1);func=superClass[m]=eval("false||function("+funcArg.join(",")+"){"+funcStr+"}")}return function(){var f=this.$this[m];var t=this.$this;var r=(t[m]=func).apply(t,arguments);t[m]=f;return r}};while(typeof t._$superClass!="undefined"){t.$super=new Object;t.$super.$this=this;for(var x in t._$superClass.prototype){if(t._$superClass.prototype.hasOwnProperty(x)){if(typeof this[x]=="undefined"&&x!="$init"){this[x]=t._$superClass.prototype[x]}if(x!="constructor"&&x!="_$superClass"&&typeof t._$superClass.prototype[x]=="function"){t.$super[x]=superFunc(x,t._$superClass,t._$superClass.prototype[x])}else{t.$super[x]=t._$superClass.prototype[x]}}}if(typeof t.$super.$init=="function"){a[a.length]=t}t=t.$super}for(var i=a.length-1;i>-1;i--){a[i].$super.$init.apply(a[i].$super,arguments)}if(typeof this.$init=="function"){this.$init.apply(this,arguments)}}if(typeof oDef.$static!="undefined"){var i=0,x;for(x in oDef){if(oDef.hasOwnProperty(x)){x=="$static"||i++}}for(x in oDef.$static){if(oDef.$static.hasOwnProperty(x)){typeClass[x]=oDef.$static[x]}}if(!i){return oDef.$static}delete oDef.$static}typeClass.prototype=oDef;typeClass.prototype.constructor=typeClass;typeClass.extend=jindo.$Class.extend;return typeClass};jindo.$Class.extend=function(b){if(typeof b=="undefined"||b===null||!b.extend){throw new Error("extend시 슈퍼 클래스는 Class여야 합니다.")}this.prototype._$superClass=b;for(var a in b){if(b.hasOwnProperty(a)){if(a=="prototype"){continue}this[a]=b[a]}}return this};jindo.$$=jindo.cssquery=(function(){var sVersion="3.0";var debugOption={repeat:1};var UID=1;var cost=0;var validUID={};var bSupportByClassName=document.getElementsByClassName?true:false;var safeHTML=false;var getUID4HTML=function(oEl){var nUID=safeHTML?(oEl._cssquery_UID&&oEl._cssquery_UID[0]):oEl._cssquery_UID;if(nUID&&validUID[nUID]==oEl){return nUID}nUID=UID++;oEl._cssquery_UID=safeHTML?[nUID]:nUID;validUID[nUID]=oEl;return nUID};var getUID4XML=function(oEl){var oAttr=oEl.getAttribute("_cssquery_UID");var nUID=safeHTML?(oAttr&&oAttr[0]):oAttr;if(!nUID){nUID=UID++;oEl.setAttribute("_cssquery_UID",safeHTML?[nUID]:nUID)}return nUID};var getUID=getUID4HTML;var uniqid=function(sPrefix){return(sPrefix||"")+new Date().getTime()+parseInt(Math.random()*100000000,10)};function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null){node=document}if(tag==null){tag="*"}var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i -1)';case"^=":return"("+sVar+" && "+sVar+".indexOf("+sVal+") == 0)";case"$=":return"("+sVar+" && "+sVar+".substr("+sVar+".length - "+oExpr.val.length+") == "+sVal+")";case"*=":return"("+sVar+" && "+sVar+".indexOf("+sVal+") > -1)";case"!=":return"("+sVar+" != "+sVal+")";case"=":return"("+sVar+" == "+sVal+")"}return"("+sVar+")"};var getNodeIndex=function(oEl){var nUID=getUID(oEl);var nIndex=oNodeIndexes[nUID]||0;if(nIndex==0){for(var oSib=(oEl.parentNode||oEl._IE5_parentNode).firstChild;oSib;oSib=oSib.nextSibling){if(oSib.nodeType!=1){continue}nIndex++;setNodeIndex(oSib,nIndex)}nIndex=oNodeIndexes[nUID]}return nIndex};var oNodeIndexes={};var setNodeIndex=function(oEl,nIndex){var nUID=getUID(oEl);oNodeIndexes[nUID]=nIndex};var unsetNodeIndexes=function(){setTimeout(function(){oNodeIndexes={}},0)};var oPseudoes_dontShrink={contains:function(oEl,sOption){return(oEl.innerText||oEl.textContent||"").indexOf(sOption)>-1},"last-child":function(oEl,sOption){for(oEl=oEl.nextSibling;oEl;oEl=oEl.nextSibling){if(oEl.nodeType==1){return false}}return true},"first-child":function(oEl,sOption){for(oEl=oEl.previousSibling;oEl;oEl=oEl.previousSibling){if(oEl.nodeType==1){return false}}return true},"only-child":function(oEl,sOption){var nChild=0;for(var oChild=(oEl.parentNode||oEl._IE5_parentNode).firstChild;oChild;oChild=oChild.nextSibling){if(oChild.nodeType==1){nChild++}if(nChild>1){return false}}return nChild?true:false},empty:function(oEl,_){return oEl.firstChild?false:true},"nth-child":function(oEl,nMul,nAdd){var nIndex=getNodeIndex(oEl);return nIndex%nMul==nAdd},"nth-last-child":function(oEl,nMul,nAdd){var oLast=(oEl.parentNode||oEl._IE5_parentNode).lastChild;for(;oLast;oLast=oLast.previousSibling){if(oLast.nodeType==1){break}}var nTotal=getNodeIndex(oLast);var nIndex=getNodeIndex(oEl);var nLastIndex=nTotal-nIndex+1;return nLastIndex%nMul==nAdd},checked:function(oEl){return !!oEl.checked},selected:function(oEl){return !!oEl.selected},enabled:function(oEl){return !oEl.disabled},disabled:function(oEl){return !!oEl.disabled}};var getExpression=function(sBody){var oRet={defines:"",returns:"true"};var sBody=restoreKeys(sBody,true);var aExprs=[];var aDefineCode=[],aReturnCode=[];var sId,sTagName;var sBody=sBody.replace(/:([\w-]+)(\(([^)]*)\))?/g,function(_1,sType,_2,sOption){switch(sType){case"not":var oInner=getExpression(sOption);var sFuncDefines=oInner.defines;var sFuncReturns=oInner.returnsID+oInner.returnsTAG+oInner.returns;aReturnCode.push("!(function() { "+sFuncDefines+" return "+sFuncReturns+" })()");break;case"nth-child":case"nth-last-child":sOption=restoreString(sOption);if(sOption=="even"){sOption="2n"}else{if(sOption=="odd"){sOption="2n+1"}}var nMul,nAdd;var matchstr=sOption.match(/([0-9]*)n([+-][0-9]+)*/);if(matchstr){nMul=matchstr[1]||1;nAdd=matchstr[2]||0}else{nMul=Infinity;nAdd=parseInt(sOption,10)}aReturnCode.push("oPseudoes_dontShrink["+wrapQuot(sType)+"](oEl, "+nMul+", "+nAdd+")");break;case"first-of-type":case"last-of-type":sType=(sType=="first-of-type"?"nth-of-type":"nth-last-of-type");sOption=1;case"nth-of-type":case"nth-last-of-type":sOption=restoreString(sOption);if(sOption=="even"){sOption="2n"}else{if(sOption=="odd"){sOption="2n+1"}}var nMul,nAdd;if(/([0-9]*)n([+-][0-9]+)*/.test(sOption)){nMul=parseInt(RegExp.$1,10)||1;nAdd=parseInt(RegExp.$2,20)||0}else{nMul=Infinity;nAdd=parseInt(sOption,10)}oRet.nth=[nMul,nAdd,sType];break;default:sOption=sOption?restoreString(sOption):"";aReturnCode.push("oPseudoes_dontShrink["+wrapQuot(sType)+"](oEl, "+wrapQuot(sOption)+")");break}return""});var sBody=sBody.replace(/\[(@?[\w-]+)(([!^~$*]?=)([^\]]*))?\]/g,function(_1,sKey,_2,sOp,sVal){sKey=restoreString(sKey);sVal=restoreString(sVal);if(sKey=="checked"||sKey=="disabled"||sKey=="enabled"||sKey=="readonly"||sKey=="selected"){if(!sVal){sOp="=";sVal="true"}}aExprs.push({key:sKey,op:sOp,val:sVal});return""});var sClassName=null;var sBody=sBody.replace(/\.([\w-]+)/g,function(_,sClass){aExprs.push({key:"class",op:"~=",val:sClass});if(!sClassName){sClassName=sClass}return""});var sBody=sBody.replace(/#([\w-]+)/g,function(_,sIdValue){if(bXMLDocument){aExprs.push({key:"id",op:"=",val:sIdValue})}else{sId=sIdValue}return""});sTagName=sBody=="*"?"":sBody;var oVars={};for(var i=0,oExpr;oExpr=aExprs[i];i++){var sKey=oExpr.key;if(!oVars[sKey]){aDefineCode.push(getDefineCode(sKey))}aReturnCode.unshift(getReturnCode(oExpr));oVars[sKey]=true}if(aDefineCode.length){oRet.defines="var "+aDefineCode.join(",")+";"}if(aReturnCode.length){oRet.returns=aReturnCode.join("&&")}oRet.quotID=sId?wrapQuot(sId):"";oRet.quotTAG=sTagName?wrapQuot(bXMLDocument?sTagName:sTagName.toUpperCase()):"";if(bSupportByClassName){oRet.quotCLASS=sClassName?wrapQuot(sClassName):""}oRet.returnsID=sId?"oEl.id == "+oRet.quotID+" && ":"";oRet.returnsTAG=sTagName&&sTagName!="*"?"oEl.tagName == "+oRet.quotTAG+" && ":"";return oRet};var splitToParts=function(sQuery){var aParts=[];var sRel=" ";var sBody=sQuery.replace(/(.*?)\s*(!?[+>~ ]|!)\s*/g,function(_,sBody,sRelative){if(sBody){aParts.push({rel:sRel,body:sBody})}sRel=sRelative.replace(/\s+$/g,"")||" ";return""});if(sBody){aParts.push({rel:sRel,body:sBody})}return aParts};var isNth_dontShrink=function(oEl,sTagName,nMul,nAdd,sDirection){var nIndex=0;for(var oSib=oEl;oSib;oSib=oSib[sDirection]){if(oSib.nodeType==1&&(!sTagName||sTagName==oSib.tagName)){nIndex++}}return nIndex%nMul==nAdd};var compileParts=function(aParts){var aPartExprs=[];for(var i=0,oPart;oPart=aParts[i];i++){aPartExprs.push(getExpression(oPart.body))}var sFunc="";var sPushCode="aRet.push(oEl); if (oOptions.single) { bStop = true; }";for(var i=aParts.length-1,oPart;oPart=aParts[i];i--){var oExpr=aPartExprs[i];var sPush=(debugOption.callback?"cost++;":"")+oExpr.defines;var sReturn="if (bStop) {"+(i==0?"return aRet;":"return;")+"}";if(oExpr.returns=="true"){sPush+=(sFunc?sFunc+"(oEl);":sPushCode)+sReturn}else{sPush+="if ("+oExpr.returns+") {"+(sFunc?sFunc+"(oEl);":sPushCode)+sReturn+"}"}var sCheckTag="oEl.nodeType != 1";if(oExpr.quotTAG){sCheckTag="oEl.tagName != "+oExpr.quotTAG}var sTmpFunc="(function(oBase"+(i==0?", oOptions) { var bStop = false; var aRet = [];":") {");if(oExpr.nth){sPush="if (isNth_dontShrink(oEl, "+(oExpr.quotTAG?oExpr.quotTAG:"false")+","+oExpr.nth[0]+","+oExpr.nth[1]+',"'+(oExpr.nth[2]=="nth-of-type"?"previousSibling":"nextSibling")+'")) {'+sPush+"}"}switch(oPart.rel){case" ":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oCandi = oEl;for (; oCandi; oCandi = (oCandi.parentNode || oCandi._IE5_parentNode)) {if (oCandi == oBase) break;}if (!oCandi || "+sCheckTag+") return aRet;"+sPush}else{sTmpFunc+="var aCandi = getChilds_dontShrink(oBase, "+(oExpr.quotTAG||'"*"')+", "+(oExpr.quotCLASS||"null")+");for (var i = 0, oEl; oEl = aCandi[i]; i++) {"+(oExpr.quotCLASS?"if ("+sCheckTag+") continue;":"")+sPush+"}"}break;case">":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");if ((oEl.parentNode || oEl._IE5_parentNode) != oBase || "+sCheckTag+") return aRet;"+sPush}else{sTmpFunc+="for (var oEl = oBase.firstChild; oEl; oEl = oEl.nextSibling) {if ("+sCheckTag+") { continue; }"+sPush+"}"}break;case"+":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oPrev;for (oPrev = oEl.previousSibling; oPrev; oPrev = oPrev.previousSibling) { if (oPrev.nodeType == 1) break; }if (!oPrev || oPrev != oBase || "+sCheckTag+") return aRet;"+sPush}else{sTmpFunc+="for (var oEl = oBase.nextSibling; oEl; oEl = oEl.nextSibling) { if (oEl.nodeType == 1) break; }if (!oEl || "+sCheckTag+") { return aRet; }"+sPush}break;case"~":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oCandi = oEl;for (; oCandi; oCandi = oCandi.previousSibling) { if (oCandi == oBase) break; }if (!oCandi || "+sCheckTag+") return aRet;"+sPush}else{sTmpFunc+="for (var oEl = oBase.nextSibling; oEl; oEl = oEl.nextSibling) {if ("+sCheckTag+") { continue; }if (!markElement_dontShrink(oEl, "+i+")) { break; }"+sPush+"}"}break;case"!":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");for (; oBase; oBase = (oBase.parentNode || oBase._IE5_parentNode)) { if (oBase == oEl) break; }if (!oBase || "+sCheckTag+") return aRet;"+sPush}else{sTmpFunc+="for (var oEl = (oBase.parentNode || oBase._IE5_parentNode); oEl; oEl = (oEl.parentNode || oEl._IE5_parentNode)) {if ("+sCheckTag+") { continue; }"+sPush+"}"}break;case"!>":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oRel = (oBase.parentNode || oBase._IE5_parentNode);if (!oRel || oEl != oRel || ("+sCheckTag+")) return aRet;"+sPush}else{sTmpFunc+="var oEl = (oBase.parentNode || oBase._IE5_parentNode);if (!oEl || "+sCheckTag+") { return aRet; }"+sPush}break;case"!+":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oRel;for (oRel = oBase.previousSibling; oRel; oRel = oRel.previousSibling) { if (oRel.nodeType == 1) break; }if (!oRel || oEl != oRel || ("+sCheckTag+")) return aRet;"+sPush}else{sTmpFunc+="for (oEl = oBase.previousSibling; oEl; oEl = oEl.previousSibling) { if (oEl.nodeType == 1) break; }if (!oEl || "+sCheckTag+") { return aRet; }"+sPush}break;case"!~":if(oExpr.quotID){sTmpFunc+="var oEl = oDocument_dontShrink.getElementById("+oExpr.quotID+");var oRel;for (oRel = oBase.previousSibling; oRel; oRel = oRel.previousSibling) { if (oRel.nodeType != 1) { continue; }if (oRel == oEl) { break; }}if (!oRel || ("+sCheckTag+")) return aRet;"+sPush}else{sTmpFunc+="for (oEl = oBase.previousSibling; oEl; oEl = oEl.previousSibling) {if ("+sCheckTag+") { continue; }if (!markElement_dontShrink(oEl, "+i+")) { break; }"+sPush+"}"}break}sTmpFunc+=(i==0?"return aRet;":"")+"})";sFunc=sTmpFunc}eval("var fpCompiled = "+sFunc+";");return fpCompiled};var parseQuery=function(sQuery){var sCacheKey=sQuery;var fpSelf=arguments.callee;var fpFunction=fpSelf._cache[sCacheKey];if(!fpFunction){sQuery=backupKeys(sQuery);var aParts=splitToParts(sQuery);fpFunction=fpSelf._cache[sCacheKey]=compileParts(aParts);fpFunction.depth=aParts.length}return fpFunction};parseQuery._cache={};var parseTestQuery=function(sQuery){var fpSelf=arguments.callee;var aSplitQuery=backupKeys(sQuery).split(/\s*,\s*/);var aResult=[];var nLen=aSplitQuery.length;var aFunc=[];for(var i=0;i"+sTag+":nth-of-type("+sTh+")"});return old_cssquery(sXPath,oParent)};cssquery.debug=function(fpCallback,nRepeat){debugOption.callback=fpCallback;debugOption.repeat=nRepeat||1};cssquery.safeHTML=function(bFlag){var bIE=/MSIE/.test(window.navigator.userAgent);if(arguments.length>0){safeHTML=bFlag&&bIE}return safeHTML||!bIE};cssquery.version=sVersion;cssquery.release=function(){if(/MSIE/.test(window.navigator.userAgent)){delete validUID;validUID={};if(bUseResultCache){cssquery.clearCache()}}};cssquery._getCacheInfo=function(){return{uidCache:validUID,eleCache:oResultCache}};cssquery._resetUID=function(){UID=0};cssquery.extreme=function(bExtreme){if(arguments.length==0){bExtreme=true}bExtremeMode=bExtreme};return cssquery})();jindo.$Agent=function(){var a=arguments.callee;var b=a._cached;if(b){return b}if(!(this instanceof a)){return new a}if(!b){a._cached=this}this._navigator=navigator;this._dm=document.documentMode};jindo.$Agent.prototype.navigator=function(){var b={},h=-1,c=-1,n=this._navigator.userAgent,m=this._navigator.vendor||"",d=this._dm;function g(f,e){return((e||"").indexOf(f)>-1)}b.getName=function(){var e="";for(x in b){if(typeof b[x]=="boolean"&&b[x]&&b.hasOwnProperty(x)){e=x}}return e};b.edge=g("Edge",n);b.webkit=!b.edge&&g("WebKit",n);b.opera=(window.opera!==undefined)||g("Opera",n)||g("OPR",n);b.ie=!b.opera&&(g("MSIE",n)||g("Trident",n));b.chrome=!b.edge&&b.webkit&&!b.opera&&g("Chrome",n)||g("CriOS",n);b.safari=!b.edge&&b.webkit&&!b.chrome&&!b.opera&&g("Apple",m);b.firefox=g("Firefox",n);b.mozilla=!b.edge&&g("Gecko",n)&&!b.safari&&!b.chrome&&!b.firefox&&!b.ie;b.camino=g("Camino",m);b.netscape=g("Netscape",n);b.omniweb=g("OmniWeb",n);b.icab=g("iCab",m);b.konqueror=g("KDE",m);b.mobile=!b.edge&&(g("Mobile",n)||g("Android",n)||g("Nokia",n)||g("webOS",n)||g("Opera Mini",n)||g("Opera Mobile",n)||g("BlackBerry",n)||(g("Windows",n)&&g("PPC",n))||g("Smartphone",n)||g("IEMobile",n))&&!(g("iPad",n)||g("Tablet",n));b.msafari=!b.edge&&((!g("IEMobile",n)&&g("Mobile",n))||(g("iPad",n)&&g("Safari",n)))&&!b.chrome&&!b.opera&&!b.firefox;b.mopera=g("Opera Mini",n);b.mie=g("PPC",n)||g("Smartphone",n)||g("IEMobile",n);try{if(b.ie){if(d>0){h=d;if(n.match(/(?:Trident)\/([0-9.]+)/)){var a=parseFloat(RegExp.$1,10);if(a>3){c=a+4}}else{c=h}}else{c=h=n.match(/(?:MSIE) ([0-9.]+)/)[1]}}else{if(b.edge){h=n.match(/(?:Edge)\/([\d.]+)/)[1]}else{if(b.safari||b.msafari){h=parseFloat(n.match(/Safari\/([0-9.]+)/)[1]);if(h==100){h=1.1}else{if(n.match(/Version\/([0-9.]+)/)){h=RegExp.$1}else{h=[1,1.2,-1,1.3,2,3][Math.floor(h/100)]}}}else{if(b.mopera){h=n.match(/(?:Opera\sMini)\/([0-9.]+)/)[1]}else{if(b.firefox||b.opera||b.omniweb){h=n.match(/(?:Firefox|Opera|OmniWeb)\/([0-9.]+)/)[1]}else{if(b.mozilla){h=n.match(/rv:([0-9.]+)/)[1]}else{if(b.icab){h=n.match(/iCab[ \/]([0-9.]+)/)[1]}else{if(b.chrome){h=n.match(/Chrome[ \/]([0-9.]+)/)[1]}}}}}}}}b.version=parseFloat(h);b.nativeVersion=parseFloat(c);if(isNaN(b.version)){b.version=-1}}catch(l){b.version=-1}this.navigator=function(){return b};return b};jindo.$Agent.prototype.os=function(){var d=new Object;var a=this._navigator.userAgent;var c=this._navigator.platform;var b=function(f,e){return(e.indexOf(f)>-1)};d.getName=function(){var e="";for(x in d){if(typeof d[x]=="boolean"&&d[x]&&d.hasOwnProperty(x)){e=x}}return e};d.win=b("Win",c);d.mac=b("Mac",c);d.linux=b("Linux",c);d.win2000=d.win&&(b("NT 5.0",a)||b("2000",a));d.winxp=d.win&&b("NT 5.1",a);d.xpsp2=d.winxp&&b("SV1",a);d.vista=d.win&&b("NT 6.0",a);d.win7=d.win&&b("NT 6.1",a);d.ipad=b("iPad",a);d.iphone=b("iPhone",a)&&!d.ipad;d.android=b("Android",a);d.nokia=b("Nokia",a);d.webos=b("webOS",a);d.blackberry=b("BlackBerry",a);d.mwin=b("PPC",a)||b("Smartphone",a)||b("IEMobile",a);this.os=function(){return d};return d};jindo.$Agent.prototype.flash=function(){var h=new Object;var g=this._navigator.plugins;var a=this._navigator.mimeTypes;var c=null;h.installed=false;h.version=-1;if(typeof g!="undefined"&&g.length){c=g["Shockwave Flash"];if(c){h.installed=true;if(c.description){h.version=parseFloat(c.description.match(/[0-9.]+/)[0])}}if(g["Shockwave Flash 2.0"]){h.installed=true;h.version=2}}else{if(typeof a!="undefined"&&a.length){c=a["application/x-shockwave-flash"];h.installed=(c&&c.enabledPlugin)}else{for(var b=10;b>1;b--){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);h.installed=true;h.version=b;break}catch(d){}}}}this.flash=function(){return h};this.info=this.flash;return h};jindo.$Agent.prototype.silverlight=function(){var d=new Object;var c=this._navigator.plugins;var a=null;d.installed=false;d.version=-1;if(typeof c!="undefined"&&c.length){a=c["Silverlight Plug-In"];if(a){d.installed=true;d.version=parseInt(a.description.split(".")[0],10);if(a.description=="1.0.30226.2"){d.version=2}}}else{try{a=new ActiveXObject("AgControl.AgControl");d.installed=true;if(a.isVersionSupported("3.0")){d.version=3}else{if(a.isVersionSupported("2.0")){d.version=2}else{if(a.isVersionSupported("1.0")){d.version=1}}}}catch(b){}}this.silverlight=function(){return d};return d};jindo.$A=function(c){var a=arguments.callee;if(typeof c=="undefined"||c==null){c=[]}if(c instanceof a){return c}if(!(this instanceof a)){return new a(c)}this._array=[];if(c.constructor!=String){this._array=[];for(var b=0;b-1)};jindo.$A.prototype.indexOf=function(a){if(typeof this._array.indexOf!="undefined"){jindo.$A.prototype.indexOf=function(b){return this._array.indexOf(b)}}else{jindo.$A.prototype.indexOf=function(b){for(var c=0;cMath.random()?1:-1});return this};jindo.$A.prototype.reverse=function(){this._array.reverse();return this};jindo.$A.prototype.empty=function(){return this.length(0)};jindo.$A.Break=function(){if(!(this instanceof arguments.callee)){throw new arguments.callee}};jindo.$A.Continue=function(){if(!(this instanceof arguments.callee)){throw new arguments.callee}};jindo.$A.prototype.map=function(b,a){if(typeof this._array.map=="function"){jindo.$A.prototype.map=function(m,d){var c=this._array;var h=this.constructor.Break;var n=this.constructor.Continue;function g(o,p,f){try{return m.call(d,o,p,f)}catch(q){if(q instanceof n){return o}else{throw q}}}try{this._array=this._array.map(g)}catch(l){if(!(l instanceof h)){throw l}}return this}}else{jindo.$A.prototype.map=function(p,g){var d=this._array;var o=[];var m=this.constructor.Break;var n=this.constructor.Continue;function h(q,r,f){try{return p.call(g,q,r,f)}catch(s){if(s instanceof n){return q}else{throw s}}}for(var c=0;c=c.length){c[f]=e[g]}}this._array=c;return this};jindo.$Ajax=function(c,e){var a=arguments.callee;if(!(this instanceof a)){return new a(c,e)}function b(){var g=window.XMLHttpRequest&&new XMLHttpRequest();if(this._checkCORSUrl(this._url)){if(g&&"withCredentials" in g){return g}else{if(window.XDomainRequest){this._bXDomainRequest=true;return new XDomainRequest()}}}else{if(g){return g}else{if(window.ActiveXObject){try{return new ActiveXObject("MSXML2.XMLHTTP")}catch(f){return new ActiveXObject("Microsoft.XMLHTTP")}}}}return null}this._status=0;this._url=c;this._options=new Object;this._headers=new Object;this._options={type:"xhr",method:"post",proxy:"",timeout:0,onload:function(f){},onerror:null,ontimeout:function(f){},jsonp_charset:"utf-8",callbackid:"",callbackname:"",sendheader:true,async:true,decode:true,postBody:false,withCredentials:false};this.option(e);if(jindo.$Ajax.CONFIG){this.option(jindo.$Ajax.CONFIG)}var d=this._options;d.type=d.type.toLowerCase();d.method=d.method.toLowerCase();if(typeof window.__jindo2_callback=="undefined"){window.__jindo2_callback=new Array()}switch(d.type){case"put":case"delete":case"get":case"post":d.method=d.type;d.type="xhr";case"xhr":this._request=b.call(this);this._checkCORS(this._url,d.type);break;case"flash":if(!jindo.$Ajax.SWFRequest){throw Error("Require jindo.$Ajax.SWFRequest")}this._request=new jindo.$Ajax.SWFRequest(jindo.$Fn(this.option,this).bind());break;case"jsonp":if(!jindo.$Ajax.JSONPRequest){throw Error("Require jindo.$Ajax.JSONPRequest")}d.method="get";this._request=new jindo.$Ajax.JSONPRequest(jindo.$Fn(this.option,this).bind());break;case"iframe":if(!jindo.$Ajax.FrameRequest){throw Error("Require jindo.$Ajax.FrameRequest")}this._request=new jindo.$Ajax.FrameRequest(jindo.$Fn(this.option,this).bind());break}};jindo.$Ajax.prototype._checkCORSUrl=function(a){return/^http/.test(a)&&!new RegExp("^http://"+window.location.host,"i").test(a)};jindo.$Ajax.prototype._checkCORS=function(a,b){this._bCORS=false;if(this._checkCORSUrl(a)&&b==="xhr"){if(this._bXDomainRequest||"withCredentials" in this._request){this._bCORS=true}else{throw Error("This browser does not support CORS.")}}};jindo.$Ajax.prototype._onload=(function(a){if(a){return function(){var b=this._request.status;var c=this._request.readyState==4&&(b==200||b==0)||(this._bXDomainRequest&&!!this._request.responseText);var d;if(this._request.readyState==4||this._bXDomainRequest){try{if(this._request.status!=200&&typeof this._options.onerror=="function"){if(!this._request.status==0){this._options.onerror(jindo.$Ajax.Response(this._request))}}else{if(!this._is_abort){d=this._options.onload(jindo.$Ajax.Response(this._request))}}}finally{if(typeof this._oncompleted=="function"){this._oncompleted(c,d)}if(this._options.type=="xhr"){this.abort();try{delete this._request.onload}catch(f){this._request.onload=undefined}}this._request.onreadystatechange&&delete this._request.onreadystatechange}}}}else{return function(){var b=this._request.readyState==4&&this._request.status==200;var c;if(this._request.readyState==4){try{if(this._request.status!=200&&typeof this._options.onerror=="function"){this._options.onerror(jindo.$Ajax.Response(this._request))}else{c=this._options.onload(jindo.$Ajax.Response(this._request))}}finally{this._status--;if(typeof this._oncompleted=="function"){this._oncompleted(b,c)}}}}}})(/MSIE/.test(window.navigator.userAgent));jindo.$Ajax.prototype.request=function(c){this._status++;var u=this;var m=this._request;var d=this._options;var h,r,p=[],h="";var e=null;var b=this._url;this._is_abort=false;var l=d.type.toUpperCase();var g=d.method.toUpperCase();if(d.postBody&&l=="XHR"&&g!="GET"){if(typeof c=="string"){h=c}else{h=jindo.$Json(c).toString()}}else{if(typeof c=="undefined"||!c){h=null}else{for(var f in c){if(c.hasOwnProperty(f)){r=c[f];if(typeof r=="function"){r=r()}if(r instanceof Array||r instanceof jindo.$A){jindo.$A(r).forEach(function(t,a,v){p[p.length]=f+"="+encodeURIComponent(t)})}else{p[p.length]=f+"="+encodeURIComponent(r)}}}h=p.join("&")}}if(h&&l=="XHR"&&g=="GET"){if(b.indexOf("?")==-1){b+="?"}else{b+="&"}b+=h;h=null}m.open(g,b,!!d.async);if(d.withCredentials){m.withCredentials=true}if(this._bCORS&&d.sendheader===false){m.setRequestHeader=null}if(l=="XHR"&&g=="GET"&&/MSIE|Trident/.test(window.navigator.userAgent)){m.setRequestHeader&&m.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT")}if((l=="XHR"||l=="IFRAME"||(l=="FLASH"&&d.sendheader))&&m.setRequestHeader){if(!this._headers["Content-Type"]){m.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8")}m.setRequestHeader("charset","utf-8");if(!this._bCORS&&!this._headers["X-Requested-With"]){m.setRequestHeader("X-Requested-With","XMLHttpRequest")}for(var o in this._headers){if(this._headers.hasOwnProperty(o)){if(typeof this._headers[o]=="function"){continue}m.setRequestHeader(o,String(this._headers[o]))}}}var n=navigator.userAgent;if(m.addEventListener&&!(n.indexOf("Opera")>-1)&&!(n.indexOf("MSIE")>-1)){if(this._loadFunc){m.removeEventListener("load",this._loadFunc,false)}this._loadFunc=function(a){clearTimeout(e);e=undefined;u._onload(a)};m.addEventListener("load",this._loadFunc,false);m.addEventListener("error",this._loadFunc,false)}else{if(typeof m.onload!="undefined"){m.onload=function(a){if(m.readyState==4&&!u._is_abort){clearTimeout(e);e=undefined;u._onload(a)}};if(this._bXDomainRequest){var s=m.onload;m.onload=function(a){u._request.readyState=4;u._request.status=200;s(a)};m.onerror=function(a){u._request.readyState=4;u._request.status=404;s(a)}}}else{if(window.navigator.userAgent.match(/(?:MSIE) ([0-9.]+)/)[1]==6&&d.async){var q=function(a){if(m.readyState==4&&!u._is_abort){if(e){clearTimeout(e);e=undefined}u._onload(a);clearInterval(u._interval);u._interval=undefined}};this._interval=setInterval(q,300)}else{m.onreadystatechange=function(a){if(m.readyState==4){clearTimeout(e);e=undefined;u._onload(a)}}}}}if(d.timeout>0){if(this._timer){clearTimeout(this._timer)}e=setTimeout(function(){u._is_abort=true;if(u._interval){clearInterval(u._interval);u._interval=undefined}try{m.abort()}catch(a){}d.ontimeout(m);if(typeof u._oncompleted=="function"){u._oncompleted(false)}},d.timeout*1000);this._timer=e}this._test_url=b;m.send(h);return this};jindo.$Ajax.prototype.isIdle=function(){return this._status==0};jindo.$Ajax.prototype.abort=function(){try{if(this._interval){clearInterval(this._interval)}if(this._timer){clearTimeout(this._timer)}this._interval=undefined;this._timer=undefined;this._is_abort=true;this._request.abort()}finally{this._status--}return this};jindo.$Ajax.prototype.option=function(b,c){if(typeof b=="undefined"){return""}if(typeof b=="string"){if(typeof c=="undefined"){return this._options[b]}this._options[b]=c;return this}try{for(var a in b){if(b.hasOwnProperty(a)){this._options[a]=b[a]}}}catch(d){}return this};jindo.$Ajax.prototype.header=function(b,c){if(typeof b=="undefined"){return""}if(typeof b=="string"){if(typeof c=="undefined"){return this._headers[b]}this._headers[b]=c;return this}try{for(var a in b){if(b.hasOwnProperty(a)){this._headers[a]=b[a]}}}catch(d){}return this};jindo.$Ajax.Response=function(a){if(this===jindo.$Ajax){return new jindo.$Ajax.Response(a)}this._response=a};jindo.$Ajax.Response.prototype.xml=function(){return this._response.responseXML};jindo.$Ajax.Response.prototype.text=function(){return this._response.responseText};jindo.$Ajax.Response.prototype.status=function(){return this._response.status};jindo.$Ajax.Response.prototype.readyState=function(){return this._response.readyState};jindo.$Ajax.Response.prototype.json=function(){if(this._response.responseJSON){return this._response.responseJSON}else{if(this._response.responseText){try{return eval("("+this._response.responseText+")")}catch(e){return{}}}}return{}};jindo.$Ajax.Response.prototype.header=function(a){if(typeof a=="string"){return this._response.getResponseHeader(a)}return this._response.getAllResponseHeaders()};jindo.$Ajax.RequestBase=jindo.$Class({_respHeaderString:"",callbackid:"",callbackname:"",responseXML:null,responseJSON:null,responseText:"",status:404,readyState:0,$init:function(a){},onload:function(){},abort:function(){},open:function(){},send:function(){},setRequestHeader:function(a,b){this._headers[a]=b},getResponseHeader:function(a){return this._respHeaders[a]||""},getAllResponseHeaders:function(){return this._respHeaderString},_getCallbackInfo:function(){var b="";if(this.option("callbackid")!=""){var a=0;do{b="_"+this.option("callbackid")+"_"+a;a++}while(window.__jindo2_callback[b])}else{do{b="_"+Math.floor(Math.random()*10000)}while(window.__jindo2_callback[b])}if(this.option("callbackname")==""){this.option("callbackname","_callback")}return{callbackname:this.option("callbackname"),id:b,name:"window.__jindo2_callback."+b}}});jindo.$Ajax.JSONPRequest=jindo.$Class({_headers:{},_respHeaders:{},_script:null,_onerror:null,$init:function(a){this.option=a},_callback:function(b){if(this._onerror){clearTimeout(this._onerror);this._onerror=null}var a=this;this.responseJSON=b;this.onload(this);setTimeout(function(){a.abort()},10)},abort:function(){if(this._script){try{this._script.parentNode.removeChild(this._script)}catch(a){}}},open:function(b,a){this.responseJSON=null;this._url=a},send:function(e){var c=this;var f=this._getCallbackInfo();var b=document.getElementsByTagName("head")[0];this._script=jindo.$("","gi"),function(e,t,n){return aJS.push(n),""}),eval(aJS.join("\n")),this},jindo.$Element._append=function(e,t){return"string"==typeof t?t=jindo.$(t):t instanceof jindo.$Element&&(t=t.$value()),e._element.appendChild(t),e},jindo.$Element._prepend=function(e,t){"string"==typeof e?e=jindo.$(e):e instanceof jindo.$Element&&(e=e.$value());var n=e.childNodes;return n.length>0?e.insertBefore(t._element,n[0]):e.appendChild(t._element),t},jindo.$Element.prototype.append=function(e){return jindo.$Element._append(this,e)},jindo.$Element.prototype.prepend=function(e){return jindo.$Element._prepend(this._element,jindo.$Element(e))},jindo.$Element.prototype.replace=function(e){jindo.$$.release();var t=this._element,n=t.parentNode,o=jindo.$Element(e);if(n&&n.replaceChild)return n.replaceChild(o.$value(),t),o;var o=o.$value();return n.insertBefore(o,t),n.removeChild(t),o},jindo.$Element.prototype.appendTo=function(e){var t=jindo.$Element(e);return jindo.$Element._append(t,this._element),t},jindo.$Element.prototype.prependTo=function(e){return jindo.$Element._prepend(e,this),jindo.$Element(e)},jindo.$Element.prototype.before=function(e){var t=jindo.$Element(e),n=t.$value();return this._element.parentNode.insertBefore(n,this._element),t},jindo.$Element.prototype.after=function(e){var t=this.before(e);return t.before(this),t},jindo.$Element.prototype.parent=function(e,t){var n=this._element,o=[],i=null;if("undefined"==typeof e)return jindo.$Element(n.parentNode);for(("undefined"==typeof t||0==t)&&(t=-1);n.parentNode&&0!=t--&&(i=jindo.$Element(n.parentNode),n.parentNode!=document.documentElement);)(!e||e&&e(i))&&(o[o.length]=i),n=n.parentNode;return o},jindo.$Element.prototype.child=function(e,t){var n=this._element,o=[],i=null;return"undefined"==typeof e?jindo.$A(n.childNodes).filter(function(e){return 1==e.nodeType}).map(function(e){return jindo.$Element(e)}).$value():(("undefined"==typeof t||0==t)&&(t=-1),(i=function(t,n){for(var r=null,s=null,a=0;ai)return this.text(t);for(i=s;1.5*s>i;)r+=Math.max(Math.ceil((n-r)/2),1),i=this.text(t.substring(0,r)+e).height()-o;for(;i>1.5*s;)r--,i=this.text(t.substring(0,r)+e).height()-o},jindo.$Element.prototype.indexOf=function(e){try{for(var t=jindo.$Element(e).$value(),n=this._element.childNodes,o=0,i=n.length,r=0;i>r;r++)if(1==n[r].nodeType){if(n[r]===t)return o;o++}}catch(t){}return-1},jindo.$Element.prototype.queryAll=function(e){return jindo.$$(e,this._element)},jindo.$Element.prototype.query=function(e){return jindo.$$.getSingle(e,this._element)},jindo.$Element.prototype.test=function(e){return jindo.$$.test(this._element,e)},jindo.$Element.prototype.xpathAll=function(e){return jindo.$$.xpath(e,this._element)},jindo.$Element.insertAdjacentHTML=function(e,t,n,o,i){var r=e._element;if(r.insertAdjacentHTML&&!/^<(option|tr|td|th|col)(?:.*?)>/.test(t.replace(/^(\s| )+|(\s| )+$/g,"").toLowerCase()))r.insertAdjacentHTML(n,t);else{var s,a=r.ownerDocument||r.document||document,u=a.createDocumentFragment(),l=t.replace(/^(\s| )+|(\s| )+$/g,""),d={option:"select",tr:"tbody",thead:"table",tbody:"table",col:"table",td:"tr",th:"tr",div:"div"},c=/^\<(option|tr|thead|tbody|td|th|col)(?:.*?)\>/i.exec(l),p=null===c?"div":c[1].toLowerCase(),f=d[p];s=jindo._createEle(f,l,a,!0);for(var h=s.getElementsByTagName("script"),y=0,m=h.length;m>y;y++)h[y].parentNode.removeChild(h[y]);for(;s[o];)u.appendChild(s[o]);i(u.cloneNode(!0))}return e},jindo.$Element.prototype.appendHTML=function(e){return jindo.$Element.insertAdjacentHTML(this,e,"beforeEnd","firstChild",jindo.$Fn(function(e){this.append(e)},this).bind())},jindo.$Element.prototype.prependHTML=function(e){return jindo.$Element.insertAdjacentHTML(this,e,"afterBegin","lastChild",jindo.$Fn(function(e){this.prepend(e)},this).bind())},jindo.$Element.prototype.beforeHTML=function(e){return jindo.$Element.insertAdjacentHTML(this,e,"beforeBegin","firstChild",jindo.$Fn(function(e){this.before(e)},this).bind())},jindo.$Element.prototype.afterHTML=function(e){return jindo.$Element.insertAdjacentHTML(this,e,"afterEnd","lastChild",jindo.$Fn(function(e){this._element.parentNode.insertBefore(e,this._element.nextSibling)},this).bind())},jindo.$Element.prototype.delegate=function(e,t,n){if(!this._element["_delegate_"+e]){this._element["_delegate_"+e]={};var o=jindo.$Fn(function(e,t){t=t||window.event,"undefined"==typeof t.currentTarget&&(t.currentTarget=this._element);var n,o,i,r,s=t.target||t.srcElement,a=this._element["_delegate_"+e];for(var u in a)if(n=a[u],r=n.checker(s),r[0]){o=n.func,i=jindo.$Event(t),i.element=r[1];for(var l=0,d=o.length;d>l;l++)o[l](i)}},this).bind(e);jindo.$Element._eventBind(this._element,e,o);var i=this._element;i["_delegate_"+e+"_func"]=o,this._element._delegate_events?this._element._delegate_events.push(e):this._element._delegate_events=[e],i=null}return this._bind(e,t,n),this},jindo.$Element._eventBind=function(e,t,n){e.addEventListener?jindo.$Element._eventBind=function(e,t,n){e.addEventListener(t,n,!1)}:jindo.$Element._eventBind=function(e,t,n){e.attachEvent("on"+t,n)},jindo.$Element._eventBind(e,t,n)},jindo.$Element.prototype.undelegate=function(e,t,n){return this._unbind(e,t,n),this},jindo.$Element.prototype._bind=function(e,t,n){var o=this._element["_delegate_"+e];if(o){var i;"string"==typeof t?i=jindo.$Fn(function(e,t){var n=t,o=jindo.$$.test(t,e);if(!o)for(var i=this._getParent(t),r=0,s=i.length;s>r;r++)if(n=i[r],jindo.$$.test(n,e)){o=!0;break}return[o,n]},this).bind(t):"function"==typeof t&&(i=jindo.$Fn(function(e,t){var n=t,o=e(this._element,t);if(!o)for(var i=this._getParent(t),r=0,s=i.length;s>r;r++)if(n=i[r],e(this._element,n)){o=!0;break}return[o,n]},this).bind(t)),this._element["_delegate_"+e]=jindo.$Element._addBind(o,t,n,i)}else alert("check your delegate event.")},jindo.$Element.prototype._getParent=function(e){for(var t=this._element,n=[],o=null;e.parentNode&&o!=t&&(o=e.parentNode,o!=document.documentElement);)n[n.length]=o,e=o;return n},jindo.$Element._addBind=function(e,t,n,o){var i=e[t];if(i){var r=i.func;r.push(n),i.func=r}else i={checker:o,func:[n]};return e[t]=i,e},jindo.$Element.prototype._unbind=function(e,t,n){var o=this._element;if(e&&t&&n){var i=o["_delegate_"+e];if(i&&i[t]){var r=i[t].func;r=i[t].func=jindo.$A(r).refuse(n).$value(),r.length||jindo.$Element._deleteFilter(o,e,t)}}else if(e&&t)jindo.$Element._deleteFilter(o,e,t);else if(e)jindo.$Element._deleteEvent(o,e,t);else{for(var s,a=o._delegate_events,u=0,l=a.length;l>u;u++)s=a[u],jindo.$Element._unEventBind(o,s,o["_delegate_"+s+"_func"]),jindo.$Element._delDelegateInfo(o,"_delegate_"+s),jindo.$Element._delDelegateInfo(o,"_delegate_"+s+"_func");jindo.$Element._delDelegateInfo(o,"_delegate_events")}return this},jindo.$Element._delDelegateInfo=function(e,t){try{e[t]=null,delete e[t]}catch(n){}return e},jindo.$Element._deleteFilter=function(e,t,n){var o=e["_delegate_"+t];o&&o[n]&&(1==jindo.$H(o).keys().length?jindo.$Element._deleteEvent(e,t,n):jindo.$Element._delDelegateInfo(o,n))},jindo.$Element._deleteEvent=function(e,t,n){var o=e._delegate_events;jindo.$Element._unEventBind(e,t,e["_delegate_"+t+"_func"]),jindo.$Element._delDelegateInfo(e,"_delegate_"+t),jindo.$Element._delDelegateInfo(e,"_delegate_"+t+"_func"),o=jindo.$A(o).refuse(t).$value(),o.length?e._delegate_events=jindo.$A(o).refuse(t).$value():jindo.$Element._delDelegateInfo(e,"_delegate_events")},jindo.$Element._unEventBind=function(e,t,n){e.removeEventListener?jindo.$Element._unEventBind=function(e,t,n){e.removeEventListener(t,n,!1)}:jindo.$Element._unEventBind=function(e,t,n){e.detachEvent("on"+t,n)},jindo.$Element._unEventBind(e,t,n)},jindo.$Fn=function(func,thisObject){var cl=arguments.callee;return func instanceof cl?func:this instanceof cl?(this._events=[],this._tmpElm=null,this._key=null,void("function"==typeof func?(this._func=func,this._this=thisObject):"string"==typeof func&&"string"==typeof thisObject&&(this._func=eval("false||function("+func+"){"+thisObject+"}")))):new cl(func,thisObject)};var _ua=navigator.userAgent;if(jindo.$Fn.prototype.$value=function(){return this._func},jindo.$Fn.prototype.bind=function(){var e=jindo.$A(arguments).$value(),t=this._func,n=this._this,o=function(){var o=jindo.$A(arguments).$value();return e.length&&(o=e.concat(o)),t.apply(n,o)};return o},jindo.$Fn.prototype.bindForEvent=function(){var e=arguments,t=this._func,n=this._this,o=this._tmpElm||null,i=function(i){var r=Array.prototype.slice.apply(e);"undefined"==typeof i&&(i=window.event),"undefined"==typeof i.currentTarget&&(i.currentTarget=o);var s=jindo.$Event(i);r.unshift(s);var a=t.apply(n,r);return"undefined"!=typeof a&&"beforeunload"==s.type&&(i.returnValue=a),a};return i},jindo.$Fn._resizeEventBugInIE=function(e){var t=document.documentMode>=9&&document.documentMode<11;if(t){var n=/resize/;jindo.$Fn._resizeEventBugInIE=function(e){return n.test(e)}}else jindo.$Fn._resizeEventBugInIE=function(){return!1};return jindo.$Fn._resizeEventBugInIE(e)},jindo.$Fn.prototype.attach=function(e,t,n){var o=null,i=t,r=e,s=_ua;if("undefined"==typeof n&&(n=!1),this._bUseCapture=n,r instanceof Array||jindo.$A&&r instanceof jindo.$A&&(r=r.$value())){for(var a=0;a-1;if("undefined"==typeof r.addEventListener||jindo.$Fn._resizeEventBugInIE(t)){if("undefined"!=typeof r.attachEvent){if("domready"==i){if(window.top!=window)throw new Error("Domready Event doesn't work in the iframe.");return jindo.$Fn._domready(r,o),this}r.attachEvent("on"+i,o)}}else{if("domready"==i)i="DOMContentLoaded";else if("mousewheel"==i&&s.indexOf("WebKit")<0&&!/Opera/.test(s)&&!u)i="DOMMouseScroll";else if("mouseenter"!=i||u)if("mouseleave"!=i||u){if("transitionend"==i||"transitionstart"==i){var l,d=i.replace("transition","");d=d.substr(0,1).toUpperCase()+d.substr(1),"undefined"!=typeof document.body.style.WebkitTransition?l="webkit":"undefined"!=typeof document.body.style.OTransition?l="o":"undefined"!=typeof document.body.style.MsTransition&&(l="ms"),i=(l?l+"Transition":"transition")+d,this._for_test_attach=i,this._for_test_detach=""}else if("animationstart"==i||"animationend"==i||"animationiteration"==i){var l,d=i.replace("animation","");d=d.substr(0,1).toUpperCase()+d.substr(1),"undefined"!=typeof document.body.style.WebkitAnimationName?l="webkit":"undefined"!=typeof document.body.style.OAnimationName?l="o":"undefined"!=typeof document.body.style.MsTransitionName&&(l="ms"),i=(l?l+"Animation":"animation")+d,this._for_test_attach=i,this._for_test_detach=""}}else i="mouseout",o=jindo.$Fn._fireWhenElementBoundary(r,o);else i="mouseover",o=jindo.$Fn._fireWhenElementBoundary(r,o);r.addEventListener(i,o,n)}return this._key||(this._key="$"+jindo.$Fn.gc.count++,jindo.$Fn.gc.pool[this._key]=this),this._events[this._events.length]={element:r,event:t.toLowerCase(),func:o},this},jindo.$Fn.prototype.detach=function(e,t){var n=null,o=e,i=t,r=_ua;if(o instanceof Array||jindo.$A&&o instanceof jindo.$A&&(o=o.$value())){for(var s=0;s0;){var n=this._events[--t].element,o=this._events[t].event;this._events[t].func;if(!e||n===e){this.detach(n,o);var i=!e;i&&window===n&&"unload"==o&&_ua.indexOf("MSIE")<1&&this._func.call(this._this),delete this._events[t]}}if(0==this._events.length)try{delete jindo.$Fn.gc.pool[this._key]}catch(r){}},jindo.$Fn._domready=function(e,t){if("undefined"==typeof jindo.$Fn._domready.list){var n=null,o=jindo.$Fn._domready.list=jindo.$A([t]),i=!1,r=function(){if(!i){i=!0;for(var t={type:"domready",target:e,currentTarget:e};n=o.shift();)n(t)}};!function(){try{e.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,50)}r()}(),e.onreadystatechange=function(){"complete"==e.readyState&&(e.onreadystatechange=null,r())}}else jindo.$Fn._domready.list.push(t)},jindo.$Fn._fireWhenElementBoundary=function(e,t){return function(e){var n=jindo.$Event(e),o=jindo.$Element(n.relatedElement);o&&(o.isEqual(this)||o.isChildOf(this))||t.call(this,e)}},jindo.$Fn.gc=function(){var e=jindo.$Fn.gc.pool;for(var t in e)if(e.hasOwnProperty(t))try{e[t].free()}catch(n){}jindo.$Fn.gc.pool=e={}},jindo.$Fn.freeElement=function(e){var t=jindo.$Fn.gc.pool;for(var n in t)if(t.hasOwnProperty(n))try{t[n].free(e)}catch(o){}},jindo.$Fn.gc.count=0,jindo.$Fn.gc.pool={},"undefined"==typeof window||isUnCacheAgent()||jindo.$Fn(jindo.$Fn.gc).attach(window,"unload"),jindo.$ElementList=function(e){var t=arguments.callee;return e instanceof t?e:this instanceof t?(e=e instanceof Array?jindo.$A(e):jindo.$A&&e instanceof jindo.$A?jindo.$A(e.$value()):"string"==typeof e&&jindo.cssquery?jindo.$A(jindo.cssquery(e)):jindo.$A(),void(this._elements=e.map(function(e,t,n){return jindo.$Element(e)}))):new t(e)},jindo.$ElementList.prototype.get=function(e){return this._elements.$value()[e]},jindo.$ElementList.prototype.getFirst=function(){return this.get(0)},jindo.$ElementList.prototype.length=function(e,t){return this._elements.length(e,t)},jindo.$ElementList.prototype.getLast=function(){return this.get(Math.max(this._elements.length()-1,0))},jindo.$ElementList.prototype.$value=function(){return this._elements.$value()},function(e){var t=["show","hide","toggle","addClass","removeClass","toggleClass","fireEvent","leave","empty","appear","disappear","className","width","height","text","html","css","attr"];jindo.$A(t).forEach(function(t){e[t]=function(){var e=jindo.$A(arguments).$value();return this._elements.forEach(function(n){n[t].apply(n,e)}),this}}),jindo.$A(["appear","disappear"]).forEach(function(t){e[t]=function(e,n){var o=this._elements.length,i=this;return this._elements.forEach(function(r,s){s==o-1?r[t](e,function(){n(i)}):r[t](e)}),this}})}(jindo.$ElementList.prototype),jindo.$S=function(e){var t=arguments.callee;return"undefined"==typeof e&&(e=""),e instanceof t?e:this instanceof t?void(this._str=e+""):new t(e)},jindo.$S.prototype.$value=function(){return this._str},jindo.$S.prototype.toString=jindo.$S.prototype.$value,jindo.$S.prototype.trim=function(){return"".trim?jindo.$S.prototype.trim=function(){return jindo.$S(this._str.trim())}:jindo.$S.prototype.trim=function(){return jindo.$S(this._str.replace(/^(\s| )+/g,"").replace(/(\s| )+$/g,""))},jindo.$S(this.trim())},jindo.$S.prototype.escapeHTML=function(){var e={'"':"quot","&":"amp","<":"lt",">":"gt","'":"#39"},t=this._str.replace(/[<>&"']/g,function(t){return e[t]?"&"+e[t]+";":t});return jindo.$S(t)},jindo.$S.prototype.stripTags=function(){return jindo.$S(this._str.replace(/<\/?(?:h[1-5]|[a-z]+(?:\:[a-z]+)?)[^>]*>/gi,""))},jindo.$S.prototype.times=function(e){for(var t=[],n=0;e>n;n++)t[t.length]=this._str;return jindo.$S(t.join(""))},jindo.$S.prototype.unescapeHTML=function(){var e={quot:'"',amp:"&",lt:"<",gt:">","#39":"'"},t=this._str.replace(/&([a-z]+|#[0-9]+);/g,function(t,n){return e[n]?e[n]:t});return jindo.$S(t)},jindo.$S.prototype.escape=function(){var e=this._str.replace(/([\u0080-\uFFFF]+)|[\n\r\t"'\\]/g,function(e,t,n){return t?escape(t).replace(/%/g,"\\"):(n={"\n":"\\n","\r":"\\r"," ":"\\t"})[e]?n[e]:"\\"+e});return jindo.$S(e)},jindo.$S.prototype.bytes=function(e){var t,n,o=0,i=0,r=0,s=this._str.length,a=(document.charset||document.characterSet||document.defaultCharset)+"";if("undefined"==typeof e?t=!1:e.constructor==Number?(t=!0,n=e):e.constructor==Object?(a=e.charset||a,n=e.size||!1,t=!!n):t=!1,"utf-8"==a.toLowerCase()){for(r=0;s>r;r++)if(o=this._str.charCodeAt(r),i+=128>o?1:2048>o?2:65536>o?3:4,t&&i>n){this._str=this._str.substr(0,r);break}}else for(r=0;s>r;r++)if(i+=this._str.charCodeAt(r)>128?2:1,t&&i>n){this._str=this._str.substr(0,r);break}return t?this:i},jindo.$S.prototype.parseString=function(){if(""==this._str)return{};for(var e,t,n,o=this._str.split(/&/g),i={},r=!1,s=0;s0){if("number"!=typeof a)return"";u="c"==s?String.fromCharCode(a):a.toString({b:2,d:10,o:8,x:16,X:16}[s])," X".indexOf(s)>0&&(u=u.toUpperCase())}return u.length-1,t=this._doc[e?"body":this._docKey];return{width:Math.max(t.scrollWidth,t.clientWidth),height:Math.max(t.scrollHeight,t.clientHeight)}},jindo.$Document.prototype.scrollPosition=function(){var e=navigator.userAgent.indexOf("WebKit")>-1,t=this._doc[e?"body":this._docKey];return{left:t.scrollLeft||window.pageXOffset||window.scrollX||0,top:t.scrollTop||window.pageYOffset||window.scrollY||0}},jindo.$Document.prototype.clientSize=function(){var e=navigator.userAgent,t=this._doc[this._docKey],n=e.indexOf("WebKit")>-1&&-1==e.indexOf("Chrome");return n?{width:window.innerWidth,height:window.innerHeight}:{width:t.clientWidth,height:t.clientHeight}},jindo.$Document.prototype.renderingMode=function(){var e,t=navigator.userAgent,n="undefined"==typeof window.opera&&t.indexOf("MSIE")>-1,o=t.indexOf("WebKit")>-1&&t.indexOf("Chrome")<0&&navigator.vendor.indexOf("Apple")>-1;return e="compatMode"in this._doc?"CSS1Compat"==this._doc.compatMode?"Standards":n?"Quirks":"Almost":o?"Standards":"Quirks"},jindo.$Document.prototype.queryAll=function(e){return jindo.$$(e,this._doc)},jindo.$Document.prototype.query=function(e){return jindo.$$.getSingle(e,this._doc)},jindo.$Document.prototype.xpathAll=function(e){return jindo.$$.xpath(e,this._doc)},jindo.$Form=function(e){var t=arguments.callee;if(e instanceof t)return e;if(!(this instanceof t))return new t(e);if(e=jindo.$(e),!e.tagName||"FORM"!=e.tagName.toUpperCase())throw new Error("The element should be a FORM element");this._form=e},jindo.$Form.prototype.$value=function(){return this._form},jindo.$Form.prototype.serialize=function(){var e=this,t={},n=arguments.length,o=function(n){var o=e.value(n);"undefined"!=typeof o&&(t[n]=o)};if(0==n)jindo.$A(this.element()).forEach(function(e){e.name&&o(e.name)});else for(var i=0;n>i;i++)o(arguments[i]);return jindo.$H(t).toQueryString()},jindo.$Form.prototype.element=function(e){return arguments.length>0?this._form[e]:this._form.elements},jindo.$Form.prototype.enable=function(){var e=arguments[0];if("object"==typeof e){var t=this;return jindo.$H(e).forEach(function(e,n){t.enable(n,e)}),this}var n=this.element(e);if(!n)return this;if(n=1==n.nodeType?[n]:n,arguments.length<2){var o=!0;return jindo.$A(n).forEach(function(e){e.disabled&&(o=!1,jindo.$A.Break())}),o}var i=arguments[1];return jindo.$A(n).forEach(function(e){e.disabled=!i}),this},jindo.$Form.prototype.value=function(e){if("object"==typeof e){var t=this;return jindo.$H(e).forEach(function(e,n){t.value(n,e)}),this}var n=this.element(e);if(!n)throw new Error("엘리먼트는 존재하지 않습니다."); +if(n=1==n.nodeType?[n]:n,arguments.length>1){var o=arguments[1];return jindo.$A(n).forEach(function(e){switch(e.type){case"radio":e.checked=e.value==o;break;case"checkbox":o.constructor==Array?e.checked=jindo.$A(o).has(e.value):e.checked=e.value==o;break;case"select-one":for(var t=-1,n=0,i=e.options.length;i>n;n++)e.options[n].value==o&&(t=n);e.selectedIndex=t;break;case"select-multiple":var t=-1;if(o.constructor==Array)for(var r=jindo.$A(o),n=0,i=e.options.length;i>n;n++)e.options[n].selected=r.has(e.options[n].value);else{for(var n=0,i=e.options.length;i>n;n++)e.options[n].value==o&&(t=n);e.selectedIndex=t}break;default:e.value=o}}),this}var i=[];return jindo.$A(n).forEach(function(e){switch(e.type){case"radio":case"checkbox":e.checked&&i.push(e.value);break;case"select-one":-1!=e.selectedIndex&&i.push(e.options[e.selectedIndex].value);break;case"select-multiple":if(-1!=e.selectedIndex)for(var t=0,n=e.options.length;n>t;t++)e.options[t].selected&&i.push(e.options[t].value);break;default:i.push(e.value)}}),i.length>1?i:i[0]},jindo.$Form.prototype.submit=function(e,t){var n=null;return"string"==typeof e&&(n=this._form.target,this._form.target=e),"function"==typeof e&&(t=e),"undefined"==typeof t||t(this._form)?(this._form.submit(),null!==n&&(this._form.target=n),this):this},jindo.$Form.prototype.reset=function(e){return"undefined"==typeof e||e(this._form)?(this._form.reset(),this):this},jindo.$Template=function(e){var t=null,n="",o=arguments.callee;return e instanceof o?e:this instanceof o?("undefined"==typeof e?e="":(t=document.getElementById(e)||e)&&t.tagName&&(n=t.tagName.toUpperCase())&&("TEXTAREA"==n||"SCRIPT"==n&&"text/template"==t.getAttribute("type"))&&(e=(t.value||t.innerHTML).replace(/^\s+|\s+$/g,"")),void(this._str=e+"")):new o(e)},jindo.$Template.splitter=/(?!\\)[\{\}]/g,jindo.$Template.pattern=/^(?:if (.+)|elseif (.+)|for (?:(.+)\:)?(.+) in (.+)|(else)|\/(if|for)|=(.+)|js (.+)|set (.+))$/,jindo.$Template.prototype.process=function(data){var key="",leftBrace="",rightBrace="",tpl=(" "+this._str+" ").replace(/\\{/g,leftBrace).replace(/\\}/g,rightBrace).replace(/(?!\\)\}\{/g,"}"+key+"{").split(jindo.$Template.splitter),i=tpl.length,map={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"," ":"\\t","\f":"\\f"},reg=[/(["'](?:(?:\\.)+|[^\\["']+)*["']|[a-zA-Z_][\w\.]*)/g,/[\n\r\t\f"\\]/g,/^\s+/,/\s+$/,/#/g],cb=[function(e){return'"'==e.substring(0,1)||"'"==e.substring(0,1)||"null"==e?e:"d."+e},function(e){return map[e]||e},"",""],stm=[],lev=0;if(tpl[0]=tpl[0].substr(1),tpl[i-1]=tpl[i-1].substr(0,tpl[i-1].length-1),2>i)return tpl[0];tpl=jindo.$A(tpl).reverse().$value();for(var delete_info;i--;)i%2?tpl[i]=tpl[i].replace(jindo.$Template.pattern,function(){var e=arguments;if(e[10])return e[10].replace(/(\w+)(?:\s*)=(?:\s*)(?:([a-zA-Z0-9_]+)|(.+))$/g,function(){var e=arguments,t="d."+e[1]+"=";return t+=e[2]?"d."+e[2]:e[3].replace(/(=(?:[a-zA-Z_][\w\.]*)+)/g,function(e){return"="==e.substring(0,1)?"d."+e.replace("=",""):e})})+";";if(e[9])return"s[i++]="+e[9].replace(/(=(?:[a-zA-Z_][\w\.]*)+)/g,function(e){return"="==e.substring(0,1)?"d."+e.replace("=",""):e})+";";if(e[8])return"s[i++]= d."+e[8]+";";if(e[1])return"if("+e[1].replace(reg[0],cb[0]).replace(/d\.(typeof) /,"$1 ").replace(/ d\.(instanceof) d\./," $1 ")+"){";if(e[2])return"}else if("+e[2].replace(reg[0],cb[0]).replace(/d\.(typeof) /,"$1 ").replace(/ d\.(instanceof) d\./," $1 ")+"){";if(e[5]){delete_info=e[4];var t=[];return t.push("var t#=d."+e[5]+"||{},p#=isArray(t#),i#=0;"),t.push("for(var x# in t#){"),t.push("if(!t#.hasOwnProperty(x#)){continue;}"),t.push(" if( (p# && isNaN(i#=parseInt(x#,10))) || (!p# && !t#.propertyIsEnumerable(x#)) ) continue;"),t.push(" d."+e[4]+"=t#[x#];"),t.push(e[3]?"d."+e[3]+"=p#?i#:x#;":""),t.join("").replace(reg[4],lev++)}return e[6]?"}else{":e[7]?"for"==e[7]?"delete d."+delete_info+"; };":"};":e[0]}):tpl[i]==key?tpl[i]="":tpl[i]&&(tpl[i]='s[i++]="'+tpl[i].replace(reg[1],cb[1])+'";');tpl=jindo.$A(tpl).reverse().$value().join("").replace(new RegExp(leftBrace,"g"),"{").replace(new RegExp(rightBrace,"g"),"}");var _aStr=[];return _aStr.push("var s=[],i=0;"),_aStr.push('function isArray(o){ return Object.prototype.toString.call(o) == "[object Array]" };'),_aStr.push(tpl),_aStr.push('return s.join("");'),tpl=eval("false||function(d){"+_aStr.join("")+"}"),tpl=tpl(data)},jindo.$Date=function(e){var t=arguments,n="",o=arguments.callee;if(e&&e instanceof o)return e;if(!(this instanceof o))return new o(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);if("string"==(n=typeof e))if(/(\d\d\d\d)(?:-?(\d\d)(?:-?(\d\d)))/.test(e))try{this._date=new Date(e),this._date.toISOString?"Invalid Date"==this._date.toISOString()&&(this._date=jindo.$Date.makeISO(e)):this._date=jindo.$Date.makeISO(e)}catch(i){this._date=jindo.$Date.makeISO(e)}else this._date=o.parse(e);else if("number"==n)if("undefined"==typeof t[1])this._date=new Date(e);else{for(var r=0;7>r;r++)"number"!=typeof t[r]&&(t[r]=1);this._date=new Date(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}else"object"==n&&e.constructor==Date?((this._date=new Date).setTime(e.getTime()),this._date.setMilliseconds(e.getMilliseconds())):this._date=new Date;this._names={};for(var r in jindo.$Date.names)jindo.$Date.names.hasOwnProperty(r)&&(this._names[r]=jindo.$Date.names[r])},jindo.$Date.makeISO=function(e){var t=e.match(/(\d\d\d\d)(?:-?(\d\d)(?:-?(\d\d)(?:[T ](\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|(?:([-+])(\d\d)(?::?(\d\d))?)?)?)?)?)?/),n=parseInt(t[4]||0,10),o=parseInt(t[5]||0,10);return"Z"==t[8]?n+=jindo.$Date.utc:("+"==t[9]||"-"==t[9])&&(n+=jindo.$Date.utc-parseInt(t[9]+t[10],10),o+=parseInt(t[9]+t[11],10)),new Date(t[1]||0,parseInt(t[2]||0,10)-1,t[3]||0,n,o,t[6]||0,t[7]||0)},jindo.$Date.names={month:["January","Febrary","March","April","May","June","July","August","September","October","Novermber","December"],s_month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],day:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s_day:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ampm:["AM","PM"]},jindo.$Date.utc=9,jindo.$Date.now=function(){return Date.now()},jindo.$Date.prototype.name=function(e){if(!arguments.length)return this._names;for(var t in e)e.hasOwnProperty(t)&&(this._names[t]=e[t])},jindo.$Date.parse=function(e){return new Date(Date.parse(e))},jindo.$Date.prototype.$value=function(){return this._date},jindo.$Date.prototype.format=function(e){var t={},n=this._date,o=this.name(),i=this;return(e||"").replace(/[a-z]/gi,function(e){if("undefined"!=typeof t[e])return t[e];switch(e){case"d":case"j":return t.j=n.getDate(),t.d=(t.j>9?"":"0")+t.j,t[e];case"l":case"D":case"w":case"N":return t.w=n.getDay(),t.N=t.w?t.w:7,t.D=o.s_day[t.w],t.l=o.day[t.w],t[e];case"S":return(t.S=["st","nd","rd"][n.getDate()])?t.S:t.S="th";case"z":return t.z=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/864e5),t.z;case"m":case"n":return t.n=n.getMonth()+1,t.m=(t.n>9?"":"0")+t.n,t[e];case"L":return t.L=i.isLeapYear(),t.L;case"o":case"Y":case"y":return t.o=t.Y=n.getFullYear(),t.y=(t.o+"").substr(2),t[e];case"a":case"A":case"g":case"G":case"h":case"H":return t.G=n.getHours(),t.g=(t.g=t.G%12)?t.g:12,t.A=t.G<12?o.ampm[0]:o.ampm[1],t.a=t.A.toLowerCase(),t.H=(t.G>9?"":"0")+t.G,t.h=(t.g>9?"":"0")+t.g,t[e];case"i":return t.i=((t.i=n.getMinutes())>9?"":"0")+t.i,t.i;case"s":return t.s=((t.s=n.getSeconds())>9?"":"0")+t.s,t.s;case"u":return t.u=n.getMilliseconds(),t.u;case"U":return t.U=i.time(),t.U;default:return e}})},jindo.$Date.prototype.time=function(e){return"number"==typeof e?(this._date.setTime(e),this):this._date.getTime()},jindo.$Date.prototype.year=function(e){return"number"==typeof e?(this._date.setFullYear(e),this):this._date.getFullYear()},jindo.$Date.prototype.month=function(e){return"number"==typeof e?(this._date.setMonth(e),this):this._date.getMonth()},jindo.$Date.prototype.date=function(e){return"number"==typeof e?(this._date.setDate(e),this):this._date.getDate()},jindo.$Date.prototype.day=function(){return this._date.getDay()},jindo.$Date.prototype.hours=function(e){return"number"==typeof e?(this._date.setHours(e),this):this._date.getHours()},jindo.$Date.prototype.minutes=function(e){return"number"==typeof e?(this._date.setMinutes(e),this):this._date.getMinutes()},jindo.$Date.prototype.seconds=function(e){return"number"==typeof e?(this._date.setSeconds(e),this):this._date.getSeconds()},jindo.$Date.prototype.isLeapYear=function(){var e=this._date.getFullYear();return!((e%4||!(e%100))&&e%400)},jindo.$Window=function(e){var t=arguments.callee;return e instanceof t?e:this instanceof t?void(this._win=e||window):new t(e)},jindo.$Window.prototype.$value=function(){return this._win},jindo.$Window.prototype.resizeTo=function(e,t){return this._win.resizeTo(e,t),this},jindo.$Window.prototype.resizeBy=function(e,t){return this._win.resizeBy(e,t),this},jindo.$Window.prototype.moveTo=function(e,t){return this._win.moveTo(e,t),this},jindo.$Window.prototype.moveBy=function(e,t){return this._win.moveBy(e,t),this},jindo.$Window.prototype.sizeToContent=function(e,t){if("function"==typeof this._win.sizeToContent)this._win.sizeToContent();else{if(2!=arguments.length){var n,o,i=this._win,r=this._win.document;i.innerHeight?(n=i.innerWidth,o=i.innerHeight):r.documentElement&&r.documentElement.clientHeight?(n=r.documentElement.clientWidth,o=r.documentElement.clientHeight):r.body&&(n=r.body.clientWidth,o=r.body.clientHeight);var s,a,u=r.body.scrollHeight,l=r.body.offsetHeight;u>l?(s=r.body.scrollWidth,a=r.body.scrollHeight):(s=r.body.offsetWidth,a=r.body.offsetHeight),e=s-n,t=a-o}this.resizeBy(e,t)}return this},"undefined"!=typeof window)for(prop in jindo)jindo.hasOwnProperty(prop)&&(window[prop]=jindo[prop]); \ No newline at end of file diff --git a/dist/js/lib/jindo_component.js b/dist/js/lib/jindo_component.js index 6470ffd..c01b80a 100644 --- a/dist/js/lib/jindo_component.js +++ b/dist/js/lib/jindo_component.js @@ -1 +1,3 @@ -jindo.Component=jindo.$Class({_htEventHandler:null,_htOption:null,$init:function(){var a=this.constructor.getInstance();a.push(this);this._htEventHandler={};this._htOption={};this._htOption._htSetter={}},option:function(c,b){switch(typeof c){case"undefined":return this._htOption;case"string":if(typeof b!="undefined"){if(c=="htCustomEventHandler"){if(typeof this._htOption[c]=="undefined"){this.attach(b)}else{return this}}this._htOption[c]=b;if(typeof this._htOption._htSetter[c]=="function"){this._htOption._htSetter[c](b)}}else{return this._htOption[c]}break;case"object":for(var a in c){if(a=="htCustomEventHandler"){if(typeof this._htOption[a]=="undefined"){this.attach(c[a])}else{continue}}this._htOption[a]=c[a];if(typeof this._htOption._htSetter[a]=="function"){this._htOption._htSetter[a](c[a])}}break}return this},optionSetter:function(c,a){switch(typeof c){case"undefined":return this._htOption._htSetter;case"string":if(typeof a!="undefined"){this._htOption._htSetter[c]=jindo.$Fn(a,this).bind()}else{return this._htOption._htSetter[c]}break;case"object":for(var b in c){this._htOption._htSetter[b]=jindo.$Fn(c[b],this).bind()}break}return this},fireEvent:function(b,k){k=k||{};var d=this["on"+b],c=this._htEventHandler[b]||[],h=typeof d=="function",g=c.length>0;if(!h&&!g){return true}c=c.concat();k.sType=b;if(typeof k._aExtend=="undefined"){k._aExtend=[];k.stop=function(){if(k._aExtend.length>0){k._aExtend[k._aExtend.length-1].bCanceled=true}}}k._aExtend.push({sType:b,bCanceled:false});var f=[k],e,j;for(e=2,j=arguments.length;e0){this._onActivate.apply(this,arguments)}else{this._onActivate()}return this},deactivate:function(){if(!this.isActivating()){return this}this._bIsActivating=false;if(arguments.length>0){this._onDeactivate.apply(this,arguments)}else{this._onDeactivate()}return this}}).extend(jindo.Component);jindo.RolloverArea=jindo.$Class({$init:function(a,b){this.option({sClassName:"rollover",sClassPrefix:"rollover-",bCheckMouseDown:true,bActivateOnload:true,htStatus:{sOver:"over",sDown:"down"}});this.option(b||{});this._elArea=jindo.$(a);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);if(this.option("bActivateOnload")){this.activate()}},_addOvered:function(a){this._aOveredElements.push(a)},_removeOvered:function(a){this._aOveredElements.splice(jindo.$A(this._aOveredElements).indexOf(a),1)},_addStatus:function(b,a){jindo.$Element(b).addClass(this.option("sClassPrefix")+a)},_removeStatus:function(b,a){jindo.$Element(b).removeClass(this.option("sClassPrefix")+a)},_isInnerElement:function(a,b){return a===b?true:jindo.$Element(a).isParentOf(b)},_onActivate:function(){this._wfMouseOver.attach(this._elArea,"mouseover");this._wfMouseOut.attach(this._elArea,"mouseout");if(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(b){var a=this.option("sClassName");return jindo.$$.test(b,"."+a)?b:jindo.$$.getSingle("! ."+a,b)},_onMouseOver:function(a){var c=a.element,b=a.relatedElement,d;for(;c=this._findRollover(c);c=c.parentNode){if(b&&this._isInnerElement(c,b)){continue}this._addOvered(c);d={element:c,htStatus:this.option("htStatus"),weEvent:a};if(this.fireEvent("over",d)){this._addStatus(d.element,d.htStatus.sOver)}}},_onMouseOut:function(a){var c=a.element,b=a.relatedElement,d;for(;c=this._findRollover(c);c=c.parentNode){if(b&&this._isInnerElement(c,b)){continue}this._removeOvered(c);d={element:c,htStatus:this.option("htStatus"),weEvent:a};if(this.fireEvent("out",d)){this._removeStatus(d.element,d.htStatus.sOver)}}},_onMouseDown:function(a){var b=a.element,c;while(b=this._findRollover(b)){c={element:b,htStatus:this.option("htStatus"),weEvent:a};this._aDownedElements.push(b);if(this.fireEvent("down",c)){this._addStatus(c.element,c.htStatus.sDown)}b=b.parentNode}},_onMouseUp:function(c){var e=c.element,f=[],a=this._aDownedElements,g,d,b;for(b=0;d=a[b];b++){f.push({element:d,htStatus:this.option("htStatus"),weEvent:c})}for(;e=this._findRollover(e);e=e.parentNode){if(jindo.$A(a).indexOf(e)>-1){continue}f.push({element:e,htStatus:this.option("htStatus"),weEvent:c})}for(b=0;g=f[b];b++){if(this.fireEvent("up",g)){this._removeStatus(g.element,g.htStatus.sDown)}}this._aDownedElements=[]}}).extend(jindo.UIComponent);jindo.Calendar=jindo.$Class({$init:function(a,b){this._htToday=this.constructor.getDateHashTable(new Date());this._elLayer=jindo.$(a);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:true};this.option(this.htDefaultOption);this.option(b||{});this._assignHTMLElements();this.activate();this.setDate(this.option("nYear"),this.option("nMonth"),this.option("nDate"));if(this.option("bDrawOnload")){this.draw()}},getBaseElement:function(){return this._elLayer},getDate:function(){return this._htDate},getDateOfElement:function(b){var a=jindo.$A(this._aDateContainerElement).indexOf(b);if(a>-1){return this._aMetaData[a]}return null},getToday:function(){return this._htToday},setDate:function(b,c,a){this._htDate={nYear:b,nMonth:(c*1),nDate:(a*1)}},getShownDate:function(){return this._getShownDate()},_getShownDate:function(){return this.htShownDate||this.getDate()},_setShownDate:function(a,b){this.htShownDate={nYear:a,nMonth:(b*1),nDate:1}},_assignHTMLElements:function(){var c=this.option("sClassPrefix"),b=this.getBaseElement();if((this.elBtnPrevYear=jindo.$$.getSingle(("."+c+"btn-prev-year"),b))){this.wfPrevYear=jindo.$Fn(function(d){d.stop(jindo.$Event.CANCEL_DEFAULT);this.draw(-1,0,true)},this)}if((this.elBtnPrevMonth=jindo.$$.getSingle(("."+c+"btn-prev-mon"),b))){this.wfPrevMonth=jindo.$Fn(function(d){d.stop(jindo.$Event.CANCEL_DEFAULT);this.draw(0,-1,true)},this)}if((this.elBtnNextMonth=jindo.$$.getSingle(("."+c+"btn-next-mon"),b))){this.wfNextMonth=jindo.$Fn(function(d){d.stop(jindo.$Event.CANCEL_DEFAULT);this.draw(0,1,true)},this)}if((this.elBtnNextYear=jindo.$$.getSingle(("."+c+"btn-next-year"),b))){this.wfNextYear=jindo.$Fn(function(d){d.stop(jindo.$Event.CANCEL_DEFAULT);this.draw(1,0,true)},this)}this.elTitle=jindo.$$.getSingle(("."+c+"title"),b);this.elTitleYear=jindo.$$.getSingle(("."+c+"title-year"),b);this.elTitleMonth=jindo.$$.getSingle(("."+c+"title-month"),b);var a=jindo.$$.getSingle("."+c+"week",b);this.elWeekTemplate=a.cloneNode(true);this.elWeekAppendTarget=a.parentNode},_setCalendarTitle:function(b,c,f){if(c<10){c=("0"+(c*1)).toString()}var d=this.elTitle,e=this.option("sTitleFormat"),a;if(typeof f!="undefined"){switch(f){case"year":d=this.elTitleYear;e=this.option("sYearTitleFormat");a=e.replace(/yyyy/g,b).replace(/y/g,(b).toString().substr(2,2));break;case"month":d=this.elTitleMonth;e=this.option("sMonthTitleFormat");a=e.replace(/mm/g,c).replace(/m/g,(c*1)).replace(/M/g,this.option("aMonthTitle")[c-1]);break}}else{a=e.replace(/yyyy/g,b).replace(/y/g,(b).toString().substr(2,2)).replace(/mm/g,c).replace(/m/g,(c*1)).replace(/M/g,this.option("aMonthTitle")[c-1])}jindo.$Element(d).text(a)},draw:function(p,s,a){var n=this.option("sClassPrefix"),l=this.getDate(),j=this._getShownDate();if(j&&typeof a!="undefined"&&a){var w=this.constructor.getRelativeDate(p,s,0,j);p=w.nYear;s=w.nMonth}else{if(typeof p=="undefined"&&typeof s=="undefined"&&typeof a=="undefined"){p=l.nYear;s=l.nMonth}else{p=p||j.nYear;s=s||j.nMonth}}if(this.fireEvent("beforeDraw",{nYear:p,nMonth:s})){if(this.elTitle){this._setCalendarTitle(p,s)}if(this.elTitleYear){this._setCalendarTitle(p,s,"year")}if(this.elTitleMonth){this._setCalendarTitle(p,s,"month")}this._clear(jindo.Calendar.getWeeks(p,s));this._setShownDate(p,s);var e=this.getToday(),k=this.constructor.getFirstDay(p,s),q=this.constructor.getLastDay(p,s),z=this.constructor.getLastDate(p,s),m=0,d=this.constructor.getRelativeDate(0,-1,0,{nYear:p,nMonth:s,nDate:1}),g=this.constructor.getRelativeDate(0,1,0,{nYear:p,nMonth:s,nDate:1}),v=this.constructor.getLastDate(d.nYear,d.nMonth),A=[],r,t,y,b,h,f,o,x,u;var c=this.constructor.getWeeks(p,s);for(u=0;u *",this.elWeekAppendTarget);if(k>0){for(u=v-k;uo){t=true;y.addClass(n+"next-mon");b=g.nYear;h=g.nMonth}else{b=p;h=s}}if(m===0){y.addClass(n+"sun")}if(m==6){y.addClass(n+"sat")}if(b==e.nYear&&(h*1)==e.nMonth&&A[u]==e.nDate){y.addClass(n+"today")}f={elDate:this._aDateElement[u],elDateContainer:y.$value(),nYear:b,nMonth:h,nDate:A[u],bPrevMonth:r,bNextMonth:t,sHTML:A[u]};jindo.$Element(f.elDate).html(f.sHTML.toString());this._aMetaData.push({nYear:b,nMonth:h,nDate:A[u]});m=(m+1)%7;this.fireEvent("draw",f)}this.fireEvent("afterDraw",{nYear:p,nMonth:s})}},_clear:function(a){this._aMetaData=[];this._aWeekElement=[];jindo.$Element(this.elWeekAppendTarget).empty()},attachEvent:function(){this.activate()},detachEvent:function(){this.deactivate()},_onActivate:function(){if(this.elBtnPrevYear){this.wfPrevYear.attach(this.elBtnPrevYear,"click")}if(this.elBtnPrevMonth){this.wfPrevMonth.attach(this.elBtnPrevMonth,"click")}if(this.elBtnNextMonth){this.wfNextMonth.attach(this.elBtnNextMonth,"click")}if(this.elBtnNextYear){this.wfNextYear.attach(this.elBtnNextYear,"click")}},_onDeactivate:function(){if(this.elBtnPrevYear){this.wfPrevYear.detach(this.elBtnPrevYear,"click")}if(this.elBtnPrevMonth){this.wfPrevMonth.detach(this.elBtnPrevMonth,"click")}if(this.elBtnNextMonth){this.wfNextMonth.detach(this.elBtnNextMonth,"click")}if(this.elBtnNextYear){this.wfNextYear.detach(this.elBtnNextYear,"click")}}}).extend(jindo.UIComponent);jindo.Calendar.getDateObject=function(a){if(arguments.length==3){return new Date(arguments[0],arguments[1]-1,arguments[2])}return new Date(a.nYear,a.nMonth-1,a.nDate)};jindo.Calendar.getDateHashTable=function(a){if(arguments.length==3){return{nYear:arguments[0],nMonth:arguments[1],nDate:arguments[2]}}if(arguments.length<=1){a=a||new Date()}return{nYear:a.getFullYear(),nMonth:a.getMonth()+1,nDate:a.getDate()}};jindo.Calendar.getTime=function(a){return this.getDateObject(a).getTime()};jindo.Calendar.getFirstDay=function(a,b){return new Date(a,b-1,1).getDay()};jindo.Calendar.getLastDay=function(a,b){return new Date(a,b,0).getDay()};jindo.Calendar.getLastDate=function(a,b){return new Date(a,b,0).getDate()};jindo.Calendar.getWeeks=function(a,c){var d=this.getFirstDay(a,c),b=this.getLastDate(a,c);return Math.ceil((d+b)/7)};jindo.Calendar.getRelativeDate=function(c,d,b,a){return this.getDateHashTable(new Date(a.nYear+c,a.nMonth+d-1,a.nDate+b))};jindo.Calendar.isPast=function(a,b){if(this.getTime(a)this.getTime(b)){return true}return false};jindo.Calendar.isSameDate=function(a,b){if(this.getTime(a)==this.getTime(b)){return true}return false};jindo.Calendar.isBetween=function(a,c,b){if(this.isFuture(a,b)||this.isPast(a,c)){return false}else{return true}};jindo.LayerManager=jindo.$Class({_bIsActivating:false,_bIsLayerVisible:false,_bIsHiding:false,_bIsShowing:false,_aLink:null,$init:function(a,b){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(b||{});this.setLayer(a);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(d){var b=jindo.$Element(d);for(var c=0,a;a=this._aLink[c];c++){a=jindo.$Element(a).$value();if(a&&(d==a||b.isChildOf(a))){return true}}return false},_find:function(c){for(var b=0,a;(a=this._aLink[b]);b++){if(a==c){return b}}return -1},getLayer:function(){return this._el},setLayer:function(b){this._el=jindo.$(b);this._wel=jindo.$Element(b);var c=this._el.cloneNode(true);var a=jindo.$Element(c);a.css({position:"absolute",left:"-5000px"}).appendTo(this._el.parentNode);a.show();this._nLayerHeight=a.height();a.height(this._nLayerHeight);this._sLayerCSSHeight=a.css("height");this._sLayerCSSOverflowX=this._wel.css("overflowX");this._sLayerCSSOverflowY=this._wel.css("overflowY");a.css("overflow","hidden").height(0);this._nSlideMinHeight=a.height()+1;a.leave();return 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(b){this._aLink=jindo.$A(b).unique().$value();return this},link:function(b){if(arguments.length>1){for(var c=0,a=arguments.length;c1){for(var d=0,b=arguments.length;d-1){this._aLink.splice(a,1)}return this},_fireEventBeforeShow:function(){this._transform();return 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=false;this._restore();this.fireEvent("show",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventBeforeHide:function(){this._transform();return this.fireEvent("beforeHide",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_fireEventHide:function(){this._bIsHiding=false;this._restore();this.fireEvent("hide",{elLayer:this.getLayer(),aLinkedElement:this.getLinks(),sMethod:this.option("sMethod")})},_show:function(b,a){this._oEventTimer.abort();this._bIsShowing=true;this._bIsHiding=false;if(a>0){this._oShowTimer.start(b,a)}else{this._oHideTimer.abort();b()}},_hide:function(b,a){this._bIsShowing=false;this._bIsHiding=true;if(a>0){this._oHideTimer.start(b,a)}else{this._oShowTimer.abort();b()}},_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(a){if(typeof a=="undefined"){a=this.option("nShowDelay")}this[this._getShowMethod()](a);return this},hide:function(a){if(typeof a=="undefined"){a=this.option("nHideDelay")}this[this._getHideMethod()](a);return this},showIn:function(a){if(typeof a=="undefined"){a=this.option("nShowDelay")}var b=this;this._show(function(){b._sAppliedMethod="show";if(!b.getVisible()){if(b._fireEventBeforeShow()){b._wel.show();b._fireEventAppear();b._fireEventShow()}}},a);return this},hideOut:function(a){if(typeof a=="undefined"){a=this.option("nHideDelay")}var b=this;this._hide(function(){b._sAppliedMethod="show";if(b.getVisible()){if(b._fireEventBeforeHide()){b._wel.hide();b._fireEventHide()}}},a);return this},_getTransition:function(){if(this._oTransition){return this._oTransition}else{return(this._oTransition=new jindo.Transition().fps(30))}},fadeIn:function(b){var a=this._getTransition();a.detachAll().abort();if(typeof b=="undefined"){b=this.option("nShowDelay")}var d=this.option("nDuration");var c=this;this._show(function(){c._sAppliedMethod="fade";var e=c.getLayer();if(!c._wel.visible()||c._wel.opacity()!=1){if(c._fireEventBeforeShow()){if(!c._wel.visible()){c._wel.opacity(0);c._wel.show()}d*=(1-c._wel.opacity());a.attach({playing:function(f){if(f.nStep===1){this.detach("playing",arguments.callee);c._fireEventAppear()}},end:function(f){this.detach("end",arguments.callee);c._fireEventShow()}}).start(d,e,{"@opacity":c.option("Transition").fFadeIn.apply(null,[1])})}}},b);return this},fadeOut:function(b){var a=this._getTransition();a.detachAll().abort();if(typeof b=="undefined"){b=this.option("nHideDelay")}var d=this.option("nDuration");var c=this;this._hide(function(){c._sAppliedMethod="fade";if(c.getVisible()){var e=c.getLayer();if(c._fireEventBeforeHide()){d*=c._wel.opacity();a.attach({end:function(f){this.detach("end",arguments.callee);c._wel.hide();c._wel.opacity(1);c._fireEventHide()}}).start(d,e,{"@opacity":c.option("Transition").fFadeOut.apply(null,[0])})}}},b);return this},slideDown:function(b){var a=this._getTransition();a.detachAll().abort();if(typeof b=="undefined"){b=this.option("nShowDelay")}var d=this.option("nDuration");var c=this;this._show(function(){c._sAppliedMethod="slide";var e=c.getLayer();if(Math.ceil(c._wel.height())-1){return true}return false},_setLeftRight:function(i,b){var c=this.getElement(),e=this.getLayer(),g=c.offsetWidth,d=e.offsetWidth;if(c==document.body){g=jindo.$Document().clientSize().width}var a=this._isPosition(i,"left"),h=this._isPosition(i,"right"),f=this._isPosition(i,"inside");if(a){if(f){b.nLeft+=i.nLeft}else{b.nLeft-=d;b.nLeft-=i.nLeft}}else{if(h){b.nLeft+=g;if(f){b.nLeft-=d;b.nLeft-=i.nLeft}else{b.nLeft+=i.nLeft}}else{if(i.sAlign=="left"){b.nLeft+=i.nLeft}if(i.sAlign=="center"){b.nLeft+=(g-d)/2}if(i.sAlign=="right"){b.nLeft+=g-d;b.nLeft-=i.nLeft}}}return b},_setVerticalAlign:function(e,f){var c=this.getElement(),b=this.getLayer(),a=c.offsetHeight,d=b.offsetHeight;if(c==document.body){a=jindo.$Document().clientSize().height}switch(e.sValign){case"top":f.nTop+=e.nTop;break;case"middle":f.nTop+=(a-d)/2;break;case"bottom":f.nTop+=a-d-e.nTop;break}return f},_adjustScrollPosition:function(a){if(this.getElement()==document.body){var b=jindo.$Document().scrollPosition();a.nTop+=b.top;a.nLeft+=b.left}return a},getPosition:function(m){if(typeof m!="object"){m=this.option()}if(typeof m.nTop=="undefined"){m.nTop=0}if(typeof m.nLeft=="undefined"){m.nLeft=0}var a,j=this._isPosition(m,"center"),h=this._isPosition(m,"inside"),i=this._isPosition(m,"top"),s=this._isPosition(m,"bottom"),n=this._isPosition(m,"left"),c=this._isPosition(m,"right");if(n){a="left"}if(c){a="right"}if(i){a="top"}if(s){a="bottom"}if(j){a="center"}var b=this.getElement(),o=jindo.$Element(b),q=this.getLayer(),l=jindo.$Element(q),f=o.offset(),g=b.offsetWidth,p=b.offsetHeight,r,d=q.offsetWidth,e=q.offsetHeight,k={nTop:f.top,nLeft:f.left};if(b==document.body){r=jindo.$Document().clientSize();g=r.width;p=r.height}d+=parseInt(l.css("marginLeft"))+parseInt(l.css("marginRight"))||0;e+=parseInt(l.css("marginTop"))+parseInt(l.css("marginBottom"))||0;switch(a){case"center":k.nTop+=(p-e)/2;k.nTop+=m.nTop;k.nLeft+=(g-d)/2;k.nLeft+=m.nLeft;break;case"top":if(h){k.nTop+=m.nTop}else{k.nTop-=m.nTop+e}k=this._setLeftRight(m,k);break;case"bottom":k.nTop+=p;if(h){k.nTop-=m.nTop+e}else{k.nTop+=m.nTop}k=this._setLeftRight(m,k);break;case"left":if(h){k.nLeft+=m.nLeft}else{k.nLeft-=m.nLeft+d}k=this._setVerticalAlign(m,k);break;case"right":k.nLeft+=g;if(h){k.nLeft-=m.nLeft+d}else{k.nLeft+=m.nLeft}k=this._setVerticalAlign(m,k);break}k=this._adjustScrollPosition(k);return k},setPosition:function(b){var a=jindo.$Element(this.getLayer());a.css("left","-9999px").css("top","0px");if(typeof b=="undefined"){b=this.getPosition()}if(this.option("bAuto")){b=this._adjustPosition(b)}a.css("left",b.nLeft+"px").css("top",b.nTop+"px");return this},getCurrentPosition:function(){var a=jindo.$Element(this.getLayer());return{nTop:parseInt(a.css("top")),nLeft:parseInt(a.css("left"))}},_isFullyVisible:function(c){var e=this.getLayer(),i=jindo.$Element(e),g=jindo.$Document().scrollPosition(),h=g.top,b=g.left,a=jindo.$Document().clientSize(),d=e.offsetWidth+(parseInt(i.css("marginLeft"))+parseInt(i.css("marginRight"))||0),f=e.offsetHeight+(parseInt(i.css("marginTop"))+parseInt(i.css("marginBottom"))||0);if(c.nLeft>=0&&c.nTop>=0&&a.width>=c.nLeft-b+d&&a.height>=c.nTop-h+f){return true}return false},_mirrorHorizontal:function(c){if(c.sAlign=="center"||c.sPosition=="inside-center"){return c}var a={};for(var b in c){a[b]=c[b]}if(this._isPosition(a,"right")){a.sPosition=a.sPosition.replace(/right/,"left")}else{if(this._isPosition(a,"left")){a.sPosition=a.sPosition.replace(/left/,"right")}else{if(a.sAlign=="right"){a.sAlign="left"}else{if(a.sAlign=="left"){a.sAlign="right"}}}}return a},_mirrorVertical:function(c){if(c.sValign=="middle"||c.sPosition=="inside-center"){return c}var a={};for(var b in c){a[b]=c[b]}if(this._isPosition(a,"top")){a.sPosition=a.sPosition.replace(/top/,"bottom")}else{if(this._isPosition(a,"bottom")){a.sPosition=a.sPosition.replace(/bottom/,"top")}else{if(a.sValign=="top"){a.sValign="bottom"}else{if(a.sValign=="bottom"){a.sValign="top"}}}}return a},_adjustPosition:function(d){var c=this.option(),a=[];a.push(d);a.push(this.getPosition(this._mirrorHorizontal(c)));a.push(this.getPosition(this._mirrorVertical(c)));a.push(this.getPosition(this._mirrorVertical(this._mirrorHorizontal(c))));for(var b=0,e;e=a[b];b++){if(this._isFullyVisible(e)){d=e;break}}return d}}).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=false},start:function(b,a){this.abort();this._nRemained=0;this._nDelay=a;this._fRun=b;this._bIsRunning=true;this._nLatest=this._getTime();this.fireEvent("wait");this._excute(this._nDelay,false);return true},isRunning:function(){return this._bIsRunning},_getTime:function(){return new Date().getTime()},_clearTimer:function(){var a=false;if(this._nTimer){clearInterval(this._nTimer);this._bIsRunning=false;a=true}this._nTimer=null;return a},abort:function(){var a=this._clearTimer();if(a){this.fireEvent("abort");this._fRun=null}return a},pause:function(){var a=this._getTime()-this._nLatest;this._nRemained=Math.max(this._nDelay-a,0);return this._clearTimer()},_excute:function(b,a){var c=this;this._clearTimer();this._bIsRunning=true;this._nTimer=setInterval(function(){if(c._nTimer){c.fireEvent("run");var d=c._fRun();c._nLatest=c._getTime();if(!d){clearInterval(c._nTimer);c._nTimer=null;c._bIsRunning=false;c.fireEvent("end");return}c.fireEvent("wait");if(a){c._excute(c._nDelay,false)}}},b)},resume:function(){if(!this._fRun||this.isRunning()){return false}this._bIsRunning=true;this.fireEvent("wait");this._excute(this._nRemained,true);this._nRemained=0;return true}}).extend(jindo.Component);jindo.Transition=jindo.$Class({_nFPS:30,_aTaskQueue:null,_oTimer:null,_bIsWaiting:true,_bIsPlaying:false,$init:function(a){this._aTaskQueue=[];this._oTimer=new jindo.Timer();this.option({fEffect:jindo.Effect.linear,bCorrection:false});this.option(a||{})},fps:function(a){if(arguments.length>0){this._nFPS=a;return this}return this._nFPS},isPlaying:function(){return this._bIsPlaying},abort:function(){this._aTaskQueue=[];this._oTimer.abort();if(this._bIsPlaying){this.fireEvent("abort")}this._bIsWaiting=true;this._bIsPlaying=false;this._htTaskToDo=null;return this},start:function(c,b,a){if(arguments.length>0){this.queue.apply(this,arguments)}this._prepareNextTask();return this},queue:function(g,f){var b;if(typeof arguments[0]=="function"){b={sType:"function",fTask:arguments[0]}}else{var k=[];var m=arguments.length;if(arguments[1] instanceof Array){k=arguments[1]}else{var h=[];jindo.$A(arguments).forEach(function(a,n){if(n>0){h.push(a);if(n%2==0){k.push(h.concat());h=[]}}})}b={sType:"task",nDuration:g,aList:[]};for(var e=0;e1){i=a(i);j=a(j);g=j.sUnit}else{j=a(i);i=null;g=j.sUnit}if(i&&j&&i.sUnit!=j.sUnit){throw new Error("unit error")}i=i&&i.nValue;j=j&&j.nValue;var h=function(n){var l=e(n);var o=function(p,q){return(q-p)*l+p+g};if(g=="color"){var m=parseInt(o(i[0],j[0]),10)<<16;m|=parseInt(o(i[1],j[1]),10)<<8;m|=parseInt(o(i[2],j[2]),10);m=m.toString(16).toUpperCase();for(var k=0;6-m.length;k++){m="0"+m}return"#"+m}return o(i,j)};if(i===null){h.setStart=function(k){k=a(k);if(k.sUnit!=g){throw new Error("unit eror")}i=k.nValue}}return h}};jindo.Effect.linear=jindo.Effect(function(a){return a});jindo.Effect.easeIn=jindo.Effect(function(a){return(1-Math.sqrt(1-(a*a)))});jindo.Effect.easeOut=jindo.Effect(function(a){return Math.sqrt((2-a)*a)});jindo.Effect.bounce=jindo.Effect(function(a){if(a<(1/2.75)){return(7.5625*a*a)}else{if(a<(2/2.75)){return(7.5625*(a-=(1.5/2.75))*a+0.75)}else{if(a<(2.5/2.75)){return(7.5625*(a-=(2.25/2.75))*a+0.9375)}else{return(7.5625*(a-=(2.625/2.75))*a+0.984375)}}}});jindo.Effect._cubicBezier=function(b,d,a,c){return function(n){var j=3*b,l=3*(a-b)-j,e=1-j-l,i=3*d,k=3*(c-d)-i,m=1-i-k;function h(o){return((e*o+l)*o+j)*o}function g(o){return((m*o+k)*o+i)*o}function f(o,v){var u=0,t=1,r=o,p,s;for(var q=0;q<8;q++){p=h(r)-o;if(Math.abs(p)t){return t}while(up){u=r}else{t=r}r=(t-u)*0.5+u}return r}return g(f(n,(1/1000)))}};jindo.Effect.cubicBezier=function(b,d,a,c){return jindo.Effect(jindo.Effect._cubicBezier(b,d,a,c))};jindo.Effect.overphase=jindo.Effect.cubicBezier(0.25,0.75,0.8,1.3);jindo.Effect.easeInOut=jindo.Effect.cubicBezier(0.75,0,0.25,1);jindo.Effect.easeOutIn=jindo.Effect.cubicBezier(0.25,0.75,0.75,0.25);jindo.Effect.cubicEase=jindo.Effect.cubicBezier(0.25,0.1,0.25,1);jindo.Effect.cubicEaseIn=jindo.Effect.cubicBezier(0.42,0,1,1);jindo.Effect.cubicEaseOut=jindo.Effect.cubicBezier(0,0,0.58,1);jindo.Effect.cubicEaseInOut=jindo.Effect.cubicBezier(0.42,0,0.58,1);jindo.Effect.cubicEaseOutIn=jindo.Effect.cubicBezier(0,0.42,1,0.58);jindo.Effect.pulse=function(a){return jindo.Effect(function(b){return(-Math.cos((b*(a-0.5)*2)*Math.PI)/2)+0.5})};jindo.FileUploader=jindo.$Class({_bIsActivating:false,_aHiddenInput:[],$init:function(a,b){var c={sUrl:"",sCallback:"",htData:{},sFiletype:"*",sMsgNotAllowedExt:"업로드가 허용되지 않는 파일형식입니다",bAutoUpload:false,bAutoReset:true,bActivateOnload:true};this.option(c);this.option(b||{});this._el=jindo.$(a);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;if(this.option("bActivateOnload")){this.activate()}},_appendIframe:function(){var a="tmpFrame_"+this._makeUniqueId();this._welIframe=jindo.$Element(jindo.$('