/*
June 2009 - Charanjit Chana
functions that show and hide the place names for the destination guides widgets
*/

function destinationGuides() {
  $('#map_points li a').mouseover(function() {
  
  
    $('.positioned .innerLabel').text($(this).text());
    $('.positioned').css('display', '');
    var position = $(this).offset();
	$(this).css('z-index', 1000);
	var mapPointsPosition = $('#map_points').offset();
    $('.positioned').css('left', (position.left - mapPointsPosition.left - 175) + 'px');
    $('.positioned').css('top', (position.top - mapPointsPosition.top - 30) + 'px');
  });
  $('#map_points li a').mouseout(function() {
    $('.positioned').css('display', 'none');
	$(this).css('z-index', 1);
  });
  

  $('#map_points li').mouseover(function() {
    var index = $('#map_points li').index(this);
    $('#continents li:eq(' + index + ')').css('display', 'block');
	//$('#continents li:eq(' + index + ')').css('left', '200px');
	//$('#continents li:eq(' + index + ')').css('top', '0px');
  });
  $('#map_points li').mouseout(function() {

    var index = $('#map_points li').index(this);
    $('#continents li:eq(' + index + ')').css('display', 'none');
	$('#continents li:eq(0)').css('display', 'block');
  });
  
}

function goToDestination(siteURL) {
  var newLoc = $('#qsearch').val();
  window.location = siteURL + newLoc;
}