// JavaScript Document $(document).ready(function() { $("#hGeneral").click(function() { if (hist != "#hcGeneral" && run != "y") { temp2 = "#hcGeneral"; ptabs(hist,temp2,function(thistory) { hist = thistory; run = "n"; }); cswitch($(this), hist2, function(thistory2) { hist2 = thistory2; }); }; }); $("#hWisconsin").click(function() { if (hist != "#hcWisconsin" && run != "y") { temp2 = "#hcWisconsin"; ptabs(hist,temp2,function(thistory) { hist = thistory; run = "n"; }); cswitch($(this), hist2, function(thistory2) { hist2 = thistory2; }); }; }); $("#pGeneral").click(function() { if (production != "#pcGeneral" && run != "y") { temp2 = "#pcGeneral"; ptabs(production,temp2,function(tproduction) { production = tproduction; run = "n"; }); cswitch($(this), production2, function(tproduction2) { production2 = tproduction2; }); }; }); $("#pPonds").click(function() { if (production != "#pcPonds" && run != "y") { temp2 = "#pcPonds"; ptabs(production,temp2,function(tproduction) { production = tproduction; run = "n"; }); cswitch($(this), production2, function(tproduction2) { production2 = tproduction2; }); }; }); $("#pRaceways").click(function() { if (production != "#pcRaceways" && run != "y") { temp2 = "#pcRaceways"; ptabs(production,temp2,function(tproduction) { production = tproduction; run = "n"; }); cswitch($(this), production2, function(tproduction2) { production2 = tproduction2; }); }; }); $("#pRAS").click(function() { if (production != "#pcRAS" && run != "y") { temp2 = "#pcRAS"; ptabs(production,temp2,function(tproduction) { production = tproduction; run = "n"; }); cswitch($(this), production2, function(tproduction2) { production2 = tproduction2; }); }; }); $("#fGeneral").click(function() { if (fish != "#fcGeneral" && run != "y") { temp2 = "#fcGeneral"; ptabs(fish,temp2,function(tfish) { fish = tfish; run = "n"; }); cswitch($(this), fish2, function(tfish2) { fish2 = tfish2; }); }; }); $("#fCold").click(function() { if (fish != "#fcCold" && run != "y") { temp2 = "#fcCold"; ptabs(fish,temp2,function(tfish) { fish = tfish; run = "n"; }); cswitch($(this), fish2, function(tfish2) { fish2 = tfish2; }); }; }); $("#fCool").click(function() { if (fish != "#fcCool" && run != "y") { temp2 = "#fcCool"; ptabs(fish,temp2,function(tfish) { fish = tfish; run = "n"; }); cswitch($(this), fish2, function(tfish2) { fish2 = tfish2; }); }; }); $("#fWarm").click(function() { if (fish != "#fcWarm" && run != "y") { temp2 = "#fcWarm"; ptabs(fish,temp2,function(tfish) { fish = tfish; run = "n"; }); cswitch($(this), fish2, function(tfish2) { fish2 = tfish2; }); }; }); $("#cGeneral").click(function() { if (classes != "#ccGeneral" && run != "y") { temp2 = "#ccGeneral"; ptabs(classes,temp2,function(tclasses) { classes = tclasses; run = "n"; }); cswitch($(this), classes2, function(tclasses2) { classes2 = tclasses2; }); }; }); $("#cType1").click(function() { if (classes != "#ccType1" && run != "y") { temp2 = "#ccType1"; ptabs(classes,temp2,function(tclasses) { classes = tclasses; run = "n"; }); cswitch($(this), classes2, function(tclasses2) { classes2 = tclasses2; }); }; }); $("#cType2").click(function() { if (classes != "#ccType2" && run != "y") { temp2 = "#ccType2"; ptabs(classes,temp2,function(tclasses) { classes = tclasses; run = "n"; }); cswitch($(this), classes2, function(tclasses2) { classes2 = tclasses2; }); }; }); $("#cType3").click(function() { if (classes != "#ccType3" && run != "y") { temp2 = "#ccType3"; ptabs(classes,temp2,function(tclasses) { classes = tclasses; run = "n"; }); cswitch($(this), classes2, function(tclasses2) { classes2 = tclasses2; }); }; }); $("#dGeneral").click(function() { if (data != "#dcGeneral" && run != "y") { temp2 = "#dcGeneral"; ptabs(data,temp2,function(tdata) { data = tdata; run = "n"; }); cswitch($(this), data2, function(tdata2) { data2 = tdata2; }); }; }); $("#dCredits").click(function() { if (data != "dcCredits" && run != "y") { temp2 = "#dcCredits"; ptabs(data,temp2,function(tdata) { data = tdata; run = "n"; }); cswitch($(this), data2, function(tdata2) { data2 = tdata2; }); }; }); $("#dAttributes").click(function() { if (data != "dcAttributes" && run != "y") { temp2 = "#dcAttributes"; ptabs(data,temp2,function(tdata) { data = tdata; run = "n"; }); cswitch($(this), data2, function(tdata2) { data2 = tdata2; }); }; }); $("#dLaunch").click(function() { if (data != "dcLaunch" && run != "y") { temp2 = "#dcLaunch"; ptabs(data,temp2,function(tdata) { data = tdata; run = "n"; }); cswitch($(this), data2, function(tdata2) { data2 = tdata2; }); }; }); }); function ptabs(temp1,temp2, callback) { run = "y"; $(temp1).slideUp(400,function() { $(temp2).slideDown(400,function() { callback(temp2); }); }); }; function cswitch(tab, ctab, callback) { $(ctab).removeClass("first"); $(tab).removeClass("tab").addClass("ctab"); $(ctab).removeClass("ctab").addClass("tab"); callback(tab); } run = "n"; production = "#pcGeneral"; production2 = "#pGeneral"; hist2 = "#hGeneral"; hist = "#hcGeneral"; fish = "#fcGeneral"; fish2 = "#fGeneral"; classes = "#ccGeneral"; classes2 = "#cGeneral"; data = "#dcGeneral"; data2 = "#dGeneral";