// JavaScript Document

/*
$(document).ready(function() {
	$(".hide").show().find("a").toggle(
			function() {
				$(this).html("Collapse all definitions.");
				$("dd").slideDown("normal");
			},
			function() {
				$(this).html("Expand all definitions.");
				$("dd").slideUp("normal");
			}
		);
	$("div#right dt").each(function() { // find specific elements

		$(this).append(" <span class=\"expandSpan\">[+]</span>") 
			.hover( // add a hover class
				function() { $(this).toggleClass("dthover") },
				function() { $(this).toggleClass("dthover") }
			)
			.toggle( // toggle the click action of the div
				// Open It
				function () { 
					// swap the class and change the HTML
					$(this).find("span.expandSpan").html("[-]"); 
					// select the div and animate it open
					$(this).next("dd").slideDown("normal"); 
				},
				// Close It
				function () { 
					// swap the class and change the html
					$(this).find("span.expandSpan").html("[+]"); 
					// select the div and animate it closed
					$(this).next("dd").slideUp("normal"); 
				}
			);
		$(this).next("dd").css("display", "none");
	  });
	
});

*/

$(document).ready(function() {
	
	$("div#right dt").each(function() {
		ht = $(this).next("dd").height();
		$(this).height(ht);
	});
	

	var bgcolor;
	var pcolor;
	var btn;
	$("#contact_form .text").focus(function() {
		bgcolor = $(this).css("background-color");
		pcolor = $(this).parent().css("background-color");
		$(this).css({
			backgroundColor:"#e9edf3"
		}).parent().css({
			backgroundColor:"#d9dde2"
		});
	});
	$("#contact_form .text").blur(function () {
		$(this).css({
			backgroundColor:bgcolor
		}).parent().css({
			backgroundColor:pcolor
		});
	});
	$("#contact_form .button").hover(function()
	{
		btn = $(this).attr("src");
		$(this).attr({ src: btn.replace(".gif", "_roll.gif") });
	}, function()
	{
		$(this).attr({ src: btn });
	});


	$("p#mainImg").pngFix();

});