
function calcularss(){
	var fecha = document.calcular_fecha.ss.value;
	
		$.ajax({
	   type: "POST",
	   url: "calcular-ss.php",
	   data: "ano="+fecha,
	   success: function(respuesta){
					   document.calcular_fecha.submit(); 
	   }
	 });	
}


$(function() {

$(".menu ul li div.submenu").hover(function(){
$(this).addClass("submenu_visible");
}, function(){
$(this).removeClass("submenu_visible");
});

	$(".menu ul li").hover(function() {
		$(this).addClass("hover");
		$(this).fadeTo("fast", 0.25); 

	}, function() {
		$(this).removeClass("hover");	
			$(this).fadeTo("fast", 1); 
	
	});
	
});


$(document).ready(function() { 
    //Speed of the slideshow    
	 var speed = 5000; 

 
      $(".banner").delay(4000).fadeOut(600).fadeIn(200);
	  //$(".element-rotated").delay(400).hide("slide", { direction: "down" }, 1000);




});


$(window).load(function()
{
	$('#rotating-elements').sideswap({
		navigation : false,
		transition_speed : 700,
		display_time : 3000
	});
});


$(function() {
				/**
				 * El menu
				 */
				var $menu = $('#menu');
				
				/**
				 * para cada elemento de la lista,
				 * mostramos el submenu al estar HOVER y
				 * expandimos el elemento (title) a 510px
				 */
				$menu.children('li').each(function(){
					var $this = $(this);
					var $span = $this.children('span');
					$span.data('width',$span.width());
					
					$this.bind('mouseenter',function(){
						$menu.find('.submenu').stop(true,true).hide();
						$span.stop().animate({'width':'510px'},300,function(){
							$this.find('.submenu').slideDown(300);
						});
					}).bind('mouseleave',function(){
						$this.find('.submenu').stop(true,true).hide();
						$span.stop().animate({'width':$span.data('width')+'px'},300);
					});
				});
            });
