$(document).ready(function(){
	$("#slideshow").easySlider({
		auto: true,
		continuous: true,
		prevText: '',
		nextText: '',
		controlsShow: false,
		speed: 250,
		padding: 2
	});
	$("#slideshowbinnen").easySlider({
		auto: true,
		continuous: true,
		prevText: '',
		nextText: '',
		controlsShow: false,
		speed: 250,
		prevId: 'prevBtnbinnen',
		nextId: 'nextBtnbinnen',
		padding: 2
	});
	
	if($('.accordion .maintext').size() > 1){	
		
		$('.accordion .maintitle').removeClass('maintitle').addClass('maintitleWithHitzone').wrapInner('<span />').prepend('<img src="images/blank.png" class="maintitleHitzone" />');
			
		$('.accordion .maintext:not(:first)').hide();
		
		$('.accordion .maintitleWithHitzone').click(
			function() {
				var checkElement = $(this).next(':first');
				if ((checkElement.is('.maintext')) && (checkElement.is(':visible'))) {
					return false;
				}
				if ((checkElement.is('.maintext')) && (!checkElement.is(':visible'))) {
					$('.maintext:visible').toggle('normal');
					checkElement.toggle('normal');
					return false;
				}
			}
		);
	}
	
	if($('#main .eyecatcher').size() < 1){
		$('#maincontent').css({'width' : '660px'});
	}
});
