var tiempo = 600;

$(document).ready(init);

function init(){
	$("#mMenu li").mouseover(ampliaFoto).mouseout(reduceFoto);
	
	$("#bgHeader").css("opacity", "0").animate({ opacity:"1"}, 700);
	$("#bgHeader h2").css("opacity", "0").animate({ opacity:"1"}, 2200);
	
	
	$("#desplegable h4").click(persiana)
	$("#desplegable div").hide()
	$("#desplegable div:first").show();
	$("#desplegable2 h4").click(persiana2)
	$("#desplegable2 div").hide()
	$("#desplegable2 div:first").show();
	$("#desplegableAcc h4").click(persianaAcc)
	$("#desplegableAcc .floatR").hide()
	$("#desplegableAcc .floatR:first").show();

}


function persiana(){
	$("#desplegable h4").next().hide();
	$(this).next().show();
	
}

function persiana2(){
	$("#desplegable2 h4").next().hide();
	$(this).next().show();
	
}

function persianaAcc(){
	$("#desplegableAcc h4").next().hide();
	$(this).next().show();
	
}


function ampliaFoto(){
	$(this).find("img").css("position", "relative").stop().animate({ width:"107px", left:"-5", height:"56px", top:"-5px", opacity:"0.8" }, tiempo);
}

function reduceFoto(){
	$(this).find("img").css("position", "relative").stop().animate({ width:"97px", left:"0px", height:"51px", top:"0px", opacity:"1"  }, tiempo);
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


