$(document).ready(function() {
	$("#localstore").autocomplete(shops, {
		matchContains: true,
		minChars: 2,
		max: 100,
		width: 244,
		formatItem: function(row, i, max) { return row.shop + " " + row.street + ", " + row.city; },
		formatMatch: function(row, i, max) { return row.shop + " " + row.street + " " + " " + row.city + " " + row.zipcode + " " + row.aka  
+ " "; },
		formatResult: function(row) { return row.shop + " " + row.street + ", " + row.city; }
	});
		
	$("input[name='card_type']").click(function() {
		if ($(this).val() == 'bonus') {
			$("li.bonuscard").show("fast");
		} else {
			$("li.bonuscard").hide();
		}
	});
	if ($("#bonus:checked").val() == null) {
		$("li.bonuscard").hide();
	}
	
	$(".js-required").show();
});

