$(function(){
	// rel externals
	$("a[rel=external]").each(function(){
		$(this).attr("target","_blank");
	});
	// jquery suckerfish
	if ($.browser.msie && parseInt($.browser.version)< 7){
		$("#nav li").hover(
			function(){
				$(this).addClass("sfhover");  
			},
			function(){
				$(this).removeClass("sfhover");  
			}
		);
     }
     
     // date picker
	$('.date-pick').datePicker({clickInput:true});
	$('.date-pick').each(function(){
		if ($(this).val() == ""){
			$(this).val("DD/MM/YYYY");
		}
	});
	
	// tooltips
	$("#attractions img").tooltip({
		delay: 0,
		track: true,
		showURL: false,
		fixPNG: false
	});
	
	// booking listing
	$(".property").hover(
		function () {
			$(this).css("backgroundColor","#555555");
		},
		function () {
			$(this).css("backgroundColor","#444444");
		}
	);
	
	// make whole box clickable
	$(".property").click(function(){
		var h = $(this).children(".book").attr("href");
		location.href = h;
	});
	
});

