$(document).ready(function() {
	jQuery.validator.messages.required = "";
	$("#validateForm").validate();
	
	$("a[target*=sdFrame]").click(function () {
		sdFrame($(this).attr("href"), $(this).attr("title"));
		return false;
	});
	
	initiateRotation();	
	
	// PNG FIX //
	$('body').supersleight({shim: 'http://62.1.211.150/~n3t33600/images/general/blank.gif'});
});


$(function(){
	$("#packages li").hover(function () {
		$("li:eq("+$("li").index(this)+") #details").slideDown("fast");
	}, function() {
		$("li:eq("+$("li").index(this)+") #details").slideUp("fast");
	});	

	$("#forcast").hover(function () {
		$("#weather ul").fadeIn("fast");
	}, function() {
		$("#weather ul").fadeOut("fast");
	});
});


function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}


function expand(divID) {
	$("#" + divID).slideToggle("fast");
}


function loadContent(file) {
	var parts = file.split("#"); 
	$("#panoHolder").load("../../members/panoLoader.php?type=" + parts[1] + "&photo=" + parts[0]);
	if (parts[2]) { document.getElementById("panoTitle").innerHTML = parts[2]; }
}


function calculatePrice(persons, price) {
	total = persons*price;
	$('#total').html(total.toFixed(2) +  '&#8364;');
	$('#people').html(persons);
}