
$(document).ready(function() {

	$('.tab_content').hide();
	$('.tab_content:first').show();

	$('#tabs a').click(function(e) {
		$('#tabs li').removeClass('active');
		$(this).parent().addClass('active');
		var selected_tab = $(this).attr('href');
		$('.tab_content').hide();
		$(selected_tab).fadeIn();

		var active_region = selected_tab.replace('#','');
		$.cookie('active_region',active_region,{path:'/'});
		e.preventDefault();
	});

	$('#select_region a').click(function(e) {
		var active_region = $(this).attr('id');
		$.cookie('active_region',active_region,{path:'/'});
	});

	$('#leasing_tab a').click(function() {
		$.cookie('property_category','leasing',{path:'/'});
	});

}); // document_ready
