
$(document).ready(function() {
	


	$("a.group").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'titlePosition' : 'inside',
		'showNavArrows' :  true,
	});
	
	$('#search_regions').change(function() {
	  //var getid = $(this).val();
	  //$('#search_locations').val('');
	  //$('.devloc').hide();
	  //$('.'+getid).show();
	});
	
	
});	




$(document).ready(function() {
	
	
	$('.requestbrochurelink').click(function() {
		var getref = $(this).children('span').attr('title');
		$('#brochure_property').val(getref.toUpperCase());
		$("#brochure_error").hide();
		$.fancybox({
			'href'          : '#brochure_form',
			'scrolling'		: 'no',
			'titleShow'		: false,
			'onClosed'		: function() {
				$("#brochure_error").hide();
			}
		});	
		return false;
	});
	
	
	$("#brochure_form").bind("submit", function() {
		if ($("#brochure_name").val().length < 1 || $("#brochure_email").val().length < 1) {
			$("#brochure_error").show();
			$.fancybox.resize();
			return false;
		}
	
		$.fancybox.showActivity();
		
	
		$.ajax({
			type		: "POST",
			cache	: false,
			url		: "",
			data		: $(this).serializeArray(),
			success: function(data) {
				var thanks;
				thanks = '<div id="thanks"><h2>Thank You!</h2><p>Thank you for requesting more information. Your request has been sent successfully.</p></div>';
				$.fancybox(thanks);
			}
		});
		return false;
	});

});

