$(document).ready(function() {

	//AUTO LOGIN
	$("a.sharestory").click(function() {
		$("#signin form").submit();
		return false;
		window.location = 'http://www.nuclearscienceweek.org/tell-us-how-you-participated/share/';
	}); 

	//OPEN PDFS IN NEW WINDOW
	$("a[href$='.pdf']").attr('target','_blank');

	// VALIDATE FORMS
	$("#contact_form").validate();
	$("#entryform").validate();
	$("#comment_form").validate();

	// TOOL TIP
	$('#calendar td').tipsy({
		gravity: 's'
	});

	// BACKGROUND DIV HEIGHT
	$("#background").height("auto");
	var c = $('#container').height();
	var h = $('#header').height();
	$("#background").height(c - h - 10);

	// LEFT NAV
	$('#left-nav').accordion({
		active: false,
		alwaysOpen: false,
		header: '.head',
		autoheight: false,
		navigation: true,
		event: 'click',
		animated: 'slide'
	});

});

