(function() {

function onAfter(curr, next, opts) {
	var index = opts.currSlide;
	$('#back')[index == 0 ? 'hide' : 'show']();
	$('#forward')[index == opts.slideCount - 1 ? 'hide' : 'show']();
	$('#content .theSection').css('width','935');
}

$('.slideshow').cycle({ 
	fx:     'scrollHorz', 
	speed:  'fast', 
	timeout: 5000, 
	pager:	'#thePager',
	// callback fn that creates a thumbnail to use as pager anchor 
	pagerAnchorBuilder: function(idx, slide) { 
		return '<li><a href="#">'+ idx +'</a></li>'; 
	}
});

slideshow2height = $('.slideshow2').height();

$('.slideshow2').cycle({
	fx:			'scrollHorz', 
	speed:		'fast', 
	next:		'#forward', 
	prev:		'#back',
	nowrap:		true,
	after:		onAfter,					
	timeout:	0,
	height:		'224px'
});
	
})(); //End closure
