	$(document).ready(function(){
		$('.slideshow').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			pager: '#nav',
			slideExpr: 'img',
			random: 1
		});
		
		$("a[rel^='prettyPhoto']").prettyPhoto({
			social_tools: ''	
		});
		
    	var url = document.URL.split('#')[1];
	//	if (url != undefined) alert(url);
		
		//When page loads...
		$(".tab_content").hide(); //Hide all content
		if (url == 'reserveren'){
			$("#reserverenTab").parent().addClass("active").show();
			$("#tab2").show();
		} else {
			$("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab_content:first").show(); //Show first tab content
		}
	
		//On Click Event
		$("ul.tabs li a").click(function() {
	
			$("ul.tabs li").removeClass("active"); //Remove any "active" class
			$(this).parent().addClass("active"); //Add "active" class to selected tab
			$(".tab_content").hide(); //Hide all tab content
	
			var activeTab = $(this).attr("href"); //Find the href attribute value to identify the active tab + content
			$(activeTab).fadeIn(); //Fade in the active ID content
			return false;
		});
		
		$("#reserverenBttn").click(function(){
			$("ul.tabs li").removeClass("active"); //Remove any "active" class
			$("#reserverenTab").parent().addClass("active"); //Add "active" class to selected tab
			$(".tab_content").hide(); //Hide all tab content
			
			$("#tab2").fadeIn(); //Fade in the active ID content
			return false;
		});
		
		Date.format = 'dd-mm-yyyy';

		$('.date-pick').datePicker({clickInput:true});
		
		$('#show-text').click(function(){
			$('.hidden-text').toggle();
			text = $(this).children().children().html()
			if (text == 'Lees meer...')
				$(this).children().children().html('Inklappen');
			else
				$(this).children().children().html('Lees meer...');
		});
		
		$(".locatie-arrow").live("click", function(){
			if ($("#locatie-arrow-check").hasClass('bottom-locatie-down')){
				$("#locatie-arrow-check").removeClass('bottom-locatie-down');
				$("#locatie-arrow-check").addClass('bottom-locatie-up');
				$("#locatie-link").slideToggle();
				$("#locatie-content").slideToggle();
			} else {
				$("#locatie-arrow-check").removeClass('bottom-locatie-up');
				$("#locatie-arrow-check").addClass('bottom-locatie-down');
				$("#locatie-content").slideToggle();
				$("#locatie-link").slideToggle();
			}
			return false;
		});
	});
