$().ready(function() {  
	
	$('#lineone').fadeTo(1000,0).fadeIn('slow').fadeTo(3000,1).fadeTo(3000,0,function(){
		$('#linetwo').fadeTo(500,0).fadeIn('slow').fadeTo(3000,1).fadeTo(3000,0, function(){
			$('#introbg').fadeOut('slow');
		});
	});
	$('#skipintro').click(function(){
		$('#introbg').hide();
	});

	$('a.tip').aToolTip();  

	$('#dove').show();
	$('#come').show(); //map won't show if div is not visible!
	
	var latlng = new google.maps.LatLng(46.41942872963997,8.41679334640503);
    var myOptions = {
      zoom: 12,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("dove"), myOptions);

	var image = 'images/marker.png';
	var beachMarker = new google.maps.Marker({
	  position: latlng,
	  map: map,
	  icon: image
	});


	$('.ui-state-default').hover(
	  function () {	$(this).addClass("ui-state-hover");  }, 
	  function () {	$(this).removeClass("ui-state-hover");  }
	);
	
	$("#tabs").tabs({ selected: 0 });

	$('.kwicks').kwicks({  
		max : 80,  
		spacing : 3,  
		isVertical : true  
	});  

	$('.kwick').click(function(){
		$id =  $(this).attr('name') ;
		
		$('.content').each(function(){
			if( $(this).attr('id') == $id ){
				$(this).fadeIn('slow');
			}
			else{
				$(this).fadeOut();
			}		
		});
	});

	$('a[rel=SL_resto]').lightBox(); // Select all links that contains lightbox in the attribute rel
	$('a[rel=SL_hotel]').lightBox(); // Select all links that contains lightbox in the attribute rel
	$('a[rel=SL_valle]').lightBox(); // Select all links that contains lightbox in the attribute rel

});  
