/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.3.0 build: 3167 */ var GLOBAL_ENV=YUI.Env;if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){GLOBAL_ENV.DOMReady=true;GLOBAL_ENV.remove(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);};GLOBAL_ENV.add(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);}YUI.add("event-base",function(e){e.publish("domready",{fireOnce:true,async:true});if(GLOBAL_ENV.DOMReady){e.fire("domready");}else{e.Do.before(function(){e.fire("domready");},YUI.Env,"_ready");}var b=e.UA,d={},a={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},c=function(h){if(!h){return h;}try{if(h&&3==h.nodeType){h=h.parentNode;}}catch(g){return null;}return e.one(h);},f=function(g,h,i){this._event=g;this._currentTarget=h;this._wrapper=i||d;this.init();};e.extend(f,Object,{init:function(){var i=this._event,j=this._wrapper.overrides,g=i.pageX,l=i.pageY,k,h=this._currentTarget;this.altKey=i.altKey;this.ctrlKey=i.ctrlKey;this.metaKey=i.metaKey;this.shiftKey=i.shiftKey;this.type=(j&&j.type)||i.type;this.clientX=i.clientX;this.clientY=i.clientY;this.pageX=g;this.pageY=l;k=i.keyCode||i.charCode;if(b.webkit&&(k in a)){k=a[k];}this.keyCode=k;this.charCode=k;this.which=i.which||i.charCode||k;this.button=this.which;this.target=c(i.target);this.currentTarget=c(h);this.relatedTarget=c(i.relatedTarget);if(i.type=="mousewheel"||i.type=="DOMMouseScroll"){this.wheelDelta=(i.detail)?(i.detail*-1):Math.round(i.wheelDelta/80)||((i.wheelDelta<0)?-1:1);}if(this._touch){this._touch(i,h,this._wrapper);}},stopPropagation:function(){this._event.stopPropagation();this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){var g=this._event;if(g.stopImmediatePropagation){g.stopImmediatePropagation();}else{this.stopPropagation();}this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(g){var h=this._event;h.preventDefault();h.returnValue=g||false;this._wrapper.prevented=1;this.prevented=1;},halt:function(g){if(g){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();}});f.resolve=c;e.DOM2EventFacade=f;e.DOMEventFacade=f;(function(){e.Env.evt.dom_wrappers={};e.Env.evt.dom_map={};var o=e.Env.evt,h=e.config,l=h.win,q=YUI.Env.add,j=YUI.Env.remove,n=function(){YUI.Env.windowLoaded=true;e.Event._load();j(l,"load",n);},g=function(){e.Event._unload();},i="domready",k="~yui|2|compat~",m=function(s){try{return(s&&typeof s!=="string"&&e.Lang.isNumber(s.length)&&!s.tagName&&!s.alert);}catch(r){return false;}},p=function(){var t=false,u=0,s=[],v=o.dom_wrappers,r=null,w=o.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!p._interval){p._interval=setInterval(p._poll,p.POLL_INTERVAL);}},onAvailable:function(x,B,F,y,C,E){var D=e.Array(x),z,A;for(z=0;z4)?D.slice(4):null);if(z){H.fire();}return B;},detach:function(E,F,z,C){var D=e.Array(arguments,0,true),H,A,G,B,x,y;if(D[D.length-1]===k){H=true;}if(E&&E.detach){return E.detach();}if(typeof z=="string"){if(H){z=e.DOM.byId(z);}else{z=e.Selector.query(z);A=z.length;if(A<1){z=null;}else{if(A==1){z=z[0];}}}}if(!z){return false;}if(z.detach){D.splice(2,1);return z.detach.apply(z,D);}else{if(m(z)){G=true;for(B=0,A=z.length;B0);}B=[];D=function(G,H){var F,E=H.override;if(H.compat){if(H.override){if(E===true){F=H.obj;}else{F=E;}}else{F=G;}H.fn.call(F,H.obj);}else{F=H.obj||e.one(G);H.fn.apply(F,(e.Lang.isArray(E))?E:[]);}};for(y=0,x=s.length;y4?e.Array(arguments,4,true):null;return e.Event.onAvailable.call(e.Event,k,h,j,g);}};e.Env.evt.plugins.contentready={on:function(i,h,k,j){var g=arguments.length>4?e.Array(arguments,4,true):null;return e.Event.onContentReady.call(e.Event,k,h,j,g);}};},"3.3.0",{requires:["event-custom-base"]});