		$(document).ready(function(){
			$(".lightboxform").fancybox({
				'scrolling'		: 'no',
				'titleShow'		: false,
			    'onClosed'		: function() {
				    $("#form-error").hide();
				}
			});
			$(".lightboxform2").fancybox({
				'scrolling'		: 'no',
				'titleShow'		: false,
			    'onClosed'		: function() {
				    $("#form-error2").hide();
				}
			});

			$("#bestell-form").bind("submit", function() {
				if ($("#vorname").val().length<1 || $("#nachname").val().length < 1 || $("#strasse").val().length < 1 || $("#plz").val().length < 1 || $("#stadt").val().length < 1 || $("#email").val().length < 1) {
				    $("#form-error").show();
				    $.fancybox.resize();
				    return false;
				}

				$.fancybox.showActivity();

				$.ajax({
					type		: "POST",
					cache	: false,
					url		: "/formulare/mail-bestellen.php",
					data		: $(this).serializeArray(),
					success: function(data) {
						$.fancybox(data);
					}
				});

				return false;
			});

			$("#bestell-form_en").bind("submit", function() {
				if ($("#vorname").val().length < 1 || $("#nachname").val().length < 1 || $("#strasse").val().length < 1 || $("#plz").val().length < 1 || $("#stadt").val().length < 1 || $("#email").val().length < 1) {
				    $("#form-error").show();
				    $.fancybox.resize();
				    return false;
				}

				$.fancybox.showActivity();

				$.ajax({
					type		: "POST",
					cache	: false,
					url		: "/formulare/mail-bestellen.php",
					data		: $(this).serializeArray(),
					success: function(data) {
						$.fancybox(data);
					}
				});

				return false;
			});

			$("#empfehlen-form").bind("submit", function() {
				if ($("#empfaenger").val().length < 1 || $("#absender").val().length < 1) {
				    $("#form-error-senden").show();
				    $.fancybox.resize();
				    return false;
				}

				$.fancybox.showActivity();

				$.ajax({
					type		: "POST",
					cache	: false,
					url		: "/formulare/mail-empfehlen.php",
					data		: $(this).serializeArray(),
					success: function(data) {
						$.fancybox(data);
					}
				});

				return false;
			});

		});
		$('.rounded').corner('8px');
		$('.top-rounded').corner('top 8px');
