$(document).ready(function(){		
	 $('#fsearch').val('Enter: street / suburb / postcode / ID').focus(function(){ $(this).val(''); }).blur(function(){ if($(this).val() == '') $(this).val('Enter: street / suburb / postcode / ID'); });

	options = { serviceUrl: '/system/fsbsearch.php',
			minChars:3,
			delimiter: /(,|;)\s*/, // regex or character
			maxHeight:200,
			width:204,
			zIndex: 100000,
			deferRequestBy: 0, //miliseconds
			noCache: true, //default is false, set to true to disable caching
			// callback function:
			onSelect: function(value, data){ $('#suburb_id').val(data); }
			};
	$('#fsearch').autocomplete(options);
	
	$("input[name='buy_btn']").click(function() {
		$('#header_search_form').attr('action', SITE_PATH+'buying/listings.php').submit();	
	});
	$("input[name='rent_btn']").click(function() {
		$('#header_search_form').attr('action', SITE_PATH+'renting/rental-listings.php').submit();	
	});
	
	
	$('#slider ul').jcarousel({		
		scroll:1,
		auto:5,
		animation:'slow',
		wrap:'circular'
	});
		
	$('#slideshow').slideShow({
		interval: 3
	});
});

