jQuery(document).ready(function(){
	var list_img				=	jQuery(".list_img");
	var property_description	=	jQuery("#property_description");
	
	/*---------------------- Show the property details on the image click -----------------*/
	list_img.click(function(){
		property_description.html('<div class="loading_property">Loading property details</div><br><div><img src="'+sitePath+'resources/images/property_loader.gif"</div>');							
		var cur_id_arr	=	new Array();
		var cur_id		=	'';
		cur_id_arr		=	(this.id).split('_');
		cur_id			=	cur_id_arr[1];
		var url			=	sitePath+'include/home_page_gallery/showcase/property_info.php?id='+cur_id;
		var result   	= 	ajaxRequest(url);
		property_description.html(result);
	});
	/*--------------------------------------------------------------------------------------*/
	
	function ajaxRequest(urlController)
	{
		jQuery.ajax({
		type: "POST",
		url: urlController,
		async: false,
		data: jQuery("form"),
		success:
			function(result) 
			{
				returnValue=result;
				return
			},
		error:
			function(errorThrown) {
				returnValue='<div class="loading_property">Unable to get property details. Please try again after some time.</div>';
				return;
			}
		});	
		return returnValue;
	}

});
