$(function(){
	/*auto populate departure date*/
	$("#destSel").change(function() {
		var thisselect = '';
		thisselect = $('[@name=destination]').val();		
		$.post("getDate.aspx", { destination: thisselect },
		function(data){	 
			$("select#dateSel").html(data); 
		}, "html");
	});
	$("#destSel2").change(function() {
		var thisselect = '';
		thisselect = $('[@name=destination2]').val();	
		$.post("getDate.aspx", { destination: thisselect },
		function(data){	 
			$("select#dateSel2").html(data); 
		}, "html");
	});
	$("#destSel").change();
	$("#destSel2").change();
});
function ShowHide(){	
	document.getElementById('light').style.display='block';
	document.getElementById('light').style.background='url(images/loading.gif) 50% 50% no-repeat #000';
	document.getElementById('fade').style.display='block';
}

var lastPage = 1;
function showResults (page, country)
{
	$("#resultsPage" + country + window.lastPage).fadeOut(600,function(){
//		$('html, body').animate({scrollTop:0}, 'fast');
		$("#resultsPage" + country + page).fadeIn(600);
		$("#resultsLink" + country + lastPage).removeClass("bold");
		$("#resultsLink" + country + page).addClass("bold");
		$("#resultsLink" + country + lastPage + "b").removeClass("bold");
		$("#resultsLink" + country + page + "b").addClass("bold");
		window.lastPage = page;
//var target_offset = $("#rightCol").offset();
//var target_top = target_offset.top;		
	});

	$('html, body').animate({scrollTop:$("#topOfDeals").offset().top}, 'slow');
	
	return false;
}

// google analytic  - jquery.gatracker.js
$(function(){
	$.gaTracker('UA-228053-18');
});