$(document).ready(function() {
	jQuery.preloadImages = function(){
	  for(var i = 0; i<arguments.length; i++)
	  {
		jQuery("<img>").attr("src", arguments[i]);
	  }
	}

	$("a.resource, a[href^='http://'], a[href^='https://'], a[href$='.pdf'], a[href$='.doc']")
		.not("a[href^='http://mpie.org']")
		.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');
	});

	$("ul.faq li h2").click(function() {
		$(this).parent().children('div').toggle();
		return false;
	});

	$("#member_login :input:first").focus();

	$(".sidebar:last").css('border-bottom', 'none');

	$(".vcard:gt("+($(".vcard").length - ($(".vcard").length % 3) - 1)+")").css('border-bottom', 'none');

	$('.copyright').click(function(){
		return confirm("This document is copyrighted and may not be reproduced or shared without the written permission of MPIE.");
	});
});
function displayBoardLogin() {
	$("#board_login").slideDown(130, function() {
		$("#board_login_user_id").focus();
	});

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

