$(document).ready(function(){

		// check the spelling on a textarea
		$("#check-textarea").click(function(e){
			e.preventDefault();
			$(".loading").show();

			$("#text-content")
			.spellchecker({
				lang: "de",
				engine: "google",
				suggestBoxPosition: "above"
			})
			.spellchecker("check", function(result){

				// spell checker has finished checking words
				$(".loading").hide();

				// if result is true then there are no badly spelt words
				if (result) {
					alert('There are no incorrectly spelt words.');
				}
			});
		});

		// you can ignore this; if document is viewed via subversion in google code then re-direct to demo page
		if (/jquery-spellchecker\.googlecode\.com/.test(window.location.hostname) && /svn/.test(window.location)) {
			window.location = 'http://spellchecker.jquery.badsyntax.co.uk/';
		}



// spam-check
$('.javascript-warning').remove();
$.get("/dib1/token.jsp",function(txt){
  $(".secure").append('<input type="hidden" name="ts" value="'+txt+'" />');
});
});



