/* GENERAL FUNCTIONS
-----------------------------------------------------*/
function animateMenu() {
	$('#menu li').find('span').css({ cursor:'pointer' }).each(function() { if(!$(this).parent().hasClass('selected')) $(this).parent().find('ul').hide(); }).click(function() {
		var c = $(this).parent().find('ul');
		if(c) {	$('#menu li ul').not(c).slideUp(400); c.slideDown(400); return false; }
	});
}

function autoPopulate(id) {
	$('#'+id).each(function() {
		if ((this.value == '') && (this.title != '')) { this.value = this.title; }
		$(this).focus(function() { if (this.value == this.title) { this.value = ''; this.select(); } });
		$(this).blur(function() { if (!this.value.length) { this.value = this.title; } });
	});
}

$(document).ready(function() {
	//if($('#body').height()<610) $('#body').css({ height:610, borderBottom:'none' }); else $('#body').css({ height:$('#body').height(), borderBottom:'none' });
	$("tbody tr").filter("tr:odd").addClass("odd").end().filter("tr:even").addClass("even"); 				// TABLE STRIPING	
	$("a[@href^='https://'],a[@href^='http://'],a[@href$='.doc'],a[@href$='.pdf'],a[@href$='.jpg']").attr("target", "_blank");	// EXTERNAL LINKS IN NEW WINDOW
	//animateMenu();
});