$(function() {
	$('input.autofill').focus(function() {
		title = $(this).attr('title');
		val = $(this).val();
		if (val == title) {
			$(this).val('');
		}
	});
	$('input.autofill').blur(function() {
		title = $(this).attr('title');
		val = $(this).val();
		if (!val) {
			$(this).val(title);
		}
	});
	$('input.autofill').each(function() {
		title = $(this).attr('title');
		val = $(this).val();
		if (!val) {
			$(this).val(title);
		}
	});
});

$(function() {
	$('div.homepage_sub_panel').each(function() {
		$(this).css('cursor','pointer');
		$(this).click(function() {
			var href = $(this).find('a').attr('href');
			document.location = href;
		});
	});
});

$(function(){
	$(".with-tooltip").simpletooltip();
});

$(function(){
	$("a[rel=large]").click(function() {
		return confirm("This document is quite large, and on slower connections may take a few minutes to download. Please click OK to proceed.");
	});
});
