function tabsSimpleSavings() {
	$('.a_simple').addClass("selected");
	
	$('.a_simple').click(function() {
			$('.simple_saving .tabs a').removeClass('selected');
			$(this).addClass('selected');
			$('.simple').css("display", "block");
			$('.savings').css("display", "none");
		
		return false;
	});
	
	$('.a_savings').click(function() {
			$('.simple_saving .tabs a').removeClass('selected');
			$(this).addClass('selected');
			$('.savings').css("display", "block");
			$('.simple').css("display", "none");
		
		return false;
	});
	
}

function validateServiceForm() {
	if(document.getElementById("service_form") != null) {
		$("#service_form").validate({
		rules: {
				email: "required",
				conf_email: {
					equalTo: "#email"
				}
			}
		});
	}
	
	if(document.getElementById("contact_form") != null) {
		$('#contact_form').validate();
	}
	
	if(document.getElementById("registration_form") != null) {
		$('#registration_form').validate({
			rules: {
				email: "required",
				Confirm_Email: {
					equalTo: "#email"
				}
			}
		});
	}
}


$(document).ready(function(){
	validateServiceForm();
	tabsSimpleSavings();
});

