$(document).ready(function() {
	//$("#cuatro").hover(function(){$("#menu-exp").slideToggle();});
	$("#navBar li").hover (
		function() {
			$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).slideDown(400);
		},	function() {
			$(this).find('ul:first').slideUp(400);
		}	
	);
	
	

    $(window).load(function() {
        $('#slider').nivoSlider({ effect:'fade',pauseTime:3000, pauseOnHover:false,controlNavThumbs:false  });
       
    });
	
	 $(window).load(function() {
        $('#slider2').nivoSlider({ effect:'sliceDown',pauseTime:3000, pauseOnHover:false,controlNavThumbs:false, directionNav:true, directionNavHide:false,  manualAdvance:false,  controlNav:true, animSpeed:200});
        
    });
	
	$(window).load(function() {
       $('#slider3').nivoSlider({ effect:'fade',pauseTime:3000, pauseOnHover:false,controlNavThumbs:false, directionNav:false, directionNavHide:false, controlNav:false,  });
        
    });

   


	jQuery.fn.anchorAnimate = function(settings) {

		settings = jQuery.extend({
			speed : 1100
		}, settings);	
		
		return this.each(function(){
			var caller = this
			$(caller).click(function (event) {	
				event.preventDefault()
				var locationHref = window.location.href
				var elementClick = $(caller).attr("href")
				
				var destination = $(elementClick).offset().top;
				$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
					window.location.hash = elementClick
				});
				return false;
			})
		})
	}
});
