$(document).ready(function(){


	/* Cycle slideshow */

	// redefine Cycle's updateActivePagerLink function 
	$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
		$(pager).find('li')
			.filter('li:not('+currSlideIndex+')')
				.removeClass('on').css({'padding-left': 55})
			.filter('li:eq('+currSlideIndex+')')
				.addClass('on').animate({paddingLeft: '42'},750);
	};

	// Cycle
	$('#spotlight ul').after('<ol></ol>').cycle({
		timeout: 6000,
		speed: 1000,
		pause: 1,
		pauseOnPagerHover: 1,
		pager: '#spotlight ol',
		pagerAnchorBuilder: function(idx, slide) {
			// put the contents of the h3 from each slide and copy it into the corresponding nav item
			return '<li><a href="#">' + $('#spotlight ul li:eq(' + (idx) + ') h3').html() + '</a></li>';
		}
	});

	// remove h3's from slides
	$('#spotlight ul h3').remove();



	/* Image Reflections */
	/* http://www.digitalia.be/software/reflectionjs-for-jquery */
	//$("#spotlight ul li img").reflect();
	
	

});