// initialize slideshow (Cycle)
$(document).ready(function() {
	if ($('.Slides').length > 0) {
		$('.Slides').cycle({ 
			fx: 'fade',						
			speed: 2000,
			timeout:  7000,
			randomizeEffects: false, 
			easing: 'easeOutCubic',
			next:   '.slideNext', 
			prev:   '.slidePrev',
			pager:  '#slidePager',
			cleartypeNoBg: true,
			before: function() {
				// reset the overlay for the next slide
				$('#SlideRepeat').css('cursor','default').unbind('click'); },
			after: function() {
				// get the link and apply it to the overlay
				var theLink = $(this).children('a');
				var linkURL = (theLink) ? theLink.attr('href') : false;
				if (linkURL) {
					$('#SlideRepeat').css('cursor','pointer').click( function() {
						document.location.href = linkURL;
					});
				}
			}
		});
	}
});
