YUI.add("key-aevents",function(a){a.namespace("KEY");a.KEY.AppletEvents=function(b){a.KEY.AppletEvents.superclass.constructor.call(this,b)};a.KEY.AppletEvents.NAME="appletEvents";a.KEY.AppletEvents.CATSTYLE=new Array(new Array("flirt",{width:"125px",height:"87px"}),new Array("over20",{width:"97px",height:"91px",bottom:"-12px"}),new Array("under18",{width:"158px",height:"90px",bottom:"-10px"}),new Array("local",{width:"123px",height:"89px"}),new Array("games",{width:"135px",height:"118px",bottom:"-15px"}),new Array("classic",{width:"128px",height:"73px"}),new Array("themes",{width:"145px",height:"90px"}));a.KEY.AppletEvents.ATTRS={};a.KEY.AppletEvents.available=function(){var b=a.get("#chatjavanote");if(b!=null){b.setStyle("display","none")}};a.KEY.AppletEvents.categorySwitch=function(e){var f=a.get(".catimg");if(f==null||a.KEY.AppletEvents.CATSTYLE[e]==undefined){return}var d=f.getStyle("backgroundImage");if(d!=null){if(d!="none"){d=d.replace(/(.*cat_\D*)\d(.*)/,"$1"+e+"$2");f.setStyle("backgroundImage",d)}else{d=f.getStyle("filter");d=d.replace(/(.*cat_\D*)\d(.*)/,"$1"+e+"$2");f.setStyle("filter",d)}f.setStyle("bottom","");for(var c in a.KEY.AppletEvents.CATSTYLE[e][1]){f.setStyle(c,a.KEY.AppletEvents.CATSTYLE[e][1][c])}}for(var b=0;b<a.KEY.AppletEvents.CATSTYLE.length;b++){f.removeClass(a.KEY.AppletEvents.CATSTYLE[b][0])}f.addClass(a.KEY.AppletEvents.CATSTYLE[e][0])};a.KEY.AppletEvents.loginSuccess=function(e,b){var d=window.K.auth.Info.getInstance().setAI(b)};a.extend(a.KEY.AppletEvents,a.Base,{initializer:function(b){},destructor:function(){}})},"1.0",{requires:["base","node"],skinnable:false});if(typeof Y=="undefined"||!Y){Y=new Object()}if(typeof Y.KEY=="undefined"||!Y.KEY){Y.KEY=new Object()}if(typeof Y.KEY.AppletEvents=="undefined"||!Y.KEY.AppletEvents){KYUI().use("key-aevents",function(a){Y.KEY.AppletEvents=a.KEY.AppletEvents})};