$(document).ready(function() {
						   
	$("ul#navbar").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
     }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
						 
						 
	$(".ver_mas").click(function() {
		$(this).parent().find("span").slideToggle();
	});
	$(".empleo_toggle").click(function() {
		$(".empleo_mas").slideToggle();
	});
	
	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute  
	//Vertical Sliding  
	$('.portfolio.slidedown').hover(function(){  
		$(".cover", this).stop().animate({top:'219px'},{queue:false,duration:300});  
	}, function() {  
		$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});  
	}); 
	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});
	
	$("a.iframe").fancybox({
		'width': 650,
		'height': 400
	});

	/* Apply fancybox to multiple items */
	
	$("a.group").fancybox({
		'overlayShow'	: false,
		'autoScale'    	: true
	});
	
	
	
	$("#link1").click(function(){
		$('#slider1').anythingSlider(4);
		return false;
	});
	
	
   
    $("#navbar li ul").hover(function() {
        $(this).parent().find("a.submenu").addClass("submenu_hover");

    }, function() {
        $(this).parent().find("a.submenu").removeClass("submenu_hover");
    });
	
	
	$(".vservicios a").each(function(){
		var ancla=$(this).attr("rel");
		$(this).attr("href", "/servicios.html#"+ancla);
		
		/*$('html,body').animate( {scrollTop: $("a[name="+ancla+"]").offset().top }, 1000);*/
		
	});
	
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
		 var $target = $(this.hash);
			$target = $target.length && $target  || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate( {scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

   

});




	
	


