// JavaScript Document



//--------------------------------------------------------------------------------------------------------- CUFON
Cufon.replace('.neoSansStyle, .neoSansBoldStyle, h1, h2, h4', {
});

Cufon.replace('#home_tabs h3', {
});


Cufon.replace('.neoSansMediumStyle, #ctl00_mainarea_content1 h3, .tour_right_element h3, #tabs ul li a', {
    textShadow: '#fff 0px 1px'
});

Cufon.replace('a.footer-language-button', {
    textShadow: '#fff 0px 1px'
});

Cufon.replace('.neoSansItalicStyle, p.shop_price, #shop_top h2,  p.payment_heading', {
    textShadow: '#fff 0px 1px'
});
Cufon.replace('#nav, .refFont', {
    textShadow: '#1c5a85 -1px -1px',
    hover: {
        color: '#69a2d2'
		
    }
});

//---------------------------------------------------------------------------------------------------------- AUTOSUGGEST HOME CODE
function suggest(inputString){
	if(inputString.length == 0) {
		$('#suggestions').fadeOut();
	} else {
		$('#homecode').addClass('load');
		$.post(_root+"ajax/homecode.php", {queryString: ""+inputString+""}, function(data){
			if(data.length >0) {
				$('#suggestions').fadeIn();
				$('#suggestionsList').html(data);
				$('#country').removeClass('load');
				$('#suggestionsFooter').fadeIn();
				$('#suggestionsHeader').fadeIn();
			}
		});
	}
}

function fill(thisValue) {
	$('#homecode').val(thisValue);
	setTimeout("$('#suggestionsHeader').fadeOut();", 600);
	setTimeout("$('#suggestions').fadeOut();", 600);
	setTimeout("$('#suggestionsFooter').fadeOut();", 600);
}



$(document).ready(function(){

configureFooterLanguage();

function configureFooterLanguage() {

	// show hide popup
	$(".footer-language-button").toggle(
		function() {
			$(".footer-language ul").fadeIn(100);
		},
		function() {
			$(".footer-language ul").fadeOut(300);
		}
	);

}


$("#mostrasitemap").click(function(){
	$("#topArrow").animate({"top": "+=300px"}, "slow");
	$("#sitemap").animate({"top": "+=300px"}, "slow");
		$("#mostrasitemap").hide();
		$("#nascondisitemap").show();
  return false;
})

$("#nascondisitemap").click(function(){
	$("#topArrow").animate({"top": "-=250px"}, "slow");
	$("#sitemap").animate({"top": "-=250px"}, "slow");
		$("#mostrasitemap").show();
		$("#nascondisitemap").hide();
  return false;
})






});



