$(document).ready(function(){
	var open1=false;
    $("#link1").click(function(){
		if(!open1) {
			if(( $("#ss-menu1").height()!=0 || $("#ss-menu2").height()!=0) && $(".bloque").height()<100) {
				open2=false;
				$(".libre").animate({"height":"0px"}, "slow");
			}
			
      $("#ss-menu1").animate({"height":"126px"}, "slow");
	  open1=true;
		}
		else {
			 $("#ss-menu1").animate({"height":"0px"}, "slow");
	  open1=false;
		}
    });
	
	
	
	
		var open2=false;
    $("#link2").click(function(){
		if(!open2) {
				if(( $("#ss-menu1").height()!=0 || $("#ss-menu2").height()!=0) && $(".bloque").height()<100) {
				open1=false;
				$(".libre").animate({"height":"0px"}, "slow");
			}
      $("#ss-menu2").animate({"height":"126px"}, "slow");
	  open2=true;
		}
		else {
			 $("#ss-menu2").animate({"height":"0px"}, "slow");
	  open2=false;
		}
    });

});


