﻿jQuery.noConflict();
jQuery(document).ready(function ($) {
	$('#marquee .slide').each(function (i) {
		if ($(this).find('a').length > 0) {
			$(this).css('cursor', 'pointer').click(function () {
				window.location = $(this).find('a').attr('href');
			});
		}
	});
	if ($('#marquee .slide').length > 1) {
		$('#marquee').before('<div id="marquee-nav" />');
		$('#marquee').cycle({ fx: 'fade', pager: '#marquee-nav', pause: 1, speed: '300', timeout: '5000' });
	}
	$('#video-library #video-wrap').before('<a href="javascript:void(0);" class="btn-nextvideo" title="More Videos">More Videos</a>').cycle({ fx: 'scrollLeft', speed: '300', timeout: 0, next: '#video-library .btn-nextvideo', cleartype: true });
	$('#video-library .video').click(function () {
		window.location = $(this).find('a').attr('href');
	});
	if ($('#upcoming-events #event-wrap .event').length > 1) {
		$('#upcoming-events #event-wrap').before('<a href="javascript:void(0);" class="btn-nextevent" title="Next Event">Next Event</a>').cycle({ fx: 'scrollLeft', speed: '300', timeout: 0, next: '#upcoming-events .btn-nextevent', cleartype: true });
	}
	//	$('#beta-testing').modal({
	//		minHeight: 60,
	//		opacity: 30,
	//		overlayClose: true,
	//		onOpen: function(d){
	//			d.overlay.fadeIn('slow', function(){
	//				d.data.hide();
	//				d.container.fadeIn('medium', function(){
	//					d.data.slideDown('medium');
	//				});
	//			});
	//		},
	//		onClose: function(d){
	//			d.data.slideUp('medium', function(){
	//				d.container.fadeOut('medium', function(){
	//					d.overlay.fadeOut('slow', function(){
	//						$.modal.close();
	//					});
	//				});
	//			});
	//		}
	//	});
});
