
// Admin confirmation on delete
function confirmSubmit()	{
var agree= confirm("Zeker weten??");
if (agree)
	return true ;
else
	return false ;
}

// Nivo slider
$(window).load(function() {
	$('#slider').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
		slices:10,
		animSpeed:1000, //Slide transition speed
		pauseTime:5000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});        

$(document).ready(function() {
	
	// Scroll to top
	$('.backtotop').click(function() {
	   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: 0}, 1500 );
	   return false;
	});
	
	// Menu animations
	$('#subnav li a.sub').hover(function() { //mouse in 
		$(this).stop().animate({ paddingLeft: '80px' }, 400); 
	}, function() { //mouse out 
		$(this).stop().animate({ paddingLeft: 0 }, 750); 
	}); 
	
	// Datepicker reservering
	$(function() {
		$.datepicker.setDefaults( $.datepicker.regional[ "nl" ] );
		$( "#date" ).datepicker({ minDate: 0, maxDate: "+4M"});
		$( "#date" ).datepicker( "option", "showAnim", "drop");
	});
	
	// Datepicker societeit
	$(function() {
		$.datepicker.setDefaults( $.datepicker.regional[ "nl" ] );
		$( "#datum" ).datepicker({ minDate: 0, maxDate: "+4M"});
		$( "#datum" ).datepicker( "option", "showAnim", "drop");
	});
	
	// Datepicker D.D.
	$(function() {
		$.datepicker.setDefaults( $.datepicker.regional[ "nl" ] );
		$( "#dd" ).datepicker();
	});
	
	// Datepicker fotoupload
	$(function() {
		$.datepicker.setDefaults( $.datepicker.regional[ "nl" ] );
		$( "#datefoto" ).datepicker( "option", "showAnim", "drop");
	});
	
	// Gallerij
	$("a.fancybox_group").fancybox({
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	600, 
		'speedOut'			:	200, 
		'showCloseButton'	:	true, 
		'enableEscapeButton':	true
	});
	
	// Scrolling shopping cart
	$().ready(function() {
		var $scrollingDiv = $("#cart");
 
		$(window).scroll(function(){			
			$scrollingDiv
  				.css({'position':'absolute','z-index':'200', 'right':'0'})
				.stop()
				.animate({"marginTop": ($(window).scrollTop() - 300) + "px"}, "slow" );			
		});
	});
});
