Team:Goettingen/suplement/scripts
From 2013.igem.org
//universal
$(".f-larger").click(function(){ $("p").css("font-size","14pt"); }); $(".f-smaller").click(function(){ $("p").css("font-size","12pt"); }); $(".f-medium").click(function(){ $("p").css("font-size","13pt"); });
function proFlyout(which){
var x="."+which,y=".f-"+which,z="#id-"+which; $(z).mouseenter(function(){$(y).fadeIn();$(x).addClass("deact");}); $(z).mouseleave(function(){$(x).removeClass("deact");$(y).hide();});
};
//4 pic slides
function fadeInOut() { $("#slide").fadeOut(500,function(){ i++; document.getElementById("slide").src=e[i]; document.getElementById("write").innerHTML = "slide: " + i; $("#slide").fadeIn(300); });
}
function starttimer()
{
//document.getElementById("slide").src=e[i]; fadeInOut(); $("#resume").hide(); $("#stop").show(); if(i >= 3) i = 0; timer=setTimeout("starttimer()",5000); };
function stoptimer()
{
clearTimeout(timer);
document.getElementById("write").innerHTML = "stopped";
$("#stop").hide();
$("#resume").show();
}
function go2right(){ stoptimer(); starttimer(); }
function go2left(){ stoptimer(); if (i == 0) i = 3; i = i - 2; if (i < 0) i =2; starttimer(); }