$(document).ready(function() {
	$("a.resource, a[href^='http://'], a[href^='https://'], a[href$='.pdf'], a[href$='.doc']")
		.attr('target', '_blank');
	$("#search input")
		.addClass('prompt')
		.val('search')
		.focus(function(){
			$("#search input.prompt")
				.val('')
				.removeClass('prompt')
		});

	$("#right h2:gt(0)").css('margin-top', 25);

	$(".lined").each(function(){
		$(this).children().slice(1).addClass('line_on_top');
	});
	$(".subpage #content object")
		.attr('height', '324')
		.attr('width', '400');
	$(".subpage #content embed")
		.attr('height', '324')
		.attr('width', '400');

	$(".gallery a").click(function() {
		var imageviewer = window.open('imageviewer', 'image', 'width=520,height=600,resizable=yes,location=no,toolbar=no');
		imageviewer.document.open();
		imageviewer.document.write('<html><head><title>Photo</title></head><body style="font-family:arial">');

		var desc = $(this).children('img').attr('alt');
		imageviewer.document.write('<img src="'+($(this).attr('href'))+'" alt="'+(desc.replace('"','\"'))+'" />');
		imageviewer.document.write('<p>'+desc+'</p>');
		imageviewer.document.write('</body></html>');
		imageviewer.document.close();
		imageviewer.focus();
		return false;
	});

	$(".bio a").click(function() {
		$(this).parent().children('div').toggle();
		return false;
	});
});
function displayBoardLogin() {
	$("#board_login").slideDown(130, function() {
		$("#board_login_user_id").focus();
	});

	$("#board_login_cancel").click(function(){
		$("#board_login").hide();
	});
}
