ipu的trunk版的android工程和服务端工程。

webframe-jcl.js 107KB

    /*! * WADE JavaScript Library v2.0 * http://www.wadecn.com/ * auth:xiedx@asiainfo-linkage.com * Copyright 2011, WADE */ (function(window,undefined){var Wade=function(selector,context){return new Wade.Dom.init(selector,context); // NOSONAR 注释,可以忽略sonar扫描 },rootWade,rtrim=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,quickExpr=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rnotwhite=/\S/,readyBound=false,readyList=[],DOMContentLoaded,browserMatch,userAgent=navigator.userAgent,toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf,_Wade=window.Wade,document=window.document,scriptPathExpr=/[\:\/\.\?\&=]/ig,includedScript; Wade.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy;if(typeof target==="boolean"){deep=target; target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!Wade.isFunction(target)){target={};}if(length===i){target=this;--i;}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name]; copy=options[name];if(target===copy){continue;}if(deep&&copy&&(Wade.isPlainObject(copy)||Wade.isArray(copy))){var clone=src&&(Wade.isPlainObject(src)||Wade.isArray(src))?src:Wade.isArray(copy)?[]:{}; target[name]=Wade.extend(deep,clone,copy);}else{if(copy!==undefined){target[name]=copy;}}}}}return target;};Wade.extend({guid:1,noop:function(){},error:function(msg){throw msg; },isNumber:function(value){return typeof value==="number"&&isFinite(value);},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value); },isString:function(value){return typeof value==="string";},isBoolean:function(value){return typeof value==="boolean";},isFunction:function(obj){return toString.call(obj)==="[object Function]"; },isArray:function(obj){return toString.call(obj)==="[object Array]";},isObject:function(obj){return toString.call(obj)==="[object Object]";},isPlainObject:function(obj){if(!obj||toString.call(obj)!=="[object Object]"||obj.nodeType||obj.setInterval){return false; }if(obj.constructor&&!hasOwnProperty.call(obj,"constructor")&&!hasOwnProperty.call(obj.constructor.prototype,"isPrototypeOf")){return false;}var key;for(key in obj){}return key===undefined||hasOwnProperty.call(obj,key); },isEmptyObject:function(obj){for(var name in obj){return false;}return true;},isElement:function(value){return value?value.nodeType!==undefined:false; },isNodeName:function(elem,name){return Wade.nodeName(elem,name);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase(); },isWindow:function(obj){return obj&&typeof obj==="object"&&"setInterval" in obj;},trim:function(text){return(text||"").replace(rtrim,"");},inArray:function(item,array){if(array.indexOf){return array.indexOf(item); }for(var i=0,length=array.length;i<length;i++){if(array[i]===item){return i;}}return -1;},makeArray:function(array,results){var ret=results||[];if(array!=null){if(array.length==null||typeof array==="string"||Wade.isFunction(array)||(typeof array!=="function"&&array.setInterval)){push.call(ret,array); }else{Wade.merge(ret,array);}}return ret;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length; j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}}first.length=i;return first;},grep:function(elems,callback,inv){var ret=[]; for(var i=0,length=elems.length;i<length;i++){if(!inv!==!callback(elems[i],i)){ret.push(elems[i]);}}return ret;},map:function(elems,callback,arg){var ret=[],value; for(var i=0,length=elems.length;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}return ret.concat.apply([],ret);},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||Wade.isFunction(object); if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break; }}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false; value=object[++i]){}}}return object;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}data=Wade.trim(data);if(/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return window.JSON&&window.JSON.parse?window.JSON.parse(data):(new Function("return "+data))(); }else{Wade.error("Invalid JSON: "+data);}},globalEval:function(data){if(data&&rnotwhite.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script"); script.type="text/javascript";if(Wade.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;}head.insertBefore(script,head.firstChild); head.removeChild(script);}},includeScript:function(path,cache){if(!path||!Wade.isString(path)){return;}var key;if(includedScript==undefined){includedScript=[]; var ssrc;Wade("script[src]").each(function(){ssrc=Wade.attr(this,"src");if(ssrc){key=ssrc.replace(scriptPathExpr,"_");if(Wade.inArray(key,includedScript)<0){includedScript.push(key); }}});}key=path.replace(scriptPathExpr,"_");if(Wade.inArray(key,includedScript)<0||false==cache){Wade.ajaxRequest({url:path,async:false,cache:(cache==undefined?true:cache),dataType:"script"}); includedScript.push(key);}},uaMatch:function(ua){ua=ua.toLowerCase();var match=/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||!/compatible/.test(ua)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua)||/(gecko)[ \/]([^\s]*)/i.exec(ua)||[]; return{browser:match[1]||"",version:match[2]||"0"};},browser:{}});window["includeScript"]=Wade.includeScript;if(indexOf){Wade.inArray=function(elem,array){return indexOf.call(array,elem); };}if(!Array.prototype.contains){Array.prototype.contains=function(obj){return(Wade.inArray(obj,this)>=0);};}browserMatch=Wade.uaMatch(userAgent);if(browserMatch.browser){Wade.browser[browserMatch.browser]=true; Wade.browser.version=browserMatch.version;}if(Wade.browser.webkit){Wade.browser.safari=true;}function evalScript(i,elem){if(elem.src){Wade.includeScript(Wade.trim(Wade.attr(elem,"src")),"false"==Wade.attr(elem,"cache")?false:true); }else{Wade.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}if(elem.parentNode){elem.parentNode.removeChild(elem);}}Wade.format={trim:function(value){return Wade.trim(value); },ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf(","),vs.lastIndexOf("。"),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?")); if(index==-1||index<(len-15)){return value.substr(0,len)+"...";}else{return vs.substr(0,index)+"...";}}else{return value.substr(0,len)+"...";}}return value; },undef:function(value){return value!==undefined?value:"";},substr:function(value,start,length){return String(value).substr(start,length);},lowercase:function(value){return String(value).toLowerCase(); },uppercase:function(value){return String(value).toUpperCase();},fileSize:function(size){if(size<1024){return size+" bytes";}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"; }else{return(Math.round(((size*10)/1048576))/10)+" MB";}}},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;"); },htmlDecode:function(value){return !value?value:String(value).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&");},math:function(){var fns={}; return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";");}return fns[a](v);};}(),number:function(v,format){if(!format){return v;}if(isFinite(v)){v=parseFloat(v); }v=!isNaN(v)?v:NaN;if(isNaN(v)){return"";}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2); i18n=true;comma=".";dec=",";}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec); if(1<psplit.length){v=v.toFixed(psplit[1].length);}else{if(2<psplit.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+format); }else{v=v.toFixed(0);}}var fnum=v.toString();psplit=fnum.split(".");if(hasComma){var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3; for(var i=0;i<j;i+=n){if(i!=0){n=3;}parr[parr.length]=cnum.substr(i,n);m-=1;}fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1];}}else{if(psplit[1]){fnum=psplit[0]+dec+psplit[1]; }}return(neg?"-":"")+format.replace(/[\d,?\.?]+/,fnum);},nl2br:function(v){return(!v||!Wade.isString(v))?"":v.replace(nl2brRe,"<br/>");},toUtf8:function(v){return !v?v:String(v).replace(/[^\u0000-\u00FF]/g,function($0){return escape($0).replace(/(%u)(\w{4})/gi,"&#x$2;"); });},toGbk:function(v){return !v?v:unescape(String(v).replace(/&#x/g,"%u").replace(/;/g,""));}};var escapeRe=function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1"); };Wade.Collection=function(allowFunctions,keyFn){this.items=[];this.map={};this.keys=[];this.length=0;this.allowFunctions=allowFunctions===true;if(keyFn){this.getKey=keyFn; }};Wade.Collection.prototype={allowFunctions:false,add:function(key,o){if(arguments.length==1){o=arguments[0];key=this.getKey(o);}if(typeof key!="undefined"&&key!==null){var old=this.map[key]; if(typeof old!="undefined"){return this.replace(key,o);}this.map[key]=o;}this.length++;this.items.push(o);this.keys.push(key);return o;},getKey:function(o){return o.id; },replace:function(key,o){if(arguments.length==1){o=arguments[0];key=this.getKey(o);}var old=this.map[key];if(typeof key=="undefined"||key===null||typeof old=="undefined"){return this.add(key,o); }var index=this.indexOfKey(key);this.items[index]=o;this.map[key]=o;return o;},addAll:function(objs){if(arguments.length>1||Wade.isArray(objs)){var args=arguments.length>1?arguments:objs; for(var i=0,len=args.length;i<len;i++){this.add(args[i]);}}else{for(var key in objs){if(this.allowFunctions||typeof objs[key]!="function"){this.add(key,objs[key]); }}}},each:function(fn,scope){var items=[].concat(this.items);for(var i=0,len=items.length;i<len;i++){if(fn.call(scope||items[i],items[i],i,len)===false){break; }}},eachKey:function(fn,scope){for(var i=0,len=this.keys.length;i<len;i++){fn.call(scope||window,this.keys[i],this.items[i],i,len);}},find:function(fn,scope){for(var i=0,len=this.items.length; i<len;i++){if(fn.call(scope||window,this.items[i],this.keys[i])){return this.items[i];}}return null;},insert:function(index,key,o){if(arguments.length==2){o=arguments[1]; key=this.getKey(o);}if(this.containsKey(key)){this.suspendEvents();this.removeKey(key);this.resumeEvents();}if(index>=this.length){return this.add(key,o); }this.length++;this.items.splice(index,0,o);if(typeof key!="undefined"&&key!==null){this.map[key]=o;}this.keys.splice(index,0,key);return o;},remove:function(o){return this.removeAt(this.indexOf(o)); },removeAt:function(index){if(index<this.length&&index>=0){this.length--;var o=this.items[index];this.items.splice(index,1);var key=this.keys[index];if(typeof key!="undefined"){delete this.map[key]; }this.keys.splice(index,1);return o;}return false;},removeKey:function(key){return this.removeAt(this.indexOfKey(key));},getCount:function(){return this.length; },indexOf:function(o){return Wade.inArray(o,this.items);},indexOfKey:function(key){return Wade.inArray(key,this.keys);},item:function(key){var mk=this.map[key],item=mk!==undefined?mk:(typeof key=="number")?this.items[key]:undefined; return typeof item!="function"||this.allowFunctions?item:null;},itemAt:function(index){return this.items[index];},key:function(key){return this.map[key]; },contains:function(o){return this.indexOf(o)!=-1;},containsKey:function(key){return typeof this.map[key]!="undefined";},clear:function(){this.length=0; this.items=[];this.keys=[];this.map={};},first:function(){return this.items[0];},last:function(){return this.items[this.length-1];},_sort:function(property,dir,fn){var i,len,dsc=String(dir).toUpperCase()=="DESC"?-1:1,c=[],keys=this.keys,items=this.items; fn=fn||function(a,b){return a-b;};for(i=0,len=items.length;i<len;i++){c[c.length]={key:keys[i],value:items[i],index:i};}c.sort(function(a,b){var v=fn(a[property],b[property])*dsc; if(v===0){v=(a.index<b.index?-1:1);}return v;});for(i=0,len=c.length;i<len;i++){items[i]=c[i].value;keys[i]=c[i].key;}},sort:function(dir,fn){this._sort("value",dir,fn); },reorder:function(mapping){this.suspendEvents();var items=this.items,index=0,length=items.length,order=[],remaining=[];for(oldIndex in mapping){order[mapping[oldIndex]]=items[oldIndex]; }for(index=0;index<length;index++){if(mapping[index]==undefined){remaining.push(items[index]);}}for(index=0;index<length;index++){if(order[index]==undefined){order[index]=remaining.shift(); }}this.clear();this.addAll(order);this.resumeEvents();},keySort:function(dir,fn){this._sort("key",dir,fn||function(a,b){var v1=String(a).toUpperCase(),v2=String(b).toUpperCase(); return v1>v2?1:(v1<v2?-1:0);});},getRange:function(start,end){var items=this.items;if(items.length<1){return[];}start=start||0;end=Math.min(typeof end=="undefined"?this.length-1:end,this.length-1); var i,r=[];if(start<=end){for(i=start;i<=end;i++){r[r.length]=items[i];}}else{for(i=start;i>=end;i--){r[r.length]=items[i];}}return r;},filter:function(property,value,anyMatch,caseSensitive){if(!value){return this.clone(); }value=this.createValueMatcher(value,anyMatch,caseSensitive);return this.filterBy(function(o){return o&&value.test(o[property]);});},filterBy:function(fn,scope){var r=new Wade.Collection(); r.getKey=this.getKey;var k=this.keys,it=this.items;for(var i=0,len=it.length;i<len;i++){if(fn.call(scope||this,it[i],k[i])){r.add(k[i],it[i]);}}return r; },findIndex:function(property,value,start,anyMatch,caseSensitive){if(!value){return -1;}value=this.createValueMatcher(value,anyMatch,caseSensitive);return this.findIndexBy(function(o){return o&&value.test(o[property]); },null,start);},findIndexBy:function(fn,scope,start){var k=this.keys,it=this.items;for(var i=(start||0),len=it.length;i<len;i++){if(fn.call(scope||this,it[i],k[i])){return i; }}return -1;},createValueMatcher:function(value,anyMatch,caseSensitive,exactMatch){if(!value.exec){value=String(value);if(anyMatch===true){value=escapeRe(value); }else{value="^"+escapeRe(value);if(exactMatch===true){value+="$";}}value=new RegExp(value,caseSensitive?"":"i");}return value;},clone:function(){var r=new Wade.Collection(); var k=this.keys,it=this.items;for(var i=0,len=it.length;i<len;i++){r.add(k[i],it[i]);}r.getKey=this.getKey;return r;}};Wade.extend({parseJsonString:function(str){if(!str||!typeof(str)=="string"){return""; }str=str.replace(/([:{}\[\]\"])[\s|\u00A0]+/g,"$1");str=str.replace(/[\s|\u00A0]+([:{}\[\]\"])/g,"$1");str=str.replace(/,([^\":{}\[\]]+):\"/g,',"$1":"'); str=str.replace(/,([^\":{}\[\]]+):\{/g,',"$1":{');str=str.replace(/,([^\":{}\[\]]+):\[/g,',"$1":[');str=str.replace(/\{([^\":{}\[\]]+):\"/g,'{"$1":"'); str=str.replace(/\{([^\":{}\[\]]+):\{/g,'{"$1":{');str=str.replace(/\{([^\":{}\[\]]+):\[/g,'{"$1":[');str=str.replace(/\\\":(null|undefined)(,|})/g,'\\":\\"\\"$2'); str=str.replace(/\\\":(true|false)(,|})/g,'\\":\\"$1\\"$2');str=str.replace(/\\\":(-)?([0-9\.]+)(,|})/g,'\\":\\"$1$2\\"$3');str=str.replace(/\\\"/g,"!~b~!"); str=str.replace(/:(null|undefined)(,|})/g,':""$2');str=str.replace(/:(true|false)(,|})/g,':"$1"$2');str=str.replace(/:(-)?([0-9\.]+)(,|})/g,':"$1$2"$3'); var out="";for(var i=0;i<str.length;i++){var chr=str.charAt(i);switch(chr){case"\b":out+="\u005Cb";break;case"\f":out+="\u005Cf";break;case"\r":out+="\u005Cr"; break;case"\t":out+="\u005Ct";break;case"\n":out+="\u005Cn";break;case'"':out+="!~a~!";break;default:out+=chr;break;}}str=out;str=str.replace(/{!~a~!/g,'{"'); str=str.replace(/!~a~!}/g,'"}');str=str.replace(/!~a~!,!~a~!/g,'","');str=str.replace(/!~a~!:!~a~!/g,'":"');str=str.replace(/!~a~!:\[/g,'":[');str=str.replace(/\],!~a~!/g,'],"'); str=str.replace(/!~a~!:{/g,'":{');str=str.replace(/},!~a~!/g,'},"');str=str.replace(/\u005C!~a~!/g,'\u005C"');str=str.replace(/!~a~!/g,'\u005C"');str=str.replace(/!~b~!/g,'\u005C"'); return str;},parseJsonValue:function(str){if(!str||!typeof(str)=="string"){return str;}var out="";for(var i=0;i<str.length;i++){var chr=str.charAt(i);switch(chr){case"\b":out+="\u005Cb"; break;case"\f":out+="\u005Cf";break;case"\r":out+="\u005Cr";break;case"\t":out+="\u005Ct";break;case"\n":out+="\u005Cn";break;case'"':out+='\u005C"';break; default:out+=chr;break;}}return out;}});Wade.DataMap=function(data){if(!this.parseString){return new Wade.DataMap(data);}Wade.Collection.call(this);if(data){if(Wade.isString(data)){this.parseString(data); }else{if(typeof(data)=="object"){this.parseObject(data);}}}};Wade.DataMap.prototype=new Wade.Collection();Wade.extend(Wade.DataMap.prototype,{get:function(key,defaultValue){var r=this.item(key); if(arguments.length>1&&(typeof(r)=="undefined"||r==null)){return arguments[1];}return r;},parseString:function(str){str=Wade.parseJsonString(str);(new Function("this.parseObject("+str+")")).apply(this); },parseObject:function(obj){for(var p in obj){if(obj[p]&&Wade.isArray(obj[p])){this.add(p,new Wade.DatasetList(obj[p]));}else{if(obj[p]&&Wade.isObject(obj[p])){this.add(p,new Wade.DataMap(obj[p])); }else{this.add(p,(obj[p]==undefined||obj[p]==null)?"":obj[p]);}}}}});Wade.DataMap.prototype.toString=function(){var cl=[],is="";for(var key in this.map){is='"'+key+'":'; if(typeof(this.map[key])=="undefined"||this.map[key]==null){is+='""';}else{if(typeof(this.map[key])=="string"||!isNaN(this.map[key])){is+='"'+Wade.parseJsonValue(""+this.map[key])+'"'; }else{is+=this.map[key].toString();}}cl.push(is);}return"{"+cl.join(",")+"}";};Wade.DataMap.prototype.put=Wade.DataMap.prototype.add;Wade.DatasetList=function(o){if(!this.parseString){return new Wade.DatasetList(o); }this.items=[];this.length=0;if(typeof(o)=="string"&&o!=""){this.parseString(o);}if(typeof(o)=="object"&&(o instanceof Array)&&o.length){this.parseArray(o); }};Wade.extend(Wade.DatasetList.prototype,{add:function(o){this.length=(this.length+1);this.items.push(o);},item:function(index,key,defaultValue){if(index<this.length&&index>=0){var r=this.items[index]; if((typeof(r)!="undefined")&&(r instanceof Wade.DataMap)&&arguments.length>1&&typeof(arguments[1])=="string"&&arguments[1]!=""){return r.get(key,defaultValue); }return r;}return;},each:function(fn,scope){var items=[].concat(this.items);for(var i=0,len=items.length;i<len;i=i+1){if(fn.call(scope||items[i],items[i],i,len)===false){break; }}},remove:function(o){return this.removeAt(this.indexOf(o));},removeAt:function(index){if(index<this.length&&index>=0){this.length=(this.length-1);this.items.splice(index,1); }},indexOf:function(o){if(!this.items.indexOf){for(var i=0,len=this.items.length;i<len;i=i+1){if(this.items[i]==o){return i;}}return -1;}else{return this.items.indexOf(o); }},getCount:function(){return this.length;},parseString:function(str){str=Wade.parseJsonString(str);(new Function("this.parseArray("+str+")")).apply(this); },parseArray:function(o){for(var i=0;i<o.length;i++){if(o[i]&&Wade.isArray(o[i])){this.add(new Wade.DatasetList(o[i]));}else{if(o[i]&&Wade.isObject(o[i])){this.add(new Wade.DataMap(o[i])); }else{if(o[i]!=undefined&&o[i]!=null){this.add(o[i]);}}}}},clear:function(){this.items=[];this.length=0;}});Wade.DatasetList.prototype.toString=function(){var cl=[],is=""; for(var i=0;i<this.items.length;i++){is="";if(typeof(this.items[i])=="undefined"||this.items[i]==null){is+='""';}else{if(typeof(this.items[i])=="string"){is='"'+Wade.parseJsonValue(this.items[i])+'"'; }else{is=this.items[i].toString();}}cl.push(is);}return"["+cl.join(",")+"]";};Wade.DatasetList.prototype.get=Wade.DatasetList.prototype.item;Wade.DatasetList.prototype.put=Wade.DatasetList.prototype.add; function now(){return(new Date()).getTime();}Wade.now=now;(function(){Wade.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+now(); div.style.display="none";div.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}Wade.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:document.createElement("select").appendChild(document.createElement("option")).selected,parentNode:div.removeChild(div.appendChild(document.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}root.insertBefore(script,root.firstChild); if(window[id]){Wade.support.scriptEval=true;delete window[id];}try{delete script.test;}catch(e){Wade.support.deleteExpando=false;}root.removeChild(script); if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function click(){Wade.support.noCloneEvent=false;div.detachEvent("onclick",click);});div.cloneNode(true).fireEvent("onclick"); }div=document.createElement("div");div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var fragment=document.createDocumentFragment(); fragment.appendChild(div.firstChild);Wade.support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;var eventSupported=function(eventName){var el=document.createElement("div"); eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]==="function"; }el=null;return isSupported;};Wade.support.submitBubbles=eventSupported("submit");Wade.support.changeBubbles=eventSupported("change");root=script=div=all=a=rDiv=null; })();Wade.fn=Wade.Dom=Wade.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;}if(selector.nodeType){this.context=this[0]=selector; this.length=1;return this;}if(selector==="body"&&!context){this.context=document;this[0]=document.body;this.selector="body";this.length=1;return this;}if(typeof selector==="string"){match=quickExpr.exec(selector); if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(Wade.isPlainObject(context)){selector=[document.createElement(ret[1])]; Wade.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=buildFragment([match[1]],[doc]);selector=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes; }return Wade.makeArray(selector,this);}else{elem=document.getElementById(match[2]);if(elem){if(elem.id!==match[2]){return rootWade.find(selector);}this.length=1; this[0]=elem;}this.context=document;this.selector=selector;return this;}}else{if(!context&&/^\w+$/.test(selector)){this.selector=selector;this.context=document; selector=document.getElementsByTagName(selector);return Wade.makeArray(selector,this);}else{if(context&&context.wade){return Wade(context).find(selector); }else{if(Wade.domSelector){return Wade.makeArray(Sizzle(selector,context),this);}else{this[0]=document.getElementById(selector);return this;}}}}}else{if(Wade.isFunction(selector)){return rootWade.ready(selector); }}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}return Wade.makeArray(selector,this);},wade:"4.0",selector:"",length:0,size:function(){return this.length; },toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?undefined:this[num]);},pushStack:function(elems,name,selector){var ret=Wade(); if(Wade.isArray(elems)){push.apply(ret,elems);}else{Wade.merge(ret,elems);}ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector; }else{if(name){ret.selector=this.selector+"."+name+"("+selector+")";}}return ret;},each:function(callback,args){return Wade.each(this,callback,args);},pushStack:function(elems,name,selector){var ret=Wade(); // NOSONAR 注释,可以忽略sonar扫描 if(Wade.isArray(elems)){push.apply(ret,elems);}else{Wade.merge(ret,elems);}ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector; }else{if(name){ret.selector=this.selector+"."+name+"("+selector+")";}}return ret;},ready:function(fn){Wade.bindReady();if(Wade.isReady){fn.call(document,Wade); }else{if(readyList){readyList.push(fn);}}return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0); },last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(Wade.map(this,function(elem,i){return callback.call(elem,i,elem); }));},end:function(){return this.prevObject||Wade(null);},push:push,sort:[].sort,splice:[].splice};Wade.Dom.init.prototype=Wade.Dom;var rexclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,ralpha=/alpha\([^)]*\)/,ropacity=/opacity=([^)]*)/,rfloat=/float/i,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle,styleFloat=Wade.support.cssFloat?"cssFloat":"styleFloat",fcamelCase=function(all,letter){return letter.toUpperCase(); };Wade.extend({style:function(elem,name,value){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined; }var style=elem.style||elem,set=value!==undefined;if(!Wade.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")"; var filter=style.filter||Wade.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;}return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":""; }if(rfloat.test(name)){name=styleFloat;}name=name.replace(rdashAlpha,fcamelCase);if(set){style[name]=value;}return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight; function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}Wade.each(which,function(){if(!extra){val-=parseFloat(Wade.curCSS(elem,"padding"+this,true))||0; }if(extra==="margin"){val+=parseFloat(Wade.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(Wade.curCSS(elem,"border"+this+"Width",true))||0;}}); }if(elem.offsetWidth!==0){getWH();}else{Wade.swap(elem,props,getWH);}return Math.max(0,Math.round(val));}return Wade.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style,filter; if(!Wade.support.opacity&&name==="opacity"&&elem.currentStyle){ret=ropacity.test(elem.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret; }if(rfloat.test(name)){name=styleFloat;}if(!force&&style&&style[name]){ret=style[name];}else{if(getComputedStyle){if(rfloat.test(name)){name="float";}name=name.replace(rupper,"-$1").toLowerCase(); var defaultView=elem.ownerDocument?elem.ownerDocument.defaultView:null;if(!defaultView){return null;}var computedStyle=defaultView.getComputedStyle(elem,null); if(computedStyle){ret=computedStyle.getPropertyValue(name);}if(name==="opacity"&&ret===""){ret="1";}}else{if(elem.currentStyle){var camelCase=name.replace(rdashAlpha,fcamelCase); ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!rnumpx.test(ret)&&rnum.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left; style.left=camelCase==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}}}return ret;},swap:function(elem,options,callback){var old={}; for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options){elem.style[name]=old[name]; }}});var jsc=now(),rscript=/<script(.|\s)*?\/script>/gi,rselectTextarea=/select|textarea/i,rinput=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,jsre=/=\?(&|$)/,rquery=/\?/,rts=/(\?|&)_=.*?(&|$)/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g; Wade.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){Wade[o]=function(f){return this.bind(o,f);};});Wade.extend({active:0,param:function(a){var s=[]; if(!a||!Wade.isObject(a)){return"";}for(var prefix in a){buildParams(prefix,a[prefix]);}return s.join("&").replace(r20,"+");function buildParams(prefix,obj){if(Wade.isArray(obj)){Wade.each(obj,function(i,v){if(/\[\]$/.test(prefix)){add(prefix,v); }else{buildParams(prefix+"["+(typeof v==="object"||Wade.isArray(v)?i:"")+"]",v);}});}else{if(obj!=null&&typeof obj==="object"){Wade.each(obj,function(k,v){buildParams(prefix+"["+k+"]",v); });}else{add(prefix,obj);}}}function add(key,value){value=Wade.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value); }},get:function(url,data,callback,type){if(Wade.isFunction(data)){type=type||callback;callback=data;data=null;}return Wade.ajaxRequest({type:"GET",url:url,data:data,success:callback,dataType:type}); },getScript:function(url,callback){return Wade.get(url,null,callback,"script");},getJSON:function(url,data,callback){return Wade.get(url,data,callback,"json"); },post:function(url,data,callback,type){if(Wade.isFunction(data)){type=type||callback;callback=data;data={};}return Wade.ajaxRequest({type:"POST",url:url,data:data,success:callback,dataType:type}); },ajaxSetup:function(settings){Wade.extend(Wade.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:window.XMLHttpRequest&&(window.location.protocol!=="file:"||!window.ActiveXObject)?function(){return new window.XMLHttpRequest(); }:function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/"+"*"}},lastModified:{},etag:{},ajaxRequest:function(origSettings){var s=Wade.extend(true,{},Wade.ajaxSettings,origSettings); var jsonp,status,data,callbackContext=origSettings&&origSettings.context||s,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=Wade.param(s.data,s.traditional); }if(s.dataType==="jsonp"){if(type==="GET"){if(!jsre.test(s.url)){s.url+=(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";}}else{if(!s.data||!jsre.test(s.data)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"; }}s.dataType="json";}if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){jsonp=s.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1"); }s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=window[jsonp]||function(tmp){data=tmp;success();complete();window[jsonp]=undefined; try{delete window[jsonp];}catch(e){}if(head){head.removeChild(script);}};}if(s.dataType==="script"&&s.cache===null){s.cache=false;}if(s.cache===false&&type==="GET"){var ts=now(); var ret=s.url.replace(rts,"$1_="+ts+"$2");s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}if(s.data&&type==="GET"){s.url+=(rquery.test(s.url)?"&":"?")+s.data; }if(s.global&&!Wade.active++){Wade.event.trigger("ajaxStart");}var parts=rurl.exec(s.url),remote=parts&&(parts[1]&&parts[1]!==location.protocol||parts[2]!==location.host); if(s.dataType==="script"&&type==="GET"&&remote){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script"); script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){done=true; success();complete();script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}}};}head.insertBefore(script,head.firstChild); return undefined;}var requestDone=false;var xhr=s.xhr();if(!xhr){return;}if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async); }try{if(s.data||origSettings&&origSettings.contentType){xhr.setRequestHeader("Content-Type",s.contentType+(s.encoding?"; charset="+s.encoding:""));}if(s.ifModified){if(Wade.lastModified[s.url]){xhr.setRequestHeader("If-Modified-Since",Wade.lastModified[s.url]); }if(Wade.etag[s.url]){xhr.setRequestHeader("If-None-Match",Wade.etag[s.url]);}}if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */"+"*":s.accepts._default); }catch(e){}if(s.beforeSend&&s.beforeSend.call(callbackContext,xhr,s)===false){if(s.global&&!--Wade.active){Wade.event.trigger("ajaxStop");}xhr.abort(); return false;}if(s.global){trigger("ajaxSend",[xhr,s]);}var onreadystatechange=xhr.onreadystatechange=function(isTimeout){if(!xhr||xhr.readyState===0||isTimeout==="abort"){if(!requestDone){complete(); }requestDone=true;if(xhr){xhr.onreadystatechange=Wade.noop;}}else{if(!requestDone&&xhr&&(xhr.readyState===4||isTimeout==="timeout")){requestDone=true;xhr.onreadystatechange=Wade.noop; status=isTimeout==="timeout"?"timeout":!Wade.httpSuccess(xhr)?"error":s.ifModified&&Wade.httpNotModified(xhr,s.url)?"notmodified":"success";var errMsg; if(status==="success"){try{data=Wade.httpData(xhr,s.dataType,s);}catch(err){status="parsererror";errMsg=err;}}if(status==="success"||status==="notmodified"){if(!jsonp){success(); }}else{Wade.handleError(s,xhr,status,errMsg);}complete();if(isTimeout==="timeout"){xhr.abort();}if(s.async){xhr=null;}}}};try{var oldAbort=xhr.abort;xhr.abort=function(){if(xhr){oldAbort.call(xhr); }onreadystatechange("abort");};}catch(e){}if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout); }try{xhr.send(type==="POST"||type==="PUT"||type==="DELETE"?s.data:null);}catch(e){Wade.handleError(s,xhr,null,e);complete();}if(!s.async){onreadystatechange(); }function success(){if(s.success){s.success.call(callbackContext,data,status,xhr);}if(s.global){trigger("ajaxSuccess",[xhr,s]);}}function complete(){if(s.complete){s.complete.call(callbackContext,xhr,status); }if(s.global){trigger("ajaxComplete",[xhr,s]);}if(s.global&&!--Wade.active){Wade.event.trigger("ajaxStop");}}function trigger(type,args){(s.context?Wade(s.context):Wade.event).trigger(type,args); }return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.context||s,xhr,status,e);}if(s.global){(s.context?Wade(s.context):Wade.event).trigger("ajaxError",[xhr,s,e]); }},httpSuccess:function(xhr){try{return !xhr.status&&location.protocol==="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0; }catch(e){}return false;},httpNotModified:function(xhr,url){var lastModified=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag"); if(lastModified){Wade.lastModified[url]=lastModified;}if(etag){Wade.etag[url]=etag;}return xhr.status===304||xhr.status===0;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText; if(xml&&data.documentElement.nodeName==="parsererror"){Wade.error("parsererror");}if(s&&s.dataFilter){data=s.dataFilter(data,type);}if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=Wade.parseJSON(data); }else{if(type==="script"||!type&&ct.indexOf("javascript")>=0){Wade.globalEval(data);}}}return data;}});var expando="Wade"+now(),uuid=0,windowData={};Wade.extend({cache:{},expando:expando,noData:{"embed":true,"object":true,"applet":true},data:function(elem,name,data){if(elem.nodeName&&Wade.noData[elem.nodeName.toLowerCase()]){return; }elem=elem==window?windowData:elem;var id=elem[expando],cache=Wade.cache,thisCache;if(!id&&typeof name==="string"&&data===undefined){return null;}if(!id){id=++uuid; }if(typeof name==="object"){elem[expando]=id;thisCache=cache[id]=Wade.extend(true,{},name);}else{if(!cache[id]){elem[expando]=id;cache[id]={};}}thisCache=cache[id]; if(data!==undefined){thisCache[name]=data;}return typeof name==="string"?thisCache[name]:thisCache;},removeData:function(elem,name){if(elem.nodeName&&Wade.noData[elem.nodeName.toLowerCase()]){return; }elem=elem==window?windowData:elem;var id=elem[expando],cache=Wade.cache,thisCache=cache[id];if(name){if(thisCache){delete thisCache[name];if(Wade.isEmptyObject(thisCache)){Wade.removeData(elem); }}}else{if(Wade.support.deleteExpando){delete elem[Wade.expando];}else{if(elem.removeAttribute){elem.removeAttribute(Wade.expando);}}delete cache[id];}},cleanData:function(elems){var data,id,cache=Wade.cache,special=Wade.event.special,deleteExpando=Wade.support.deleteExpando; for(var i=0,elem;(elem=elems[i])!=null;i++){id=elem[Wade.expando];if(id){data=cache[id];if(data.events){for(var type in data.events){if(special[type]){Wade.event.remove(elem,type); }else{removeEvent(elem,type,data.handle);}}}if(deleteExpando){delete elem[Wade.expando];}else{if(elem.removeAttribute){elem.removeAttribute(Wade.expando); }}delete cache[id];}}}});Wade.Dom.extend=Wade.extend;Wade.Dom.extend({find:function(selector){if(this[0]){return new Wade.Dom.init(selector,this[0]);}return; },outerHtml:function(){if(!this[0]||this[0].nodeType!==1){return;}var html=this[0].outerHTML,ownerDocument=this[0].ownerDocument;if(!html){var div=ownerDocument.createElement("div"); div.appendChild(this[0].cloneNode(true));html=div.innerHTML;}return html;},data:function(key,value){if(typeof key==="undefined"&&this.length){return Wade.data(this[0]); }else{if(typeof key==="object"){return this.each(function(){Wade.data(this,key);});}}var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]); // NOSONAR 注释,可以忽略sonar扫描 if(data===undefined&&this.length){data=Wade.data(this[0],key);}return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){Wade.data(this,key,value); });}},removeData:function(key){return this.each(function(){Wade.removeData(this,key);});}});var removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener(type,handle,false); }:function(elem,type,handle){elem.detachEvent("on"+type,handle);};Wade.Event=function(src){if(!this.preventDefault){return new Wade.Event(src);}if(src&&src.type){this.originalEvent=src; this.type=src.type;}else{this.type=src;}this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}function returnTrue(){return true; }Wade.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.preventDefault){e.preventDefault(); }e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.stopPropagation){e.stopPropagation(); }e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},stop:function(){this.preventDefault(); this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var rnamespaces=/\.(.*)$/,fcleanup=function(nm){return nm.replace(/[^\w\s\.\|`]/g,function(ch){return"\\"+ch; });};Wade.event={props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),global:{},special:{ready:{setup:Wade.bindReady,teardown:Wade.noop},beforeunload:{setup:function(data,namespaces,eventHandle){if(this.setInterval){this.onbeforeunload=eventHandle; }return false;},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}},add:function(elem,types,handler,data){if(!elem||elem.nodeType===3||elem.nodeType===8){return; }if(elem.setInterval&&(elem!==window&&!elem.frameElement)){elem=window;}var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler; }if(!handler.guid){handler.guid=Wade.guid++;}var elemData=Wade.data(elem);if(!elemData){return;}var events=elemData.events=elemData.events||{},eventHandle=elemData.handle,eventHandle; if(!eventHandle){elemData.handle=eventHandle=function(){return typeof Wade!=="undefined"&&!Wade.event.triggered?Wade.event.handle.apply(eventHandle.elem,arguments):undefined; };}eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?Wade.extend({},handleObjIn):{handler:handler,data:data}; if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[]; handleObj.namespace="";}handleObj.type=type;handleObj.guid=handler.guid;var handlers=events[type],special=Wade.event.special[type]||{};if(!handlers){handlers=events[type]=[]; if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false); }else{if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid; }}handlers.push(handleObj);Wade.event.global[type]=true;}elem=null;},remove:function(elem,types,handler,pos){if(!elem||elem.nodeType===3||elem.nodeType===8){return; }var ret,type,fn,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,elemData=Wade.data(elem),events=elemData&&elemData.events;if(!elemData||!events){return; }if(types&&types.type){handler=types.handler;types=types.type;}if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){Wade.event.remove(elem,type+types); }return;}types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split("."); type=namespaces.shift();namespace=new RegExp("(^|\\.)"+Wade.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)");}eventType=events[type]; if(!eventType){continue;}if(!handler){for(var j=0;j<eventType.length;j++){handleObj=eventType[j];Wade.event.remove(elem,origType,handleObj.handler,j);eventType.splice(j--,1); }continue;}special=Wade.event.special[type]||{};for(var j=pos||0;j<eventType.length;j++){handleObj=eventType[j];if(handler.guid===handleObj.guid){if(pos==null){eventType.splice(j--,1); }if(special.remove){special.remove.call(elem,handleObj);}if(pos!=null){break;}}}if(eventType.length===0||pos!=null&&eventType.length===1){if(!special.teardown||special.teardown.call(elem,namespaces)===false){removeEvent(elem,type,elemData.handle); }ret=null;delete events[type];}}if(Wade.isEmptyObject(events)){var handle=elemData.handle;if(handle){handle.elem=null;}delete elemData.events;delete elemData.handle; if(Wade.isEmptyObject(elemData)){Wade.removeData(elem);}}},trigger:function(event,data,elem){var type=event.type||event,bubbling=arguments[3];if(!bubbling){event=typeof event==="object"?event[expando]?event:Wade.extend(Wade.Event(type),event):Wade.Event(type); if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}if(!elem){event.stopPropagation();if(Wade.event.global[type]){Wade.each(Wade.cache,function(){if(this.events&&this.events[type]){Wade.event.trigger(event,data,this.handle.elem); }});}}if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}event.result=undefined;event.target=elem;data=Wade.makeArray(data);data.unshift(event); }event.currentTarget=elem;var handle=Wade.data(elem,"handle");if(handle){handle.apply(elem,data);}var parent=elem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName&&Wade.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false; }}}catch(e){}if(!event.isPropagationStopped()&&parent){Wade.event.trigger(event,data,parent,true);}else{if(!event.isDefaultPrevented()){var target=event.target,old,isClick=Wade.nodeName(target,"a")&&type==="click",special=Wade.event.special[type]||{}; if(event.result!=false&&(!special._default||special._default.call(elem,event)===false)&&!isClick&&!(target&&target.nodeName&&Wade.noData[target.nodeName.toLowerCase()])){try{if(target[type]){old=target["on"+type]; if(old){target["on"+type]=null;}Wade.event.triggered=true;target[type]();}}catch(e){}if(old){target["on"+type]=old;}Wade.event.triggered=false;}}}},handle:function(event){var all,handlers,namespaces,namespace,events; event=arguments[0]=Wade.event.fix(event||window.event);event.currentTarget=this;all=event.type.indexOf(".")<0&&!event.exclusive;var events=Wade.data(this,"events"),handlers=events[event.type]; if(events&&handlers){handlers=handlers.slice(0);for(var j=0,l=handlers.length;j<l;j++){var handleObj=handlers[j];event.handler=handleObj.handler;event.data=handleObj.data; event.handleObj=handleObj;var ret=handleObj.handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation(); }}if(event.isImmediatePropagationStopped()){break;}}}return event.result;},fix:function(event){if(event[expando]){return event;}var originalEvent=event; event=Wade.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}if(!event.target){event.target=event.srcElement||document; }if(event.target.nodeType===3){event.target=event.target.parentNode;}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement; }if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0); event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode; }if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}if(!event.which&&event.button!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0))); }return event;}};rootWade=Wade(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false); Wade.ready();};}else{if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded); Wade.ready();}};}}function doScrollCheck(){if(Wade.isReady){return;}try{document.documentElement.doScroll("left");}catch(error){setTimeout(doScrollCheck,1); return;}Wade.ready();}Wade.extend({isReady:false,ready:function(){if(!Wade.isReady){if(!document.body){return setTimeout(Wade.ready,13);}Wade.isReady=true; if(readyList){var fn,i=0;while((fn=readyList[i++])){fn.call(document,Wade);}readyList=null;}if(Wade.Dom.triggerHandler){Wade(document).triggerHandler("ready"); }}},bindReady:function(){if(readyBound){return;}readyBound=true;if(document.readyState==="complete"){return Wade.ready();}if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false); window.addEventListener("load",Wade.ready,false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",Wade.ready); var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}}}});Wade.each(("blur focus focusin focusout load resize scroll unload click dblclick contextmenu "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){Wade.Dom[name]=function(data,fn){if(fn==null){fn=data; data=null;}return arguments.length>0?this.bind(name,data,fn):this.trigger(name);};if(Wade.attrFn){Wade.attrFn[name]=true;}});if(window.attachEvent&&!window.addEventListener){window.attachEvent("onunload",function(){for(var id in Wade.cache){if(Wade.cache[id].handle){try{Wade.event.remove(Wade.cache[id].handle.elem); }catch(e){}}}});}var rinlineWade=/ Wade\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/(<([\w:]+)[^>]*?)\/>/g,rselfClosing=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnocache=/<script|<object|<embed|<option|<style/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,fcloseTag=function(all,front,tag){return rselfClosing.test(tag)?all:front+"></"+tag+">"; },wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]}; wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!Wade.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"]; }var emptyTags=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe=/tag|children|cn|html$/i;function createHtml(o){var b="",attr,val,key,cn,i; if(typeof o=="string"){b=o;}else{if(Wade.isArray(o)){for(i=0;i<o.length;i++){if(o[i]){b+=createHtml(o[i]);}}}else{b+="<"+(o.tag=o.tag||"div");for(attr in o){val=o[attr]; if(!confRe.test(attr)){if(typeof val=="object"){b+=" "+attr+'="';for(key in val){b+=key+":"+val[key]+";";}b+='"';}else{b+=" "+({cls:"class",htmlFor:"for"}[attr]||attr)+'="'+val+'"'; }}}if(emptyTags.test(o.tag)){b+="/>";}else{b+=">";if((cn=o.children||o.cn)){b+=createHtml(cn);}else{if(o.html){b+=o.html;}}b+="</"+o.tag+">";}}}return b; }Wade.Dom.extend({isNodeName:function(nodeName){if(this[0]){return Wade.isNodeName(this[0],nodeName);}},nodeName:function(){if(this[0]){return this[0].nodeName; }},text:function(text){if(Wade.isFunction(text)){return this.each(function(i){var self=Wade(this);self.text(text.call(this,i,self.text()));});}if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text)); }return Wade.text(this);},wrapAll:function(html){if(Wade.isFunction(html)){return this.each(function(i){Wade(this).wrapAll(html.call(this,i));});}if(this[0]){var wrap=Wade(html,this[0].ownerDocument).eq(0).clone(true); if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild; }return elem;}).append(this);}return this;},wrapInner:function(html){if(Wade.isFunction(html)){return this.each(function(i){Wade(this).wrapInner(html.call(this,i)); });}return this.each(function(){var self=Wade(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){Wade(this).wrapAll(html); });},unwrap:function(){return this.parent().each(function(){if(!Wade.nodeName(this,"body")){Wade(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem); }});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this); });}else{if(arguments.length){var set=Wade(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling); });}else{if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,Wade(arguments[0]).toArray());return set;}}},clone:function(events){var ret=this.map(function(){if(!Wade.support.noCloneEvent&&!Wade.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument; if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}return Wade.clean([html.replace(rinlineWade,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(rleadingWhitespace,"")],ownerDocument)[0]; }else{return this.cloneNode(true);}});if(events===true){cloneCopyEvent(this,ret);cloneCopyEvent(this.find("*"),ret.find("*"));}return ret;},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlineWade,""):null; }else{if(typeof value==="string"&&!rnocache.test(value)&&(Wade.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,fcloseTag); try{for(var i=0,l=this.length;i<l;i++){if(this[i].nodeType===1){Wade.cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML=value;}}}catch(e){this.empty().append(value); }}else{if(Wade.isFunction(value)){this.each(function(i){var self=Wade(this),old=self.html();self.empty().append(function(){return value.call(this,i,old); });});}else{this.empty().append(value);}}}return this;},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(Wade.isFunction(value)){return this.each(function(i){var self=Wade(this),old=self.html(); self.replaceWith(value.call(this,i,old));});}if(typeof value!=="string"){value=Wade(value).detach();}return this.each(function(){var next=this.nextSibling,parent=this.parentNode; Wade(this).remove();if(next){Wade(next).before(value);}else{Wade(parent).append(value);}});}else{return this.pushStack(Wade(Wade.isFunction(value)?value():value),"replaceWith",value); }},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){if(args&&args[0]&&Wade.isPlainObject(args[0])){args[0]=createHtml(args[0]); }var results,first,value=args[0],scripts=[],fragment,parent;if(!Wade.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){Wade(this).domManip(args,table,callback,true); });}if(Wade.isFunction(value)){return this.each(function(i){var self=Wade(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback); });}if(this[0]){parent=value&&value.parentNode;if(Wade.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent}; }else{results=buildFragment(args,this,scripts);}fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild; }if(first){table=table&&Wade.nodeName(first,"tr");for(var i=0,l=this.length;i<l;i++){callback.call(table?root(this[i],first):this[i],i>0||results.cacheable||this.length>1?fragment.cloneNode(true):fragment); }}if(scripts.length){Wade.each(scripts,evalScript);}}return this;function root(elem,cur){return Wade.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem; }},remove:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){Wade.cleanData(elem.getElementsByTagName("*"));Wade.cleanData([elem]); }if(elem.parentNode){elem.parentNode.removeChild(elem);}}return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){Wade.cleanData(elem.getElementsByTagName("*")); }while(elem.firstChild){elem.removeChild(elem.firstChild);}}return this;}});function cloneCopyEvent(orig,ret){var i=0;ret.each(function(){if(this.nodeName!==(orig[i]&&orig[i].nodeName)){return; }var oldData=Wade.data(orig[i++]),curData=Wade.data(this,oldData),events=oldData&&oldData.events;if(events){delete curData.handle;curData.events={};for(var type in events){for(var handler in events[type]){Wade.event.add(this,type,events[type][handler],events[type][handler].data); }}}});}function buildFragment(args,nodes,scripts){var fragment,cacheable,cacheresults,doc=(nodes&&nodes[0]?nodes[0].ownerDocument||nodes[0]:document);if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===document&&!rnocache.test(args[0])&&(Wade.support.checkClone||!rchecked.test(args[0]))){cacheable=true; cacheresults=Wade.fragments[args[0]];if(cacheresults){if(cacheresults!==1){fragment=cacheresults;}}}if(!fragment){fragment=doc.createDocumentFragment(); Wade.clean(args,doc,fragment,scripts);}if(cacheable){Wade.fragments[args[0]]=cacheresults?fragment:1;}return{fragment:fragment,cacheable:cacheable};}Wade.fragments={}; Wade.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){Wade.fn[name]=function(selector){var ret=[],insert=Wade(selector),parent=this.length===1&&this[0].parentNode; if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length; i<l;i++){var elems=(i>0?this.clone(true):this).get();Wade.fn[original].apply(Wade(insert[i]),elems);ret=ret.concat(elems);}return this.pushStack(ret,name,insert.selector); }};});Wade.extend({clean:function(elems,context,fragment,scripts){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document; }var ret=[];for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";}if(!elem){continue;}if(typeof elem==="string"&&!rhtml.test(elem)){elem=context.createTextNode(elem); }else{if(typeof elem==="string"){elem=elem.replace(rxhtmlTag,fcloseTag);var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div"); div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}if(!Wade.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[]; for(var j=tbody.length-1;j>=0;--j){if(Wade.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}if(!Wade.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild); }elem=div.childNodes;}}if(elem.nodeType){ret.push(elem);}else{ret=Wade.merge(ret,elem);}}if(fragment){for(var i=0;ret[i];i++){if(scripts&&Wade.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]); }else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(Wade.makeArray(ret[i].getElementsByTagName("script"))));}fragment.appendChild(ret[i]); }}}return ret;},cleanData:function(elems){var data,id,cache=Wade.cache,special=Wade.event.special,deleteExpando=Wade.support.deleteExpando;for(var i=0,elem; (elem=elems[i])!=null;i++){id=elem[Wade.expando];if(id){data=cache[id];if(data.events){for(var type in data.events){if(special[type]){Wade.event.remove(elem,type); }else{removeEvent(elem,type,data.handle);}}}if(deleteExpando){delete elem[Wade.expando];}else{if(elem.removeAttribute){elem.removeAttribute(Wade.expando); }}delete cache[id];}}}});Wade.extend({getDom:function(el){if(!el||!document){return null;}if(el.nodeType){return el;}else{if(el.length&&el[0]&&el[0].nodeType){return el[0]; }else{if(typeof el=="string"){return Wade.getDom(Wade(el));}}}return null;},insertHtml:function(where,el,html){if("beforebegin"==where){return Wade(el).before(html); }else{if("afterbegin"==where){return Wade(el).prepend(html);}else{if("beforeend"==where){return Wade(el).append(html);}else{if("afterend"==where){return Wade(el).after(html); }}}}},doInsert:function(where,el,html){this.insertHtml(where,el,html);},insertBefore:function(el,html){return this.doInsert("beforebegin",el,html);},insertAfter:function(el,html){return this.doInsert("afterend",el,html); },insertFirst:function(el,html){return this.doInsert("afterbegin",el,html);},append:function(el,html){return this.doInsert("beforeend",el,html);}});Wade.Template=function(html){if(!this.applyTemplate){return new Wade.Template(html); }if(html instanceof Array){html=html.join("");}else{if(arguments.length>1){html=Array.prototype.join.call(arguments,"");}}this.html=html;};Wade.Template.prototype={applyTemplate:function(dataValues){var values=(dataValues&&Wade.isPlainObject(dataValues.map))?dataValues.map:dataValues; if(this.compiled){return this.compiled(values);}var useF=this.disableFormats!==true;var fm=Wade.format,tpl=this;var fn=function(m,name,format,args){if(format&&useF){if(format.substr(0,5)=="this."){return tpl.call(format.substr(5),values[name]); }else{if(args){var re=/^\s*['"](.*)["']\s*$/;args=args.split(",");for(var i=0,len=args.length;i<len;i=i+1){args[i]=args[i].replace(re,"$1");}args=[values[name]].concat(args); }else{args=[values[name]];}return fm[format].apply(fm,args);}}else{return values[name]!==undefined?values[name]:"";}};return this.html.replace(this.re,fn); },set:function(html,compile){this.html=html;this.compiled=null;if(compile){this.compile();}return this;},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Wade.format; var useF=this.disableFormats!==true;var sep=Wade.browser.gecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("; }else{format='this.call("'+format.substr(5)+'", ';args="";}}else{args="";format=("(values['"+name+"'] == undefined ? '' : ");}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"; };var body;if(Wade.browser.gecko){body="this.compiled = function(values){ return '"+this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn)+"';};"; }else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/(\r\n|\n)/g,"\\n").replace("'","\\'").replace(this.re,fn));body.push("'].join('');};"); body=body.join("");}eval(body);return this;},call:function(fnName,value){return this[fnName](value);},insertFirst:function(el,values){return this.doInsert("afterbegin",el,values); },insertBefore:function(el,values){return this.doInsert("beforebegin",el,values);},insertAfter:function(el,values){return this.doInsert("afterend",el,values); },append:function(el,values){return this.doInsert("beforeend",el,values);},doInsert:function(where,el,values){return Wade.insertHtml(where,el,this.applyTemplate(values)); }};Wade.Template.prototype.apply=Wade.Template.prototype.applyTemplate;function _getHtmlTemplate(el,displayStyle){if(!el||!el.length){return;}var html=el.data("x-wade-template"); if(!html){var tpl=el.find("*[x_tag=x-databind-template]");tpl.css("display",(displayStyle?displayStyle:"block"));html=tpl.outerHtml();el.data("x-wade-template",html); tpl.remove();}return html;}Wade.DataMap.prototype.bind=function(el,displayStyle){if(el&&Wade.isString(el)&&"#"!=el.indexOf(0)){el="#"+el;}var el=Wade(el); if(!el||!el.length){return;}var html=_getHtmlTemplate(el,displayStyle);if(html){el.empty();var tpl=Wade.Template(html);tpl.append(el[0],this.map);tpl=null; }};Wade.DatasetList.prototype.bind=function(el,displayStyle){if(el&&Wade.isString(el)&&"#"!=el.indexOf(0)){el="#"+el;}var el=Wade(el);if(!el||!el.length){return; }var html=_getHtmlTemplate(el,displayStyle);if(html){var tpl=Wade.Template(html);el.empty();for(var i=0;i<this.length;i++){tpl.append(el[0],this.get(i).map); }tpl=null;}};Wade.Dom.extend({ready:function(fn){Wade.bindReady();if(Wade.isReady){fn.call(document,Wade);}else{if(readyList){readyList.push(fn);}}return this; },unbind:function(type,fn){if(typeof type==="object"&&!type.preventDefault){for(var key in type){this.unbind(key,type[key]);}}else{for(var i=0,l=this.length; i<l;i++){Wade.event.remove(this[i],type,fn);}}return this;},trigger:function(type,data){return this.each(function(){Wade.event.trigger(type,data,this); });},triggerHandler:function(type,data){if(this[0]){var event=Wade.Event(type);event.preventDefault();event.stopPropagation();Wade.event.trigger(event,data,this[0]); return event.result;}}});if(document.addEventListener){Wade.each({focus:"focusin",blur:"focusout"},function(orig,fix){Wade.event.special[fix]={setup:function(){this.addEventListener(orig,handler,true); },teardown:function(){this.removeEventListener(orig,handler,true);}};function handler(e){e=Wade.event.fix(e);e.type=fix;return Wade.event.handle.call(this,e); }});}Wade.each(["bind","one"],function(i,name){Wade.Dom[name]=function(type,data,fn){var handler;if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn); }return this;}if(arguments.length===2||data===false){fn=data;data=undefined;}if(name==="one"){handler=function(event){Wade(this).unbind(event,handler); return fn.apply(this,arguments);};handler.guid=fn.guid||Wade.guid++;}else{handler=fn;}if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length; i<l;i++){Wade.event.add(this[i],type,handler,data);}}return this;};});var withinElement=function(event){var parent=event.relatedTarget;try{while(parent&&parent!==this){parent=parent.parentNode; }if(parent!==this){event.type=event.data;Wade.event.handle.apply(this,arguments);}}catch(e){}},delegate=function(event){event.type=event.data;Wade.event.handle.apply(this,arguments); };Wade.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){Wade.event.special[orig]={setup:function(data){Wade.event.add(this,fix,data&&data.selector?delegate:withinElement,orig); },teardown:function(data){Wade.event.remove(this,fix,data&&data.selector?delegate:withinElement);}};});var rclass=/[\n\t]/g,rspace=/\s+/,rreturn=/\r/g,rspecialurl=/href|src|style/,rtype=/(button|input)/i,rfocusable=/(button|input|object|select|textarea)/i,rclickable=/^(a|area)$/i,rradiocheck=/radio|checkbox/; function access(elems,key,value,exec,fn,pass){var length=elems.length;if(typeof key==="object"){for(var k in key){access(elems,k,key[k],exec,fn,value); }return elems;}if(value!==undefined){exec=!pass&&exec&&Wade.isFunction(value);for(var i=0;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass); }return elems;}return length?fn(elems[0],key):undefined;}Wade.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"}; Wade.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined; }if(pass&&name in Wade.attrFn){return Wade(elem)[name](value);}var set=value!==undefined;name=Wade.props[name]||name;if(elem.nodeType===1){var special=rspecialurl.test(name); if(name==="selected"&&!Wade.support.optSelected){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex; }}}if(name in elem&&!special){if(set){if(name==="type"&&rtype.test(elem.nodeName)&&elem.parentNode){Wade.error("属性'type'不允许被更改");}elem[name]=value;}if(Wade.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue; }if(name==="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined; }if(name==="itemId"){return elem.getAttribute(name);}else{return elem[name];}}if(!Wade.support.style&&name==="style"){if(set){elem.style.cssText=""+value; }return elem.style.cssText;}if(set){elem.setAttribute(name,""+value);}var attr=!Wade.support.hrefNormalized&&special?elem.getAttribute(name,2):elem.getAttribute(name); return attr===null?undefined:attr;}return Wade.style(elem,name,value);}});Wade.Dom.extend({attr:function(name,value){return access(this,name,value,true,Wade.attr); },removeAttr:function(name,fn){return this.each(function(){Wade.attr(this,name,"");if(this.nodeType===1){this.removeAttribute(name);}});},css:function(name,value){return access(this,name,value,true,function(elem,name,value){if(value===undefined){return Wade.curCSS(elem,name); }if(typeof value==="number"&&!rexclude.test(name)){value+="px";}Wade.style(elem,name,value);});},addClass:function(value){if(Wade.isFunction(value)){return this.each(function(i){var self=Wade(this); self.addClass(value.call(this,i,self.attr("class")));});}if(value&&typeof value==="string"){var classNames=(value||"").split(rspace);for(var i=0,l=this.length; i<l;i++){var elem=this[i];if(elem.nodeType===1){if(!elem.className){elem.className=value;}else{var className=" "+elem.className+" ",setClass=elem.className; for(var c=0,cl=classNames.length;c<cl;c++){if(className.indexOf(" "+classNames[c]+" ")<0){setClass+=" "+classNames[c];}}elem.className=Wade.trim(setClass); }}}}return this;},removeClass:function(value){if(Wade.isFunction(value)){return this.each(function(i){var self=Wade(this);self.removeClass(value.call(this,i,self.attr("class"))); });}if((value&&typeof value==="string")||value===undefined){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i]; if(elem.nodeType===1&&elem.className){if(value){var className=(" "+elem.className+" ").replace(rclass," ");for(var c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," "); }elem.className=Wade.trim(className);}else{elem.className="";}}}}return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean"; if(Wade.isFunction(value)){return this.each(function(i){var self=Wade(this);self.toggleClass(value.call(this,i,self.attr("class"),stateVal),stateVal);}); }return this.each(function(){if(type==="string"){var className,i=0,self=Wade(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className); self[state?"addClass":"removeClass"](className);}}else{if(type==="undefined"||type==="boolean"){if(this.className){Wade.data(this,"__className__",this.className); }this.className=this.className||value===false?"":Wade.data(this,"__className__")||"";}}});},hasClass:function(selector){var className=" "+selector+" "; for(var i=0,l=this.length;i<l;i++){if((" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}}return false;},val:function(value){if(value===undefined){var elem=this[0]; if(elem){if(Wade.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;}if(Wade.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one"; if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=Wade(option).val(); if(one){return value;}values.push(value);}}return values;}if(rradiocheck.test(elem.type)&&!Wade.support.checkOn){return elem.getAttribute("value")===null?"on":elem.value; }return(elem.value||"").replace(rreturn,"");}return undefined;}var isFunction=Wade.isFunction(value);return this.each(function(i){var self=Wade(this),val=value; if(this.nodeType!==1){return;}if(isFunction){val=value.call(this,i,self.val());}if(typeof val==="number"){val+="";}if(Wade.isArray(val)&&rradiocheck.test(this.type)){this.checked=Wade.inArray(self.val(),val)>=0; }else{if(Wade.nodeName(this,"select")){var values=Wade.makeArray(val);Wade("option",this).each(function(){this.selected=Wade.inArray(Wade(this).val(),values)>=0; });if(!values.length){this.selectedIndex=-1;}}else{this.value=val;}}});},bindData:function(data,f_name,f_val,defopt){var elem=this[0];if(!elem){return; }if(!data){return;}if(Wade.isBoolean(f_name)){defopt=f_name;f_name=null;}if(!f_name&&!f_val){f_name="NAME";f_val="VALUE";}function addOpt(n,v){elem.options.add(new Option(n,v)); }if(Wade.nodeName(elem,"select")){elem.innerHTML="";if(true==defopt){elem.options.add(new Option(Wade.lang["view.web.jcl.select.defalut.option"],""));}if(Wade.isPlainObject(data)){for(var p in data){addOpt(p,data[p]); }}else{if(data instanceof Wade.DataMap){data.eachKey(function(key){addOpt(key,data.get(key));});}else{if(data instanceof Wade.DatasetList){var _name;data.each(function(item){_name=item.get(f_name); if(_name){addOpt(_name,item.get(f_val));}});}}}}}});Wade(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div); Wade.boxModel=Wade.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none";div=null;});if("getBoundingClientRect" in document.documentElement){Wade.Dom.offset=function(options){var elem=this[0]; if(options){return this.each(function(i){Wade.offset.setOffset(this,options,i);});}if(!elem||!elem.ownerDocument){return null;}if(elem===elem.ownerDocument.body){return Wade.offset.bodyOffset(elem); }var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||Wade.support.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||Wade.support.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft; return{top:top,left:left};};}else{Wade.Dom.offset=function(options){var elem=this[0];if(options){return this.each(function(i){Wade.offset.setOffset(this,options,i); });}if(!elem||!elem.ownerDocument){return null;}if(elem===elem.ownerDocument.body){return Wade.offset.bodyOffset(elem);}Wade.offset.initialize();var offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft; while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(Wade.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;}computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle; top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(Wade.offset.doesNotAddBorder&&!(Wade.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0; left+=parseFloat(computedStyle.borderLeftWidth)||0;}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}if(Wade.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0; left+=parseFloat(computedStyle.borderLeftWidth)||0;}prevComputedStyle=computedStyle;}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop; left+=body.offsetLeft;}if(Wade.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft); }return{top:top,left:left};};}Wade.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(Wade.curCSS(body,"marginTop",true))||0,html="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; Wade.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html; body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5); this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position="fixed",checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15); checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5); this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);body=container=innerDiv=checkDiv=table=td=null;Wade.offset.initialize=Wade.noop; },bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;Wade.offset.initialize();if(Wade.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(Wade.curCSS(body,"marginTop",true))||0; left+=parseFloat(Wade.curCSS(body,"marginLeft",true))||0;}return{top:top,left:left};},setOffset:function(elem,options,i){if(/static/.test(Wade.curCSS(elem,"position"))){elem.style.position="relative"; }var curElem=Wade(elem),curOffset=curElem.offset(),curTop=parseInt(Wade.curCSS(elem,"top",true),10)||0,curLeft=parseInt(Wade.curCSS(elem,"left",true),10)||0; if(Wade.isFunction(options)){options=options.call(elem,i,curOffset);}var props={top:(options.top-curOffset.top)+curTop,left:(options.left-curOffset.left)+curLeft}; if("using" in options){options.using.call(elem,props);}else{curElem.css(props);}}};Wade.Dom.extend({position:function(){if(!this[0]){return null;}var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset(); offset.top-=parseFloat(Wade.curCSS(elem,"marginTop",true))||0;offset.left-=parseFloat(Wade.curCSS(elem,"marginLeft",true))||0;parentOffset.top+=parseFloat(Wade.curCSS(offsetParent[0],"borderTopWidth",true))||0; parentOffset.left+=parseFloat(Wade.curCSS(offsetParent[0],"borderLeftWidth",true))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}; },offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.nodeName)&&Wade.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent; }return offsetParent;});}});Wade.each(["Left","Top"],function(i,name){var method="scroll"+name;Wade.Dom[method]=function(val){var elem=this[0],win;if(!elem){return null; }if(val!==undefined){return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:Wade(win).scrollLeft(),i?val:Wade(win).scrollTop());}else{this[method]=val; }});}else{win=getWindow(elem);return win?("pageXOffset" in win)?win[i?"pageYOffset":"pageXOffset"]:Wade.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method]; }};});function getWindow(elem){return("scrollTo" in elem&&elem.document)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}Wade.each(["Height","Width"],function(i,name){var type=name.toLowerCase(); Wade.Dom["inner"+name]=function(){return this[0]?Wade.css(this[0],type,false,"padding"):null;};Wade.Dom["outer"+name]=function(margin){return this[0]?Wade.css(this[0],type,false,margin?"margin":"border"):null; };Wade.Dom[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;}if(Wade.isFunction(size)){return this.each(function(i){var self=Wade(this); self[type](size.call(this,i,self[type]()));});}return("scrollTo" in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?Wade.css(elem,type):this.css(type,typeof size==="string"?size:size+"px"); };});var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,slice=Array.prototype.slice;Wade.each({parent:function(elem){var parent=elem.parentNode; return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return Wade.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return Wade.dir(elem,"parentNode",until); },next:function(elem){return Wade.nth(elem,2,"nextSibling");},prev:function(elem){return Wade.nth(elem,2,"previousSibling");},nextAll:function(elem){return Wade.dir(elem,"nextSibling"); },prevAll:function(elem){return Wade.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return Wade.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return Wade.dir(elem,"previousSibling",until); },siblings:function(elem){return Wade.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return Wade.sibling(elem.firstChild);},contents:function(elem){return Wade.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:Wade.makeArray(elem.childNodes); }},function(name,fn){Wade.fn[name]=function(until,selector){var ret=Wade.map(this,fn,until);if(!runtil.test(name)){selector=until;}if(selector&&typeof selector==="string"){ret=Wade.filter(selector,ret); }ret=this.length>1?Wade.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}return this.pushStack(ret,name,slice.call(arguments).join(",")); };});Wade.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";}return Wade.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir]; while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||Wade(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}cur=cur[dir];}return matched; },nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}return cur;},sibling:function(n,elem){var r=[]; for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}return r;}});Wade.extend({combinePath:function(p1,p2){var s1=""+p1,s2=""+p2;if(p1==undefined||p1==null){s1=""; }if(p2=undefined||p2==null){s2="";}if(s1==""||s2==""){return s1+s2;}var f1=s1.lastIndexOf("/")==(s1.length-1);var f2=s2.indexOf("/")==0;if(f1&&f2){return s1.substring(0,s1.length-1)+s2; }else{if(!f1&&!f2){return s1+"/"+s2;}else{return s1+s2;}}},loadCssFile:function(cssPath,uniqueId){if(/\w+\.\w+(\?|$)/.test(cssPath)){if(!(typeof(uniqueId)=="string"&&uniqueId!=="")){uniqueId="Css_"+cssPath.replace(/\W/g,""); }if(document.getElementById(uniqueId)){return;}var link=document.createElement("link");link.href=cssPath;link.id=uniqueId;link.type="text/css";link.rel="stylesheet"; uniqueId=document.getElementsByTagName("head")[0];uniqueId.insertBefore(link,uniqueId.firstChild);}}});var hexcase=0;var b64pad="";var chrsz=8;var mode=32; function core_md5(K,F){K[F>>5]|=128<<((F)%32);K[(((F+64)>>>9)<<4)+14]=F;var J=1732584193;var I=-271733879;var H=-1732584194;var G=271733878;for(var C=0; C<K.length;C+=16){var E=J;var D=I;var B=H;var A=G;J=md5_ff(J,I,H,G,K[C+0],7,-680876936);G=md5_ff(G,J,I,H,K[C+1],12,-389564586);H=md5_ff(H,G,J,I,K[C+2],17,606105819); I=md5_ff(I,H,G,J,K[C+3],22,-1044525330);J=md5_ff(J,I,H,G,K[C+4],7,-176418897);G=md5_ff(G,J,I,H,K[C+5],12,1200080426);H=md5_ff(H,G,J,I,K[C+6],17,-1473231341); I=md5_ff(I,H,G,J,K[C+7],22,-45705983);J=md5_ff(J,I,H,G,K[C+8],7,1770035416);G=md5_ff(G,J,I,H,K[C+9],12,-1958414417);H=md5_ff(H,G,J,I,K[C+10],17,-42063); I=md5_ff(I,H,G,J,K[C+11],22,-1990404162);J=md5_ff(J,I,H,G,K[C+12],7,1804603682);G=md5_ff(G,J,I,H,K[C+13],12,-40341101);H=md5_ff(H,G,J,I,K[C+14],17,-1502002290); I=md5_ff(I,H,G,J,K[C+15],22,1236535329);J=md5_gg(J,I,H,G,K[C+1],5,-165796510);G=md5_gg(G,J,I,H,K[C+6],9,-1069501632);H=md5_gg(H,G,J,I,K[C+11],14,643717713); I=md5_gg(I,H,G,J,K[C+0],20,-373897302);J=md5_gg(J,I,H,G,K[C+5],5,-701558691);G=md5_gg(G,J,I,H,K[C+10],9,38016083);H=md5_gg(H,G,J,I,K[C+15],14,-660478335); I=md5_gg(I,H,G,J,K[C+4],20,-405537848);J=md5_gg(J,I,H,G,K[C+9],5,568446438);G=md5_gg(G,J,I,H,K[C+14],9,-1019803690);H=md5_gg(H,G,J,I,K[C+3],14,-187363961); I=md5_gg(I,H,G,J,K[C+8],20,1163531501);J=md5_gg(J,I,H,G,K[C+13],5,-1444681467);G=md5_gg(G,J,I,H,K[C+2],9,-51403784);H=md5_gg(H,G,J,I,K[C+7],14,1735328473); I=md5_gg(I,H,G,J,K[C+12],20,-1926607734);J=md5_hh(J,I,H,G,K[C+5],4,-378558);G=md5_hh(G,J,I,H,K[C+8],11,-2022574463);H=md5_hh(H,G,J,I,K[C+11],16,1839030562); I=md5_hh(I,H,G,J,K[C+14],23,-35309556);J=md5_hh(J,I,H,G,K[C+1],4,-1530992060);G=md5_hh(G,J,I,H,K[C+4],11,1272893353);H=md5_hh(H,G,J,I,K[C+7],16,-155497632); I=md5_hh(I,H,G,J,K[C+10],23,-1094730640);J=md5_hh(J,I,H,G,K[C+13],4,681279174);G=md5_hh(G,J,I,H,K[C+0],11,-358537222);H=md5_hh(H,G,J,I,K[C+3],16,-722521979); I=md5_hh(I,H,G,J,K[C+6],23,76029189);J=md5_hh(J,I,H,G,K[C+9],4,-640364487);G=md5_hh(G,J,I,H,K[C+12],11,-421815835);H=md5_hh(H,G,J,I,K[C+15],16,530742520); I=md5_hh(I,H,G,J,K[C+2],23,-995338651);J=md5_ii(J,I,H,G,K[C+0],6,-198630844);G=md5_ii(G,J,I,H,K[C+7],10,1126891415);H=md5_ii(H,G,J,I,K[C+14],15,-1416354905); I=md5_ii(I,H,G,J,K[C+5],21,-57434055);J=md5_ii(J,I,H,G,K[C+12],6,1700485571);G=md5_ii(G,J,I,H,K[C+3],10,-1894986606);H=md5_ii(H,G,J,I,K[C+10],15,-1051523); I=md5_ii(I,H,G,J,K[C+1],21,-2054922799);J=md5_ii(J,I,H,G,K[C+8],6,1873313359);G=md5_ii(G,J,I,H,K[C+15],10,-30611744);H=md5_ii(H,G,J,I,K[C+6],15,-1560198380); I=md5_ii(I,H,G,J,K[C+13],21,1309151649);J=md5_ii(J,I,H,G,K[C+4],6,-145523070);G=md5_ii(G,J,I,H,K[C+11],10,-1120210379);H=md5_ii(H,G,J,I,K[C+2],15,718787259); I=md5_ii(I,H,G,J,K[C+9],21,-343485551);J=safe_add(J,E);I=safe_add(I,D);H=safe_add(H,B);G=safe_add(G,A);}if(mode==16){return Array(I,H);}else{return Array(J,I,H,G); }}function md5_cmn(F,C,B,A,E,D){return safe_add(bit_rol(safe_add(safe_add(C,F),safe_add(A,D)),E),B);}function md5_ff(C,B,G,F,A,E,D){return md5_cmn((B&G)|((~B)&F),C,B,A,E,D); }function md5_gg(C,B,G,F,A,E,D){return md5_cmn((B&F)|(G&(~F)),C,B,A,E,D);}function md5_hh(C,B,G,F,A,E,D){return md5_cmn(B^G^F,C,B,A,E,D);}function md5_ii(C,B,G,F,A,E,D){return md5_cmn(G^(B|(~F)),C,B,A,E,D); }function core_hmac_md5(C,F){var E=str2binl(C);if(E.length>16){E=core_md5(E,C.length*chrsz);}var A=Array(16),D=Array(16);for(var B=0;B<16;B++){A[B]=E[B]^909522486; D[B]=E[B]^1549556828;}var G=core_md5(A.concat(str2binl(F)),512+F.length*chrsz);return core_md5(D.concat(G),512+128);}function safe_add(A,D){var C=(A&65535)+(D&65535); var B=(A>>16)+(D>>16)+(C>>16);return(B<<16)|(C&65535);}function bit_rol(A,B){return(A<<B)|(A>>>(32-B));}function str2binl(D){var C=Array();var A=(1<<chrsz)-1; for(var B=0;B<D.length*chrsz;B+=chrsz){C[B>>5]|=(D.charCodeAt(B/chrsz)&A)<<(B%32);}return C;}function binl2str(C){var D="";var A=(1<<chrsz)-1;for(var B=0; B<C.length*32;B+=chrsz){D+=String.fromCharCode((C[B>>5]>>>(B%32))&A);}return D;}function binl2hex(C){var B=hexcase?"0123456789ABCDEF":"0123456789abcdef"; var D="";for(var A=0;A<C.length*4;A++){D+=B.charAt((C[A>>2]>>((A%4)*8+4))&15)+B.charAt((C[A>>2]>>((A%4)*8))&15);}return D;}function binl2b64(D){var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var F="";for(var B=0;B<D.length*4;B+=3){var E=(((D[B>>2]>>8*(B%4))&255)<<16)|(((D[B+1>>2]>>8*((B+1)%4))&255)<<8)|((D[B+2>>2]>>8*((B+2)%4))&255);for(var A=0; A<4;A++){if(B*8+A*6>D.length*32){F+=b64pad;}else{F+=C.charAt((E>>6*(3-A))&63);}}}return F;}Wade.extend({md5:function(A){return this.hex_md5(A);},md5_3:function(B){var A=new Array; A=core_md5(str2binl(B),B.length*chrsz);A=core_md5(A,16*chrsz);A=core_md5(A,16*chrsz);return binl2hex(A);},hex_md5:function(A){return binl2hex(core_md5(str2binl(A),A.length*chrsz)); },b64_md5:function(A){return binl2b64(core_md5(str2binl(A),A.length*chrsz));},str_md5:function(A){return binl2str(core_md5(str2binl(A),A.length*chrsz)); },hex_hmac_md5:function(A,B){return binl2hex(core_hmac_md5(A,B));},b64_hmac_md5:function(A,B){return binl2b64(core_hmac_md5(A,B));},str_hmac_md5:function(A,B){return binl2str(core_hmac_md5(A,B)); }});function getDatePos(formatString){var ia=new Array();var i=0;yi=formatString.search(/yyyy/);if(yi<0){yi=formatString.search(/yy/);}if(yi>=0){ia[i]=yi; i++;}Mi=formatString.search(/MM/);if(Mi<0){Mi=formatString.search(/M/);}if(Mi>=0){ia[i]=Mi;i++;}di=formatString.search(/dd/);if(di<0){di=formatString.search(/d/); }if(di>=0){ia[i]=di;i++;}Hi=formatString.search(/HH/);if(Hi<0){Hi=formatString.search(/H/);}if(Hi>=0){ia[i]=Hi;i++;}mi=formatString.search(/mm/);if(mi<0){mi=formatString.search(/m/); }if(mi>=0){ia[i]=mi;i++;}si=formatString.search(/ss/);if(si<0){si=formatString.search(/s/);}if(si>=0){ia[i]=si;i++;}var ia2=new Array(yi,Mi,di,Hi,mi,si); for(i=0;i<ia.length-1;i++){for(j=0;j<ia.length-1-i;j++){if(ia[j]>ia[j+1]){temp=ia[j];ia[j]=ia[j+1];ia[j+1]=temp;}}}for(i=0;i<ia.length;i++){for(j=0;j<ia2.length; j++){if(ia[i]==ia2[j]){ia2[j]=i;}}}return ia2;}String.prototype.toDate=function(format){var str=this;if(!Wade.trim(str)){return null;}format=format||"yyyy-MM-dd HH:mm:ss"; var y4="([0-9]{4})";var y2="([0-9]{2})";var yi=-1;var M2="(0[1-9]|1[0-2])";var M1="([1-9]|1[0-2])";var Mi=-1;var d2="(0[1-9]|[1-2][0-9]|30|31)";var d1="([1-9]|[1-2][0-9]|30|31)"; var di=-1;var H2="([0-1][0-9]|20|21|22|23)";var H1="([0-9]|1[0-9]|20|21|22|23)";var Hi=-1;var m2="([0-5][0-9])";var m1="([0-9]|[1-5][0-9])";var mi=-1;var s2="([0-5][0-9])"; var s1="([0-9]|[1-5][0-9])";var si=-1;var reg=format;reg=reg.replace(/yyyy/,y4).replace(/yy/,y2).replace(/MM/,M2).replace(/M/,M1).replace(/dd/,d2).replace(/d/,d1).replace(/HH/,H2).replace(/H/,H1).replace(/mm/,m2).replace(/m/,m1).replace(/ss/,s2).replace(/s/,s1); var regexp=new RegExp("^"+reg+"$");var isDateStr=regexp.test(str);if(isDateStr){var index=getDatePos(format);var now=new Date();var vals=regexp.exec(str); var year=index[0]>=0?vals[index[0]+1]:now.getFullYear();var month=index[1]>=0?(vals[index[1]+1]-1):now.getMonth();var day=index[2]>=0?vals[index[2]+1]:now.getDate(); var hour=index[3]>=0?vals[index[3]+1]:"";var minute=index[4]>=0?vals[index[4]+1]:"";var second=index[5]>=0?vals[index[5]+1]:"";var validate;if(hour==""){validate=new Date(year,month,day); }else{validate=new Date(year,month,day,hour,minute,second);}if(validate.getDate()==day){return validate;}}else{return null;}};Date.prototype.format=function(fmt){var o={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S":this.getMilliseconds()}; var week={"0":"\u65e5","1":"\u4e00","2":"\u4e8c","3":"\u4e09","4":"\u56db","5":"\u4e94","6":"\u516d"};if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)); }if(/(E+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,((RegExp.$1.length>1)?(RegExp.$1.length>2?"\u661f\u671f":"\u5468"):"")+week[this.getDay()+""]);}for(var k in o){if(new RegExp("("+k+")").test(fmt)){fmt=fmt.replace(RegExp.$1,(RegExp.$1.length==1)?(o[k]):(("00"+o[k]).substr((""+o[k]).length))); }}return fmt;};window.Wade=Wade;})(window); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var B=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,A=0,x=Object.prototype.toString,G=false,H=true,z=/\\/g,e=/\W/; [0,0].sort(function(){H=false;return 0;});var J=function(h,f,c,b){c=c||[];f=f||document;var s=f;if(f.nodeType!==1&&f.nodeType!==9){return[];}if(!h||typeof h!=="string"){return c; }var o,q,k,p,r,m,n,d,i=true,l=J.isXML(f),g=[],a=h;do{B.exec("");o=B.exec(a);if(o){a=o[3];g.push(o[1]);if(o[2]){p=o[3];break;}}}while(o);if(g.length>1&&F.exec(h)){if(g.length===2&&E.relative[g[0]]){q=w(g[0]+g[1],f); }else{q=E.relative[g[0]]?[f]:J(g.shift(),f);while(g.length){h=g.shift();if(E.relative[h]){h+=g.shift();}q=w(h,q);}}}else{if(!b&&g.length>1&&f.nodeType===9&&!l&&E.match.ID.test(g[0])&&!E.match.ID.test(g[g.length-1])){r=J.find(g.shift(),f,l); f=r.expr?J.filter(r.expr,r.set)[0]:r.set[0];}if(f){r=b?{expr:g.pop(),set:D(b)}:J.find(g.pop(),g.length===1&&(g[0]==="~"||g[0]==="+")&&f.parentNode?f.parentNode:f,l); q=r.expr?J.filter(r.expr,r.set):r.set;if(g.length>0){k=D(q);}else{i=false;}while(g.length){m=g.pop();n=m;if(!E.relative[m]){m="";}else{n=g.pop();}if(n==null){n=f; }E.relative[m](k,n,l);}}else{k=g=[];}}if(!k){k=q;}if(!k){J.error(m||h);}if(x.call(k)==="[object Array]"){if(!i){c.push.apply(c,k);}else{if(f&&f.nodeType===1){for(d=0; k[d]!=null;d++){if(k[d]&&(k[d]===true||k[d].nodeType===1&&J.contains(f,k[d]))){c.push(q[d]);}}}else{for(d=0;k[d]!=null;d++){if(k[d]&&k[d].nodeType===1){c.push(q[d]); // NOSONAR 注释,可以忽略sonar扫描 }}}}}else{D(k,c);}if(p){J(p,s,c,b);J.uniqueSort(c);}return c;};J.uniqueSort=function(a){if(y){G=H;a.sort(y);if(G){for(var b=1;b<a.length;b++){if(a[b]===a[b-1]){a.splice(b--,1); }}}}return a;};J.matches=function(b,a){return J(b,null,null,a);};J.matchesSelector=function(b,a){return J(a,null,null,[b]).length>0;};J.find=function(b,c,a){var d; if(!b){return[];}for(var h=0,i=E.order.length;h<i;h++){var g,f=E.order[h];if((g=E.leftMatch[f].exec(b))){var k=g[1];g.splice(1,1);if(k.substr(k.length-1)!=="\\"){g[1]=(g[1]||"").replace(z,""); d=E.find[f](g,c,a);if(d!=null){b=b.replace(E.match[f],"");break;}}}}if(!d){d=typeof c.getElementsByTagName!=="undefined"?c.getElementsByTagName("*"):[]; }return{set:d,expr:b};};J.filter=function(s,a,n,k){var g,f,o=s,i=[],c=a,d=a&&a[0]&&J.isXML(a[0]);while(s&&a.length){for(var b in E.filter){if((g=E.leftMatch[b].exec(s))!=null&&g[2]){var m,q,p=E.filter[b],l=g[1]; f=false;g.splice(1,1);if(l.substr(l.length-1)==="\\"){continue;}if(c===i){i=[];}if(E.preFilter[b]){g=E.preFilter[b](g,c,n,i,k,d);if(!g){f=m=true;}else{if(g===true){continue; }}}if(g){for(var h=0;(q=c[h])!=null;h++){if(q){m=p(q,g,h,c);var r=k^!!m;if(n&&m!=null){if(r){f=true;}else{c[h]=false;}}else{if(r){i.push(q);f=true;}}}}}if(m!==undefined){if(!n){c=i; }s=s.replace(E.match[b],"");if(!f){return[];}break;}}}if(s===o){if(f==null){J.error(s);}else{break;}}o=s;}return c;};J.error=function(a){throw"Syntax error, unrecognized expression: "+a; };var E=J.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href"); },type:function(a){return a.getAttribute("type");}},relative:{"+":function(h,f){var c=typeof f==="string",i=c&&!e.test(f),b=c&&!i;if(i){f=f.toLowerCase(); }for(var d=0,g=h.length,a;d<g;d++){if((a=h[d])){while((a=a.previousSibling)&&a.nodeType!==1){}h[d]=b||a&&a.nodeName.toLowerCase()===f?a||false:a===f;}}if(b){J.filter(f,h,true); }},">":function(g,d){var h,a=typeof d==="string",c=0,f=g.length;if(a&&!e.test(d)){d=d.toLowerCase();for(;c<f;c++){h=g[c];if(h){var b=h.parentNode;g[c]=b.nodeName.toLowerCase()===d?b:false; }}}else{for(;c<f;c++){h=g[c];if(h){g[c]=a?h.parentNode:h.parentNode===d;}}if(a){J.filter(d,g,true);}}},"":function(b,d,g){var a,c=A++,f=v;if(typeof d==="string"&&!e.test(d)){d=d.toLowerCase(); a=d;f=L;}f("parentNode",d,c,b,a,g);},"~":function(b,d,g){var a,c=A++,f=v;if(typeof d==="string"&&!e.test(d)){d=d.toLowerCase();a=d;f=L;}f("previousSibling",d,c,b,a,g); }},find:{ID:function(c,b,a){if(typeof b.getElementById!=="undefined"&&!a){var d=b.getElementById(c[1]);return d&&d.parentNode?[d]:[];}},NAME:function(c,g){if(typeof g.getElementsByName!=="undefined"){var d=[],a=g.getElementsByName(c[1]); for(var b=0,f=a.length;b<f;b++){if(a[b].getAttribute("name")===c[1]){d.push(a[b]);}}return d.length===0?null:d;}},TAG:function(b,a){if(typeof a.getElementsByTagName!=="undefined"){return a.getElementsByTagName(b[1]); }}},preFilter:{CLASS:function(c,f,d,g,h,b){c=" "+c[1].replace(z,"")+" ";if(b){return c;}for(var a=0,i;(i=f[a])!=null;a++){if(i){if(h^(i.className&&(" "+i.className+" ").replace(/[\t\n\r]/g," ").indexOf(c)>=0)){if(!d){g.push(i); }}else{if(d){f[a]=false;}}}}return false;},ID:function(a){return a[1].replace(z,"");},TAG:function(a,b){return a[1].replace(z,"").toLowerCase();},CHILD:function(b){if(b[1]==="nth"){if(!b[2]){J.error(b[0]); }b[2]=b[2].replace(/^\+|\s*/g,"");var a=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(b[2]==="even"&&"2n"||b[2]==="odd"&&"2n+1"||!/\D/.test(b[2])&&"0n+"+b[2]||b[2]); b[2]=(a[1]+(a[2]||1))-0;b[3]=a[3]-0;}else{if(b[2]){J.error(b[0]);}}b[0]=A++;return b;},ATTR:function(a,d,c,f,h,g){var b=a[1]=a[1].replace(z,"");if(!g&&E.attrMap[b]){a[1]=E.attrMap[b]; }a[4]=(a[4]||a[5]||"").replace(z,"");if(a[2]==="~="){a[4]=" "+a[4]+" ";}return a;},PSEUDO:function(a,d,c,f,g){if(a[1]==="not"){if((B.exec(a[3])||"").length>1||/^\w/.test(a[3])){a[3]=J(a[3],null,null,d); }else{var b=J.filter(a[3],d,c,true^g);if(!c){f.push.apply(f,b);}return false;}}else{if(E.match.POS.test(a[0])||E.match.CHILD.test(a[0])){return true;}}return a; },POS:function(a){a.unshift(true);return a;}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden";},disabled:function(a){return a.disabled===true; },checked:function(a){return a.checked===true;},selected:function(a){if(a.parentNode){a.parentNode.selectedIndex;}return a.selected===true;},parent:function(a){return !!a.firstChild; },empty:function(a){return !a.firstChild;},has:function(a,b,c){return !!J(c[3],a).length;},header:function(a){return(/h\d/i).test(a.nodeName);},text:function(a){var c=a.getAttribute("type"),b=a.type; return a.nodeName.toLowerCase()==="input"&&"text"===b&&(c===b||c===null);},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type; },checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type;},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type; },password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type;},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type; },image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type;},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type; },button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button";},input:function(a){return(/input|select|textarea|button/i).test(a.nodeName); },focus:function(a){return a===a.ownerDocument.activeElement;}},setFilters:{first:function(a,b){return b===0;},last:function(b,c,d,a){return c===a.length-1; },even:function(a,b){return b%2===0;},odd:function(a,b){return b%2===1;},lt:function(a,b,c){return b<c[3]-0;},gt:function(a,b,c){return b>c[3]-0;},nth:function(a,b,c){return c[3]-0===b; },eq:function(a,b,c){return c[3]-0===b;}},filter:{PSEUDO:function(i,b,d,a){var c=b[1],k=E.filters[c];if(k){return k(i,d,b,a);}else{if(c==="contains"){return(i.textContent||i.innerText||J.getText([i])||"").indexOf(b[3])>=0; }else{if(c==="not"){var h=b[3];for(var f=0,g=h.length;f<g;f++){if(h[f]===i){return false;}}return true;}else{J.error(c);}}}},CHILD:function(d,i){var f=i[1],l=d; switch(f){case"only":case"first":while((l=l.previousSibling)){if(l.nodeType===1){return false;}}if(f==="first"){return true;}l=d;case"last":while((l=l.nextSibling)){if(l.nodeType===1){return false; // NOSONAR 注释,可以忽略sonar扫描 }}return true;case"nth":var k=i[2],a=i[3];if(k===1&&a===0){return true;}var g=i[0],b=d.parentNode;if(b&&(b.sizcache!==g||!d.nodeIndex)){var h=0;for(l=b.firstChild; l;l=l.nextSibling){if(l.nodeType===1){l.nodeIndex=++h;}}b.sizcache=g;}var c=d.nodeIndex-a;if(k===0){return c===0;}else{return(c%k===0&&c/k>=0);}}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b; },TAG:function(a,b){return(b==="*"&&a.nodeType===1)||a.nodeName.toLowerCase()===b;},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1; },ATTR:function(h,b){var c=b[1],f=E.attrHandle[c]?E.attrHandle[c](h):h[c]!=null?h[c]:h.getAttribute(c),g=f+"",a=b[2],d=b[4];return f==null?a==="!=":a==="="?g===d:a==="*="?g.indexOf(d)>=0:a==="~="?(" "+g+" ").indexOf(d)>=0:!d?g&&f!==false:a==="!="?g!==d:a==="^="?g.indexOf(d)===0:a==="$="?g.substr(g.length-d.length)===d:a==="|="?g===d||g.substr(0,d.length+1)===d+"-":false; },POS:function(a,d,c,g){var f=d[2],b=E.setFilters[f];if(b){return b(a,c,d,g);}}}};var F=E.match.POS,K=function(a,b){return"\\"+(b-0+1);};for(var I in E.match){E.match[I]=new RegExp(E.match[I].source+(/(?![^\[]*\])(?![^\(]*\))/.source)); E.leftMatch[I]=new RegExp(/(^(?:.|\r|\n)*?)/.source+E.match[I].source.replace(/\\(\d+)/g,K));}var D=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a); return b;}return a;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(u){D=function(a,b){var c=0,d=b||[];if(x.call(a)==="[object Array]"){Array.prototype.push.apply(d,a); }else{if(typeof a.length==="number"){for(var f=a.length;c<f;c++){d.push(a[c]);}}else{for(;a[c];c++){d.push(a[c]);}}}return d;};}var y,C;if(document.documentElement.compareDocumentPosition){y=function(a,b){if(a===b){G=true; return 0;}if(!a.compareDocumentPosition||!b.compareDocumentPosition){return a.compareDocumentPosition?-1:1;}return a.compareDocumentPosition(b)&4?-1:1; };}else{y=function(b,c){if(b===c){G=true;return 0;}else{if(b.sourceIndex&&c.sourceIndex){return b.sourceIndex-c.sourceIndex;}}var g,l,k=[],d=[],h=b.parentNode,f=c.parentNode,a=h; if(h===f){return C(b,c);}else{if(!h){return -1;}else{if(!f){return 1;}}}while(a){k.unshift(a);a=a.parentNode;}a=f;while(a){d.unshift(a);a=a.parentNode; }g=k.length;l=d.length;for(var i=0;i<g&&i<l;i++){if(k[i]!==d[i]){return C(k[i],d[i]);}}return i===g?C(b,d[i],-1):C(k[i],c,1);};C=function(c,d,b){if(c===d){return b; }var a=c.nextSibling;while(a){if(a===d){return -1;}a=a.nextSibling;}return 1;};}J.getText=function(d){var c="",a;for(var b=0;d[b];b++){a=d[b];if(a.nodeType===3||a.nodeType===4){c+=a.nodeValue; }else{if(a.nodeType!==8){c+=J.getText(a.childNodes);}}}return c;};(function(){var b=document.createElement("div"),a="script"+(new Date()).getTime(),c=document.documentElement; b.innerHTML="<a name='"+a+"'/>";c.insertBefore(b,c.firstChild);if(document.getElementById(a)){E.find.ID=function(d,h,g){if(typeof h.getElementById!=="undefined"&&!g){var f=h.getElementById(d[1]); return f?f.id===d[1]||typeof f.getAttributeNode!=="undefined"&&f.getAttributeNode("id").nodeValue===d[1]?[f]:undefined:[];}};E.filter.ID=function(g,f){var d=typeof g.getAttributeNode!=="undefined"&&g.getAttributeNode("id"); return g.nodeType===1&&d&&d.nodeValue===f;};}c.removeChild(b);c=b=null;})();(function(){var a=document.createElement("div");a.appendChild(document.createComment("")); if(a.getElementsByTagName("*").length>0){E.find.TAG=function(f,g){var b=g.getElementsByTagName(f[1]);if(f[1]==="*"){var c=[];for(var d=0;b[d];d++){if(b[d].nodeType===1){c.push(b[d]); }}b=c;}return b;};}a.innerHTML="<a href='#'></a>";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"){E.attrHandle.href=function(b){return b.getAttribute("href",2); };}a=null;})();if(document.querySelectorAll){(function(){var d=J,a=document.createElement("div"),b="__sizzle__";a.innerHTML="<p class='TEST'></p>";if(a.querySelectorAll&&a.querySelectorAll(".TEST").length===0){return; }J=function(p,l,g,q){l=l||document;if(!q&&!J.isXML(l)){var r=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(p);if(r&&(l.nodeType===1||l.nodeType===9)){if(r[1]){return D(l.getElementsByTagName(p),g); }else{if(r[2]&&E.find.CLASS&&l.getElementsByClassName){return D(l.getElementsByClassName(r[2]),g);}}}if(l.nodeType===9){if(p==="body"&&l.body){return D([l.body],g); }else{if(r&&r[3]){var h=l.getElementById(r[3]);if(h&&h.parentNode){if(h.id===r[3]){return D([h],g);}}else{return D([],g);}}}try{return D(l.querySelectorAll(p),g); }catch(f){}}else{if(l.nodeType===1&&l.nodeName.toLowerCase()!=="object"){var k=l,i=l.getAttribute("id"),n=i||b,m=l.parentNode,o=/^\s*[+~]/.test(p);if(!i){l.setAttribute("id",n); }else{n=n.replace(/'/g,"\\$&");}if(o&&m){l=l.parentNode;}try{if(!o||m){return D(l.querySelectorAll("[id='"+n+"'] "+p),g);}}catch(s){}finally{if(!i){k.removeAttribute("id"); }}}}}return d(p,l,g,q);};for(var c in d){J[c]=d[c];}a=null;})();}(function(){var f=document.documentElement,c=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.msMatchesSelector; if(c){var a=!c.call(document.createElement("div"),"div"),d=false;try{c.call(document.documentElement,"[test!='']:sizzle");}catch(b){d=true;}J.matchesSelector=function(h,k){k=k.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"); if(!J.isXML(h)){try{if(d||!E.match.PSEUDO.test(k)&&!/!=/.test(k)){var i=c.call(h,k);if(i||!a||h.document&&h.document.nodeType!==11){return i;}}}catch(g){}}return J(k,null,null,[h]).length>0; };}})();(function(){var a=document.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0){return; }a.lastChild.className="e";if(a.getElementsByClassName("e").length===1){return;}E.order.splice(1,0,"CLASS");E.find.CLASS=function(d,c,b){if(typeof c.getElementsByClassName!=="undefined"&&!b){return c.getElementsByClassName(d[1]); }};a=null;})();function L(l,f,g,a,c,b){for(var i=0,k=a.length;i<k;i++){var d=a[i];if(d){var h=false;d=d[l];while(d){if(d.sizcache===g){h=a[d.sizset];break; }if(d.nodeType===1&&!b){d.sizcache=g;d.sizset=i;}if(d.nodeName.toLowerCase()===f){h=d;break;}d=d[l];}a[i]=h;}}}function v(l,f,g,a,c,b){for(var i=0,k=a.length; i<k;i++){var d=a[i];if(d){var h=false;d=d[l];while(d){if(d.sizcache===g){h=a[d.sizset];break;}if(d.nodeType===1){if(!b){d.sizcache=g;d.sizset=i;}if(typeof f!=="string"){if(d===f){h=true; break;}}else{if(J.filter(f,[d]).length>0){h=d;break;}}}d=d[l];}a[i]=h;}}}if(document.documentElement.contains){J.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true); };}else{if(document.documentElement.compareDocumentPosition){J.contains=function(a,b){return !!(a.compareDocumentPosition(b)&16);};}else{J.contains=function(){return false; };}}J.isXML=function(b){var a=(b?b.ownerDocument||b:0).documentElement;return a?a.nodeName!=="HTML":false;};var w=function(g,b){var i,c=[],a="",d=b.nodeType?[b]:b; while((i=E.match.PSEUDO.exec(g))){a+=i[0];g=g.replace(E.match.PSEUDO,"");}g=E.relative[g]?g+"*":g;for(var h=0,f=d.length;h<f;h++){J(g,d[h],c);}return J.filter(a,c); };window.Sizzle=J;if(window.Wade){Wade.domSelector=true;Wade.find=J;Wade.expr=J.selectors;Wade.expr[":"]=Wade.expr.filters;Wade.unique=J.uniqueSort;Wade.text=J.getText; Wade.isXMLDoc=J.isXML;Wade.contains=J.contains;}})();Wade.lang={get:function(){var e=arguments;var d=e[0];if(!d||!Wade.isString(d)){return;}var f=Wade.lang[d]; if(f&&Wade.isString(f)){if(e.length>1){f=f.replace(/\{(\d{1})\}/ig,function(b){var a=b.match(/\{(\d{1})\}/i);if(a&&a.length==2){return(e[a[1]]?e[a[1]]:""); }return b;});}return f;}},set:function(d,c){if(!d||!Wade.isString(d)){return;}if(!c||!Wade.isString(c)){return;}Wade.lang[d]=c;},extend:function(b){Wade.extend(Wade.lang,b); }};