jQuery.fn.toggleDefault = function(text) {
	$(this).focus( function() {
		if ( $(this).val() == text ) {
			$(this).val("");
		}
	});
	$(this).blur( function() {
		if ( $(this).val() == "" ) {
			$(this).val(text);
		}
	});
};

jQuery.fn.alternateColor = function(sChildren,sColor1, sColor2) {
	$(this).children(sChildren+":even").css("background-color",sColor1);
	$(this).children(sChildren+":odd").css("background-color",sColor2);
};

jQuery.fn.submitOnKey = function(nKeyCode, sFormID) {
	$(this).keypress( function(e) {
		var key = e.which ? e.which : e.keyCode;
	    if (key == nKeyCode) {
			$("#"+sFormID).trigger("submit");
			e.preventDefault();
			e.cancelBubble = false;
		}
	});
};

$(function() {
	$("form#form_login").submitOnKey(13, 'form_login');
	
	$("div.knop").click( function() {
		$(this).parents("form").trigger("submit");
	});
});
