// JavaScript Document
jQuery(document).ready(function() { 

	jQuery('#tgl_reseller').toggle(
	function() {
			jQuery("#new_reseller").css({ "display":"block" })
	},
	function() {
			jQuery("#new_reseller").css({ "display":"none" })
	});

	/* move this to a better location */
	jQuery('.fg-button').hover(
			function(){ 
				jQuery(this).addClass("ui-state-hover"); 
			},
			function(){ 
				jQuery(this).removeClass("ui-state-hover"); 
			}
		);
	
	
	jQuery('#changeToCustomerEditForm').click(function(){
			// swap content from container			
			form = jQuery('#ajaxCustomerForm').html();
			jQuery('#customerInformation').html(form);
			return false;
		});
		
	/* END */

	jQuery('#checkoutFormIDEAL').validate({
		rules: {
			issuerList: {
				required: true
			}
		},
		messages: {
			issuerList: {
				required: "Kiest eerst uw bank"
			}
		}	
		
	});
	
	jQuery('#doLogin').validate({
		rules: {
			email: {
				required: true,
				email: true },
			password: "required"
		},
		messages: {
			email: "<span class='red'>* Controleer</span>",
			password: "<span class='red'>* Controleer</span>"
		}
	});
				
	
	jQuery('#registerForm').validate({
		rules: {
			salutation: "required",
			firstName: "required",
			lastName: "required",
			email: {
				required: true,
				email: true
			},
			password: {
				required: true,
				minlength: 5
			},
			password_confirm: {
				required: true,
				minlength: 5,
				equalTo: "#password"
			},
			billingstreet: "required",
			billingzipcode: {
				required: true,
				minlength: 6
			},
			billingcity: "required"			
		},
		messages: {
			salutation: "Maak uw keuze",
			firstName: "Uw voornaam of voorletters",
			lastName: "Uw achternaam",
			email: "Uw email adres",
			password: {
				required: "Kies een wachtwoord",
				minlength: "De minimale lengte is {0} karakters"
			},
			password_confirm: {
				required: "Herhaal het wachtwoord",
				minlength: "De minimale lengte is {0} karakters",
				equalTo: "De wachtwoorden komen niet overeen"
			},
			billingstreet: "Voer uw Straatnaam in",
			billingzipcode: "Voer uw Postcode in",
			billingcity: "Voer uw Stadsnaam in"
		}		
	});



});
