$(document).ready(function() {
	/*--Smooth Scrolling--*/
	
	$(function(){
		$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
			&& location.hostname == this.hostname) {
				var $target = $(this.hash);
				$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
				if ($target.length) {
					var targetOffset = $target.offset().top;
					$('html,body').animate({scrollTop: targetOffset}, 1000);
					return false;
				}
			}
		});
	});   
});


$(function(){  // $(document).ready shorthand
	$('#alertSuccess').hide().fadeIn('slow');
	$('#alertSuccess').fadeIn('slow');

	$('#alertError').hide().fadeIn('slow');
	$('#alertError').fadeIn('slow');
});


$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a.fancybox").fancybox();
	
	/* Using custom settings */
	
	$("a.fancybox").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$("a.fancybox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayColor'		: '#000',
		'overlayOpacity'	: 0.5
	});

	$("a.grouped_elements").fancybox();
	
});

$(document).ready(function() {
  $.TourType = {
    '1 Hour Experience' : $('#SelectCar')
  };

  $('#TourType').change(function() {
    // hide all
    $.each($.TourType, function() { this.hide(); });
    // show current
    $.TourType[$(this).val()].show();
  });
});
