// JavaScript Document

$(document).ready( function() {

// MAREGOLD Formatierung
$("body").highlight("MARE", { element: 'span', className: 'maretext', caseSensitive: true });
$("body").highlight("GOLD", { element: 'span', className: 'goldtext', caseSensitive: true });
$("body #inhalt").highlight("PURE BEAUTY", { element: 'span', className: 'purebeauty', caseSensitive: true });
$("body #inhalt").highlight("PHYSIO EFFECT", { element: 'span', className: 'physioeffect', caseSensitive: true });
$("body #inhalt").highlight("MENOJA PERLEN", { element: 'span', className: 'menojaperlen', caseSensitive: true });

// Automatische Klassen-Zuweisungen für Formularelemente
$("input[type=submit]").addClass("submit");
$("form p:has('input[type=submit]')").addClass("ohnelinie submit");

$("input[type=radio]").addClass("radio");
$("form p:has('input[type=radio]')").addClass("radio");
$("form label:has('input[type=radio]')").addClass("radio");

$("#kontoshow h4").css({'display':'none'});

// Kontoinhaber automatisch ausfüllen
var auto = true;
$("input#vorname").focusout( function() {
	if(auto != false) {
		$("input#kontoinhaber").attr( 'value', $("input#vorname").val() + ' ' + $("input#nachname").val());	  
	}
});
$("input#nachname").focusout( function() {
	if(auto != false) {
		$("input#kontoinhaber").attr( 'value', $("input#vorname").val() + ' ' + $("input#nachname").val());	  
	}
});
$("input#kontoinhaber").change( function() {
	auto=false;
});
$("form#testen").submit( function() {
	if($("input#zahlungsart").val() == "rechnung") {
		$("input#kontoinhaber").val('');
	}
});

// Häufige Fragen
/*$("#fragenübersicht").hide();
$(".frage .content").hide();
$(".frage .top").hide();
$(".farge .close").show();
$(".frage h2").click( function() {
	$(this, "~ .content").show(fast);
});*/

}); // END $(document).ready()
