$(window).load(function() {

/* Fancybox
--------------------------------------------------------------------------------------- */
	$("a[rel='lightbox'], .gallery-item a").fancybox({
		'width' : 760,
		'height' : 290,
		'type' : 'iframe',
		'scrolling' : 'no',
		'showNavArrows' : false
	});
	
/* Slider
--------------------------------------------------------------------------------------- */
/*	$('#slides').cycle({ 
		fx :     'scrollLeft',
		requeueOnImageNotLoaded : true,
		timeout:       6000
	}); */

    $('#tour-btns').click(function(e){
        e.preventDefault();
        var $clicked = $(e.target).closest('li');
		if (!$clicked.hasClass('current')) {
			$clicked.addClass('current').siblings().removeClass('current');
			var $tab = $($('#tour-dynamic-wrap').children()[$clicked.index()]);
			if ($tab.not('#thumbs_wrap'))
				$('#tour-slides').cycle('pause');
			$tab.siblings().fadeOut('fast', function() {
				if ($tab.is('#thumbs_wrap'))
					$('#tour-slides').cycle({ 
						fx :     'scrollLeft',
						requeueOnImageNotLoaded : true
					});
				else
					$('#tour-slides').cycle('destroy');
				if ($tab.is('#video-tab') && typeof video_url != 'undefined')
					swfobject.embedSWF(video_url, 'vid-wrap', '460', '260', '9');
				else
					$('#vid-wrap').html('');
				$tab.fadeIn('fast');
			});
		}
    });
	
	$('.home-prevNav').click(function(e){
		e.preventDefault();
		$('#slides').cycle('prev');
	});
	
	$('.home-nextNav').click(function(e){
		e.preventDefault();
		$('#slides').cycle('prev');
	});
	
	$('.vt-prevNav').click(function(e){
		e.preventDefault();
		$('#tour-slides').cycle('prev');
	});
	
	$('.vt-nextNav').click(function(e){
		e.preventDefault();
		$('#tour-slides').cycle('prev');
	});
	
/* Callout Animation
--------------------------------------------------------------------------------------- */
	 var fadeDuration = 150; //time in milliseconds
      
     $('#callouts-wrap a').hover(function() {
        $(this).animate({ bottom: '6' }, fadeDuration);
     }, function() {
        $(this).animate({ bottom: '0' }, fadeDuration);       
     });
	 
/* Zebra Strips
--------------------------------------------------------------------------------------- */
$('#schedule tr:even').addClass("alt");

});

