function f(){

}

function aivao_sendform(){
	$('form').ajaxSubmit({ 
		dataType:  'json', 
		success:   function (data) {
			
			//alert(data['empty']);
			if(data['grant'] == 0){
				var html = '';
				if(data['error'] == 1){
					html = 'Bitte füllen Sie die hervorgehobenen Felder aus.';
					$.each(data['empty'], function(i, v) { 
						//alert(v);
					  $('input[name='+v+']').addClass('highlight');
					  
					});
				}
				else if(data['mailerror'] == 1){
					html = 'Bitte geben Sie eine korrekte E-mail-Adresse an.';
					$('input[name='+data['empty'][0]+']').addClass('highlight');
				}
				alert(html);
			}
			else{
				$('.text').html('<p><b>Vielen Dank für Ihre Nachricht.<br /><br />Wir werden uns so bald wie möglich bei Ihnen melden.</b></p>');
			}
			
		}
	}); 
}

$(function() {
	$('a').live('click', function(e){
		var href = $.trim($(this).attr('href'));
		if(href == '#'){
			e.preventDefault();
		}
	});

	$("#navi > ul > li > ul.anim").slideDown(600);
	/*
	$("p").sifr({
		build: 436,
    	version: 3,
		font:"sifr_corporate_lightbold",
		path:"/hanbuch/cms/js/jquery/sifr/",
		debug: true
	});
	*/
	$(".news .showall").click(
		function () {	
			if($(this).is(".showall_open")){
				$(this).removeClass("showall_open");
				$(this).html("mehr");
				$(this).parent().find(".news_content").removeClass("news_open");
			}
			else{
				$(this).addClass("showall_open");
				$(this).html("weniger");
				$(this).parent().find(".news_content").addClass("news_open");
			}
		}
	);
	
});

