/** * Jindo2 Framework * @version 1.5.1 * NHN_Library:Jindo-1.5.1;JavaScript Framework; */ 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 cl=arguments.callee;var cc=cl._cached;if(cc)return cc;if(!(this instanceof cl))return new cl();if(!cc)cl._cached=this;this.version="1.5.1";} jindo.$=function(sID){var ret=[],arg=arguments,nArgLeng=arg.length,lastArgument=arg[nArgLeng-1],doc=document,el=null;var reg=/^<([a-z]+|h[1-5])>$/i;var reg2=/^<([a-z]+|h[1-5])(\s+[^>]+)?>/i;if(nArgLeng>1&&typeof lastArgument!="string"&&lastArgument.body){arg=Array.prototype.slice.apply(arg,[0,nArgLeng-1]);doc=lastArgument;} for(var i=0;i-1){if(reg.test(el)){el=doc.createElement(RegExp.$1);}else if(reg2.test(el)){var p={thead:'table',tbody:'table',tr:'tbody',td:'tr',dt:'dl',dd:'dl',li:'ul',legend:'fieldset',option:"select"};var tag=RegExp.$1.toLowerCase();var ele=jindo._createEle(p[tag],el,doc);for(var i=0,leng=ele.length;i1?ret:(ret[0]||null);} jindo._createEle=function(sParentTag,sHTML,oDoc,bWantParent){var sId='R'+new Date().getTime()+parseInt(Math.random()*100000);var oDummy=oDoc.createElement("div");switch(sParentTag){case'select':case'table':case'dl':case'ul':case'fieldset':oDummy.innerHTML='<'+sParentTag+' class="'+sId+'">'+sHTML+'';break;case'thead':case'tbody':oDummy.innerHTML='<'+sParentTag+' class="'+sId+'">'+sHTML+'
';break;case'tr':oDummy.innerHTML=''+sHTML+'
';break;default:oDummy.innerHTML='
'+sHTML+'
';break;} var oFound;for(oFound=oDummy.firstChild;oFound;oFound=oFound.firstChild){if(oFound.className==sId)break;} return bWantParent?oFound:oFound.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\s*\(([^\)]*)[\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(superClass){if(typeof superClass=="undefined"||superClass===null||!superClass.extend){throw new Error("extend시 슈퍼 클래스는 Class여야 합니다.");} this.prototype._$superClass=superClass;for(var x in superClass){if(superClass.hasOwnProperty(x)){if(x=="prototype")continue;this[x]=superClass[x];}} 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);};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);} 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)||1;nAdd=parseInt(RegExp.$2)||0;}else{nMul=Infinity;nAdd=parseInt(sOption);} 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 cl=arguments.callee;var cc=cl._cached;if(cc)return cc;if(!(this instanceof cl))return new cl;if(!cc)cl._cached=this;this._navigator=navigator;} jindo.$Agent.prototype.navigator=function(){var info=new Object;var ver=-1;var nativeVersion=-1;var u=this._navigator.userAgent;var v=this._navigator.vendor||"";function f(s,h){return((h||"").indexOf(s)>-1)};info.getName=function(){var name="";for(x in info){if(typeof info[x]=="boolean"&&info[x]&&info.hasOwnProperty(x)) name=x;} return name;} info.webkit=f("WebKit",u);info.opera=(typeof window.opera!="undefined")||f("Opera",u);info.ie=!info.opera&&f("MSIE",u);info.chrome=info.webkit&&f("Chrome",u);info.safari=info.webkit&&!info.chrome&&f("Apple",v);info.firefox=f("Firefox",u);info.mozilla=f("Gecko",u)&&!info.safari&&!info.chrome&&!info.firefox;info.camino=f("Camino",v);info.netscape=f("Netscape",u);info.omniweb=f("OmniWeb",u);info.icab=f("iCab",v);info.konqueror=f("KDE",v);info.mobile=(f("Mobile",u)||f("Android",u)||f("Nokia",u)||f("webOS",u)||f("Opera Mini",u)||f("BlackBerry",u)||f("PPC",u)||f("Smartphone",u)||f("IEMobile",u))&&!f("iPad",u);info.msafari=(!f("IEMobile",u)&&f("Mobile",u))||(f("iPad",u)&&f("Safari",u));info.mopera=f("Opera Mini",u);info.mie=f("PPC",u)||f("Smartphone",u)||f("IEMobile",u);try{if(info.ie){ver=u.match(/(?:MSIE) ([0-9.]+)/)[1];if(u.match(/(?:Trident)\/([0-9.]+)/)&&u.match(/(?:Trident)\/([0-9.]+)/)[1]==4){nativeVersion=8;}}else if(info.safari||info.msafari){ver=parseFloat(u.match(/Safari\/([0-9.]+)/)[1]);if(ver==100){ver=1.1;}else{ver=[1.0,1.2,-1,1.3,2.0,3.0][Math.floor(ver/100)];}}else if(info.mopera){ver=u.match(/(?:Opera\sMini)\/([0-9.]+)/)[1];}else if(info.firefox||info.opera||info.omniweb){ver=u.match(/(?:Firefox|Opera|OmniWeb)\/([0-9.]+)/)[1];}else if(info.mozilla){ver=u.match(/rv:([0-9.]+)/)[1];}else if(info.icab){ver=u.match(/iCab[ \/]([0-9.]+)/)[1];}else if(info.chrome){ver=u.match(/Chrome[ \/]([0-9.]+)/)[1];} info.version=parseFloat(ver);info.nativeVersion=parseFloat(nativeVersion);if(isNaN(info.version))info.version=-1;}catch(e){info.version=-1;} this.navigator=function(){return info;};return info;};jindo.$Agent.prototype.os=function(){var info=new Object;var u=this._navigator.userAgent;var p=this._navigator.platform;var f=function(s,h){return(h.indexOf(s)>-1)};info.getName=function(){var name="";for(x in info){if(typeof info[x]=="boolean"&&info[x]&&info.hasOwnProperty(x)) name=x;} return name;} info.win=f("Win",p) info.mac=f("Mac",p);info.linux=f("Linux",p);info.win2000=info.win&&(f("NT 5.0",u)||f("2000",u));info.winxp=info.win&&f("NT 5.1",u);info.xpsp2=info.winxp&&f("SV1",u);info.vista=info.win&&f("NT 6.0",u);info.win7=info.win&&f("NT 6.1",u);info.ipad=f("iPad",u);info.iphone=f("iPhone",u)&&!info.ipad;info.android=f("Android",u);info.nokia=f("Nokia",u);info.webos=f("webOS",u);info.blackberry=f("BlackBerry",u);info.mwin=f("PPC",u)||f("Smartphone",u)||f("IEMobile",u);this.os=function(){return info;};return info;};jindo.$Agent.prototype.flash=function(){var info=new Object;var p=this._navigator.plugins;var m=this._navigator.mimeTypes;var f=null;info.installed=false;info.version=-1;if(typeof p!="undefined"&&p.length){f=p["Shockwave Flash"];if(f){info.installed=true;if(f.description){info.version=parseFloat(f.description.match(/[0-9.]+/)[0]);}} if(p["Shockwave Flash 2.0"]){info.installed=true;info.version=2;}}else if(typeof m!="undefined"&&m.length){f=m["application/x-shockwave-flash"];info.installed=(f&&f.enabledPlugin);}else{for(var i=10;i>1;i--){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);info.installed=true;info.version=i;break;}catch(e){}}} this.flash=function(){return info;};this.info=this.flash;return info;};jindo.$Agent.prototype.silverlight=function(){var info=new Object;var p=this._navigator.plugins;var s=null;info.installed=false;info.version=-1;if(typeof p!="undefined"&&p.length){s=p["Silverlight Plug-In"];if(s){info.installed=true;info.version=parseInt(s.description.split(".")[0]);if(s.description=="1.0.30226.2")info.version=2;}}else{try{s=new ActiveXObject("AgControl.AgControl");info.installed=true;if(s.isVersionSupported("3.0")){info.version=3;}else if(s.isVersionSupported("2.0")){info.version=2;}else if(s.isVersionSupported("1.0")){info.version=1;}}catch(e){}} this.silverlight=function(){return info;};return info;};jindo.$A=function(array){var cl=arguments.callee;if(typeof array=="undefined"||array==null)array=[];if(array instanceof cl)return array;if(!(this instanceof cl))return new cl(array);this._array=[] if(array.constructor!=String){this._array=[];for(var i=0;i-1);};jindo.$A.prototype.indexOf=function(oValue){if(typeof this._array.indexOf!='undefined'){jindo.$A.prototype.indexOf=function(oValue){return this._array.indexOf(oValue);}}else{jindo.$A.prototype.indexOf=function(oValue){for(var i=0;iMath.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(fCallback,oThis){if(typeof this._array.map=="function"){jindo.$A.prototype.map=function(fCallback,oThis){var arr=this._array;var errBreak=this.constructor.Break;var errContinue=this.constructor.Continue;function f(v,i,a){try{return fCallback.call(oThis,v,i,a);}catch(e){if(e instanceof errContinue){return v;}else{throw e;}}};try{this._array=this._array.map(f);}catch(e){if(!(e instanceof errBreak))throw e;} return this;}}else{jindo.$A.prototype.map=function(fCallback,oThis){var arr=this._array;var returnArr=[];var errBreak=this.constructor.Break;var errContinue=this.constructor.Continue;function f(v,i,a){try{return fCallback.call(oThis,v,i,a);}catch(e){if(e instanceof errContinue){return v;}else{throw e;}}};for(var i=0;i=b.length)b[j]=a[i];} this._array=b;return this;};jindo.$Ajax=function(url,option){var cl=arguments.callee;if(!(this instanceof cl))return new cl(url,option);function _getXHR(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(ActiveXObject){try{return new ActiveXObject('MSXML2.XMLHTTP');}catch(e){return new ActiveXObject('Microsoft.XMLHTTP');} return null;}} var loc=location.toString();var domain='';try{domain=loc.match(/^https?:\/\/([a-z0-9_\-\.]+)/i)[1];}catch(e){} this._status=0;this._url=url;this._options=new Object;this._headers=new Object;this._options={type:"xhr",method:"post",proxy:"",timeout:0,onload:function(req){},onerror:null,ontimeout:function(req){},jsonp_charset:"utf-8",callbackid:"",callbackname:"",sendheader:true,async:true,decode:true,postBody:false};this.option(option);if(jindo.$Ajax.CONFIG){this.option(jindo.$Ajax.CONFIG);} var _opt=this._options;_opt.type=_opt.type.toLowerCase();_opt.method=_opt.method.toLowerCase();if(typeof window.__jindo2_callback=="undefined"){window.__jindo2_callback=new Array();} switch(_opt.type){case"put":case"delete":case"get":case"post":_opt.method=_opt.type;_opt.type="xhr";case"xhr":this._request=_getXHR();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');_opt.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._onload=(function(isIE){if(isIE){return function(){var bSuccess=this._request.readyState==4&&this._request.status==200;var oResult;if(this._request.readyState==4){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{oResult=this._options.onload(jindo.$Ajax.Response(this._request));}}finally{if(typeof this._oncompleted=='function'){this._oncompleted(bSuccess,oResult);} if(this._options.type!="jsonp"){this.abort();try{delete this._request.onload;}catch(e){this._request.onload=undefined;}} delete this._request.onreadystatechange;}}}}else{return function(){var bSuccess=this._request.readyState==4&&this._request.status==200;var oResult;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{oResult=this._options.onload(jindo.$Ajax.Response(this._request));}}finally{this._status--;if(typeof this._oncompleted=='function'){this._oncompleted(bSuccess,oResult);}}}}}})(/MSIE/.test(window.navigator.userAgent));jindo.$Ajax.prototype.request=function(oData){this._status++;var t=this;var req=this._request;var opt=this._options;var data,v,a=[],data="";var _timer=null;var url=this._url;this._is_abort=false;if(opt.postBody&&opt.type.toUpperCase()=="XHR"&&opt.method.toUpperCase()!="GET"){if(typeof oData=='string'){data=oData;}else{data=jindo.$Json(oData).toString();}}else if(typeof oData=="undefined"||!oData){data=null;}else{for(var k in oData){if(oData.hasOwnProperty(k)){v=oData[k];if(typeof v=="function")v=v();if(v instanceof Array||v instanceof jindo.$A){jindo.$A(v).forEach(function(value,index,array){a[a.length]=k+"="+encodeURIComponent(value);});}else{a[a.length]=k+"="+encodeURIComponent(v);}}} data=a.join("&");} if(data&&opt.type.toUpperCase()=="XHR"&&opt.method.toUpperCase()=="GET"){if(url.indexOf('?')==-1){url+="?";}else{url+="&";} url+=data;data=null;} req.open(opt.method.toUpperCase(),url,opt.async);if(opt.type.toUpperCase()=="XHR"&&opt.method.toUpperCase()=="GET"&&/MSIE/.test(window.navigator.userAgent)){req.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");} if(opt.sendheader){req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");req.setRequestHeader("charset","utf-8");for(var x in this._headers){if(this._headers.hasOwnProperty(x)){if(typeof this._headers[x]=="function") continue;req.setRequestHeader(x,String(this._headers[x]));}}} var navi=navigator.userAgent;if(req.addEventListener&&!(navi.indexOf("Opera")>-1)&&!(navi.indexOf("MSIE")>-1)){if(this._loadFunc){req.removeEventListener("load",this._loadFunc,false);} this._loadFunc=function(rq){clearTimeout(_timer);_timer=undefined;t._onload(rq);} req.addEventListener("load",this._loadFunc,false);}else{if(typeof req.onload!="undefined"){req.onload=function(rq){if(req.readyState==4&&!t._is_abort){clearTimeout(_timer);_timer=undefined;t._onload(rq);}};}else{if(window.navigator.userAgent.match(/(?:MSIE) ([0-9.]+)/)[1]==6&&opt.async){var onreadystatechange=function(rq){if(req.readyState==4&&!t._is_abort){if(_timer){clearTimeout(_timer);_timer=undefined;} t._onload(rq);clearInterval(t._interval);t._interval=undefined;}};this._interval=setInterval(onreadystatechange,300);}else{req.onreadystatechange=function(rq){if(req.readyState==4){clearTimeout(_timer);_timer=undefined;t._onload(rq);}};}}} if(opt.timeout>0){if(this._interval)clearInterval(this._interval);if(this._timer)clearTimeout(this._timer);_timer=setTimeout(function(){t._is_abort=true;if(t._interval){clearInterval(t._interval);t._interval=undefined;} try{req.abort();}catch(e){};opt.ontimeout(req);if(typeof t._oncompleted=='function')t._oncompleted(false);},opt.timeout*1000);this._timer=_timer;} this._test_url=url;req.send(data);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(name,value){if(typeof name=="undefined")return"";if(typeof name=="string"){if(typeof value=="undefined")return this._options[name];this._options[name]=value;return this;} try{for(var x in name){if(name.hasOwnProperty(x)) this._options[x]=name[x]}}catch(e){};return this;};jindo.$Ajax.prototype.header=function(name,value){if(typeof name=="undefined")return"";if(typeof name=="string"){if(typeof value=="undefined")return this._headers[name];this._headers[name]=value;return this;} try{for(var x in name){if(name.hasOwnProperty(x)) this._headers[x]=name[x]}}catch(e){};return this;};jindo.$Ajax.Response=function(req){if(this===jindo.$Ajax)return new jindo.$Ajax.Response(req);this._response=req;};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(name){if(typeof name=="string")return this._response.getResponseHeader(name);return this._response.getAllResponseHeaders();};jindo.$Ajax.RequestBase=jindo.$Class({_respHeaderString:"",callbackid:"",callbackname:"",responseXML:null,responseJSON:null,responseText:"",status:404,readyState:0,$init:function(fpOption){},onload:function(){},abort:function(){},open:function(){},send:function(){},setRequestHeader:function(sName,sValue){this._headers[sName]=sValue;},getResponseHeader:function(sName){return this._respHeaders[sName]||"";},getAllResponseHeaders:function(){return this._respHeaderString;},_getCallbackInfo:function(){var id="";if(this.option("callbackid")!=""){var idx=0;do{id="_"+this.option("callbackid")+"_"+idx;idx++;}while(window.__jindo2_callback[id]);}else{do{id="_"+Math.floor(Math.random()*10000);}while(window.__jindo2_callback[id]);} if(this.option("callbackname")==""){this.option("callbackname","_callback");} return{callbackname:this.option("callbackname"),id:id,name:"window.__jindo2_callback."+id};}});jindo.$Ajax.JSONPRequest=jindo.$Class({_headers:{},_respHeaders:{},_script:null,_onerror:null,$init:function(fpOption){this.option=fpOption;},_callback:function(data){if(this._onerror){clearTimeout(this._onerror);this._onerror=null;} var self=this;this.responseJSON=data;this.onload(this);setTimeout(function(){self.abort()},10);},abort:function(){if(this._script){try{this._script.parentNode.removeChild(this._script);}catch(e){};}},open:function(method,url){this.responseJSON=null;this._url=url;},send:function(data){var t=this;var info=this._getCallbackInfo();var head=document.getElementsByTagName("head")[0];this._script=jindo.$("