$(document).ready(function() {
	if ($('#Slides').length > 0) {
		$('#Slides').cycle({
			fx: 'fade',
			speed: 1500,
			timeout:  6000,
			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;
					});
				}
			}
		});
	}
});
$(document).ready(function() {
	if ($('#Slides2').length > 0) {
		$('#Slides2').cycle({
			fx: 'fade',
			speed: 1500,
			timeout:  6000,
			randomizeEffects: false,
			easing: 'easeOutCubic',
			next:   '.slideNext',
			prev:   '.slidePrev',
			pager: '#slidePager',
			pagerAnchorBuilder: function(idx, slide) {
				return '#slidePager a:eq(' + idx + ')';
			} ,
			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;
					});
				}
			}
		});
	}
});
$(document).ready(function() {
	if ($('#NewsBar').length > 0) {
		$('#NewsBar div:first').fadeIn(1000, function() {
			$('#NewsBar').cycle({
				fx: 'fade',
				random:	1,
				speed: 2000,
				timeout:  20000,
				randomizeEffects: false,
				easing: 'easeOutCubic',
				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;
						});
					}
				}
			});
		});
	}
});

