$(document).ready(function(){
	//Hide (Collapse) the toggle containers on load
	$('.wp-table-reloaded').show()
	$("h1.toggle").attr('title', "Inhalt einblenden");

	//Switch the "Open" and "Close" state per click
	
	//Slide up and down on click
	$("h1.toggle").click(function(){
		$(this).siblings(".active").next(".toggle_content").slideToggle();
		$(this).siblings(".active").toggleClass("active");
		$(this).next(".toggle_content").slideToggle();
		$(this).toggleClass("active");
		$("h1.toggle").attr('title', "Inhalt einblenden");
		$("h1.toggle.active").attr('title', "Inhalt ausblenden");
	});
	

	$("a.fancy").fancybox({
		'zoomOpacity'			: true,
		'overlayShow'			: true,
		'overlayOpacity'		: 0.8,
		'zoomSpeedIn'			: 1000,
		'zoomSpeedOut'			: 1000,
		'hideOnContentClick'	: false,
		'padding'				: 8,
		'onComplete': function() {
			$("#fancybox-outer").bind("contextmenu", function(e) {
				e.preventDefault();
		 	});
			$("#fancybox-outer").bind("mousedown", function(e) {
				e.preventDefault();
		 	});
		}
	});
});	

