YUI.add('moodle-theme_splash-colourswitcher',function(Y){var COLOURS=['red','green','blue','orange'],ColourSwitcher=function(){ColourSwitcher.superclass.constructor.apply(this,arguments)};ColourSwitcher.prototype={initializer:function(config){var i,c;for(i in COLOURS){c=COLOURS[i];if(Y.one(document.body).hasClass('splash-'+c))this.set('colour',c);Y.all(config.div+' .colour-'+c).on('click',this.setColour,this,c)}},setColour:function(e,colour){e.preventDefault();Y.one(document.body).replaceClass('splash-'+this.get('colour'),'splash-'+colour);this.set('colour',colour);M.util.set_user_preference('theme_splash_chosen_colour',colour)}};Y.extend(ColourSwitcher,Y.Base,ColourSwitcher.prototype,{NAME:'Splash theme colour switcher',ATTRS:{colour:{value:'red'}}});M.theme_splash=M.theme_splash||{};M.theme_splash.initColourSwitcher=function(cfg){return new ColourSwitcher(cfg)}},'@VERSION@',{requires:['base','node']})