jQuery(document).ready(function($) {
    $('a[rel*=facebox]').facebox({
        loading_image : 'loading.gif',
        close_image   : 'closelabel.gif'}) 
    })

	$(document).ready(function(){
		$("div#controller").jFlow({
			slides: "#slides",
			controller: ".jFlowControl", // must be class, use . sign
			slideWrapper : "#jFlowSlide", // must be id, use # sign
			selectedWrapper: "jFlowSelected",  // just pure text, no sign
			width: "700px",
			height: "225px",
			duration: 400,
			interval: 4000, // this is the amount of milliseconds before the switch happens
			prev: ".jFlowPrev", // must be class, use . sign
			next: ".jFlowNext" // must be class, use . sign
		});
	});

//      WebFontConfig = { 
//        google: { families: [ 'Tangerine', 'Cantarell' ] }
//      };
//      (function() {
//       var wf = document.createElement('script');
//       wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
//           '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
//       wf.type = 'text/javascript';
//       wf.async = 'true';
//       var s = document.getElementsByTagName('script')[0];
//       s.parentNode.insertBefore(wf, s);
//     })();

function controllacerca()
{
q = document.ricerca.q.value;
if (q == '' || q =='Ricerca')
{
document.ricerca.q.focus;
document.ricerca.q.style.backgroundColor = "#336699";
alert('Inserire un termine di ricerca');
return false
}
return true
}
function inputricerca()
{
document.ricerca.q.value = '';
}
function inputricercadue()
{
//document.ricerca.q.value = 'Ricerca';//
}

function clicca(azienda)
{
if(azienda != "")
{
var url = "/conta-click.asp?id="+azienda+"&cosa=banner";
document.images.intro.src = url;
}
}


var map;
var gdir;
var geocoder = null;
var addressMarker;
function direzioni() {  
  if (GBrowserIsCompatible()) {
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(44.008024, 10.099204), 12);
	var marker = new GMarker(new GLatLng(44.008024, 10.099204))
	map.addOverlay(marker);
	marker.openInfoWindowHtml("<font size=2><b>TEAM TRAVEL BOOKING SAS</b><br>Piazza Betti n° 32 - 54037 - Marina di Massa (MS)</font>");
	gdir = new GDirections(map, document.getElementById("directions"));	
  }
}
function setDirections(fromAddress) {
  gdir.load("from: " + fromAddress + " to: 44.008024, 10.099204");
}
