jQuery(document).ready(function(){
jQuery.noConflict();
jQuery('a[@href^="#"]').click(function() {
        var parts = this.href.split('#');
        var scrolltarget = '#' + parts[1];
        jQuery(scrolltarget).ScrollTo(1000);
        return false;
    });

// Starte Tooltips	
	tooltip();
// Weise FancyZoom allen Links mit der Klasse ".zoom" zu
// jQuery('a.zoom').fancyZoom();
// Weise Cover-Cycle allen Links mit der Klasse ".cycle" zu
	jQuery('.cycle').cycle('cover');
// Coda Slide anwenden
	jQuery(window).bind("load", function() {
		jQuery("div#slider1").codaSlider()
		// jQuery("div#slider2").codaSlider()
		// etc, etc. Beware of cross-linking difficulties if using multiple sliders on one page.
	});
// Toggle Contactform
	if(!jQuery.browser.msie) {
			jQuery("div#contact").toggle();
	    jQuery("div.contactformtoggle a#showbutton").click(
        function(){ 
					jQuery("div.contactform")
						.animate({ height: "180px" })
						.animate({height: "150px" }, "fast")
						.animate({height: "170px" }, "fast")
						.animate({height: "155px" }, "fast")
						.animate({height: "160px" }, "fast");
					jQuery("div.contactformtoggle a.contactbutton").toggle();
      });
			jQuery("a[@href*='/kontakt']").click(
        function(){ 
					var urlpath = window.location.pathname;
					jQuery("div.contactform")
						.animate({ height: "180px" })
						.animate({height: "150px" }, "fast")
						.animate({height: "170px" }, "fast")
						.animate({height: "155px" }, "fast")
						.animate({height: "160px" }, "fast");
					jQuery("div.contactformtoggle a.contactbutton").toggle();
					return false;
      });
			jQuery("div.contactformtoggle a#hidebutton").click(
				function(){
					jQuery("div.contactform")
						.animate({ height: "180px" })
						.animate({height: "0px"}, "fast");
					jQuery("div.contactformtoggle a.contactbutton").toggle();
					jQuery("div.wpcf7-response-output").hide();
			});   
			jQuery("div.contactform a#hideinput").click(
				function(){
					jQuery("div.contactform")
						.animate({ height: "180px" })
						.animate({height: "0px"}, "fast");
					jQuery("div.contactformtoggle a.contactbutton").toggle(); 
					jQuery("div.wpcf7-response-output").hide();
			});   
			jQuery("div.contactform #submit").click(
				function(){
					jQuery("div.contactform")
						.animate({ height: "250px" })
						.animate({height: "220px" }, "fast")
						.animate({height: "240px" }, "fast")
						.animate({height: "225px" }, "fast")
						.animate({height: "230px" }, "fast");
			});
		}
});