$(document).ready(function(){
	if ($('#rules').is('*')) {$("#makeOrder").submit(function(event){
		 if( $('#rules').is(":checked") != true){ alert("Musisz zaakceptowac regulamin"); return false;}	
		});}		 if (!$('#invoice-1').is(":checked")) $('#invoiceForm').hide();	 if (!$('#invoiceForm2 input[value!=""]').length > 0) 	 $('#invoiceForm2').hide();		 $('input[@name=invoice]').change(function(){		if (this.value == 1) $('#invoiceForm').show(250);		else $('#invoiceForm').hide(250);	});		$('#showInvoiceForm').click(function(e){		if ($('#invoiceForm2').is(':visible')) $('#invoiceForm2').hide(250);		else $('#invoiceForm2').show(250);		e.preventDefault();	});		
});
