$(document).ready(function(){



$('a[href$="rueckruf-anfordern"]').click(function(){
  $(this).parents('div.box').attr('id', 'callback');
  $(this).hide();
  $(this).before("<i>Bitte warten...</i><br /><br />");
  
  $(this).parent().parent().load( $(this).attr('href') + " #contactForm", function(){
    $("#contactForm").prepend("Bitte füllen Sie das Formular aus. Wir rufen umgehend zurück.<br/><br/>");
    $("#contactForm input[type!='reset'], #contactForm select").before("<br />");
    window.location.href = window.location.href + "#callback";
  });
  return false;

});


if( window.location.href.indexOf('section=contact&cmd=13') != -1 ) {
  checkAllFields();

  $('input[type="reset"]').click(function(){
    $('input').each(function(){
      if( !$(this).hasClass('contactFormClass_button') ) {
        $(this).val('');
        $(this).css('border', '1px solid #7F9DB9');
      }
    });

    $('select').each(function(){
        $(this).find('option').eq(0).attr('selected', 'selected');
    });

    return false;
  });

}





});
