// SHADOWBOX
Shadowbox.init({
	animate: true,
	fadeDuration: 1,
	overlayOpacity: 0.7,
	modal: false
});

//VOEG TOE AAN FAVORIETEN
var bookmarkurl="http://www.elfstedenwandeltocht.nl/"
var bookmarktitel="Elfstedenwandeltocht.nl"
function favorieten(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitel)
}

//SUPERSIZED
$(function(){
	$.fn.supersized.options = {  
		startwidth: 800,  
		startheight: 600,
		vertical_center: 0,
		slideshow: 1,
		navigation: 0,
		transition: 0, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
		pause_hover: 0,
		slide_counter: 1,
		slide_captions: 1,
		slide_interval: 3000  
	};
	$('#supersize').supersized(); 
});

//TWITTER
$(function(){
	$(".tweet").tweet({
		join_text: "auto",
		username: "elfstedenwandel",
		avatar_size: 0,
		count: 1,
		auto_join_text_default: "", 
		auto_join_text_ed: "",
		auto_join_text_ing: "",
		auto_join_text_reply: "",
		auto_join_text_url: "",
		loading_text: "loading..."
	});
});

//CUFON
Cufon.replace('h1, h2, h3, header p', { fontFamily: 'Georgia' });
Cufon.replace('h4, ul.buttons', { fontFamily: 'Gill Sans', hover: true});

//TOOLTIP
$(function() {
	$(".mapDot").tooltip({ 
		effect: 'toggle',
		delay: 40,
		offset: [5, -20],
		relative: true
	}); 
});

//TOGGLE
$(function(){
	$("div.collapse").each(function() {
		if (!$(this).next().next().hasClass("collapse")) {
			$(this).css({
				"margin-bottom": "20px"
			}).find("div.block").css({
				"margin-bottom": 0
			})
		}
	});

	$(".toggle_container").hide();
/*
	//Switch the "Open" and "Close" state per click
	$("span.trigger").toggle(function(){
		$(this).addClass("active");
		}, function(){
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("span.trigger").toggle(function(){
		//$(this).next(".toggle_container").slideToggle();
		$(this).next(".toggle_container").hide();
		}, function(){
		$(this).next(".toggle_container").css("display", "inline-block");
	});
*/

$("span.trigger").click(function(){
	if ($(this).attr("active") == "true") {
		$(this).removeAttr("active");
		$(this).removeClass("active").next(".toggle_container").slideToggle("slow");
		//$(this).removeClass("active").next(".toggle_container").hide();
	} else {
		$("span.trigger").removeClass("active").removeAttr("active");	
		$(this).attr("active", "true");
		$(".toggle_container").slideUp();
		$(this).addClass("active").next(".toggle_container").slideToggle("slow");
		//$(this).next(".toggle_container").show();
	}
});
	//$("span.trigger").eq(0).click();
});

