/* jquery.scripts.js */


$(document).ready(function($){
	
	/* Cycle slideshow - http://malsup.com/jquery/cycle/ */

	// redefine Cycle's updateActivePagerLink function - see: http://malsup.com/jquery/cycle/pager7.html
	$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 
    $(pager).find('li').removeClass('activeLI') 
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI'); 
	};
	// create slideshow
	$('#slideshow ul').after('<ol></ol>').cycle({
		timeout: 5000,
		speed: 1500,
		pause: 1,
		pauseOnPagerHover: 1,
		pager: '#slideshow ol',
		pagerAnchorBuilder: function(idx, slide) {				// populate pager nav
						//return '<li><a href="#">' + (idx+1) + '</a></li>';	// 'idx' is the zero-indexed array position, so we add 1 to it
		},
	});

	/* Add 'first' and 'last' class to some elements */
	$('#right.sidebar .features div:first-child, #footer .nav li:first-child, div.svSyndRemote dl:first-child').addClass('first');
	$('div.svSyndRemote dl:last-child').addClass('last'); /* remote feeds did not have first/last classes until Mura 5.2 r2099*/

});

/* EOF */

