$(document).ready(function(){




// single


	var param1 = $(document).getUrlParam("post"); 
	//$('#console').append('post = '+param1);


	$('#posts').css({ display: 'block' });

	setTimeout(function()
		{
		$('#posts').animate({ opacity: '1'}, 1000);
		}, 1000);




	$('#posts').cycle(
		{ 
    	fx:				"scrollHorz", 
    	speedIn:  		"300", 
    	speedOut:  		"300",
		startingSlide: 	param1, 
    	timeout:		0, 
    	next:			".flipRight", 
    	prev:			".flipLeft",
		before:			onBefore,
		after:			onAfter
 		}
	);



	function onBefore(curr, next, opts, fwd)
		{
		$('.description').hide();
		$('.kenmerken').hide();
		$('.descriptionImage').hide();
		$('.post-edit-link').hide();
		}

	function onAfter(curr, next, opts, fwd)
		{ 
		$('.description').fadeIn(150);
		$('.descriptionImage').fadeIn(150);
		$('.kenmerken').fadeIn(150);
		$('.post-edit-link').fadeIn(150);
		}






	// The Buttons
	$('.flipLeft').click(function(e)
		{
		e.preventDefault();
		}
	);


	$('.flipRight').click(function(e)
		{
		e.preventDefault();
		}
	);






	$('.descriptionImage img').hover(function()
		{
		$(this).css({ cursor: 'pointer' });
		$(this).parent().parent().children('.post-image2').fadeIn('fast');
		}, function() 
		{
		$(this).parent().parent().children('.post-image2').fadeOut('fast');
		}
	);



});
