//This version uses show() and hide() instead of visibility
var score = 0;
$(document).ready(function(){
$('#Trophybutton').click(function() {
ClaimTrophy(this.form);
});
});
function trim(str) {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
function checkAnswers(form) {
score = 0;
var AnswerRight = false;
if (score < ) {
$('#Checkbuttontext').val('Check again');
}
if (score >= ) {
$('#Trophybutton').show();
$('#Trophybutton').val('Claim Your Trophy for ' + score + ' out of ');
}
if(score==) {
$('#Checkbutton').hide();
}
}
function ClaimTrophy(form) {
form.Other_Text.value = score + ' out of ';
form.submit();
}
function ShowDescription() {
$('#GreyOut').show();
$('#DescriptionBox').show();
}
function HideDescription() {
$('#GreyOut').hide();
$('#DescriptionBox').hide();
}
function ShowHelp() {
$('#GreyOut').show();
$('#HelpBox').show();
}
function HideHelp() {
$('#GreyOut').hide();
$('#HelpBox').hide();
}
function RemoveSpaces(){
var StudentsText;
for (var z=1; z<=; z++ ){
StudentsText = $('input[name=Guess'+z+']').val().split(' ').join('');
StudentsText = StudentsText.replace(//g,'');
$('input[name=Guess'+z+']').val(StudentsText);
}
}