Team:UCL London/js/manufacturing

From 2011.igem.org

Revision as of 05:06, 22 September 2011 by PhilippBoeing (Talk | contribs)

// JavaScript Document window.addEvent('load',function(){ $$("#manufacturing-concept #iptg").setStyle("opacity",0); $$("#manufacturing-concept #iptg").setStyle("display","inline"); $$("#manufacturing-concept #xylene").setStyle("opacity",0); $$("#manufacturing-concept #xylene").setStyle("display","inline"); $$("#manufacturing-concept #therm").setStyle("opacity",0); $$("#manufacturing-concept #therm").setStyle("display","inline");

Asset.image("Ucl-manpro-background-normal.jpg");

Asset.image("Ucl-manpro-background-1.jpg"); Asset.image("Ucl-manpro-background-2.jpg"); Asset.image("Ucl-manpro-background-3.jpg"); Asset.image("Ucl-manpro-background-12.jpg"); Asset.image("Ucl-manpro-background-yfp.jpg"); Asset.image("Ucl-manpro-background-gfp.jpg"); Asset.image("Ucl-manpro-background-cfp.jpg");

function iptgFadeIn(){ var iptg = $$("#manufacturing-concept #iptg")[0];

var iptgMorph = new Fx.Morph(iptg, {duration: 150});

iptgMorph.start({ link:'cancel', 'top': 135, 'left': 26, 'opacity': 1 }); }

function iptgFadeOut(){ var iptg = $$("#manufacturing-concept #iptg")[0];

var iptgMorph = new Fx.Morph(iptg, {duration: 150});

iptgMorph.start({ link:'cancel', 'top': 121, 'left': 8, 'opacity': 0 }); }

function xyleneFadeIn(){ var iptg = $$("#manufacturing-concept #xylene")[0];

var iptgMorph = new Fx.Morph(iptg, {duration: 150});

iptgMorph.start({ link:'cancel', 'top': 152, 'left': 655, 'opacity': 1 });

var therm = $$("#manufacturing-concept #therm")[0];

var thermMorph = new Fx.Morph(therm, {duration: 150});

thermMorph.start({ link:'cancel', 'opacity': 1 }); }

function xyleneFadeOut(){ var iptg = $$("#manufacturing-concept #xylene")[0];

var iptgMorph = new Fx.Morph(iptg, {duration: 150});

iptgMorph.start({ link:'cancel', 'top': 140, 'left': 700, 'opacity': 0 });

var therm = $$("#manufacturing-concept #therm")[0];

var thermMorph = new Fx.Morph(therm, {duration: 150});

thermMorph.start({ link:'cancel', 'opacity': 0 }); }

function turnOn(divname){ $$(divname).setStyle("display","inline"); }

function turnOff(divname){ $$(divname).setStyle("display","none"); }

function changecellto(newcell){ turnOff("#manufacturing-concept #"+currentcell); currentcell = newcell; turnOn("#manufacturing-concept #"+currentcell); }

var currentcell = "c";

$$("#manufacturing-concept #flowbar #fermentation").addEvent('mouseenter',function(){ changecellto("c12"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); iptgFadeIn(); });

$$("#manufacturing-concept #flowbar #fermentation").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight"); iptgFadeOut(); });

$$("#manufacturing-concept #flowbar #harvesting").addEvent('mouseenter',function(){ changecellto("c3"); turnOn("#manufacturing-concept #flowbar #harvesting_highlight"); xyleneFadeIn(); });

$$("#manufacturing-concept #flowbar #harvesting").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #harvesting_highlight"); xyleneFadeOut(); });

$$("#manufacturing-concept #hover_supercoiliology").addEvent('mouseenter',function(){ changecellto("c1"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); iptgFadeIn(); });

$$("#manufacturing-concept #hover_supercoiliology").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight"); iptgFadeOut(); });

$$("#manufacturing-concept #hover_magnetosites").addEvent('mouseenter',function(){ changecellto("c2"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); });

$$("#manufacturing-concept #hover_magnetosites").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight");});

$$("#manufacturing-concept #hover_extractery").addEvent('mouseenter',function(){ changecellto("c3"); turnOn("#manufacturing-concept #flowbar #harvesting_highlight"); xyleneFadeIn(); });

$$("#manufacturing-concept #hover_extractery").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #harvesting_highlight"); xyleneFadeOut(); });

$$("#manufacturing-concept #hover_shearometer").addEvent('mouseenter',function(){ changecellto("cgfp"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); });

$$("#manufacturing-concept #hover_shearometer").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight");});

$$("#manufacturing-concept #hover_oximeter").addEvent('mouseenter',function(){ changecellto("cyfp"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); });

$$("#manufacturing-concept #hover_oximeter").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight");});

$$("#manufacturing-concept #hover_supercoilometer").addEvent('mouseenter',function(){ changecellto("ccfp"); turnOn("#manufacturing-concept #flowbar #fermentation_highlight"); });

$$("#manufacturing-concept #hover_supercoilometer").addEvent('mouseout',function(){ changecellto("c"); turnOff("#manufacturing-concept #flowbar #fermentation_highlight");}); });