$(function() {
	$('#slideshow, #venue-r1 .col-1').cycle({
		random: 1,
		speed: 'slow',
		timeout: 5000
	});
});

$(function() {
	$('#news-container .inner, #content-r1 .col-2 .inner').cycle({
		fx:     'fade',
		speed: 'slow',
		timeout: 5000
	});
});

$(document).ready(function () {

	$(document).pngFix(); 

	//Fix for slideshow content
	$('#slideshow .inner img').css('display', 'block');
	$('#news-container .news-item').css('display', 'inline');

	//news-numbers cursor on hover
	$('#news-numbers span').hover(function (){
		$(this).addClass('hover');
	}, function (){
		$(this).removeClass('hover');
	});
	
	//fix for nav hovers
	$('#top-nav span, #nav span').hover(function (){
		$(this).css('cursor', 'pointer');
	}, function (){
		$(this).removeClass('cursor', '');
	});
	
	//venue-space hover
	$('.space-list .space').hover(function (){
		$(this).css('cursor', 'pointer');
		$(this).addClass('active');
	}, function (){
		$(this).removeClass('cursor', '');
		$(this).removeClass('active');
	});
	
	//Quick Venue Search Onclick
	$('select#search-venue-type_eq').change(function(){
		var venue_type = $(this).val();
		window.location = '/search/results.html?'+venue_type+'=1&advanced=yes';
	});
	
	// Redirect for venue list
	$('.venue-list select').change(function(){
		var venue_url = $(this).val();
		window.location = venue_url;
	});
	
	
	//Venue Spaces Formatting
	//first hide all spaces, then fade in first
	$('#venue-r2 .col-2 .current-space').css('display', 'none');
	$('#venue-r2 .col-2 .current-space:first').css('display', 'block');
	$('#venue-r2 .col-2 .space-list .space').click(function (){
		var tempClass = $(this).attr('id');
		$('#venue-r2 .col-2 .current-space').css('display', 'none');
		$('#venue-r2 .col-2 .'+tempClass).fadeIn();
	});
	
	//Members sub-nav
	$('ul.left-nav-members li.dir').hover(function (){
		//$(this).find('ul').fadeIn();
		$(this).find('ul').css('display', 'block');
	}, function (){
		//$(this).find('ul').fadeOut();
		$(this).find('ul').css('display', 'none');
	});
	
	//Venue Map pop-up
	$('#map-container .inner img').hover(function (){
		$('#map-container .large-map').fadeIn();
		$(this).css('cursor', 'pointer');
	}, function (){
		$('#map-container .large-map').fadeOut();
		$(this).removeClass('cursor', '');
	});
	
});




