$(function(){
	// Main rotational
	$('div.rotational div.slides div.mod-wrapper').cycle({
		fx: 'scrollHorz',
		speed: 500,
		timeout: 5000,
		cleartypeNoBg: true,
		pager: 'div.pager'
	});
	
	// Attractions rotational
	var rot_labels = new Array();
	var rot_links = new Array();
	var i = 0;
	$('.attr_slide a img').each(function(){
		// Set the link text, based on the ALT
		var link_txt = $(this).attr('alt');
		rot_labels[i] = link_txt;
		var link_url = $(this).parent().attr('href');
		rot_links[i] = link_url;
		i++;
	});
	
	$('div.attr_slide div.mod-wrapper').cycle({
		fx: 'fade',
		speed: 0,
		timeout: 3000,
		cleartypeNoBg: true,
		pagerEvent: 'mouseover',
		allowPagerClickBubble: true,
		pager: 'div.attr_rotational ul.pager',
		pagerAnchorBuilder: function(idx) {
			if (idx == 0 || idx == 1) { first = ' class="first"'; } else { first = ''; }
			rot_link = '<li'+first+'>';
			rot_link += '<a href="' + rot_links[idx] + '">' + rot_labels[idx] + '</a>';
			rot_link += '</li>';
			return rot_link;
		}
	});
});

