http://cis.jhu.edu/~shanest/project/.../dynamic4.html

I'm not sure why this is not selecting the input values and writing them anywhere. Can I use the jQuery selectors and functions in a context like this given that they've already been loaded?

HTML:
HTML Code:
<div class="right">
			<p>
			Stage 4: 0 <br />
			Stage 3: <input type="text" id="s3" size="5" /><br/>
			Stage 2: <input type="text" id="s2" size="5" /><br/>
			Stage 1: <input type="text" id="s1" size="5" /><br/>
			<button onclick="p1_calc()">Calculate</button><br />

			<button onclick="p1_check()">Is it correct?</button>
			</p>
			<p>
			Your traverse distance is: <span id="dist"></span> <br />
			Is this the correct traverse? <span id="correct"></span>
			</p>
		</div>
Javascript (jquery loaded above):
HTML Code:
	<script type="text/javascript">
	<![CDATA[
		var inputs;
		var total =  0;
		function p1_calc() {
			inputs = $(":text");
			for(var i = 0; i < 3; i++)
				total += inputs[i].val();
			$("#dist").text(total);
		}
		function p1_check() {
			var correct = $("#correct");
			if(total == 8) 
				correct.text("You got right!");
			else
				correct.text("Sorry, try again...").css("color", "red");
		}
	]]>
	</script>