$(document).ready(function(){
    $("#kontakt-absenden").click(function(){
	    $("#toggle-content-kontaktdaten").addClass("toggle-open");
	});
});

$(document).ready(function(){
    $("#tabs-kontakt > ul").tabs();
});

$(document).ready(function() 
{
	$.fn.qtip.styles.mystyle = { // Last part is the name of the style
	   width: 211,
	   background: '#ffffe9',
	   color: '#424243',
	   textAlign: 'center',
	   fontSize: 11,
	   border: {
	      width: 1,
	      radius: 1,
	      color: '#e1e1e1'
	   },
	   tip: { // Now an object instead of a string
          corner: 'topMiddle', // We declare our corner within the object using the corner sub-option
          color: '#e1e1e1',
          size: {
            x: 16, // Be careful that the x and y values refer to coordinates on screen, not height or width.
            y : 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
       	  }
	   }
	}

	$(".tooltip").qtip({
	   position: {
	      corner: {
	         target: 'bottomMiddle',
	         tooltip: 'topMiddle'
	      }
	   },
	   style: 'mystyle'
	});

});

$(document).ready(function(){
  $("#form-rueckruf").validate({
		errorElement: "span",
		wrapper: "em"
	})
});

$(document).ready(function(){
  $("#form-kontakt").validate({
		errorElement: "span",
		wrapper: "p",
		showErrors: function(errorMap, errorList) {
				$("#error-box").html("Achtung! Bitte erg&auml;nzen Sie die fehlenden Pflichtfelder unter &bdquo;Kontaktdaten&ldquo; und klicken Sie dann erneut auf &bdquo;Absenden&ldquo;.");
				this.defaultShowErrors();
			}
	})
});

$(document).ready(function(){
    $("#form1").validate({
		errorElement: "span",
		wrapper: "em"
	})
  });
