// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){
Cufon.replace('.logo', {
	hover: true
});
	// your functions go here
$('#contact_form').submit(function() {
		var cont_name = $('input#cont_name').val();
		var email = $('input#email').val()
		var comment = $('textarea#comment').val();
		var dataString = 'cont_name=' + cont_name + '&email=' + email + '&comment=' + comment;
		$.ajax({
			type:"POST",
			url:"php/send_mail.php",
			data:dataString,
			dataType:'text',
			success:function(data){
				data = data.replace(/(^\s*|\s*$)/, "");
				if(data == 'yes'){
					$('#contact').html('<p>Thanks for contacting us.<br />If you\'ve requested to be contacted we\'ll make sure we do so soon.</p>');
				}
			},
			error:function(){
				$('#contact').html('<p>Something seems to have gone wrong! we\'ll look into that.');
			}
		});
		return false;
	});
});


/* optional triggers

$(window).load(function() {
	
});

$(window).resize(function() {
	
});

*/

