jQuery(document).ready(function() {  
    
    jQuery('a[href^=#]').bind("click", function(event) {
        event.preventDefault();
        var ziel = jQuery(this).attr("href");

        jQuery('html,body').animate({
                scrollTop: jQuery(ziel).offset().top -100
        }, 400);
        return false;
    });
	
	jQuery('a[href^=#top]').bind("click", function(event) {
        event.preventDefault();
        var ziel = jQuery(this).attr("href");

        jQuery('html,body').animate({
                scrollTop: jQuery(ziel).offset().top
        }, 400);
        return false;
    });
    
	jQuery(window).scroll(function () {
		if (jQuery(this).scrollTop() > 150) {
			jQuery('.scrollToTop').animate({
				bottom: '70',
				opacity: 'show'
			},500);		
			
		} else {		
			jQuery('.scrollToTop').animate({
				bottom: '-200',
				opacity: 'hide'
			},1000);	
		}
	});
	
	// Show Filter
	jQuery(".showcontact,.kontaktHide").click(function(e) {
		jQuery(".showcontact").toggleClass("aktiv");
		jQuery("#contactContainer").animate({
			opacity: 1,
			height: 'toggle'
		}, 500);
		
		e.preventDefault();
	});
	
	jQuery(".searchHide").toggle(function() {
		jQuery(".searchHide").text("hide");
		jQuery("#searchBox").animate({
			top: 0
		}, 500);	
		
		}, function () {
		  jQuery(".searchHide").text("search");
		  jQuery("#searchBox").animate({
		  	top: -90
		  }, 500);	
	});
	 
	
});
