jQuery(document).ready(function(){
	jQuery("img").ifixpng();
	jQuery('a[rel*=facebox]').facebox()
	jQuery("#submitConsultation").live('click', function(){ submitConsultation(); });
	jQuery("#closeFacebox").live('click', function (){ jQuery(document).trigger('close.facebox'); });
});
function submitConsultation()
{
	jQuery.post('http://www.greenshieldwindows.com/consultation/', {
		'consultation': 'true',
		'firstname': jQuery("#firstname").val(),
		'lastname': jQuery("#lastname").val(),
		'email': jQuery("#email").val(),
		'phone': jQuery("#phone").val(),
		'address': jQuery("#address").val(),
		'postal': jQuery("#postal").val()
	}, function(data){
		if(data == true)
			jQuery("#consultationForm").html('<h1>Free Consultation</h1><p>Thank you! One of our staff will be in touch with you shortly!</p><a id="closeFacebox">Close this Window</a>');
		else
			alert(data);
	});
}