$(document).ready(function(){
	/*	General	*/
	$('img.fade_img').hover(
		function() {
			$(this).animate({	opacity: 0.5}, 250);
		},
		function() {
			$(this).animate({	opacity : 1.0 }, 500);
		}
	);
	$('.info_table tbody tr:even').addClass('info_table_shade_even');
  $('.info_table tbody tr').hover(function(){
    $(this).addClass('info_table_hover');
  }, function(){
    $(this).removeClass('info_table_hover');
  });
	
	/*	Home page	*/
	$('#hp_accom_cats a').hover(function(){
    $(this).animate({paddingLeft: '+=8px'}, 200);
    $(this).children('#hp_accom_cats img').animate({marginRight: '-=4px'}, 200);
  }, function(){
    $(this).animate({paddingLeft: '-=8px'}, 200);
    $(this).children('#hp_accom_cats img').animate({marginRight: '+=4px'}, 200);
  });
	$('#hp_activities .activity a').hover(function(){
    $(this).parent().animate({paddingLeft: '+=8px'}, 200);
  }, function(){
    $(this).parent().animate({paddingLeft: '-=8px'}, 400);
  });
	
	$('#newsflash_images a').lightBox();	
	
	/*	Accommodation	*/
	$(".btn-rates").click(function(){		
		$("#rates_guide").slideToggle("slow");
		$(this).toggleClass("active");
		$(".btn-towns_wrapper").slideToggle("slow");
		return false;
	});
	$(".btn-towns").click(function(){
		$(".btn-rates_wrapper").slideToggle("slow");
		$("#towns_guide").slideToggle("slow");
		$(this).toggleClass("active_towns");
		return false;
	});
	
	/*	Activities	*/	
	$('.act_intro').hover(
		function() {
			$(this).addClass('act_intro_hover');
		},
		function() {
			$(this).removeClass('act_intro_hover');
		}
	);
	
	$(".act_intro").tooltip();	
	
	/* Top slideshow */
	$('#hp_portrait').crossSlide({
		sleep: 2,
		fade: 2
	}, [
		{ src: 'images/home_page/portrait/cango_caves.jpg' },
		{ src: 'images/home_page/portrait/succulent_karoo.jpg'   },
		{ src: 'images/home_page/portrait/ostrich.jpg'   },
		{ src: 'images/home_page/portrait/cango_wildlife_ranch.jpg'  },
		{ src: 'images/home_page/portrait/swartberg_pass.jpg'  },
		{ src: 'images/home_page/portrait/cape_sugarbird.jpg' }
	]);
	
	
});
