$(function() {
	$('#slideshow').append('<div id="nav"></div>').cycle({
		fx:			'scrollLeft',
		slideExpr:	'div.frontPageProject:not("#nav")',
		speedIn:	350,
		speedOut:	350,
		timeout:	6000,
		pager:		'#nav',
		before: 	function(currentSlide, nextSlide) {
			/**
			 * Make sure that the links below the images
			 * does not animate across the screen
			 *
			 * Hide the currently visible link before the
			 * animation starts. And show the link below the
			 * next slide so it'll animate in together with
			 * the image.
			 */
			$('a:last', currentSlide).hide();
			$('a:last:hidden', nextSlide).show();
		},
		after: 		function(currentSlide, nextSlide) {
			/**
			 * Will make sure the link is visible on
			 * the first slide when the plugin loads.
			 */
			$('a:last:hidden', nextSlide).show();
		},
		pagerAnchorBuilder: function(idx, slide) {
			return '<a href="#"></a>';
		}
	});
});

