/* Copyright (c) 2009, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 3.0.0 build: 1549 */ (function(){var GLOBAL_ENV=YUI.Env,C=YUI.config,D=C.doc,POLL_INTERVAL=C.pollInterval||40,_ready=function(e){GLOBAL_ENV._ready();};if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){if(!GLOBAL_ENV.DOMReady){GLOBAL_ENV.DOMReady=true;if(D.removeEventListener){D.removeEventListener("DOMContentLoaded",_ready,false);}}};if(navigator.userAgent.match(/MSIE/)){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=='complete'){document.onreadystatechange=null;_ready();}};}else{GLOBAL_ENV._dri=setInterval(function(){try{document.documentElement.doScroll('left');clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;_ready();}catch(ex){}},POLL_INTERVAL);}}else{D.addEventListener("DOMContentLoaded",_ready,false);}}})();YUI.add('event-base',function(Y){(function(){var GLOBAL_ENV=YUI.Env,yready=function(){Y.fire('domready');};Y.publish('domready',{fireOnce:true});if(GLOBAL_ENV.DOMReady){yready();}else{Y.before(yready,GLOBAL_ENV,"_ready");}})();(function(){var ua=Y.UA,webkitKeymap={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},resolve=function(n){try{if(n&&3==n.nodeType){n=n.parentNode;}}catch(e){return null;} return Y.one(n);};Y.DOMEventFacade=function(ev,currentTarget,wrapper){wrapper=wrapper||{};var e=ev,ot=currentTarget,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 webkitKeymap)){c=webkitKeymap[c];} this.keyCode=c;this.charCode=c;this.button=e.which||e.button;this.which=this.button;this.target=resolve(e.target||e.srcElement);this.currentTarget=resolve(ot);t=e.relatedTarget;if(!t){if(e.type=="mouseout"){t=e.toElement;}else if(e.type=="mouseover"){t=e.fromElement;}} this.relatedTarget=resolve(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;} wrapper.stopped=1;};this.stopImmediatePropagation=function(){if(e.stopImmediatePropagation){e.stopImmediatePropagation();}else{this.stopPropagation();} wrapper.stopped=2;};this.preventDefault=function(returnValue){if(e.preventDefault){e.preventDefault();} e.returnValue=returnValue||false;wrapper.prevented=1;};this.halt=function(immediate){if(immediate){this.stopImmediatePropagation();}else{this.stopPropagation();} this.preventDefault();};};})();(function(){Y.Env.evt.dom_wrappers={};Y.Env.evt.dom_map={};var _eventenv=Y.Env.evt,add=YUI.Env.add,remove=YUI.Env.remove,onLoad=function(){YUI.Env.windowLoaded=true;Y.Event._load();remove(window,"load",onLoad);},onUnload=function(){Y.Event._unload();remove(window,"unload",onUnload);},EVENT_READY='domready',COMPAT_ARG='~yui|2|compat~',shouldIterate=function(o){try{return(o&&typeof o!=="string"&&Y.Lang.isNumber(o.length)&&!o.tagName&&!o.alert);}catch(ex){return false;}},Event=function(){var _loadComplete=false,_retryCount=0,_avail=[],_wrappers=_eventenv.dom_wrappers,_windowLoadKey=null,_el_events=_eventenv.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,p_obj,p_override,checkContent,compat){var a=Y.Array(id),i,availHandle;for(i=0;i4)?args.slice(4):null);if(fireNow){cewrapper.fire();} return ret;},detach:function(type,fn,el,obj){var args=Y.Array(arguments,0,true),compat,i,l,ok,id,ce;if(args[args.length-1]===COMPAT_ARG){compat=true;} if(type&&type.detach){return type.detach();} if(typeof el=="string"){if(compat){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(shouldIterate(el)){ok=true;for(i=0,l=el.length;i0);} notAvail=[];executeItem=function(el,item){var context,ov=item.override;if(item.compat){if(item.override){if(ov===true){context=item.obj;}else{context=ov;}}else{context=el;} item.fn.call(context,item.obj);}else{context=item.obj||Y.one(el);item.fn.apply(context,(Y.Lang.isArray(ov))?ov:[]);}};for(i=0,len=_avail.length;i4?Y.Array(arguments,4,true):[];return Y.Event.onAvailable.call(Y.Event,id,fn,o,a);}};Y.Env.evt.plugins.contentready={on:function(type,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']});