# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/theme/splash/config.php
--- moodle/theme/splash/config.php Base (1.1)
+++ moodle/theme/splash/config.php Locally Modified (Based On 1.1)
@@ -18,7 +18,11 @@
 
 
 $THEME->sheets = array(
-	'green','blue','orange','sl','ie',
+    'sl',
+    'green',
+    'blue',
+    'orange',
+    'ie',
 );
 
 ////////////////////////////////////////////////////
@@ -128,11 +132,3 @@
 // Splash Theme Specific settings for Administrators to customise
 // css.
 ///////////////////////////////////////////////////////////////
-
-
-
-$THEME->javascripts = array('styleswitcher');
-
-///////////////////////////////////////////////////////////////
-// Referencing the javascript files required for theme elements.
-///////////////////////////////////////////////////////////////
\ No newline at end of file
Index: moodle/theme/splash/javascript/styleswitcher.js
--- moodle/theme/splash/javascript/styleswitcher.js Base (1.1)
+++ moodle/theme/splash/javascript/styleswitcher.js Locally Deleted
@@ -1,64 +0,0 @@
-function setActiveStyleSheet(title) {
-  var i, a, main;
-  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
-    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
-      a.disabled = true;
-      if(a.getAttribute("title") == title) a.disabled = false;
-    }
-  }
-}
-
-function getActiveStyleSheet() {
-  var i, a;
-  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
-    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
-  }
-  return null;
-}
-
-function getPreferredStyleSheet() {
-  var i, a;
-  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
-    if(a.getAttribute("rel").indexOf("style") != -1
-       && a.getAttribute("rel").indexOf("alt") == -1
-       && a.getAttribute("title")
-       ) return a.getAttribute("title");
-  }
-  return null;
-}
-
-function createCookie(name,value,days) {
-  if (days) {
-    var date = new Date();
-    date.setTime(date.getTime()+(days*24*60*60*1000));
-    var expires = "; expires="+date.toGMTString();
-  }
-  else expires = "";
-  document.cookie = name+"="+value+expires+"; path=/";
-}
-
-function readCookie(name) {
-  var nameEQ = name + "=";
-  var ca = document.cookie.split(';');
-  for(var i=0;i < ca.length;i++) {
-    var c = ca[i];
-    while (c.charAt(0)==' ') c = c.substring(1,c.length);
-    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
-  }
-  return null;
-}
-
-window.onload = function(e) {
-  var cookie = readCookie("style");
-  var title = cookie ? cookie : getPreferredStyleSheet();
-  setActiveStyleSheet(title);
-}
-
-window.onunload = function(e) {
-  var title = getActiveStyleSheet();
-  createCookie("style", title, 365);
-}
-
-var cookie = readCookie("style");
-var title = cookie ? cookie : getPreferredStyleSheet();
-setActiveStyleSheet(title);
Index: moodle/theme/splash/lang/en/theme_splash.php
--- moodle/theme/splash/lang/en/theme_splash.php Base (1.1)
+++ moodle/theme/splash/lang/en/theme_splash.php Locally Modified (Based On 1.1)
@@ -16,30 +16,28 @@
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * Strings for component 'theme_standard', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'theme_splash', language 'en'
  *
  * @package   theme_standard
- * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @copyright 2010 Caroline Kennedy of Synergy Learning
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-$string['pluginname'] = 'Splash';
-$string['choosereadme'] = 'Splash, a Moodle 2.0 theme by Caroline Kennedy of Synergy Learning)';
 
+$string['choosereadme'] = 'Splash, a Moodle 2.0 theme by Caroline Kennedy of Synergy Learning';
 $string['configtitle'] = 'Splash Theme Settings';
 $string['customcss'] = 'Custom CSS';
 $string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
+$string['defaulttagline'] = 'Virtual learning center';
 $string['footnote'] = 'Footnote';
 $string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page. E.g: your copyright info.';
-$string['tagline'] = 'Tagline';
-$string['taglinedesc'] = 'The content from this textarea will be displayed under the Site logo on the Homepage';
 $string['hide_tagline'] = 'Hide Tagline';
 $string['hide_taglinedesc'] = 'Check this box to hide the tagline under the logo.';
-
-
+$string['loginhere'] = "Login here!";
 $string['logo'] = 'Logo';
 $string['logodesc'] = 'Enter the URL to an image to use as the logo for this site. E.g: http://www.yoursite.com/path/to/logo.png. The logo should be max 230px wide.';
-
-
+$string['pluginname'] = 'Splash';
+$string['tagline'] = 'Tagline';
+$string['taglinedesc'] = 'The content from this textarea will be displayed under the Site logo on the Homepage';
+$string['usergreeting'] = 'Hi {$a}!';
 $string['welcome'] = "Welcome";
-$string['loginhere'] = "Login here!";
\ No newline at end of file
Index: moodle/theme/splash/layout/general.php
--- moodle/theme/splash/layout/general.php Base (1.1)
+++ moodle/theme/splash/layout/general.php Locally Modified (Based On 1.1)
@@ -9,7 +9,11 @@
 $custommenu = $OUTPUT->custom_menu();
 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
 
+splash_check_colourswitch();
+splash_initialise_colourswitcher($PAGE);
+
 $bodyclasses = array();
+$bodyclasses[] = 'splash-'.splash_get_colour();
 if ($hassidepre && !$hassidepost) {
     $bodyclasses[] = 'side-pre-only';
 } else if ($hassidepost && !$hassidepre) {
@@ -27,7 +31,7 @@
 if (!empty($PAGE->theme->settings->tagline)) {
     $tagline = $PAGE->theme->settings->tagline;
 } else {
-    $tagline = "Virtual Learning Center";
+    $tagline = get_string('defaulttagline', 'theme_splash');
 }
 
 if (!empty($PAGE->theme->settings->footnote)) {
@@ -36,150 +40,92 @@
     $footnote = "";
 }
 
-if (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1) 
-{
+if (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1) {
     $hidetagline = $PAGE->theme->settings->hide_tagline;
 } else {
     $hidetagline = "";
 }
 
-
-
 echo $OUTPUT->doctype() ?>
 <head>
     <title><?php echo $PAGE->title ?></title>
     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
     <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
     <?php echo $OUTPUT->standard_head_html() ?>
-
-    <link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/green.css" title="green" media="screen" />
-     
-     <link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/blue.css" title="blue" media="screen" />
-      <link rel="alternate stylesheet" type="text/css" href="<?php echo $CFG->wwwroot .'/theme/'. current_theme() ?>/style/orange.css" title="orange" media="screen" />
-
-     <noscript>
-<style type="text/css">
-#colourswitcher
-{
-	display:none;
-}
-</style>
-</noscript>
-    
 </head>
-
-
 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
 <?php echo $OUTPUT->standard_top_of_body_html() ?>
-
-
 <div id="page">
-
 	<?php if ($hasheading || $hasnavbar) { ?>
     	<div id="page-header">
 			<div id="page-header-wrapper" class="wrapper clearfix">
 	        	<?php if ($hasheading) { ?>
-
 		             <div id="headermenu">
-                  		 <?php
-                    if (isloggedin())
-                    {
-                        
-                       	echo '<div id="userdetails"><h1>Hi '.$USER->firstname.'!</h1>';
-                        echo '<p class="prolog"><a href="'.$CFG->wwwroot.'/user/profile.php?id='.$USER->id.'">'.get_string('myprofile').'</a> | <a href="'.$CFG->wwwroot.'/login/logout.php?sesskey='.sesskey().'">'.get_string('logout').'</a></p></div>';
-                        echo '<div id="userimg">'.$OUTPUT->user_picture($USER, array('size'=>55)).'</div>';
-                        
+                    <?php if (isloggedin()) {
+                        echo html_writer::start_tag('div', array('id'=>'userdetails'));
+                        echo html_writer::tag('h1', get_string('usergreeting', 'theme_splash', $USER->firstname));
+                        echo html_writer::start_tag('p', array('class'=>'prolog'));
+                        echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | ';
+                        echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout'));
+                        echo html_writer::end_tag('p');
+                        echo html_writer::end_tag('div');
+                        echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg'));
                      } else {
-                        echo '<div id="userdetails_loggedout"><h1>Welcome,
-							  <a href="'.$CFG->wwwroot.'/login/index.php?">Login here!</a></h1></div>';
-                    }
-                    
-                    
-                    ?>			    	     
+                        echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout'));
+                        $loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_splash'));
+                        echo html_writer::tag('h1', get_string('welcome', 'theme_splash', $loginlink));
+                        echo html_writer::end_tag('div');;
+                    } ?>
                 		<div class="clearer"></div>
                			<div id="colourswitcher" align="right">
               				<ul>
-                     			<li><img src="<?php echo $CFG->wwwroot .'/theme/'. current_theme().'/pix/colour.jpg' ?>" /></li>
-                           		<li><a onclick="setActiveStyleSheet('sl'); return false;" href="<?php echo $CFG->wwwroot  ?>" rel="sl" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" /></a></li>
-                        		<li><a onclick="setActiveStyleSheet('green'); return false;" href="<?php echo $CFG->wwwroot  ?>" rel="green" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" /></a></li>
-                        		<li><a onclick="setActiveStyleSheet('blue'); return false;" href="<?php echo $CFG->wwwroot ?>" rel="blue" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" /></a></li>
-                        		<li><a onclick="setActiveStyleSheet('orange'); return false;" href="<?php echo $CFG->wwwroot?>" rel="orange" class="styleswitch"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" /></a></li>
+                            <li><img src="<?php echo $OUTPUT->pix_url('colour', 'theme'); ?>" alt="colour" /></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'red')); ?>" class="styleswitch colour-red"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'green')); ?>" class="styleswitch colour-green"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'blue')); ?>" class="styleswitch colour-blue"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'orange')); ?>" class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" /></a></li>
                     		</ul>   
                 		</div>
-
                  </div>
-         
-            
                 <div id="logobox">
-                	<?php if ($logourl == NULL) { ?>
-                		<a class="nologoimage" href="<?php echo $CFG->wwwroot ?>">
-                			<?php echo $PAGE->heading ?>
-                	<?php } else { ?>
-                		<a href="<?php echo $CFG->wwwroot ?>">
-                			<img src="<?php echo $logourl ?>"  />
-               		 <?php } ?>
-                		</a>
-                
+                    <?php if ($logourl == NULL) {
+                        echo html_writer::link(new moodle_url('/'), $PAGE->heading, array('class'=>'nologoimage'));
+                    } else {
+                        echo html_writer::link(new moodle_url('/'), "<img src='{$logourl}' alt='logo' />");
+                    } ?>
                 	<?php if ($hidetagline == 0) { ?>
                 	<h4><?php echo $tagline ?></h4>
                 	<?php } ?>
-                
                 </div>
-                
            		<div class="clearer"></div>
            		<?php if ($logourl == NULL) { ?>
            		<h4 class="headermain inside">&nbsp;</h4>
            		<?php } else { ?>
     		    <h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
 		        <?php } ?>
-		        
-	        <?php } ?>
-	    
-        
-        
-        
+            <?php } // End of if ($hasheading)?>
         <!-- DROP DOWN MENU -->
 		<div class="clearer"></div>
 		<div id="dropdownmenu">
  		<?php if ($hascustommenu) { ?>
  			<div id="custommenu"><?php echo $custommenu; ?></div>
 		<?php } ?>
-
 			<div class="navbar">
             	<div class="wrapper clearfix">
 	               <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
     	           <div class="navbutton"> <?php echo $PAGE->button; ?></div>
     	    	</div>
         	</div>
-            
 		</div>
-
-
-		</div>
 <!-- END DROP DOWN MENU -->
-
-
-        
     </div>
-
-       
-<?php } ?>
-
-
-
-            
+        </div>
+    <?php } // if ($hasheading || $hasnavbar) ?>
 <!-- END OF HEADER -->
-
-
-
-
-
 <!-- START OF CONTENT -->
-
     <div id="page-content">
         <div id="region-main-box">
             <div id="region-post-box">
-            
                 <div id="region-main-wrap">
                     <div id="region-main">
                         <div class="region-content">
@@ -203,17 +149,13 @@
                     </div>
                 </div>
                 <?php } ?>
-                
             </div>
         </div>
     </div>
-
-
 	<!-- END OF CONTENT -->
 	<div class="clearfix"></div>
 <!-- END OF #Page -->
 </div>
-
 <!-- START OF FOOTER -->
 <?php if ($hasfooter) { ?>
 <div id="page-footer">
@@ -230,7 +172,6 @@
      </div>
 </div>
     <?php } ?>
-
\ No newline at end of file
 <?php echo $OUTPUT->standard_end_of_body_html() ?>
 </body>
 </html>
Index: moodle/theme/splash/lib.php
--- moodle/theme/splash/lib.php Base (1.1)
+++ moodle/theme/splash/lib.php Locally Modified (Based On 1.1)
@@ -1,5 +1,34 @@
 <?php
 
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Library functions for the Splash theme
+ *
+ * @package   theme_standard
+ * @copyright 2010 Caroline Kennedy of Synergy Learning
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * Splash theme post process function for CSS
+ * @param string $css Incoming CSS to process
+ * @param stdClass $theme The theme object
+ * @return string The processed CSS
+ */
 function splash_process_css($css, $theme) {
  
     if (!empty($theme->settings->regionwidth)) {
@@ -59,4 +88,40 @@
     return $css;
 }
 
-?>
\ No newline at end of file
+/**
+ * Adds the JavaScript for the colour switcher to the page.
+ *
+ * The colour switcher is a YUI moodle module that is located in
+ *     theme/splash/yui/splash/splash.js
+ *
+ * @param moodle_page $page 
+ */
+function splash_initialise_colourswitcher(moodle_page $page) {
+    user_preference_allow_ajax_update('theme_splash_chosen_colour', PARAM_ALPHA);
+    $page->requires->yui_module('moodle-theme_splash-colourswitcher', 'M.theme_splash.initColourSwitcher', array(array('div'=>'#colourswitcher')));
+}
+
+/**
+ * Gets the colour the user has selected, or the default if they have never changed
+ *
+ * @param string $default The default colour to use, normally red
+ * @return string The colour the user has selected
+ */
+function splash_get_colour($default='red') {
+    return get_user_preferences('theme_splash_chosen_colour', $default);
+}
+
+/**
+ * Checks if the user is switching colours with a refresh (JS disabled)
+ *
+ * If they are this updates the users preference in the database
+ *
+ * @return bool
+ */
+function splash_check_colourswitch() {
+    $changecolour = optional_param('splashcolour', null, PARAM_ALPHA);
+    if (in_array($changecolour, array('red','green','blue','orange'))) {
+        return set_user_preference('theme_splash_chosen_colour', $changecolour);
+    }
+    return false;
+}
\ No newline at end of file
Index: moodle/theme/splash/settings.php
--- moodle/theme/splash/settings.php Base (1.1)
+++ moodle/theme/splash/settings.php Locally Modified (Based On 1.1)
@@ -1,7 +1,27 @@
 <?php
  
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
 /**
  * Settings for the splash theme
+ *
+ * @package   theme_standard
+ * @copyright 2010 Caroline Kennedy of Synergy Learning
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
  
 // Create our admin page
@@ -18,7 +38,7 @@
 $name = 'theme_splash/tagline';
 $title = get_string('tagline','theme_splash');
 $description = get_string('taglinedesc', 'theme_splash');
-$setting = new admin_setting_configtextarea($name, $title, $description, 'Virtual Learning Center');
+$setting = new admin_setting_configtextarea($name, $title, $description, get_string('defaulttagline', 'theme_splash'));
 $temp->add($setting);
 
 $name = 'theme_splash/hide_tagline';
@@ -53,4 +73,3 @@
  
 // Add our page to the structure of the admin tree
 $ADMIN->add('themes', $temp);
-?>
\ No newline at end of file
Index: moodle/theme/splash/style/blue.css
--- moodle/theme/splash/style/blue.css Base (1.1)
+++ moodle/theme/splash/style/blue.css Locally Modified (Based On 1.1)
@@ -10,65 +10,64 @@
 /* Global 
 ------------------------*/
 
-body {				/* Define margins and background colour/image */ 
-	background: url(../pix/bgblue.jpg) top left repeat-x #f4f4f4;
+body.splash-blue {				/* Define margins and background colour/image */
+	background: url([[pix:theme|bgblue]]) top left repeat-x #fff;
 	margin: 0 auto;
 	padding: 0;
 	width: 100%;
-
 }
 
-a:link {		/* Defining all link styles*/ 
+.splash-blue a:link {		/* Defining all link styles*/
 	color: #3d6276;
 }
 
-a:visited {		/* Setting all visited link styles */ 
+.splash-blue a:visited {		/* Setting all visited link styles */
 	color: #3d6276;
 }
 
-a:hover {		/* Setting all rollover link styles */ 
+.splash-blue a:hover {		/* Setting all rollover link styles */
 	color: #294b5d;
 }
 
-a:active {		/* Setting all active link styles */ 
+.splash-blue a:active {		/* Setting all active link styles */
 	color: #3d6276;
 }
 
 
 /* Header 
 -----------------------*/
-#page-header {			/* Set height for header */ 
+.splash-blue #page-header {			/* Set height for header */
     float: none;
 	padding: 0;
 	margin:0;
 	color: #fff;
 	height: 308px;
-	background: url(../pix/pageheaderbgblue.jpg) top center no-repeat;
+	background: url([[pix:theme|pageheaderbgblue]]) top center no-repeat;
 
 }
 
-#logobox{  /* holder background for logo*/ 
+.splash-blue #logobox{  /* holder background for logo*/
 	height: 185px;
 	width: 252px;
 	margin: auto;
 	text-align: center;
-	background: url(../pix/lbgv2blue.jpg) no-repeat;
+	background: url([[pix:theme|lbgv2blue]]) no-repeat;
 	float: left;
 }
 
 
-#colourswitcher p{
+.splash-blue #colourswitcher p{
 		color:#3d6276
 }
 
 
 /* Custom Menu
 -----------------------*/
- #custommenu .yui3-menu-content ul.first-of-type li{
+.splash-blue #custommenu .yui3-menu-content ul.first-of-type li{
 	border-right: 1px solid #bfced7;	
 }
 
-#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
+.splash-blue #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
 	background:#3d6276;
 	border:1px solid #fff;
 	color: #fff;
@@ -77,14 +76,14 @@
 /* Content
 -----------------------*/
 
-.coursebox{
+.splash-blue .coursebox{
 	padding-left:5px;
 	border-bottom: 1px dashed #cbd3d6; 
 	 
 
 }
 
-ul.topics li#section-0, ul.weeks li#section-0 {
+.splash-blue ul.topics li#section-0, ul.weeks li#section-0 {
 	background: #386377;
 	border: 1px solid #ccc;
 
@@ -93,25 +92,17 @@
 /* Sideblocks
 -----------------------*/
 
-#region-pre .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2blue.jpg) center no-repeat;
+.splash-blue #region-pre .block .header,
+.splash-blue #region-post .block .header {  /*-- right block header   --*/
+	background: url([[pix:theme|sbheaderbg2blue]]) center no-repeat;
 	padding: 12px 5px 5px;
 	color: #fff;
 }
 
-
-#region-post .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2blue.jpg) center no-repeat;
-	padding: 12px 5px 5px;
-	color: #fff;
-}
-
-
-
 /* Mini Calendar
 ------------------------*/
 
-.block .minicalendar td.weekend {    /* setting weekend date colour */ 
+.splash-blue .block .minicalendar td.weekend {    /* setting weekend date colour */
 	color:#3d6276;
 }
 
@@ -119,7 +110,7 @@
 /* Forum
 ------------------------*/
 
-.forumpost .topic .subject {    /* forum subject section inside topic header */
+.splash-blue .forumpost .topic .subject {    /* forum subject section inside topic header */
 	font-weight: bold;
 	font-size: 1.1em;
 	padding-left: 5px;
Index: moodle/theme/splash/style/green.css
--- moodle/theme/splash/style/green.css Base (1.1)
+++ moodle/theme/splash/style/green.css Locally Modified (Based On 1.1)
@@ -10,67 +10,67 @@
 /* Global 
 ------------------------*/
 
-body {				/* Define margins and background colour/image */ 
-	background: url(../pix/bggreen.jpg) top left repeat-x #f4f4f4;
+body.splash-green {				/* Define margins and background colour/image */
+	background: url([[pix:theme|bggreen]]) top left repeat-x #f4f4f4;
     margin: 0 auto;
 	padding: 0;
 	width: 100%;
 }
 
 
-a:link {		/* Defining all link styles*/ 
+.splash-green a:link {		/* Defining all link styles*/
 	color: #446e4c;
 }
 
-a:visited {		/* Setting all visited link styles */ 
+.splash-green a:visited {		/* Setting all visited link styles */
 	color: #446e4c;
 }
 
-a:hover {		/* Setting all rollover link styles */ 
+.splash-green a:hover {		/* Setting all rollover link styles */
 	color: #335a3a;
 }
 
-a:active {		/* Setting all active link styles */ 
+.splash-green a:active {		/* Setting all active link styles */
 	color: #446e4c;
 }
 
 /* Header 
 -----------------------*/
 
-#page-header {			/* Set height for header */ 
+.splash-green #page-header {			/* Set height for header */
 	float: none;
 	padding: 0;
 	margin:0;
 	color: #fff;
 	height: 308px;
-	background: url(../pix/pageheaderbggreen.jpg) top center no-repeat;
+	background: url([[pix:theme|pageheaderbggreen]]) top center no-repeat;
 
 }
 
 
-#logobox{  /* holder background for logo*/ 
+.splash-green #logobox{  /* holder background for logo*/
 	height: 185px;
 	width: 252px;
 	margin: auto;
 	text-align: center;
-	background: url(../pix/lbgv2green.jpg) no-repeat;
+	background: url([[pix:theme|lbgv2green]]) no-repeat;
 	float: left;
 }
 
 
 
-#colourswitcher p{
+.splash-green #colourswitcher p{
 	color:#446e4c;
 }
 
 
 /* Custom Menu
 -----------------------*/
- #custommenu .yui3-menu-content ul.first-of-type li{
+ .splash-green #custommenu .yui3-menu-content ul.first-of-type li{
 	border-right: 1px solid #d5e1d7;	
 }
 
-#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
+.splash-green #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
 	background:#446e4c;
 	border:1px solid #fff;
 	color: #fff;
@@ -80,14 +80,14 @@
 
 /* Content
 -----------------------*/
-ul.topics li#section-0, ul.weeks li#section-0 {
+.splash-green ul.topics li#section-0, ul.weeks li#section-0 {
 	background: #386c4c;
 	border: 1px solid #ccc;
 
 }
 
 
-.coursebox{
+.splash-green .coursebox{
 	padding-left:5px;
 	border-bottom: 1px dashed #dae0dc; 
 	 
@@ -97,25 +97,19 @@
 /* Sideblocks
 -----------------------*/
 
-#region-pre .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2green.jpg) center no-repeat;
+.splash-green #region-pre .block .header,  /*-- right block header   --*/
+.splash-green #region-post .block .header {  /*-- right block header   --*/
+	background: url([[pix:theme|sbheaderbg2green]]) center no-repeat;
 	padding: 12px 5px 5px;
 	color: #fff;
 }
 
 
-#region-post .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2green.jpg) center no-repeat;
-	padding: 12px 5px 5px;
-	color: #fff;
-}
 
-
-
 /* Mini Calendar
 ------------------------*/
 
-.block .minicalendar td.weekend {    /* setting weekend date colour */ 
+.splash-green .block .minicalendar td.weekend {    /* setting weekend date colour */
 	color:#446e4c;
 }
 
@@ -123,7 +117,7 @@
 /* Forum
 ------------------------*/
 
-.forumpost .topic .subject {    /* forum subject section inside topic header */
+.splash-green .forumpost .topic .subject {    /* forum subject section inside topic header */
 	font-weight: bold;
 	font-size: 1.1em;
 	padding-left: 5px;
Index: moodle/theme/splash/style/orange.css
--- moodle/theme/splash/style/orange.css Base (1.1)
+++ moodle/theme/splash/style/orange.css Locally Modified (Based On 1.1)
@@ -10,29 +10,28 @@
 /* Global 
 ------------------------*/
 
-body {				/* Define margins and background colour/image */ 
-	background: url(../pix/bgorange.jpg) top left repeat-x #f4f4f4;
+body.splash-orange {				/* Define margins and background colour/image */
+	background: url([[pix:theme|bgorange]]) top left repeat-x #f4f4f4;
 	margin: 0 auto;
 	padding: 0;
 	width: 100%;
-
 }
 
 
 
-a:link {		/* Defining all link styles*/ 
+.splash-orange a:link {		/* Defining all link styles*/
 	color: #7c7165;
 }
 
-a:visited {		/* Setting all visited link styles */ 
+.splash-orange a:visited {		/* Setting all visited link styles */
 	color: #7c7165;
 }
 
-a:hover {		/* Setting all rollover link styles */ 
+.splash-orange a:hover {		/* Setting all rollover link styles */
 	color: #5f564c;
 }
 
-a:active {		/* Setting all active link styles */ 
+.splash-orange a:active {		/* Setting all active link styles */
 	color: #7c7165;
 }
 
@@ -40,37 +39,37 @@
 /* Header 
 -----------------------*/
 
-#page-header {			/* Set height for header */ 
+.splash-orange #page-header {			/* Set height for header */
 	float: none;
 	padding: 0;
 	margin:0;
 	color: #fff;
 	height: 308px;
-	background: url(../pix/pageheaderbgorange.jpg) top center no-repeat;
+	background: url([[pix:theme|pageheaderbgorange]]) top center no-repeat;
 
 }
 
-#logobox{  /* holder background for logo*/ 
+.splash-orange #logobox{  /* holder background for logo*/
 	height: 185px;
 	width: 252px;
 	margin: auto;
 	text-align: center;
-	background: url(../pix/lbgv2orange.jpg) no-repeat;
+	background: url([[pix:theme|lbgv2orange]]) no-repeat;
 	float: left;
 }
 
-#colourswitcher p{
+.splash-orange #colourswitcher p{
 	color: #cb8f47;
 }
 
 
 /* Custom Menu
 -----------------------*/
- #custommenu .yui3-menu-content ul.first-of-type li{
+ .splash-orange #custommenu .yui3-menu-content ul.first-of-type li{
 	border-right: 1px solid #dbcfc0;	
 }
 
-#custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
+.splash-orange #custommenu div.yui3-menu.custom_menu_submenu .yui3-menu-content{
 	background:#cb8f47;
 	border:1px solid #fff;
 	color: #fff;
@@ -80,13 +79,13 @@
 
 /* Content
 -----------------------*/
-ul.topics li#section-0, ul.weeks li#section-0 {
+.splash-orange ul.topics li#section-0, ul.weeks li#section-0 {
 	background: #df9a55;
 	border: 1px solid #ccc;
 
 }
 
-.coursebox{
+.splash-orange .coursebox{
 	padding-left:5px;
 	border-bottom: 1px dashed #f0e7de; 
 	 
@@ -96,31 +95,25 @@
 /* Sideblocks
 -----------------------*/
 
-#region-pre .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2orange.jpg) center no-repeat;
+.splash-orange #region-pre .block .header,  /*-- right block header   --*/
+.splash-orange #region-post .block .header {  /*-- right block header   --*/
+	background: url([[pix:theme|sbheaderbg2orange]]) center no-repeat;
 	padding: 12px 5px 5px;
 	color: #fff;
 }
 
 
-#region-post .block .header {  /*-- right block header   --*/
-	background: url(../pix/sbheaderbg2orange.jpg) center no-repeat;
-	padding: 12px 5px 5px;
-	color: #fff;
-}
-
-
 /* Mini Calendar
 ------------------------*/
 
-.block .minicalendar td.weekend {    /* setting weekend date colour */ 
+.splash-orange .block .minicalendar td.weekend {    /* setting weekend date colour */
 	color:#cb8f47;
 }
 
 /* Forum
 ------------------------*/
 
-.forumpost .topic .subject {    /* forum subject section inside topic header */
+.splash-orange .forumpost .topic .subject {    /* forum subject section inside topic header */
 	font-weight: bold;
 	font-size: 1.1em;
 	padding-left: 5px;
Index: moodle/theme/splash/style/sl.css
--- moodle/theme/splash/style/sl.css Base (1.1)
+++ moodle/theme/splash/style/sl.css Locally Modified (Based On 1.1)
@@ -217,7 +217,6 @@
 	position: absolute;
 	top: 66px;
 	right: 4px;
-	
 }
 
 #colourswitcher ul{
Index: moodle/theme/splash/yui/colourswitcher/colourswitcher.js
--- moodle/theme/splash/yui/colourswitcher/colourswitcher.js No Base Revision
+++ moodle/theme/splash/yui/colourswitcher/colourswitcher.js Locally New
@@ -0,0 +1,63 @@
+YUI.add('moodle-theme_splash-colourswitcher', function(Y) {
+
+// Available colours
+var COLOURS = ['red','green','blue','orange'];
+
+/**
+ * Splash theme colour switcher class.
+ * Initialise this class by calling M.theme_splash.init
+ */
+var ColourSwitcher = function() {
+    ColourSwitcher.superclass.constructor.apply(this, arguments);
+}
+ColourSwitcher.prototype = {
+    /**
+     * Constructor for this class
+     * @param {object} config
+     */
+    initializer : function(config) {
+        var i, c;
+        // Attach events to the links to change colours so we can do it with
+        // JavaScript without refreshing the page
+        for (i in COLOURS) {
+            c = COLOURS[i];
+            // Check if this is the current colour
+            if (Y.one(document.body).hasClass('splash-'+c)) {
+                this.set('colour', c);
+            }
+            Y.all(config.div+' .colour-'+c).on('click', this.setColour, this, c);
+        }
+    },
+    /**
+     * Sets the colour being used for the splash theme
+     * @param {Y.Event} e The event that fired
+     * @param {string} colour The new colour
+     */
+    setColour : function(e, colour) {
+        // Prevent the event from refreshing the page
+        e.preventDefault();
+        // Switch over the CSS classes on the body
+        Y.one(document.body).replaceClass('splash-'+this.get('colour'), 'splash-'+colour);
+        // Update the current colour
+        this.set('colour', colour);
+        // Store the users selection (Uses AJAX to save to the database)
+        M.util.set_user_preference('theme_splash_chosen_colour', colour);
+    }
+}
+// Make the colour switcher a fully fledged YUI module
+Y.extend(ColourSwitcher, Y.Base, ColourSwitcher.prototype, {
+    NAME : 'Splash theme colour switcher',
+    ATTRS : {
+        colour : {
+            value : 'red'
+        }
+    }
+});
+// Our splash theme namespace
+M.theme_splash = M.theme_splash || {}
+// Initialisation function for the colour switcher
+M.theme_splash.initColourSwitcher = function(cfg) {
+    return new ColourSwitcher(cfg);
+}
+
+}, '@VERSION@', {requires:['base','node']});
\ No newline at end of file
