jQuery(document).ready(function(){
	var p = jQuery('.mainMenuAct');
	var offset = p.offset();
	
	if ((jQuery('.submenuBox').html()) != '') 
	{
		jQuery('.subMenuContainer').css('margin-left', offset.left+10+'px').delay(200).slideDown(400);
		jQuery('.subbg').fadeIn(600);
	};
	
	if ((jQuery('.headbild').html()) == '') 
	{
		jQuery('.headbild').html('<img src="fileadmin/images/neuebilder/haus0001.jpg" alt="Hotel Puint" />');
	};
	
	jQuery('.newsletter').children('.invis').html('100');

	jQuery('.boxes img').mouseenter(function(){
		jQuery(this).stop().animate({
		    top: '-15'
		  }, 200, function() {
		  });
	});
	jQuery('.boxes img').mouseleave(function(){
		jQuery(this).stop().animate({
		    top: '0'
		  }, 200, function() {
		  });
	});



	jQuery('.newsletter').children('.invis').html('100');

	jQuery('.toggler, .sizerBox h3').click(function(){

		if ((jQuery(this).parent('.sizerBox').height()) > 60) {
			jQuery(this).siblings('.invis').html((jQuery(this).parent('.sizerBox').height()));
			jQuery(this).parent('.sizerBox').animate({
				height: '20'
			},400, function(){
				jQuery(this).children('.toggler').css('background','url(fileadmin/img/plus.png) no-repeat center')
			});
		} 
		else{
			var setheight = jQuery(this).siblings('.invis').html();
			jQuery(this).parent('.sizerBox').animate({
				height: setheight
			},400, function(){
				jQuery(this).children('.toggler').css('background','url(fileadmin/img/ex.png) no-repeat center')
			});
		};

	});

});
