function simplevalidate() {

  ar = $('#anrede').val();
  tt = $('#titel').val();       
  vn = $('#vorname').val(); 
  nn = $('#name').val();
  ss = $('#strasse').val(); 
  hn = $('#hausnummer').val();
  pl = $('#plz').val(); 
  or = $('#ort').val(); 
  gb = $('#geburtsdatum').val(); 
  fs = $('#familienstand').val(); 
  em = $('#email').val(); 
  at = em.indexOf("@");
  mt = $('#mobiltelefon').val(); 
  tf = $('#telefonfax').val(); 
  sn = $('#steuernr').val(); 
  bh = $('#behoerde').val();
  br = $('#beruf').val(); 
  se = $('#selbststaendig').val();
    
  if (ar.length <= 0) {
    alert('Bitte geben Sie Ihre Anrede ein!');
    return false;
  }

  else if (vn.length <= 0) {
    alert('Bitte geben Sie Ihren Vornamen ein!');
    return false;
  }

  else if (nn.length <= 0) {
    alert('Bitte geben Sie Ihren Nachnamen ein!');
    return false;
  }
				 
  else if (em <= 0 || em.substring(at).indexOf(".") < 4) {
    alert('Bitte geben Sie eine gueltige Emailadresse an!');
    return false;
  }
	
  $("#").load( ajaxSendAnfrage, {
	
    'email[anrede]' : ar,
    'email[titel]' : tt,
    'email[vorname]' : vn,
    'email[name]' : nn,
    'email[strasse]' : ss,
    'email[hausnummer]' : hn,
    'email[plz]' : pl,
    'email[ort]' : or,
    'email[geburtstag]' : gb,
    'email[familienstand]' : fs,
    'email[email]' : em,
    'email[firma]' : at,
    'email[mobiltelefon]' : mt,
    'email[telefonfax]' : tf,
    'email[steuernummer]' : sn,
    'email[behoerde]' : bh,
    'email[beruf]' : br,
    'email[selbststaendig]' : se

  });		
    alert('Vielen Dank!');	
}

function whenreset()
{
if(confirm('Ihre Daten gehen verloren, weiter?')){
//if click OK, reset the form, otherwise do nothing
document.forms[0].reset();
} 
} 

function clearSearchForm() {
  if ( $('#log_input').attr('value') == 'Kunden Log-In' ) {
    $('#log_input').val('') ;
  }
   $("#log_input").addClass('active');
}

function UnClearSearchForm() { 
  if ( $('#log_input').attr('value') === null ) {
    $('#log_input').val('Kunden Log-In') ;
  }
   $("#log_input").removeClass('active');
}



jQuery().ready(function(){

  //remove titles from images
  $('img').each(function(){
     $(this).attr('title' , '');
  })
  
  //disable empty links
  $('a[href=""]').each(function(){
     $(this).addClass('aDisable').click(function(){
       return false;
     });
  })


  if($.browser.msie){
     $('body').addClass('IE');

     $('a, .ui-accordion-header span,.ui-accordion-header a').click(function(){
        $(this).blur();      //remove focus outlines IE
     })

     //$('div.content ul.newsticker li.sIFR-replaced object').remove();
     
  }

  if( !$.browser.msie && !$.browser.webkit ){
   sIFR.replace(fagoot, {
   selector: 'ul.newsticker li',
   wmode: 'transparent',
   css: {
   '.sIFR-root': { 'color': '#000077' },
   'a': { 'text-decoration': 'none', 'color':'#000077' },
   'a:link': { 'text-decoration': 'none', 'color':'#000077' },
   'a:hover': { 'text-decoration': 'underline', 'color':'#000077' },
   'a:visited': { 'text-decoration': 'none', 'color':'#000077' },
   'a:active': { 'text-decoration': 'none', 'color':'#000077' }
   }
   , tuneHeight: -1
   , offsetTop: -1
  
   });
}

   if( $.browser.webkit ){
     $('ul.newsticker').css('margin-top','1px');
   }

$('div.tabs').css({'display':'block'});

 // initalize navi

//accordion fx 
$.ui.accordion.animations.smoothSlow = function(options) {
	this.slide(options, {
		duration: 460,
                easing: 'jswing'
	});


 };

 $('div#nav_containerXXX').accordion({
	 active: true,
	 header: 'a.nav_main_1',
	 selectedClass: 'nav_current',
	 alwaysOpen: true,
	 autoHeight: false,         
	 navigation: true,
         animated: 'smoothSlow'
         
 });


 $('div.nav_level_1 a').click(function() {
 $('div#navigation div:first').removeClass('nav_current');
 });


//Newsticker
$(".newsticker").newsticker();

 
//Collapser animation
$.ui.accordion.animations.smoothCollapse = function(options) {
	this.slide(options, {
		duration: 460,
                easing: 'jswing'
	});
 };


 // applying the settings - collapser
if ($('#collapser').length > 0) {
    
	 $('#collapser').accordion({
	 active: 'h5.selected',
	 header: 'h5.arialHead2',
         
	 alwaysOpen: false,
	 autoHeight: false,
         fillSpace: false,
         //clearStyle: true,
         animated: 'smoothCollapse'
        
});
}


//Analytics stuff 

$('a[href$=".pdf"]').click(function(){
   var UrlTracked = $(this).attr('href');
   pageTracker._trackPageview(UrlTracked);
})

});



