	function equalHeight(group) {
		var tallest = 0;
		group.each(function() {
			var thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}

	  $(document).ready(function() {
	
		$('input[type="text"]').focus(function() {
			if (this.value == this.defaultValue) {
				this.value = '';	
			}
		});
		
		$('.infoboxbuttons img[alt="more info"]').parent().append('<div class="infobuttonpopup">more info</div>');
		$('.infoboxbuttons img[alt="buy now"]').parent().append('<div class="infobuttonpopup">buy now</div>');
		
		equalHeight($(".centeredContent"));
		
	$("#submit").click(function() {
		var formName = $(this).parents("form").attr("name");
		if (formName == "login") {
			var email = $('input[type="text"]').val();
			if(!isValidEmailAddress(email)) {
				alert("You must enter a valid email address, and it must be the same one used to sign up.");
				return false;
			} else {
				password = $('input[type="password"]').val()
				if (password != '') {
					$("form").submit();
					return false;
				} else {
					alert("You must enter your password. If you have forgotten it, use the link below.");
					return false;
				}
			}
		} else {
			$("form").submit();
			return false;
		}
	});    

	});

