(function(){
var _1=YUI.Env,C=YUI.config,D=C.doc,_2=C.pollInterval||40,_3=function(e){
_1._ready();
};
if(!_1._ready){
_1._ready=function(){
if(!_1.DOMReady){
_1.DOMReady=true;
if(D.removeEventListener){
D.removeEventListener("DOMContentLoaded",_3,false);
}
}
};
if(navigator.userAgent.match(/MSIE/)){
if(self!==self.top){
document.onreadystatechange=function(){
if(document.readyState=="complete"){
document.onreadystatechange=null;
_3();
}
};
}else{
_1._dri=setInterval(function(){
try{
document.documentElement.doScroll("left");
clearInterval(_1._dri);
_1._dri=null;
_3();
}
catch(ex ){
}
},_2);
}
}else{
D.addEventListener("DOMContentLoaded",_3,false);
}
}
})();
YUI.add("event-base",function(Y){
(function(){
var _4=YUI.Env,_5=function(){
Y.fire("domready");
};
Y.publish("domready",{fireOnce:true});
if(_4.DOMReady){
_5();
}else{
Y.before(_5,_4,"_ready");
}
})();
(function(){
var ua=Y.UA,_6={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},_7=function(n){
try{
if(n&&3==n.nodeType){
n=n.parentNode;
}
}
catch(e ){
return null;
}
return Y.one(n);
};
Y.DOMEventFacade=function(ev,_8,_9){
_9=_9||{};
var e=ev,ot=_8,d=Y.config.doc,b=d.body,x=e.pageX,y=e.pageY,c,t;
this.altKey=e.altKey;
this.ctrlKey=e.ctrlKey;
this.metaKey=e.metaKey;
this.shiftKey=e.shiftKey;
this.type=e.type;
this.clientX=e.clientX;
this.clientY=e.clientY;
if(!x&&0!==x){
x=e.clientX||0;
y=e.clientY||0;
if(ua.ie){
x+=Math.max(d.documentElement.scrollLeft,b.scrollLeft);
y+=Math.max(d.documentElement.scrollTop,b.scrollTop);
}
}
this._yuifacade=true;
this._event=e;
this.pageX=x;
this.pageY=y;
c=e.keyCode||e.charCode||0;
if(ua.webkit&&(c in _6)){
c=_6[c];
}
this.keyCode=c;
this.charCode=c;
this.button=e.which||e.button;
this.which=this.button;
this.target=_7(e.target||e.srcElement);
this.currentTarget=_7(ot);
t=e.relatedTarget;
if(!t){
if(e.type=="mouseout"){
t=e.toElement;
}else{
if(e.type=="mouseover"){
t=e.fromElement;
}
}
}
this.relatedTarget=_7(t);
if(e.type=="mousewheel"||e.type=="DOMMouseScroll"){
this.wheelDelta=(e.detail)?(e.detail*-1):Math.round(e.wheelDelta/80)||((e.wheelDelta<0)?-1:1);
}
this.stopPropagation=function(){
if(e.stopPropagation){
e.stopPropagation();
}else{
e.cancelBubble=true;
}
_9.stopped=1;
};
this.stopImmediatePropagation=function(){
if(e.stopImmediatePropagation){
e.stopImmediatePropagation();
}else{
this.stopPropagation();
}
_9.stopped=2;
};
this.preventDefault=function(_a){
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=_a||false;
_9.prevented=1;
};
this.halt=function(_b){
if(_b){
this.stopImmediatePropagation();
}else{
this.stopPropagation();
}
this.preventDefault();
};
};
})();
(function(){
Y.Env.evt.dom_wrappers={};
Y.Env.evt.dom_map={};
var _c=Y.Env.evt,_d=YUI.Env.add,_e=YUI.Env.remove,_f=function(){
YUI.Env.windowLoaded=true;
Y.Event._load();
_e(window,"load",_f);
},_10=function(){
Y.Event._unload();
_e(window,"unload",_10);
},_11="domready",_12="~yui|2|compat~",_13=function(o){
try{
return (o&&typeof o!=="string"&&Y.Lang.isNumber(o.length)&&!o.tagName&&!o.alert);
}
catch(ex ){
return false;
}
},_14=function(){
var _15=false,_16=0,_17=[],_18=_c.dom_wrappers,_19=null,_1a=_c.dom_map;
return {POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){
var E=Y.Event;
if(!E._interval){
E._interval=setInterval(Y.bind(E._poll,E),E.POLL_INTERVAL);
}
},onAvailable:function(id,fn,_1b,_1c,_1d,_1e){
var a=Y.Array(id),i,_1f;
for(i=0;i<a.length;i=i+1){
_17.push({id:a[i],fn:fn,obj:_1b,override:_1c,checkReady:_1d,compat:_1e});
}
_16=this.POLL_RETRYS;
setTimeout(Y.bind(Y.Event._poll,Y.Event),0);
_1f=new Y.EventHandle({_delete:function(){
if(_1f.handle){
_1f.handle.detach();
return;
}
var i,j;
for(i=0;i<a.length;i++){
for(j=0;j<_17.length;j++){
if(a[i]===_17[j].id){
_17.splice(j,1);
}
}
}
}});
return _1f;
},onContentReady:function(id,fn,_20,_21,_22){
return this.onAvailable(id,fn,_20,_21,true,_22);
},attach:function(_23,fn,el,_24){
return Y.Event._attach(Y.Array(arguments,0,true));
},_createWrapper:function(el,_25,_26,_27,_28){
var ek=Y.stamp(el),key="event:"+ek+_25,_29;
if(false===_28){
key+="native";
}
if(_26){
key+="capture";
}
_29=_18[key];
if(!_29){
_29=Y.publish(key,{silent:true,bubbles:false,contextFn:function(){
_29.nodeRef=_29.nodeRef||Y.one(_29.el);
return _29.nodeRef;
}});
_29.el=el;
_29.key=key;
_29.domkey=ek;
_29.type=_25;
_29.fn=function(e){
_29.fire(Y.Event.getEvent(e,el,(_27||(false===_28))));
};
_29.capture=_26;
if(el==Y.config.win&&_25=="load"){
_29.fireOnce=true;
_19=key;
}
_18[key]=_29;
_1a[ek]=_1a[ek]||{};
_1a[ek][key]=_29;
_d(el,_25,_29.fn,_26);
}
return _29;
},_attach:function(_2a,_2b){
var _2c,E=Y.Event,_2d,oEl,_2e,_2f,_30=false,ret,_31=_2a[0],fn=_2a[1],el=_2a[2]||Y.config.win,_32=_2b&&_2b.facade,_33=_2b&&_2b.capture;
if(_2a[_2a.length-1]===_12){
_2c=true;
}
if(!fn||!fn.call){
return false;
}
if(_13(el)){
_2d=[];
Y.each(el,function(v,k){
_2a[2]=v;
_2d.push(E._attach(_2a,_2b));
});
return new Y.EventHandle(_2d);
}else{
if(Y.Lang.isString(el)){
if(_2c){
oEl=Y.DOM.byId(el);
}else{
oEl=Y.Selector.query(el);
switch(oEl.length){
case 0:
oEl=null;
break;
case 1:
oEl=oEl[0];
break;
default:
_2a[2]=oEl;
return E._attach(_2a,_2b);
}
}
if(oEl){
el=oEl;
}else{
ret=this.onAvailable(el,function(){
ret.handle=E._attach(_2a,_2b);
},E,true,false,_2c);
return ret;
}
}
}
if(!el){
return false;
}
if(Y.Node&&el instanceof Y.Node){
el=Y.Node.getDOMNode(el);
}
_2e=this._createWrapper(el,_31,_33,_2c,_32);
if(el==Y.config.win&&_31=="load"){
if(YUI.Env.windowLoaded){
_30=true;
}
}
if(_2c){
_2a.pop();
}
_2f=_2a[3];
ret=_2e._on(fn,_2f,(_2a.length>4)?_2a.slice(4):null);
if(_30){
_2e.fire();
}
return ret;
},detach:function(_34,fn,el,obj){
var _35=Y.Array(arguments,0,true),_36,i,l,ok,id,ce;
if(_35[_35.length-1]===_12){
_36=true;
}
if(_34&&_34.detach){
return _34.detach();
}
if(typeof el=="string"){
if(_36){
el=Y.DOM.byId(el);
}else{
el=Y.Selector.query(el);
l=el.length;
if(l<1){
el=null;
}else{
if(l==1){
el=el[0];
}
}
}
}
if(!el){
return false;
}
if(_13(el)){
ok=true;
for(i=0,l=el.length;i<l;++i){
_35[2]=el[i];
ok=(Y.Event.detach.apply(Y.Event,_35)&&ok);
}
return ok;
}
if(!_34||!fn||!fn.call){
return this.purgeElement(el,false,_34);
}
id="event:"+Y.stamp(el)+_34;
ce=_18[id];
if(ce){
return ce.detach(fn);
}else{
return false;
}
},getEvent:function(e,el,_37){
var ev=e||window.event;
return (_37)?ev:new Y.DOMEventFacade(ev,el,_18["event:"+Y.stamp(el)+e.type]);
},generateId:function(el){
var id=el.id;
if(!id){
id=Y.stamp(el);
el.id=id;
}
return id;
},_isValidCollection:_13,_load:function(e){
if(!_15){
_15=true;
if(Y.fire){
Y.fire(_11);
}
Y.Event._poll();
}
},_poll:function(){
if(this.locked){
return;
}
if(Y.UA.ie&&!YUI.Env.DOMReady){
this.startInterval();
return;
}
this.locked=true;
var _38=!_15,_39,_3a,i,len,_3b,el;
if(!_38){
_38=(_16>0);
}
_39=[];
_3a=function(el,_3c){
var _3d,ov=_3c.override;
if(_3c.compat){
if(_3c.override){
if(ov===true){
_3d=_3c.obj;
}else{
_3d=ov;
}
}else{
_3d=el;
}
_3c.fn.call(_3d,_3c.obj);
}else{
_3d=_3c.obj||Y.one(el);
_3c.fn.apply(_3d,(Y.Lang.isArray(ov))?ov:[]);
}
};
for(i=0,len=_17.length;i<len;++i){
_3b=_17[i];
if(_3b&&!_3b.checkReady){
el=(_3b.compat)?Y.DOM.byId(_3b.id):Y.Selector.query(_3b.id,null,true);
if(el){
_3a(el,_3b);
_17[i]=null;
}else{
_39.push(_3b);
}
}
}
for(i=0,len=_17.length;i<len;++i){
_3b=_17[i];
if(_3b&&_3b.checkReady){
el=(_3b.compat)?Y.DOM.byId(_3b.id):Y.Selector.query(_3b.id,null,true);
if(el){
if(_15||(el.get&&el.get("nextSibling"))||el.nextSibling){
_3a(el,_3b);
_17[i]=null;
}
}else{
_39.push(_3b);
}
}
}
_16=(_39.length===0)?0:_16-1;
if(_38){
this.startInterval();
}else{
clearInterval(this._interval);
this._interval=null;
}
this.locked=false;
return;
},purgeElement:function(el,_3e,_3f){
var oEl=(Y.Lang.isString(el))?Y.Selector.query(el,null,true):el,lis=this.getListeners(oEl,_3f),i,len,_40;
if(lis){
for(i=0,len=lis.length;i<len;++i){
_40=lis[i];
_40.detachAll();
_e(_40.el,_40.type,_40.fn,_40.capture);
delete _18[_40.key];
delete _1a[_40.domkey][_40.key];
}
}
if(_3e&&oEl&&oEl.childNodes){
for(i=0,len=oEl.childNodes.length;i<len;++i){
this.purgeElement(oEl.childNodes[i],_3e,_3f);
}
}
},getListeners:function(el,_41){
var ek=Y.stamp(el,true),_42=_1a[ek],_43=[],key=(_41)?"event:"+ek+_41:null;
if(!_42){
return null;
}
if(key){
if(_42[key]){
_43.push(_42[key]);
}
key+="native";
if(_42[key]){
_43.push(_42[key]);
}
}else{
Y.each(_42,function(v,k){
_43.push(v);
});
}
return (_43.length)?_43:null;
},_unload:function(e){
Y.each(_18,function(v,k){
v.detachAll();
_e(v.el,v.type,v.fn,v.capture);
delete _18[k];
delete _1a[v.domkey][k];
});
},nativeAdd:_d,nativeRemove:_e};
}();
Y.Event=_14;
if(Y.config.injected||YUI.Env.windowLoaded){
_f();
}else{
_d(window,"load",_f);
}
if(Y.UA.ie){
Y.on(_11,_14._poll,_14,true);
}
Y.on("unload",_10);
_14.Custom=Y.CustomEvent;
_14.Subscriber=Y.Subscriber;
_14.Target=Y.EventTarget;
_14.Handle=Y.EventHandle;
_14.Facade=Y.EventFacade;
_14._poll();
})();
Y.Env.evt.plugins.available={on:function(_44,fn,id,o){
var a=arguments.length>4?Y.Array(arguments,4,true):[];
return Y.Event.onAvailable.call(Y.Event,id,fn,o,a);
}};
Y.Env.evt.plugins.contentready={on:function(_45,fn,id,o){
var a=arguments.length>4?Y.Array(arguments,4,true):[];
return Y.Event.onContentReady.call(Y.Event,id,fn,o,a);
}};
},"3.0.0",{requires:["event-custom-base"]});
YUI.add("event-delegate",function(Y){
var _46=Y.Event,_47=Y.Lang,_48={},_49={mouseenter:"mouseover",mouseleave:"mouseout"},_4a=function(n){
try{
if(n&&3==n.nodeType){
return n.parentNode;
}
}
catch(e ){
}
return n;
},_4b=function(_4c,e,el){
var _4d=_4a((e.target||e.srcElement)),_4e=_48[_4c],_4f,_50,_51,fn,ev;
var _52=function(el,_53,_54){
var _55;
if(!el||el===_54){
_55=false;
}else{
_55=Y.Selector.test(el,_53)?el:_52(el.parentNode,_53,_54);
}
return _55;
};
for(_4f in _4e){
if(_4e.hasOwnProperty(_4f)){
_50=_4e[_4f];
fn=_4e.fn;
_51=null;
if(Y.Selector.test(_4d,_4f,el)){
_51=_4d;
}else{
if(Y.Selector.test(_4d,((_4f.replace(/,/gi," *,"))+" *"),el)){
_51=_52(_4d,_4f,el);
}
}
if(_51){
if(!ev){
ev=new Y.DOMEventFacade(e,el);
ev.container=ev.currentTarget;
}
ev.currentTarget=Y.Node.get(_51);
Y.publish(_50,{contextFn:function(){
return ev.currentTarget;
}});
if(fn){
fn(ev,_50);
}else{
Y.fire(_50,ev);
}
}
}
}
},_56=function(_57,key,_58){
var _59={focus:_46._attachFocus,blur:_46._attachBlur},_5a=_59[_57],_5b=[_57,function(e){
_4b(key,(e||window.event),_58);
},_58];
if(_5a){
return _5a(_5b,{capture:true,facade:false});
}else{
return _46._attach(_5b,{facade:false});
}
},_5c=Y.cached(function(str){
return str.replace(/[|,:]/g,"~");
});
Y.Env.evt.plugins.delegate={on:function(_5d,fn,el,_5e,_5f){
var _60=Y.Array(arguments,0,true);
_60.splice(3,1);
_60[0]=_5e;
return Y.delegate.apply(Y,_60);
}};
_46.delegate=function(_61,fn,el,_62){
if(!_62){
return false;
}
var _63=Y.Array(arguments,0,true),_64=el,_65;
if(_47.isString(el)){
_64=Y.Selector.query(el,null,true);
if(!_64){
_65=_46.onAvailable(el,function(){
_65.handle=_46.delegate.apply(_46,_63);
},_46,true,false);
return _65;
}
}
_64=Y.Node.getDOMNode(_64);
var _66=Y.stamp(_64),_67="delegate:"+_66+_61+_5c(_62),_68=_61+_66,_69=_48[_68],_6a,_6b,_6c;
if(!_69){
_69={};
if(_49[_61]){
if(!_46._fireMouseEnter){
return false;
}
_61=_49[_61];
_69.fn=_46._fireMouseEnter;
}
_6a=_56(_61,_68,_64);
Y.after(function(sub){
if(_6a.sub==sub){
delete _48[_68];
Y.detachAll(_67);
}
},_6a.evt,"_delete");
_69.handle=_6a;
_48[_68]=_69;
}
_6c=_69.listeners;
_69.listeners=_6c?(_6c+1):1;
_69[_62]=_67;
_63[0]=_67;
_63.splice(2,2);
_6b=Y.on.apply(Y,_63);
Y.after(function(){
_69.listeners=(_69.listeners-1);
if(_69.listeners===0){
_69.handle.detach();
}
},_6b,"detach");
return _6b;
};
Y.delegate=_46.delegate;
},"3.0.0",{requires:["node-base"]});
YUI.add("event-mousewheel",function(Y){
var _6d="DOMMouseScroll",_6e=function(_6f){
var a=Y.Array(_6f,0,true),_70;
if(Y.UA.gecko){
a[0]=_6d;
_70=Y.config.win;
}else{
_70=Y.config.doc;
}
if(a.length<3){
a[2]=_70;
}else{
a.splice(2,0,_70);
}
return a;
};
Y.Env.evt.plugins.mousewheel={on:function(){
return Y.Event._attach(_6e(arguments));
},detach:function(){
return Y.Event.detach.apply(Y.Event,_6e(arguments));
}};
},"3.0.0",{requires:["node-base"]});
YUI.add("event-mouseenter",function(Y){
var _71=Y.Event,_72=Y.Lang,_73=Y.Env.evt.plugins,_74={},_75={on:function(_76,fn,el){
var _77=Y.Array(arguments,0,true),_78=el,_79;
if(_72.isString(el)){
_78=Y.all(el);
if(_78.size()===0){
_79=_71.onAvailable(el,function(){
_79.handle=Y.on.apply(Y,_77);
},_71,true,false);
return _79;
}
}
var _7a=(_76==="mouseenter")?"mouseover":"mouseout",_7b=_76+":"+Y.stamp(_78)+_7a,_7c=_74[_7b],_7d,_7e,_7f;
if(!_7c){
_7d=Y.on(_7a,Y.rbind(_71._fireMouseEnter,Y,_7b),_78);
Y.after(function(sub){
if(_7d.sub==sub){
delete _74[_7b];
Y.detachAll(_7b);
}
},_7d.evt,"_delete");
_7c={};
_7c.handle=_7d;
_74[_7b]=_7c;
}
_7f=_7c.count;
_7c.count=_7f?(_7f+1):1;
_77[0]=_7b;
_77.splice(2,1);
_7e=Y.on.apply(Y,_77);
Y.after(function(){
_7c.count=(_7c.count-1);
if(_7c.count===0){
_7c.handle.detach();
}
},_7e,"detach");
return _7e;
}};
_71._fireMouseEnter=function(e,_80){
var _81=e.relatedTarget,_82=e.currentTarget;
if(_82!==_81&&!_82.contains(_81)){
Y.publish(_80,{contextFn:function(){
return _82;
}});
Y.fire(_80,e);
}
};
_73.mouseenter=_75;
_73.mouseleave=_75;
},"3.0.0",{requires:["node-base"]});
YUI.add("event-key",function(Y){
Y.Env.evt.plugins.key={on:function(_83,fn,id,_84,o){
var a=Y.Array(arguments,0,true),_85,_86,_87,_88;
_85=_84&&_84.split(":");
if(!_84||_84.indexOf(":")==-1||!_85[1]){
a[0]="key"+((_85&&_85[0])||"press");
return Y.on.apply(Y,a);
}
_86=_85[0];
_87=(_85[1])?_85[1].split(/,|\+/):null;
_88=(Y.Lang.isString(id)?id:Y.stamp(id))+_84;
_88=_88.replace(/,/g,"_");
if(!Y.getEvent(_88)){
Y.on(_83+_86,function(e){
var _89=false,_8a=false,i,_8b,_8c;
for(i=0;i<_87.length;i=i+1){
_8b=_87[i];
_8c=parseInt(_8b,10);
if(Y.Lang.isNumber(_8c)){
if(e.charCode===_8c){
_89=true;
}else{
_8a=true;
}
}else{
if(_89||!_8a){
_89=(e[_8b+"Key"]);
_8a=!_89;
}
}
}
if(_89){
Y.fire(_88,e);
}
},id);
}
a.splice(2,2);
a[0]=_88;
return Y.on.apply(Y,a);
}};
},"3.0.0",{requires:["node-base"]});
YUI.add("event-focus",function(Y){
(function(){
var UA=Y.UA,_8d=Y.Event,_8e=Y.Env.evt.plugins,ie=UA.ie,_8f=(UA.opera||UA.webkit),_90={focus:(ie?"focusin":(_8f?"DOMFocusIn":"focus")),blur:(ie?"focusout":(_8f?"DOMFocusOut":"blur"))},_91={capture:(UA.gecko?true:false)},_92=function(_93,_94){
var a=Y.Array(_93,0,true);
a[0]=_90[a[0]];
return _8d._attach(a,_94);
},_95={on:function(){
return _92(arguments,_91);
}};
_8d._attachFocus=_92;
_8d._attachBlur=_92;
_8e.focus=_95;
_8e.blur=_95;
})();
},"3.0.0",{requires:["node-base"]});
YUI.add("event-resize",function(Y){
(function(){
var _96,_97,_98="window:resize",_99=function(e){
if(Y.UA.gecko){
Y.fire(_98,e);
}else{
if(_97){
_97.cancel();
}
_97=Y.later(Y.config.windowResizeDelay||40,Y,function(){
Y.fire(_98,e);
});
}
};
Y.Env.evt.plugins.windowresize={on:function(_9a,fn){
if(!_96){
_96=Y.Event._attach(["resize",_99]);
}
var a=Y.Array(arguments,0,true);
a[0]=_98;
return Y.on.apply(Y,a);
}};
})();
},"3.0.0",{requires:["node-base"]});
YUI.add("event",function(Y){
},"3.0.0",{use:["event-base","event-delegate","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize"]});

