$(document).ready(function(){
	$("#doodle").Watermark(i18n_search, "#000");
	$("#authusername").Watermark(i18n_username, "#000");
	$("#authpassword").Watermark(i18n_password, "#000");

	
	if($("#authusername").length > 0){
		$("#authusername").keypress(function(e){
			if(e.which == 13) $("#loginForm").submit();		
		});
		
		$("#authpassword").keypress(function(e){
			if(e.which == 13) $("#loginForm").submit();		
		});
		
		$("#buttonLogin").click(function(){
			$("#loginForm").submit();
		});
	}

	$("#doodle").keypress(function(e){
		if(e.which == 13) $("#doodleForm").submit();
	});
	
	$("#doodleHolder").click(function(){
		$("#doodle").focus();
	});
	
	$("#doodleButton > a").click(function(){
		$("#doodleForm").submit();
	});
});

function doMail(str){
	document.location="mailto:" + Base64.decode(str);
}
