//<![CDATA[
$(document).ready(function(){
	$('.slidingbox-content').each(function(){
		$(this).hide();
	});
	
	$('.slidingbox h3').each(function(){
		$(this).prepend('<img src="media/icon_slidingbox_open.gif" alt="öffnen" id="slidingbox-icon" align="absmiddle" style="margin:2px 10px 0 0" />').css('cursor','pointer').click(function(){
			$(this).next('.slidingbox-content').slideToggle("normal",function(){
				if($(this).is(':hidden')){
					$(this).prev('h3').children('img').attr('src','media/icon_slidingbox_open.gif');
					$(this).prev('h3').css({
						background :'#d4d1ce',
						color : '#50433a'
					});
				}else{
					$(this).prev('h3').children('img').attr('src','media/icon_slidingbox_close.gif');
					$(this).prev('h3').css({
						background : '#867d74 url(css/basic/header_sprite.gif) 0 0 repeat-x',
						color : '#ffffff'
					});
				}
			});
		});
	});
});
//]]>
