
// ---------- Fancybox Start ----------
// ---------- http://fancybox.net/api

$(document).ready(function()
{
	$("a[href $='.jpg']").fancybox({
		'titlePosition'	: 'over', // inside, outside, over
		'overlayShow'	: true,
		'autoScale'		: false,
		'overlayColor'	: '#fff',
		'overlayOpacity': 0.8,
		'transitionIn'	: 'elastic', // elastic, fade, none
		'transitionOut'	: 'elastic', 
		'speedIn'		: 300,
		'speedOut'		: 500, // millisekunden
		'changeSpeed'	: 10
	});

	$("a[rel=example_group]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts)
								{
								return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
								}
		});
});

// ---------- Fancybox End ---------- 




// ---------- Accordion Start ----------

$(document).ready(function()
{	
	$(".presse h2").eq(0).addClass("active");
	$(".presse ul").eq(0).show();
	
	$(".presse h2").eq(1).addClass("active");
	$(".presse ul").eq(1).show();
	
	/* sash */
	$(".presse .showall").click(function()
	{
		$(".presse ul").show();
	});
	$(".presse .hideall").click(function()
	{
		$(".presse ul").hide();
	});	/* / sash */
	
	$(".presse h2").click(function()
	{
		$(this).next("ul").slideToggle("slow")
		.siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h2").removeClass("active");
	});
});

// ---------- Accordion End ----------




// ---------- Navi Marker Start ---------- 

$(document).ready(function() {
	$('.navi a[href*="' + location.pathname.split("/")[2] + '"]').parent("li").addClass('active'); // use 3 for testing
	 //alert(location.pathname.split("/")[3]); // for debugging
});


/* alternative 
$(document).ready(function() {
						   
	$(".navi a").each(function() {
	var hreflink = $(this).attr("href");
	if (hreflink.toLowerCase()==location.href.toLowerCase()) {
		$(this).parent("li").addClass("selected");
	}
	
}); */

// ---------- Navi Marker End ---------- 




// ---------- Neu Start ----------
// ---------- Neu End ----------






