// JavaScript Document

$(document).ready(function() {

  $("#email").submit(function() {
    if ($("#email_text").val().length > 0) {
      $.ajax({
   		type: "POST",
   		url: "includes/email.php?email_address="+$("#email_text").val(),
   		/*data: "email_address=" + $("#email_text").val(),*/
   		success: function(){
		$(".email").html('Thank you');
		$(".email").delay(1000).fadeOut("slow", function() {
		  $(".email").delay(4000).html('<form id="email">Please enter recipients email addres<br /><input type="text" name="email" id="email_text" /><input type="submit" value="Go" /></form>');
	 });
		
      }
    });
	return false;
    }
  });
  
  $(".awards > div > h2").click(function () {
		if($(this).parent().find(".text").is(':visible')) {
		  $(this).parent().find(".text").slideUp("slow");
		   $(this).children("span").html('&darr;');
		}else {
		  $(this).parent().find(".text").slideDown("slow");
		  $(this).children("span").html('&uarr;');
		}
  });

						   
						   
  $("a.email_link").click(function () {
	$(".email").fadeIn(100);					 
  });
  
  if (!$.support.cssFloat) {
      $("div:has(.boxheader) > table").each(function () {
              $(this).parent().width($(this).width());
      });
  }
 



});
