﻿$(document).ready(function() {
	$(".username:first").focus(function() {
		if ($(this).val() == "Enter your username") {
			$(this).val("");
		}
	});
	$(".username:first").blur(function() {
		if ($(this).val() == "") {
			$(this).val("Enter your username");
		}
	});
	//Add functionality for flight type headers
	/*
	$("#flightTable h2").each(function() {
		$(this).css("cursor", "pointer");
		$(this).attr("class", "flightInfoCollapsed");
		$(this).mouseover(function() {
			$(this).css("background-color", "#EEEEEE");
		});
		$(this).mouseout(function() {
			$(this).css("background-color", "transparent");
		});
		$(this).click(function() {
			$(this).next().slideToggle("fast");
			if ($(this).hasClass("flightInfoExpanded")) {
				$(this).removeClass("flightInfoExpanded")
			}
			else {
				$(this).addClass("flightInfoExpanded");
			}
		});
	}).next().hide();
	//Add functionality for show and hide buttons
	$("#btnShowAll").click(function() {
		$("#flightTable h2").each(function() {
			$(this).next().slideDown("fast");
			$(this).addClass("flightInfoExpanded");
		});
	});
	$("#btnHideAll").click(function() {
		$("#flightTable h2").each(function() {
			$(this).next().slideUp("fast");
			$(this).removeClass("flightInfoExpanded");
		});
	});
	*/
});

function openTravelPrefsPDF(OrientationID) {
	window.open("/pdfgen/Travel/" + OrientationID + ".pdf", "PDFWindow");
}

function openMealRoommatePrefsPDF(OrientationID) {
	window.open("/pdfgen/prefs/" + OrientationID + ".pdf", "PDFWindow");
}

function openScholarGroupsPrefsPDF(OrientationID) {
	window.open("/pdfgen/grp_prefs/" + OrientationID + ".pdf", "PDFWindow");
}

function openScholarBioPhotoPDF(OrientationID) {
	window.open("/pdfgen/biophoto/" + OrientationID + ".pdf", "PDFWindow");
}