$(function(){
		   
		   
	//switch_tabs
	$(".tab_content").hide();
	$(".tab_content_hp").hide();
	
	$("ul.tabsBoxNav li:first").addClass("active").show();
	$("ul.tabsBoxNav_hp li:first").addClass("active").show();
	
	$(".tab_content:first").show();
	$(".tab_content_hp:first").show();

	$("ul.tabsBoxNav li").click(function() {

		$("ul.tabsBoxNav li").removeClass("active");
		$(this).addClass("active");
		$(".tab_content").hide();

		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$("ul.tabsBoxNav_hp li").click(function() {

		$("ul.tabsBoxNav_hp li").removeClass("active");
		$(this).addClass("active");
		$(".tab_content_hp").hide();

		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});  
		 
	
	//switch_contentVtc
	$(".preview_content").hide();
	$("ul.jcarousel-skin-TPVtc li:first").addClass("active").show();
	$(".preview_content:first").show();

	$("ul.jcarousel-skin-TPVtc li").click(function() {

		$("ul.jcarousel-skin-TPVtc li").removeClass("active");
		$(this).addClass("active");
		$(this).parents(".slideshowVtc").parent().find(".preview_content").hide();

		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});


	//switch_contentHrz
	$(".previewCnt").hide();
	$("ul.jcarousel-skin-TPHrz li:first").addClass("active").show();
	$(".previewCnt:first").show();

	$("ul.jcarousel-skin-TPHrz li").click(function() {
		$("ul.jcarousel-skin-TPHrz li").removeClass("active");
		$(this).addClass("active");
		$(".previewCnt").hide();

		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		//return false;
	});
		   

	//For the different lots
	$(".small_map .lot area").bind("click", function() {
		$(".item li").removeClass("selected")
		var $activeLot = $($(this).attr("href"));
		$activeLot.addClass("selected");
		var height = $activeLot.outerHeight() + parseInt($activeLot.css("marginTop")) + parseInt($activeLot.css("marginBottom"));
		var offTop = $activeLot[0].offsetTop;
		$activeLot.parents(".scrollable").scrollTop(offTop-height);
	});
});

