/* ------------------------------------------------------------
 * PROJECT        : 
 * FILENAME       : jqload.js
 * ------------------------------------------------------------
 * LAST UPDATED   : 10 Jan 2010
 * ------------------------------------------------------------
 * AUTHOR(S)      : Kevin Scholl (ksscholl@fhsc.com)
 * ------------------------------------------------------------
 * NOTE(S)        : 
 * ------------------------------------------------------------ */

$(document).ready(function(){
 
	// adjust margin(s)
  $(""
		+ "div:last-child,"
		+ "fieldset:last-child,"
		+ "form:last-child,"
		+ "img:last-child,"
		+ "li:last-child,"
		+ "ol:last-child,"
		+ "p:last-child,"
		+ "table:last-child,"
		+ "ul:last-child,"
		+ "").css("margin-bottom","0");
	
	$("div.withBorder").parent().find("div.withBorder:first").css("margin-top","10px");
	$("div.withBorder").parent().find("div.withBorder:last").css("margin-bottom","10px");

	// rounded corners
	$(".errorMsg, .systemMsg, .warningMsg").corner("8px");
	$("div#nav ul li a")                   .corner("5px");
	$(".calloutGreen, .calloutOrange")     .corner("8px");

	// global message icons
	$(".errorMsg, .systemMsg, .warningMsg").css("padding","4px 10px 4px 28px").prepend("<span class=\"msgIcon\"></span>");

	// dropdown navigation
	$("div#nav ul li").hover(
		function () {
			$(this).find(" > ul").fadeIn(500).css("display","block");
			}, 
		function () {
			$(this).find(" > ul").fadeOut(250);
			}
		);
	$("div#nav ul li:has(ul) > a").click(
		function () {
			return false;
			}
		);
	
	$("a[rel=enlargement]").click(function() {
    viewPhoto($(this).attr("href"),"Enlargement",640,480);
		return false;
		});
  });

