$(document).ready(function() {
            $(".portafolio li").hover(function(){
                $(this).stop(true, true).animate({
                    opacity: 1
                  }, 700);
                $(this).find('span').stop(true, true).fadeIn(700);
                $(".portafolio li").not(this).stop(true, true).animate({
                    opacity: 0.2
                  }, 700);
                }, function(){
                $(this).find('span').stop(true, true).fadeOut(700);
            });
            $(".portafolio").mouseleave(function(){
                $(".portafolio li").stop(true, true).animate({
                    opacity: 1
                  }, 700);
              });

	    
	});
	
// Cufon //

Cufon.replace('h2');
Cufon.replace('#menu');



// Rotador //


$(window).load(function() {
	    $('#rotador').nivoSlider({
		effect:'fade', 
		animSpeed:500, 
		pauseTime:2000,
		directionNav:true,
		directionNavHide:false,
		controlNav:true, 
		controlNavThumbs:false
	    });

	});
	
// google map

function initialize() {
        var myLatlng = new google.maps.LatLng(-33.433751,-70.619795);
        var myOptions = {
          zoom: 15,
          center: myLatlng,
	  disableDefaultUI: true,
          mapTypeId: google.maps.MapTypeId.ROADMAP
	  
        }
        
        var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
                
        var image = 'http://buenabuena.cl/wp-content/themes/bb2011/img/isobuenabuena40x40.png';
	var myLatLng = new google.maps.LatLng(-33.433900,-70.62030);
	var beachMarker = new google.maps.Marker({
	    position: myLatLng,
	    map: map,
	    icon: image
	});
        
        google.maps.event.addListener(marker, 'click', function() {
          infowindow.open(map,marker);
        });
      }
	  
	 $(document).ready(function() {
        $('.equipo li').hover(function(){
	$(this).find('img').stop(true, true).animate({
	    bottom: 35
	  }, 500);
	$(this).find('img.over').stop(true, true).delay(800).fadeIn(600);
	}, function(){
	$(this).find('img').stop(true, true).animate({
	    bottom: -89
	  }, 500);
	$(this).find('img.over').stop(true, true).hide();
	});
	});

    
