	$(document).ready(function(){
		
		$('#scroll-wrap').jScrollPane({scrollbarWidth:15, scrollbarMargin:15, dragMinHeight: 18, dragMaxHeight: 18, showArrows: true, arrowSize: 18 });
		
		var config = {    
			sensitivity: 3, 
			interval: 100,
			over: makeVisible,
			timeout: 500,
			out: makeInvisible		
		};
		
		$("li.properties").hoverIntent( config );
		
		$("select#roomconfig").change(function () {
			var str = "http://www.latitude16.com.au/our-properties/types/?rooms=";
			$("select#roomconfig option:selected").each(function () {
				str += $(this).val();
			});
			window.location = str;
        });

		var now = new Date();
		$('#inputDate').DatePicker({
			format:'d-B-Y',
			date: $('#inputDate').val(),
			current: $('#inputDate').val(),
			starts: 1,
			position: 'r',
			
			onBeforeShow: function(){
				$('#inputDate').DatePickerSetDate($('#inputDate').val(), true);
			},
			onChange: function(formated, dates){
				$('#inputDate').val(formated);
			}
		});		
		
	});
	
	function makeVisible() {
		$("ul#properties-list").show();
		$("a.props-tab-off").removeClass("props-tab-off").addClass("props-tab-on");
	}
	
	function makeInvisible() {
		$("ul#properties-list").hide();
		$("a.props-tab-on").removeClass("props-tab-on").addClass("props-tab-off");
	}	
