$(document).ready(function() {
	
/*-----------------------------------------------------------------------------------*/
/*	Slider Home
/*-----------------------------------------------------------------------------------*/

$('.headerslider').flexslider({
animation: "slide",
controlsContainer: ".flex-container",
slideshow: true,                
slideshowSpeed: 4000,           
animationDuration: 600, 
animationLoop: true,
pauseOnHover: false,
});


/*-----------------------------------------------------------------------------------*/
/*	Slider Other pages
/*-----------------------------------------------------------------------------------*/

$('.headerslider1').flexslider({
animation: "fade",
controlsContainer: ".flex-container",
slideshow: true,                
slideshowSpeed: 6000,           
animationDuration: 600, 
animationLoop: true,
pauseOnHover: false,

});
	
/*-----------------------------------------------------------------------------------*/
/*	BTN style
/*-----------------------------------------------------------------------------------*/
$("a.btn_small").wrap('<div id="btn_small">');
$('a.btn_small').before('<span class="before_btn_small"></span>');
$('a.btn_small').after('<span class="after_btn_small"></span>');

$("a.btn_smaller").wrap('<div id="btn_smaller">');
$('a.btn_smaller').before('<span class="before_btn_smaller"></span>');
$('a.btn_smaller').after('<span class="after_btn_smaller"></span>');

/*-----------------------------------------------------------------------------------*/
/*	Post Thumb Hover Effects
/*-----------------------------------------------------------------------------------*/

$("a.post_thumb img").before('<div class="post_thumb_overlay"></div>');
$("a.post_thumb").wrap('<div class="post_thumb_block"></div>');
$("a.post_thumb").after('<div class="thumb_shadow"></div>');

function tz_postThumbOverlay() {

var postThumb = jQuery('a.post_thumb');

postThumb.hover( function() {

jQuery(this).find('.post_thumb_overlay').stop().css({
opacity: 0,
display: 'block'
}).animate({
opacity: 1
}, 250);

}, function() {
jQuery(this).find('.post_thumb_overlay').stop().fadeOut(250);
});

}

tz_postThumbOverlay();

/*-----------------------------------------------------------------------------------*/
/*	Fix Sub menu
/*-----------------------------------------------------------------------------------*/

$(".linkBox ul li:first").addClass("first")

/*-----------------------------------------------------------------------------------*/
/*	Hello bar
/*-----------------------------------------------------------------------------------*/
	
jQuery('#notification .close').click( function () {
	jQuery('#wrapper').animate({marginTop: 0}, 200)
	jQuery('#notification').animate({marginTop: -46}, 200, function() {
	jQuery.cookie("TopBar", "close", { path: '/', expires: 5 });
	});
});

if(jQuery.cookie("TopBar") === 'close')
{
	jQuery('#wrapper').css("marginTop", 0);
	jQuery('#notification').css("marginTop", -46);
}
else
{ jQuery('#notification').css("marginTop", 0);}



        $(".bericht").click(function (){
           $('html, body').animate({scrollTop:$(document).height()}, 'slow');

        return false;

           });
   


		
/*-----------------------------------------------------------------------------------*/
/*	END
/*-----------------------------------------------------------------------------------*/

 });
