$(document).ready(function()
{	
	// form ajax form validation:
	
	// callMeForm ===================================================================
	$("#formCallMe").submit(function(){

	// 'this' refers to the current submitted form
	var str = $(this).serialize();
	
	   $.ajax({
	   type: "POST",
	   url: "../incSend/sendFormCallMe.php",
	   data: str,
	   success: function(msg){

	$("#formCallMe .formErrors").ajaxComplete(function(event, request, settings){

	if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
	{
	result = '<div class="notification_ok">Your message has been sent.<br />Thank you!</div>';
	$("#fields").hide();
	}
	else
	{
	result = msg;
	}
	
	$(this).html(result);
	
	});
	
	}
	
	});
	
	return false;
	
	});

	// END callMeForm ===================================================================
	
	
	
	// formMainContact ===================================================================
	$("#formMainContact").submit(function(){

	// 'this' refers to the current submitted form
	var str = $(this).serialize();
	
	   $.ajax({
	   type: "POST",
	   url: "../incSend/sendFormMainContact.php",
	   data: str,
	   success: function(msg){

	$("#formMainContact .formErrors").ajaxComplete(function(event, request, settings){

	if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
	{
	result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
	$("#fields").hide();
	}
	else
	{
	result = msg;
	}
	
	$(this).html(result);
	
	});
	
	}
	
	});
	
	return false;
	
	});

	// END formMainContact ===================================================================
	
	
	
	
	
	
	
	
	// make certain links light up
	var imageMouseOver = 0.85;
	var imageMouseOut = 1;

	$("#header a").hover(
	function()
	{
		$(this).css({ "opacity" : imageMouseOver });
		$(this).children("img").css({ "opacity" : imageMouseOver });
	},
	function()
	{
		$(this).css({ "opacity" : imageMouseOut });
		$(this).children("img").css({ "opacity" : imageMouseOut });
	});
	

	// call me form:
	$("a#callMeButton").fancybox();
	
});
