/*
Copyright 2010, KISSY UI Library v1.0.8
MIT Licensed
build: 792 Jul 1 19:46
*/
(function(e,r,o){if(e[r]===o)e[r]={};r=e[r];var s=e.document,t=function(g,m,i,n){if(!m||!g)return g;if(i===o)i=true;var p,x,w;if(n&&(w=n.length))for(p=0;p<w;p++){x=n[p];if(x in m)if(i||!(x in g))g[x]=m[x]}else for(x in m)if(i||!(x in g))g[x]=m[x];return g},q=false,k=[],j=false;t(r,{version:"1.0.8",_init:function(){this.Env={mods:{}}},add:function(g,m){this.Env.mods[g]={name:g,fn:m};m(this);return this},ready:function(g){j||this._bindReady();q?g.call(e,this):k.push(g);return this},_bindReady:function(){var g=
this,m=s.documentElement.doScroll,i=m?"onreadystatechange":"DOMContentLoaded",n=function(){g._fireReady()};j=true;if(s.readyState==="complete")return n();if(s.addEventListener){var p=function(){s.removeEventListener(i,p,false);n()};s.addEventListener(i,p,false)}else{var x=function(){if(s.readyState==="complete"){s.detachEvent(i,x);n()}};s.attachEvent(i,x);e.attachEvent("onload",n);if(e==e.top){var w=function(){try{m("left");n()}catch(h){setTimeout(w,1)}};w()}}},_fireReady:function(){if(!q){q=true;
if(k){for(var g,m=0;g=k[m++];)g.call(e,this);k=null}}},mix:t,merge:function(){var g={},m,i=arguments.length;for(m=0;m<i;++m)t(g,arguments[m]);return g},augment:function(){var g=arguments,m=g.length-2,i=g[0],n=g[m],p=g[m+1],x=1;if(!r.isArray(p)){n=p;p=o;m++}if(!r.isBoolean(n)){n=o;m++}for(;x<m;x++)t(i.prototype,g[x].prototype||g[x],n,p);return i},extend:function(g,m,i,n){if(!m||!g)return g;var p=Object.prototype,x=m.prototype,w=function(h){function a(){}a.prototype=h;return new a}(x);g.prototype=w;
w.constructor=g;g.superclass=x;if(m!==Object&&x.constructor===p.constructor)x.constructor=m;i&&t(w,i);n&&t(g,n);return g},namespace:function(){var g=arguments.length,m=null,i,n,p;for(i=0;i<g;++i){p=(""+arguments[i]).split(".");m=this;for(n=e[p[0]]===m?1:0;n<p.length;++n)m=m[p[n]]=m[p[n]]||{}}return m},app:function(g,m){var i=e[g]||{};t(i,this,true,["_init","add","namespace"]);i._init();return t(e[g]=i,typeof m==="function"?m():m)},log:function(g,m,i){if(this.Config.debug){if(i)g=i+": "+g;if(e.console!==
o&&console.log)console[m&&console[m]?m:"log"](g)}return this},error:function(g){if(this.Config.debug)throw g;}});r._init();r.Config={debug:""}})(window,"KISSY");
KISSY.add("kissy-lang",function(e,r){function o(a){var b=typeof a;return a===null||b!=="object"&&b!=="function"}var s=window,t=document,q=location,k=Array.prototype,j=k.indexOf,g=k.filter,m=String.prototype.trim,i=Object.prototype.toString,n=encodeURIComponent,p=decodeURIComponent,x=/^\s+|\s+$/g,w=/^(\w+)\[\]$/,h=/\S/;e.mix(e,{isUndefined:function(a){return a===r},isBoolean:function(a){return typeof a==="boolean"},isString:function(a){return typeof a==="string"},isNumber:function(a){return typeof a===
"number"&&isFinite(a)},isPlainObject:function(a){return a&&i.call(a)==="[object Object]"&&!a.nodeType&&!a.setInterval},isEmptyObject:function(a){for(var b in a)return false;return true},isFunction:function(a){return i.call(a)==="[object Function]"},isArray:function(a){return i.call(a)==="[object Array]"},trim:m?function(a){return a==r?"":m.call(a)}:function(a){return a==r?"":a.toString().replace(x,"")},each:function(a,b,c){for(var d=a&&a.length||0,f=0;f<d;++f)b.call(c||s,a[f],f,a)},indexOf:j?function(a,
b){return j.call(b,a)}:function(a,b){for(var c=0,d=b.length;c<d;++c)if(b[c]===a)return c;return-1},inArray:function(a,b){return e.indexOf(a,b)>-1},makeArray:function(a){if(a===null||a===r)return[];if(e.isArray(a))return a;if(typeof a.length!=="number"||typeof a==="string"||e.isFunction(a))return[a];if(a.item&&e.UA.ie){for(var b=[],c=0,d=a.length;c<d;++c)b[c]=a[c];return b}return k.slice.call(a)},filter:g?function(a,b,c){return g.call(a,b,c)}:function(a,b,c){var d=[];e.each(a,function(f,l,v){b.call(c,
f,l,v)&&d.push(f)});return d},param:function(a){if(!e.isPlainObject(a))return"";var b=[],c,d;for(c in a){d=a[c];c=n(c);if(o(d))b.push(c,"=",n(d+""),"&");else if(e.isArray(d)&&d.length)for(var f=0,l=d.length;f<l;++f)o(d[f])&&b.push(c,"[]=",n(d[f]+""),"&")}b.pop();return b.join("")},unparam:function(a,b){if(typeof a!=="string"||(a=e.trim(a)).length===0)return{};var c={};a=a.split(b||"&");for(var d,f,l,v=0,u=a.length;v<u;++v){b=a[v].split("=");d=p(b[0]);try{f=p(b[1]||"")}catch(y){f=b[1]||""}if((l=d.match(w))&&
l[1]){c[l[1]]=c[l[1]]||[];c[l[1]].push(f)}else c[d]=f}return c},later:function(a,b,c,d,f){b=b||0;d=d||{};var l=a,v=e.makeArray(f),u;if(typeof a==="string")l=d[a];l||e.error("method undefined");a=function(){l.apply(d,v)};u=c?setInterval(a,b):setTimeout(a,b);return{id:u,interval:c,cancel:function(){this.interval?clearInterval(u):clearTimeout(u)}}},now:function(){return(new Date).getTime()},globalEval:function(a){if(a&&h.test(a)){var b=t.getElementsByTagName("head")[0]||t.documentElement,c=t.createElement("script");
c.text=a;b.insertBefore(c,b.firstChild);b.removeChild(c)}}});if(q&&q.search&&q.search.indexOf("ks-debug")!==-1)e.Config.debug=true});
KISSY.add("kissy-ua",function(e){var r=navigator.userAgent,o,s={webkit:0,chrome:0,safari:0,gecko:0,firefox:0,ie:0,opera:0,mobile:""},t=function(q){var k=0;return parseFloat(q.replace(/\./g,function(){return k++===0?".":""}))};if((o=r.match(/AppleWebKit\/([\d.]*)/))&&o[1]){s.webkit=t(o[1]);if((o=r.match(/Chrome\/([\d.]*)/))&&o[1])s.chrome=t(o[1]);else if((o=r.match(/\/([\d.]*) Safari/))&&o[1])s.safari=t(o[1]);if(/ Mobile\//.test(r))s.mobile="Apple";else if(o=r.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))s.mobile=
o[0]}else if((o=r.match(/Opera\/.* Version\/([\d.]*)/))&&o[1]){s.opera=t(o[1]);if(r.match(/Opera Mini[^;]*/))s.mobile=o[0]}else if((o=r.match(/MSIE\s([^;]*)/))&&o[1])s.ie=t(o[1]);else if(o=r.match(/Gecko/)){s.gecko=1;if((o=r.match(/rv:([\d.]*)/))&&o[1])s.gecko=t(o[1]);if((o=r.match(/Firefox\/([\d.]*)/))&&o[1])s.firefox=t(o[1])}e.UA=s});KISSY.add("dom",function(e){e.DOM={_isElementNode:function(r){return r&&r.nodeType===1}}});
KISSY.add("selector",function(e,r){function o(h,a){var b,c=[],d,f;a=s(a);if(e.isString(h)){h=e.trim(h);if(x.test(h)){if(a=t(h.slice(1)))c=[a]}else if(b=w.exec(h)){d=b[1];f=b[2];b=b[3];if(a=d?t(d):a)if(b)if(!d||h.indexOf(n)!==-1)c=k(b,f,a);else{if((a=t(d))&&i.hasClass(a,b))c=[a]}else if(f)c=q(a,f)}else if(h.indexOf(",")>-1)if(a.querySelectorAll)c=a.querySelectorAll(h);else{d=h.split(",");f=[];c=0;for(h=d.length;c<h;++c)f=f.concat(o(d[c],a));c=j(f)}else if(e.ExternalSelector)return e.ExternalSelector(h,
a);else g(h)}else if(h&&h.nodeType)c=[h];else if(h&&(h.item||e.isArray(h)))c=h;if(c.item)c=e.makeArray(c);return c}function s(h){if(h===r)h=m;else if(e.isString(h)&&x.test(h))h=t(h.slice(1));else if(h&&h.nodeType!==1&&h.nodeType!==9)h=null;return h}function t(h){return m.getElementById(h)}function q(h,a){return h.getElementsByTagName(a)}function k(h,a,b){b=h=b.getElementsByClassName(h);var c=0,d=0,f=h.length,l;if(a&&a!==p){b=[];for(a=a.toUpperCase();c<f;++c){l=h[c];if(l.tagName===a)b[d++]=l}}return b}
function j(h){var a=false;h.sort(function(c,d){c=c.sourceIndex-d.sourceIndex;if(c===0)a=true;return c});if(a)for(var b=1;b<h.length;b++)h[b]===h[b-1]&&h.splice(b--,1);return h}function g(h){e.error("Unsupported selector: "+h)}var m=document,i=e.DOM,n=" ",p="*",x=/^#[\w-]+$/,w=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;(function(){var h=m.createElement("div");h.appendChild(m.createComment(""));if(h.getElementsByTagName(p).length>0)q=function(a,b){a=a.getElementsByTagName(b);if(b===p){b=[];for(var c=
0,d=0,f;f=a[c++];)if(f.nodeType===1)b[d++]=f;a=b}return a}})();m.getElementsByClassName||(k=m.querySelectorAll?function(h,a,b){return b.querySelectorAll((a?a:"")+"."+h)}:function(h,a,b){a=b.getElementsByTagName(a||p);b=[];var c=0,d=0,f=a.length,l,v;for(h=n+h+n;c<f;++c){l=a[c];if((v=l.className)&&(n+v+n).indexOf(h)>-1)b[d++]=l}return b});e.query=o;e.get=function(h,a){return o(h,a)[0]||null};e.mix(i,{query:o,get:e.get,filter:function(h,a){var b=o(h),c,d,f,l=[];if(e.isString(a)&&(c=w.exec(a))&&!c[1]){d=
c[2];f=c[3];a=function(v){return!(d&&v.tagName!==d.toUpperCase()||f&&!i.hasClass(v,f))}}if(e.isFunction(a))l=e.filter(b,a);else if(a&&e.ExternalSelector)l=e.ExternalSelector._filter(h,a);else g(a);return l},test:function(h,a){h=o(h);return i.filter(h,a).length===h.length}})});
KISSY.add("dom-class",function(e,r){function o(k,j,g,m){if(!(j=e.trim(j)))return m?false:r;k=e.query(k);var i=0,n=k.length;j=j.split(t);for(var p;i<n;i++){p=k[i];if(p.nodeType===1){p=g(p,j,j.length);if(p!==r)return p}}if(m)return false}var s=e.DOM,t=/[\.\s]\s*\.?/,q=/[\n\t]/g;e.mix(s,{hasClass:function(k,j){return o(k,j,function(g,m,i){if(g=g.className){g=" "+g+" ";for(var n=0,p=true;n<i;n++)if(g.indexOf(" "+m[n]+" ")<0){p=false;break}if(p)return true}},true)},addClass:function(k,j){o(k,j,function(g,
m,i){var n=g.className;if(n){var p=" "+n+" ";n=n;for(var x=0;x<i;x++)if(p.indexOf(" "+m[x]+" ")<0)n+=" "+m[x];g.className=e.trim(n)}else g.className=j})},removeClass:function(k,j){o(k,j,function(g,m,i){var n=g.className;if(n)if(i){n=(" "+n+" ").replace(q," ");for(var p=0;p<i;p++)n=n.replace(" "+m[p]+" "," ");g.className=e.trim(n)}else g.className=""})},replaceClass:function(k,j,g){s.removeClass(k,j);s.addClass(k,g)},toggleClass:function(k,j,g){var m=e.isBoolean(g),i;o(k,j,function(n,p,x){for(var w=
0,h;w<x;w++){h=p[w];i=m?!g:s.hasClass(n,h);s[i?"removeClass":"addClass"](n,h)}})}})});
KISSY.add("dom-attr",function(e,r){function o(w,h){return h&&h.nodeName.toUpperCase()===w.toUpperCase()}var s=e.UA,t=s.ie,q=t&&t<8,k=document.documentElement.textContent!==r?"textContent":"innerText",j=e.DOM,g=j._isElementNode,m=/href|src|style/,i=/href|src|colspan|rowspan/,n=/\r/g,p=/radio|checkbox/,x={readonly:"readOnly"};q&&e.mix(x,{"for":"htmlFor","class":"className"});e.mix(j,{attr:function(w,h,a){if(h=e.trim(h)){h=h.toLowerCase();h=x[h]||h;if(a===r){w=e.get(w);if(!g(w))return r;var b;m.test(h)||
(b=w[h]);if(b===r)b=w.getAttribute(h);if(q)if(i.test(h))b=w.getAttribute(h,2);else if(h==="style")b=w.style.cssText;return b===null?r:b}e.each(e.query(w),function(c){if(g(c))if(q&&h==="style")c.style.cssText=a;else c.setAttribute(h,""+a)})}},removeAttr:function(w,h){e.each(e.query(w),function(a){g(a)&&a.removeAttribute(h)})},val:function(w,h){if(h===r){var a=e.get(w);if(!g(a))return r;if(o("option",a))return(a.attributes.value||{}).specified?a.value:a.text;if(o("select",a)){var b=a.selectedIndex;
w=a.options;if(b<0)return null;else if(a.type==="select-one")return j.val(w[b]);a=[];for(var c=0,d=w.length;c<d;++c)w[c].selected&&a.push(j.val(w[c]));return a}if(s.webkit&&p.test(a.type))return a.getAttribute("value")===null?"on":a.value;return(a.value||"").replace(n,"")}e.each(e.query(w),function(f){if(o("select",f)){var l=e.makeArray(h),v=f.options,u;c=0;for(d=v.length;c<d;++c){u=v[c];u.selected=e.inArray(j.val(u),l)}if(!l.length)f.selectedIndex=-1}else if(g(f))f.value=h})},text:function(w,h){if(h===
r){w=e.get(w);if(g(w))return w[k]||""}else e.each(e.query(w),function(a){if(g(a))a[k]=h})}})});
KISSY.add("dom-style",function(e,r){var o=e.DOM,s=document,t=s.documentElement,q=/width|height|top|left|right|bottom|margin|padding/i,k=/-([a-z])/ig,j=function(m,i){return i.toUpperCase()},g={};e.mix(o,{_CUSTOM_STYLES:g,_getComputedStyle:function(m,i){var n="",p=m.ownerDocument;if(m.style)n=p.defaultView.getComputedStyle(m,null)[i];return n},css:function(m,i,n){if(e.isPlainObject(i))for(var p in i)o.css(m,p,i[p]);else{if(i.indexOf("-")>0)i=i.replace(k,j);i=g[i]||i;if(n===r){m=e.get(m);p="";if(m&&
m.style){p=i.get?i.get(m):m.style[i];if(p===""&&!i.get)p=o._getComputedStyle(m,i)}return p===r?"":p}else{if(n===null||n==="")n="";else if(!isNaN(new Number(n))&&q.test(i))n+="px";(i==="width"||i==="height")&&parseFloat(n)<0||e.each(e.query(m),function(x){if(x&&x.style)i.set?i.set(x,n):(x.style[i]=n)})}}},addStyleSheet:function(m,i){var n;if(i)n=e.get(i);n||(n=o.create("<style>",{id:i}));e.get("head").appendChild(n);if(n.styleSheet)n.styleSheet.cssText=m;else n.appendChild(s.createTextNode(m))}});
if(t.style.cssFloat!==r)g["float"]="cssFloat";else if(t.style.styleFloat!==r)g["float"]="styleFloat"});
KISSY.add("dom-style-ie",function(e,r){if(e.UA.ie){var o=e.DOM,s=document,t=s.documentElement,q=o._CUSTOM_STYLES,k=/^-?\d+(?:px)?$/i,j=/^-?\d/;try{if(t.style.opacity===r&&t.filters)q.opacity={get:function(m){var i=100;try{i=m.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(n){try{i=m.filters("alpha").opacity}catch(p){}}return i/100+""},set:function(m,i){m=m.style;m.zoom=1;m.filter="alpha(opacity="+i*100+")"}}}catch(g){e.log("IE filters ActiveX is disabled. ex = "+g)}if(!(s.defaultView||
{}).getComputedStyle&&t.currentStyle)o._getComputedStyle=function(m,i){var n=m.style;m=m.currentStyle[i];if(!k.test(m)&&j.test(m)){var p=n.left;n.left=i==="fontSize"?"1em":m||0;m=n.pixelLeft+"px";n.left=p}return m}}});
KISSY.add("dom-offset",function(e,r){function o(h){var a=0,b=0;if(h!==j.body&&h!==g&&h[w]){h=h[w]();a=h.left+t.scrollLeft();b=h.top+t.scrollTop()}return{left:a,top:b}}function s(h,a){var b=t.css(h,p);if(b==="static")b=h.style[p]=x;var c=o(h);b=b===x;var d=n(t.css(h,"left"),10),f=n(t.css(h,"top"),10);d=e.isNumber(d)?d:b?0:h.offsetLeft;f=e.isNumber(f)?f:b?0:h.offsetTop;t.css(h,{left:d+a.left-c.left,top:f+a.top-c.top})}var t=e.DOM,q=e.UA,k=window,j=document,g=j.documentElement,m=j.compatMode==="CSS1Compat",
i=Math.max,n=parseInt,p="position",x="relative",w="getBoundingClientRect";e.mix(t,{offset:function(h,a){if(!(h=e.get(h))||!h.ownerDocument)return null;if(a===r)return o(h);s(h,a)},scrollLeft:function(){return k.pageXOffset||g.scrollLeft||j.body.scrollLeft},scrollTop:function(){return k.pageYOffset||g.scrollTop||j.body.scrollTop},docHeight:function(){return i(!m?j.body.scrollHeight:g.scrollHeight,t.viewportHeight())},docWidth:function(){return i(!m?j.body.scrollWidth:g.scrollWidth,t.viewportWidth())},
viewportHeight:function(){return q.ie?m?g.clientHeight:j.body.clientHeight:k.innerHeight},viewportWidth:function(){return!m&&!q.opera?j.body.clientWidth:q.ie?g.clientWidth:k.innerWidth}})});
KISSY.add("dom-traversal",function(e,r){function o(k,j,g,m){if(!(k=e.get(k)))return null;if(j===r)j=1;var i=null,n,p;if(e.isNumber(j)&&j>=0){if(j===0)return k;n=0;p=j;j=function(){return++n===p}}for(;k=k[g];)if(q(k)&&(!j||t.test(k,j))&&(!m||m(k))){i=k;break}return i}function s(k,j,g){var m=[];var i=k=e.get(k);if(k&&g)i=k.parentNode;if(i){g=0;for(i=i.firstChild;i;i=i.nextSibling)if(q(i)&&i!==k&&(!j||t.test(i,j)))m[g++]=i}return m}var t=e.DOM,q=t._isElementNode;e.mix(t,{parent:function(k,j){return o(k,
j,"parentNode",function(g){return g.nodeType!=11})},next:function(k,j){return o(k,j,"nextSibling")},prev:function(k,j){return o(k,j,"previousSibling")},siblings:function(k,j){return s(k,j,true)},children:function(k,j){return s(k,j)},contains:function(k,j){var g=false;if((k=e.get(k))&&(j=e.get(j)))if(k.contains)return k.contains(j);else if(k.compareDocumentPosition)return!!(k.compareDocumentPosition(j)&16);else for(;!g&&(j=j.parentNode);)g=j==k;return g}})});
KISSY.add("dom-create",function(e,r){function o(b,c){if(g(b)&&c)for(var d in c)q.attr(b,d,c[d]);return b}function s(b,c){var d=null,f;if(b&&(b.push||b.item)&&b[0]){c=c||b[0].ownerDocument;d=c.createDocumentFragment();if(b.item)b=e.makeArray(b);c=0;for(f=b.length;c<f;c++)d.appendChild(b[c])}else e.log("Unable to convert "+b+" to fragment.");return d}var t=document,q=e.DOM,k=e.UA,j=k.ie,g=q._isElementNode,m=t.createElement("div"),i=/<(\w+)/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;e.mix(q,{create:function(b,
c,d){if(g(b))return b;if(!(b=e.trim(b)))return null;var f=null;f=q._creators;var l,v="div",u;if(l=n.exec(b))f=(d||t).createElement(l[1]);else{if((l=i.exec(b))&&(u=l[1])&&e.isFunction(f[u=u.toLowerCase()]))v=u;b=f[v](b,d).childNodes;f=b.length===1?b[0].parentNode.removeChild(b[0]):s(b,d||t)}return o(f,c)},_creators:{div:function(b,c){c=c?c.createElement("div"):m;c.innerHTML=b;return c}},html:function(b,c){if(c===r){b=e.get(b);if(g(b))return b.innerHTML}else e.each(e.query(b),function(d){if(g(d)){d.innerHTML=
"";c&&d.appendChild(q.create(c))}})}});var p=q._creators,x=q.create,w=/(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/,h={option:"select",td:"tr",tr:"tbody",tbody:"table",col:"colgroup",legend:"fieldset"};if(k.gecko||j){for(var a in h)(function(b){p[a]=function(c,d){return x("<"+b+">"+c+"</"+b+">",null,d)}})(h[a]);if(j){p.script=function(b,c){c=c?c.createElement("div"):m;c.innerHTML="-"+b;c.removeChild(c.firstChild);return c};if(j<8)p.tbody=function(b,c){c=x("<table>"+b+"</table>",null,c);
var d=c.children.tags("tbody")[0];c.children.length>1&&d&&!w.test(b)&&d.parentNode.removeChild(d);return c}}e.mix(p,{optgroup:p.option,th:p.td,thead:p.tbody,tfoot:p.tbody,caption:p.tbody,colgroup:p.tbody})}});
KISSY.add("dom-insertion",function(e){var r=e.DOM;e.mix(r,{insertBefore:function(o,s){o=r.create(o);s=e.get(s);o&&s&&s.parentNode&&s.parentNode.insertBefore(o,s);return o},insertAfter:function(o,s){o=r.create(o);s=e.get(s);if(o&&s&&s.parentNode)s.nextSibling?s.parentNode.insertBefore(o,s.nextSibling):s.parentNode.appendChild(o);return o}})});
KISSY.add("event",function(e,r){function o(a,b,c,d,f){if(e.isString(b))b=e.query(b);if(e.isArray(b)){e.each(b,function(l){h[a](l,c,d,f)});return true}if((c=e.trim(c))&&c.indexOf(p)>0){e.each(c.split(p),function(l){h[a](b,l,d,f)});return true}}function s(a){return k(a)?-1:a[n]}function t(a,b){if(k(a))return e.error("Text or comment node is not valid event target.");try{a[n]=b}catch(c){e.error(c)}}function q(a){try{a[n]=r;delete a[n]}catch(b){}}function k(a){return a.nodeType===3||a.nodeType===8}var j=
window,g=document,m=g.addEventListener?function(a,b,c,d){a.addEventListener&&a.addEventListener(b,c,d)}:function(a,b,c){a.attachEvent&&a.attachEvent("on"+b,c)},i=g.removeEventListener?function(a,b,c,d){a.removeEventListener&&a.removeEventListener(b,c,d)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},n="ksEventTargetId",p=" ",x=e.now(),w={},h={EVENT_GUID:n,special:{},add:function(a,b,c,d){if(!o("add",a,b,c,d)){var f=s(a),l,v;if(!(f===-1||!b||!e.isFunction(c))){if(!f){t(a,f=x++);w[f]={target:a,
events:{}}}v=w[f].events;l=!a.isCustomEventTarget&&h.special[b]||{};if(!v[b]){f=function(u,y){if(!u||!u.fixed){u=new e.EventObject(a,u,b);e.isPlainObject(y)&&e.mix(u,y)}l.setup&&l.setup(u);return(l.handle||h._handle)(a,u,v[b].listeners,d)};v[b]={handle:f,listeners:[]};if(a.isCustomEventTarget)a._addEvent&&a._addEvent(b,f);else m(a,l.fix||b,f,l.capture)}v[b].listeners.push(c)}}},remove:function(a,b,c){if(!o("remove",a,b,c)){var d=s(a),f,l,v,u,y,A;if(d!==-1)if(d&&(f=w[d]))if(f.target===a){f=f.events||
{};if(l=f[b]){v=l.listeners;y=v.length;if(e.isFunction(c)&&y&&e.inArray(c,v)){A=[];for(u=0;u<y;++u)c!==v[u]&&A.push(v[u]);y=A.length}if(c===r||y===0){a.isCustomEventTarget||i(a,b,l.handle);delete f[b]}}if(b===r||e.isEmptyObject(f)){for(b in f)h.remove(a,b);delete w[d];q(a)}}}},_handle:function(a,b,c,d){var f,l=0,v=c.length;for(d=d||a;l<v;++l){f=c[l].call(d,b);if(f===false&&a.isCustomEventTarget||b.isImmediatePropagationStopped)break}return f},_getCache:function(a){return w[a]},_simpleAdd:m,_simpleRemove:i};
h.on=h.add;e.Event=h;j.attachEvent&&!j.addEventListener&&j.attachEvent("onunload",function(){var a,b;for(a in w)if(b=w[a].target)try{h.remove(b)}catch(c){}})});
KISSY.add("event-object",function(e,r){function o(q,k,j){this.currentTarget=q;this.originalEvent=k||{};if(k){this.type=k.type;this._fix()}else{this.type=j;this.target=q}this.fixed=true}var s=document,t="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(" ");e.mix(o.prototype,
{_fix:function(){for(var q=this.originalEvent,k=t.length,j;k;){j=t[--k];this[j]=q[j]}if(!this.target)this.target=this.srcElement||s;if(this.target.nodeType===3)this.target=this.target.parentNode;if(!this.relatedTarget&&this.fromElement)this.relatedTarget=this.fromElement===this.target?this.toElement:this.fromElement;if(this.pageX===r&&this.clientX!==r){q=s.documentElement;k=s.body;this.pageX=this.clientX+(q&&q.scrollLeft||k&&k.scrollLeft||0)-(q&&q.clientLeft||k&&k.clientLeft||0);this.pageY=this.clientY+
(q&&q.scrollTop||k&&k.scrollTop||0)-(q&&q.clientTop||k&&k.clientTop||0)}if(this.which===r)this.which=this.charCode!==r?this.charCode:this.keyCode;if(this.metaKey===r)this.metaKey=this.ctrlKey;if(!this.which&&this.button!==r)this.which=this.button&1?1:this.button&2?3:this.button&4?2:0},preventDefault:function(){var q=this.originalEvent;if(q.preventDefault)q.preventDefault();else q.returnValue=false;this.isDefaultPrevented=true},stopPropagation:function(){var q=this.originalEvent;if(q.stopPropagation)q.stopPropagation();
else q.cancelBubble=true;this.isPropagationStopped=true},stopImmediatePropagation:function(){var q=this.originalEvent;q.stopImmediatePropagation?q.stopImmediatePropagation():this.stopPropagation();this.isImmediatePropagationStopped=true},halt:function(q){q?this.stopImmediatePropagation():this.stopPropagation();this.preventDefault()}});e.EventObject=o});
KISSY.add("event-target",function(e,r){var o=e.Event,s=o.EVENT_GUID;e.EventTarget={isCustomEventTarget:true,fire:function(t,q){if((t=((o._getCache(this[s]||-1)||{}).events||{})[t])&&e.isFunction(t.handle))return t.handle(r,q)},on:function(t,q,k){o.add(this,t,q,k)},detach:function(t,q){o.remove(this,t,q)}}});
KISSY.add("event-mouseenter",function(e){var r=e.Event;e.UA.ie||e.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(o){r.special[o.name]={fix:o.fix,setup:function(s){s.type=o.name},handle:function(s,t,q){var k=t.relatedTarget;try{for(;k&&k!==s;)k=k.parentNode;k!==s&&r._handle(s,t,q)}catch(j){}}}})});
KISSY.add("event-focusin",function(e){var r=e.Event;document.addEventListener&&e.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(o){r.special[o.name]={fix:o.fix,capture:true,setup:function(s){s.type=o.name}}})});
KISSY.add("cookie",function(e){function r(q){return typeof q==="string"&&q!==""}var o=document,s=encodeURIComponent,t=decodeURIComponent;e.Cookie={get:function(q){var k;if(r(q))if(q=o.cookie.match("(?:^| )"+q+"(?:(?:=([^;]*))|;|$)"))k=q[1]?t(q[1]):"";return k},set:function(q,k,j,g,m,i){k=s(k);var n=j;if(typeof n==="number"){n=new Date;n.setTime(n.getTime()+j*864E5)}if(n instanceof Date)k+="; expires="+n.toUTCString();if(r(g))k+="; domain="+g;if(r(m))k+="; path="+m;if(i)k+="; secure";o.cookie=q+"="+
k},remove:function(q){this.set(q,"",0)}}});
KISSY.add("json",function(e){function r(i){return i<10?"0"+i:i}function o(i){q.lastIndex=0;return q.test(i)?'"'+i.replace(q,function(n){var p=g[n];return typeof p==="string"?p:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'}function s(i,n){var p,x,w=k,h,a=n[i];if(a&&typeof a==="object"&&typeof a.toJSON==="function")a=a.toJSON(i);if(typeof m==="function")a=m.call(n,i,a);switch(typeof a){case "string":return o(a);case "number":return isFinite(a)?String(a):"null";case "boolean":case "null":return String(a);
case "object":if(!a)return"null";k+=j;h=[];if(Object.prototype.toString.apply(a)==="[object Array]"){x=a.length;for(i=0;i<x;i+=1)h[i]=s(i,a)||"null";n=h.length===0?"[]":k?"[\n"+k+h.join(",\n"+k)+"\n"+w+"]":"["+h.join(",")+"]";k=w;return n}if(m&&typeof m==="object"){x=m.length;for(i=0;i<x;i+=1){p=m[i];if(typeof p==="string")if(n=s(p,a))h.push(o(p)+(k?": ":":")+n)}}else for(p in a)if(Object.hasOwnProperty.call(a,p))if(n=s(p,a))h.push(o(p)+(k?": ":":")+n);n=h.length===0?"{}":k?"{\n"+k+h.join(",\n"+k)+
"\n"+w+"}":"{"+h.join(",")+"}";k=w;return n}}e=e.JSON=window.JSON||{};if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+r(this.getUTCMonth()+1)+"-"+r(this.getUTCDate())+"T"+r(this.getUTCHours())+":"+r(this.getUTCMinutes())+":"+r(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var t=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,k,j,g={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;if(typeof e.stringify!=="function")e.stringify=function(i,n,p){var x;j=k="";if(typeof p==="number")for(x=0;x<p;x+=1)j+=" ";else if(typeof p==="string")j=p;if((m=n)&&typeof n!=="function"&&(typeof n!=="object"||typeof n.length!=="number"))throw new Error("JSON.stringify");return s("",
{"":i})};if(typeof e.parse!=="function")e.parse=function(i,n){function p(x,w){var h,a,b=x[w];if(b&&typeof b==="object")for(h in b)if(Object.hasOwnProperty.call(b,h)){a=p(b,h);if(a!==undefined)b[h]=a;else delete b[h]}return n.call(x,w,b)}i=String(i);t.lastIndex=0;if(t.test(i))i=i.replace(t,function(x){return"\\u"+("0000"+x.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){i=eval("("+i+")");return typeof n==="function"?p({"":i},""):i}throw new SyntaxError("JSON.parse");}});
KISSY.add("ajax",function(e){var r=document,o=e.UA;e.Ajax={request:function(){e.error("not implemented")},getScript:function(s,t,q){var k=r.getElementsByTagName("head")[0]||r.documentElement,j=r.createElement("script");j.src=s;if(q)j.charset=q;j.async=true;if(e.isFunction(t))if(o.ie)j.onreadystatechange=function(){var g=j.readyState;if(g==="loaded"||g==="complete"){j.onreadystatechange=null;t()}};else j.onload=t;k.appendChild(j)}}});
(function(){function e(a,b,c,d,f,l){f=0;for(var v=d.length;f<v;f++){var u=d[f];if(u){u=u[a];for(var y=false;u;){if(u.sizcache===c){y=d[u.sizset];break}if(u.nodeType===1&&!l){u.sizcache=c;u.sizset=f}if(u.nodeName.toLowerCase()===b){y=u;break}u=u[a]}d[f]=y}}}function r(a,b,c,d,f,l){f=0;for(var v=d.length;f<v;f++){var u=d[f];if(u){u=u[a];for(var y=false;u;){if(u.sizcache===c){y=d[u.sizset];break}if(u.nodeType===1){if(!l){u.sizcache=c;u.sizset=f}if(typeof b!=="string"){if(u===b){y=true;break}}else if(j.filter(b,
[u]).length>0){y=u;break}}u=u[a]}d[f]=y}}}var o=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,s=0,t=Object.prototype.toString,q=false,k=true;[0,0].sort(function(){k=false;return 0});var j=function(a,b,c,d){c=c||[];var f=b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return c;var l=[],v,u,y,A,B=true,D=j.isXML(b),C=a,z;do{o.exec("");if(v=o.exec(C)){C=v[3];l.push(v[1]);if(v[2]){A=
v[3];break}}}while(v);if(l.length>1&&m.exec(a))if(l.length===2&&g.relative[l[0]])u=h(l[0]+l[1],b);else for(u=g.relative[l[0]]?[b]:j(l.shift(),b);l.length;){a=l.shift();if(g.relative[a])a+=l.shift();u=h(a,u)}else{if(!d&&l.length>1&&b.nodeType===9&&!D&&g.match.ID.test(l[0])&&!g.match.ID.test(l[l.length-1])){v=j.find(l.shift(),b,D);b=v.expr?j.filter(v.expr,v.set)[0]:v.set[0]}if(b){v=d?{expr:l.pop(),set:p(d)}:j.find(l.pop(),l.length===1&&(l[0]==="~"||l[0]==="+")&&b.parentNode?b.parentNode:b,D);u=v.expr?
j.filter(v.expr,v.set):v.set;if(l.length>0)y=p(u);else B=false;for(;l.length;){v=z=l.pop();if(g.relative[z])v=l.pop();else z="";if(v==null)v=b;g.relative[z](y,v,D)}}else y=[]}y||(y=u);y||j.error(z||a);if(t.call(y)==="[object Array]")if(B)if(b&&b.nodeType===1)for(a=0;y[a]!=null;a++){if(y[a]&&(y[a]===true||y[a].nodeType===1&&j.contains(b,y[a])))c.push(u[a])}else for(a=0;y[a]!=null;a++)y[a]&&y[a].nodeType===1&&c.push(u[a]);else c.push.apply(c,y);else p(y,c);if(A){j(A,f,c,d);j.uniqueSort(c)}return c};
j.uniqueSort=function(a){if(w){q=k;a.sort(w);if(q)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a};j.matches=function(a,b){return j(a,null,null,b)};j.find=function(a,b,c){var d;if(!a)return[];for(var f=0,l=g.order.length;f<l;f++){var v=g.order[f],u;if(u=g.leftMatch[v].exec(a)){var y=u[1];u.splice(1,1);if(y.substr(y.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");d=g.find[v](u,b,c);if(d!=null){a=a.replace(g.match[v],"");break}}}}d||(d=b.getElementsByTagName("*"));return{set:d,
expr:a}};j.filter=function(a,b,c,d){for(var f=a,l=[],v=b,u,y,A=b&&b[0]&&j.isXML(b[0]);a&&b.length;){for(var B in g.filter)if((u=g.leftMatch[B].exec(a))!=null&&u[2]){var D=g.filter[B],C,z;z=u[1];y=false;u.splice(1,1);if(z.substr(z.length-1)!=="\\"){if(v===l)l=[];if(g.preFilter[B])if(u=g.preFilter[B](u,v,c,l,d,A)){if(u===true)continue}else y=C=true;if(u)for(var E=0;(z=v[E])!=null;E++)if(z){C=D(z,u,E,v);var F=d^!!C;if(c&&C!=null)if(F)y=true;else v[E]=false;else if(F){l.push(z);y=true}}if(C!==undefined){c||
(v=l);a=a.replace(g.match[B],"");if(!y)return[];break}}}if(a===f)if(y==null)j.error(a);else break;f=a}return v};j.error=function(a){throw"Syntax error, unrecognized expression: "+a;};var g=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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
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")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!/\W/.test(b);c=c&&!d;if(d)b=b.toLowerCase();d=0;for(var f=a.length,l;d<f;d++)if(l=a[d]){for(;(l=l.previousSibling)&&l.nodeType!==1;);a[d]=c||l&&l.nodeName.toLowerCase()===
b?l||false:l===b}c&&j.filter(b,a,true)},">":function(a,b){var c=typeof b==="string",d,f=0,l=a.length;if(c&&!/\W/.test(b))for(b=b.toLowerCase();f<l;f++){if(d=a[f]){c=d.parentNode;a[f]=c.nodeName.toLowerCase()===b?c:false}}else{for(;f<l;f++)if(d=a[f])a[f]=c?d.parentNode:d.parentNode===b;c&&j.filter(b,a,true)}},"":function(a,b,c){var d=s++,f=r,l;if(typeof b==="string"&&!/\W/.test(b)){l=b=b.toLowerCase();f=e}f("parentNode",b,d,a,l,c)},"~":function(a,b,c){var d=s++,f=r,l;if(typeof b==="string"&&!/\W/.test(b)){l=
b=b.toLowerCase();f=e}f("previousSibling",b,d,a,l,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c)return(a=b.getElementById(a[1]))?[a]:[]},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[];b=b.getElementsByName(a[1]);for(var d=0,f=b.length;d<f;d++)b[d].getAttribute("name")===a[1]&&c.push(b[d]);return c.length===0?null:c}},TAG:function(a,b){return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,f,l){a=" "+a[1].replace(/\\/g,"")+" ";
if(l)return a;l=0;for(var v;(v=b[l])!=null;l++)if(v)if(f^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(a)>=0))c||d.push(v);else if(c)b[l]=false;return false},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){var b=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}a[0]=s++;return a},ATTR:function(a,b,c,d,f,l){b=
a[1].replace(/\\/g,"");if(!l&&g.attrMap[b])a[1]=g.attrMap[b];if(a[2]==="~=")a[4]=" "+a[4]+" ";return a},PSEUDO:function(a,b,c,d,f){if(a[1]==="not")if((o.exec(a[3])||"").length>1||/^\w/.test(a[3]))a[3]=j(a[3],null,null,b);else{a=j.filter(a[3],b,c,true^f);c||d.push.apply(d,a);return false}else if(g.match.POS.test(a[0])||g.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){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){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===
a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.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(a,b,c,d){var f=b[1],l=g.filters[f];if(l)return l(a,c,b,d);else if(f==="contains")return(a.textContent||a.innerText||j.getText([a])||"").indexOf(b[3])>=0;else if(f==="not"){b=b[3];c=0;for(d=b.length;c<d;c++)if(b[c]===a)return false;return true}else j.error("Syntax error, unrecognized expression: "+f)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case "only":case "first":for(;d=d.previousSibling;)if(d.nodeType===1)return false;if(c===
"first")return true;d=a;case "last":for(;d=d.nextSibling;)if(d.nodeType===1)return false;return true;case "nth":c=b[2];var f=b[3];if(c===1&&f===0)return true;b=b[0];var l=a.parentNode;if(l&&(l.sizcache!==b||!a.nodeIndex)){var v=0;for(d=l.firstChild;d;d=d.nextSibling)if(d.nodeType===1)d.nodeIndex=++v;l.sizcache=b}a=a.nodeIndex-f;return c===0?a===0:a%c===0&&a/c>=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(a,b){var c=b[1];a=g.attrHandle[c]?g.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c);c=a+"";var d=b[2];b=b[4];return a==null?d==="!=":d==="="?c===b:d==="*="?c.indexOf(b)>=0:d==="~="?(" "+c+" ").indexOf(b)>=0:!b?c&&a!==false:d==="!="?c!==b:d==="^="?c.indexOf(b)===0:d==="$="?c.substr(c.length-b.length)===b:d==="|="?c===b||c.substr(0,b.length+1)===b+"-":false},POS:function(a,b,c,d){var f=g.setFilters[b[2]];
if(f)return f(a,c,b,d)}}},m=g.match.POS,i=function(a,b){return"\\"+(b-0+1)};for(var n in g.match){g.match[n]=new RegExp(g.match[n].source+/(?![^\[]*\])(?![^\(]*\))/.source);g.leftMatch[n]=new RegExp(/(^(?:.|\r|\n)*?)/.source+g.match[n].source.replace(/\\(\d+)/g,i))}var p=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)}catch(x){p=function(a,b){b=b||[];var c=0;if(t.call(a)==="[object Array]")Array.prototype.push.apply(b,
a);else if(typeof a.length==="number")for(var d=a.length;c<d;c++)b.push(a[c]);else for(;a[c];c++)b.push(a[c]);return b}}var w;if(document.documentElement.compareDocumentPosition)w=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b)q=true;return a.compareDocumentPosition?-1:1}a=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(a===0)q=true;return a};else if("sourceIndex"in document.documentElement)w=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b)q=true;return a.sourceIndex?
-1:1}a=a.sourceIndex-b.sourceIndex;if(a===0)q=true;return a};else if(document.createRange)w=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b)q=true;return a.ownerDocument?-1:1}var c=a.ownerDocument.createRange(),d=b.ownerDocument.createRange();c.setStart(a,0);c.setEnd(a,0);d.setStart(b,0);d.setEnd(b,0);a=c.compareBoundaryPoints(Range.START_TO_END,d);if(a===0)q=true;return a};j.getText=function(a){for(var b="",c,d=0;a[d];d++){c=a[d];if(c.nodeType===3||c.nodeType===4)b+=c.nodeValue;else if(c.nodeType!==
8)b+=j.getText(c.childNodes)}return b};(function(){var a=document.createElement("div"),b="script"+(new Date).getTime();a.innerHTML="<a name='"+b+"'/>";var c=document.documentElement;c.insertBefore(a,c.firstChild);if(document.getElementById(b)){g.find.ID=function(d,f,l){if(typeof f.getElementById!=="undefined"&&!l)return(f=f.getElementById(d[1]))?f.id===d[1]||typeof f.getAttributeNode!=="undefined"&&f.getAttributeNode("id").nodeValue===d[1]?[f]:undefined:[]};g.filter.ID=function(d,f){var l=typeof d.getAttributeNode!==
"undefined"&&d.getAttributeNode("id");return d.nodeType===1&&l&&l.nodeValue===f}}c.removeChild(a);c=a=null})();(function(){var a=document.createElement("div");a.appendChild(document.createComment(""));if(a.getElementsByTagName("*").length>0)g.find.TAG=function(b,c){c=c.getElementsByTagName(b[1]);if(b[1]==="*"){b=[];for(var d=0;c[d];d++)c[d].nodeType===1&&b.push(c[d]);c=b}return c};a.innerHTML="<a href='#'></a>";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!==
"#")g.attrHandle.href=function(b){return b.getAttribute("href",2)};a=null})();document.querySelectorAll&&function(){var a=j,b=document.createElement("div");b.innerHTML="<p class='TEST'></p>";if(!(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)){j=function(d,f,l,v){f=f||document;if(!v&&f.nodeType===9&&!j.isXML(f))try{return p(f.querySelectorAll(d),l)}catch(u){}return a(d,f,l,v)};for(var c in a)j[c]=a[c];b=null}}();(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)){a.lastChild.className="e";if(a.getElementsByClassName("e").length!==1){g.order.splice(1,0,"CLASS");g.find.CLASS=function(b,c,d){if(typeof c.getElementsByClassName!=="undefined"&&!d)return c.getElementsByClassName(b[1])};a=null}}})();j.contains=document.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};j.isXML=function(a){return(a=(a?
a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":false};var h=function(a,b){var c=[],d="",f;for(b=b.nodeType?[b]:b;f=g.match.PSEUDO.exec(a);){d+=f[0];a=a.replace(g.match.PSEUDO,"")}a=g.relative[a]?a+"*":a;f=0;for(var l=b.length;f<l;f++)j(a,b[f],c);return j.filter(d,c)};KISSY.ExternalSelector=j;KISSY.ExternalSelector._filter=function(a,b){return j.matches(b,KISSY.query(a))}})();

