$(document).ready(function() { 
	/* This is basic - uses default settings */
	
	$("a[rel^='fancybox']").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',
		'overlayColor'     : '#000'});

	/* Using custom settings */ 
	
	$("a#inline").fancybox({ 'hideOnContentClick': false }); 
	
	$("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false }); 
}); 

$(document).ready(function() { 
	
	//Do what we need to when form is submitted.	
	$('#form_submit').click(function(){
	
	//Setup any needed variables.
	var input_email = $('#form_email').val(),
		response_text = $('#response');
		//Hide any previous response text 
		response_text.hide();
		
		//Change response text to 'loading...'
		response_text.html('Loading...').show();
		
		//Make AJAX request 
		$.post('http://www.carlbowser.com/assets/php/contact-send.php', {email: input_email}, function(data){
			response_text.html(data);
		});
		
		//Cancel default action
		return false;
	});

});
