Index: /issm/trunk-jpl/src/m/plot/plot_unit.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19744)
+++ /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19745)
@@ -20,7 +20,4 @@
 	//}}}
 
-	//load the shaders: 
-	loadShaders(gl);
-	
 	//Initialize the buffer structure: 
 	node = Node(gl,options);
Index: /issm/trunk-jpl/src/m/plot/webgl.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19744)
+++ /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19745)
@@ -1,4 +1,3 @@
 /*This is where we have all our webgl relevant functionality for the plotting routines: */
-var shaders = {};
 //{{{ GL Initialization
 function initWebGL(canvas,options) { //{{{
@@ -27,4 +26,7 @@
 	gl.enableVertexAttribArray(0);
 	gl.enableVertexAttribArray(1);
+
+	// Load shaders and store them in gl object
+	gl.shaders = loadShaders(gl);
 
 	// Add context state variables
@@ -68,5 +70,5 @@
 
 	node= {buffers:[],
-		shader:shaders["colored"]["program"],
+		shader:gl.shaders["colored"]["program"],
 		draw:null,
 		hideOcean:false,
@@ -128,24 +130,31 @@
 //{{{ Shader Loading
 function loadShaders(gl) { //{{{
-	var shader_name_array = ["colored"];
-	//var shaders = {};
-	for (var i = 0; i < shader_name_array.length; i++) {
-		loadShader(gl,shader_name_array[i]);
-	}
-	//return shaders; 
-} //}}}
-function loadShader(gl,shaderName) { //{{{
-	//var shader = {loaded:false, vsh:{}, fsh:{}};
+	// TODO: Subsitute shaders["colored"] with shaderColored
+	shaderName = "colored";
+	shaders = {};
 	shaders[shaderName] = {loaded:false, vsh:{}, fsh:{}};
-	$.ajax({
-		url: "webgl/shaders/" + shaderName + ".vsh",
-		async: false,
-		dataType: "script"
-	});
-	$.ajax({
-		url: "webgl/shaders/" + shaderName + ".fsh",
-		async: false,
-		dataType: "script"
-	});
+	shaders["colored"]["vsh"]["string"] = `
+		attribute vec3 aVertexPosition;
+		attribute vec4 aVertexColor;
+
+		uniform mat4 uMVPMatrix;
+		uniform float uAlpha;
+
+		varying vec4 vColor;
+
+		void main(void) {
+			gl_Position = uMVPMatrix * vec4(aVertexPosition.xyz, 1.0);
+			vColor = vec4(aVertexColor.xyz, uAlpha);
+		}
+	`;
+	shaders["colored"]["fsh"]["string"] = `
+		precision mediump float;
+
+		varying vec4 vColor;
+
+		void main(void) {
+			gl_FragColor = vColor;
+		}
+	`;
 
 	shaders[shaderName]["vsh"]["shader"] = getShaderByString(gl, shaders[shaderName]["vsh"]["string"], "vsh");
@@ -190,5 +199,5 @@
 	}
 	shaders[shaderName]["loaded"] = true;
-	//return shader;
+	return shaders;
 } //}}}
 function getShaderByString(gl,str,type) { //{{{
@@ -213,8 +222,4 @@
 
 	return shader;
-} //}}}
-function functionToString(functionVariable) { //{{{
-	//Workaround for loading text files - store as multiline comment in function, then strip string from function once loaded
-	return functionVariable.toString().replace(/^[^\/]+\/\*!?/, '').replace(/\*\/[^\/]+$/, '');
 } //}}}
 function nameFromLine(line) { //{{{
