$(document).ready(function() {

	// fancy box pop up images
	$("a.popupimage").fancybox({
		'titlePosition'	: 'over',
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
		'overlayOpacity' : '0.6',
		'overlayColor' : '#000',
		'cyclic' : 'true'
	});


	// show and hide feature used throughout the site
	$('.showhide h4').next('.info').hide();
	$('.showhide h4').click(function() {
		$(this).next('.info').slideToggle('400');
		$(this).toggleClass("active");
		return false;
	});

	// virtual tour
    $('.virtualtour .slides').cycle({
		fx:     'fade',
		speed:  'fast',
		timeout: 0,
		next:   '#next',
		prev:   '#prev',
		cleartype:  true,
	    cleartypeNoBg:  true
	});

	// home page slideshow
    $('.slideshow').cycle({
		fx:      'fade',
    	speed:    500,
    	timeout: 2700
	});

	// member logo slideshow
    $('.memberlogos_slideshow').cycle({
		fx:      'fade',
    	speed:    800,
    	timeout: 3500,
    	pause: 1
	});

		// open links to other sites in new windows
		$('a[href^=http]').click( function() {
			window.open(this.href);
			return false;
		});


});

