﻿function setPage() {

	$(document).ready(function() {

		$('#headNavBar td').click(function() {
			var pg = $(this).find('a')[0].click();
		});

		$('#headNavBar td.headNavLnk').mouseover(function() {
			var dropMenu = $(this).children('table.headDropMenu');
			if (dropMenu[0] != undefined) {
				dropMenu.show();
				dropMenu.css('top', ($(this).offset().top + 30));
				dropMenu.css('left', $(this).offset().left);
			}
		});

		$('#headNavBar td.headNavLnk').mouseout(function() {
			var dropMenu = $(this).children('table.headDropMenu');
			if (dropMenu[0] != undefined) {
				dropMenu.hide();
			}
		});

		// set stpg variable to anything on pages where you want to run additional scripts on page loads
		// using stpg is useful for async postbacks
		if (stpg !== undefined) {
			setPageLoad();
		}
	});

}
