// JavaScript Document
$(document).ready(function(){
$("#send").removeAttr("disabled"); 						   
$("#Home").show();
$("#menu a").click(function () {
	var nume = $(this).text();					 
	$("#menu a").each(function () {
		var tab = $(this).text();					 
		$(this).removeClass("active");
		$("#"+tab).hide();
  	});
	$(this).addClass("active");
	$("#"+nume).show();
});
});
function show() {
	if (typeof(xhr) != "undefined") xhr.abort();
	var id = $('#yid').val();
	if (id == "") {
		$("#results").html("<div style=\"padding-top:37px;\">Please enter Y! ID</div>");
		return false;
	}
	$("#results").html("<div style=\"padding-top:37px;\"><img src=\"images/aloader.gif\" /></div>");
	$('#results').slideDown('normal');
	xhr = $.ajax({
	  url: "status.php",
	  data: "yahooid="+id,
	  cache: false,
	  success: function(html){
		$("#results").html(html);
		$('#yid').val("");
      },
	  error: function(html) {
		$("#results").html("<div style=\"padding-top:37px;\">There was a problem with the request</div>"); 
	  }
	});
}
function sendmail() {
	$.ajax({
   		type: "POST",
	    url: "send.php",
	    data: $("#contact").serialize(),
	    success: function(msg){
	       $("#sendstatus").html(msg);
		   if (msg == 'Message sent!') {
			   $("#send").attr("disabled", "true"); 
		   }
	   }
 	});
}