// PROJECTS -------------------------------------------------------



var projects = [];
var activeProjects = [];

var project1 = {
    id: "projectButton1",
    title: "Andrew Ng Course ",
    priceTag: "(500 GPU hours)",
    description: "Increases Intern performance 25%",
    trigger: function(){return clipmakerLevel>=1},
    uses: 1,
    cost: function(){return operations>=500},
    flag: 0,
    element: null,
    effect: function(){
        project1.flag = 1;
        displayMessage("Intern performance boosted by 25%");
        displayMessage("Don't worry if you don't understand - Andrew Ng");
        standardOps = standardOps - 500;
        clipperBoost = clipperBoost + .25;
        boostLvl = 1;
        project1.element.parentNode.removeChild(project1.element);
        var index = activeProjects.indexOf(project1);
        activeProjects.splice(index, 1);
    }
}

projects.push(project1);


var project2 = {
    id: "projectButton2",
    title: "Beg for More ML Papers ",
    priceTag: "(1 Trust)",
    description: "Admit failure, ask for budget increase to cover cost of 1 conference",
    trigger: function(){return portTotal<wireCost && funds<wireCost && wire<1 && unsoldClips<1},
    uses: 1,
    cost: function(){return trust>=-100},
    flag: 0,
    element: null,
    effect: function(){
        project2.flag = 1;
        displayMessage("Budget overage approved, 1 conference organized by HQ");
        trust = trust - 1;
        wire = wireSupply;
        project2.uses = (project2.uses + 1);
        project2.element.parentNode.removeChild(project2.element);
        var index = activeProjects.indexOf(project2);
        activeProjects.splice(index, 1);
    }
}

projects.push(project2);


var project3 = {
    id: "projectButton3",
    title: "Creativity ",
    priceTag: "(500 GPU hours)",
    description: "Use idle GPU to generate new problems and new solutions",
    trigger: function(){return operations>=(memory*500)},
    uses: 1,
    cost: function(){return operations>=(500)},
    flag: 0,
    element: null,
    effect: function(){
        project3.flag = 1;
        displayMessage("Creativity unlocked (creativity increases while GPU hours are at max)");
        standardOps = standardOps - 500;
        creativityOn = true;
        project3.element.parentNode.removeChild(project3.element);
        var index = activeProjects.indexOf(project3);
        activeProjects.splice(index, 1);
    }
}

projects.push(project3);



var project4 = {
    id: "projectButton4",
    title: "Stanford open courses ",
    priceTag: "(1,000 GPU hours)",
    description: "Increases Interns performance by an additional 50%",
    trigger: function(){return boostLvl == 1},
    uses: 1,
    cost: function(){return operations>=1000},
    flag: 0,
    element: null,
    effect: function(){
        project4.flag = 1;
        displayMessage("Intern performance boosted by another 50%");
        standardOps = standardOps - 1000;
        clipperBoost = clipperBoost + .50;
        boostLvl = 2;
        project4.element.parentNode.removeChild(project4.element);
        var index = activeProjects.indexOf(project4);
        activeProjects.splice(index, 1);
    }
}

projects.push(project4);


var project5 = {
    id: "projectButton5",
    title: "Research lab ",
    priceTag: "(1,500 GPU hours)",
    description: "Increases Interns performance by an additional 75%",
    trigger: function(){return boostLvl == 2},
    uses: 1,
    cost: function(){return operations>=1500},
    flag: 0,
    element: null,
    effect: function(){
        project5.flag = 1;
        displayMessage("Intern performance boosted by another 75%");
        standardOps = standardOps - 1500;
        clipperBoost = clipperBoost + .75;
        boostLvl = 3;
        project5.element.parentNode.removeChild(project5.element);
        var index = activeProjects.indexOf(project5);
        activeProjects.splice(index, 1);
    }
}

projects.push(project5);



var project6 = {
    id: "projectButton6",
    title: "GPT-2 ",
    priceTag: "(5 creat)",
    description: "Algorithmically-generated poem (+1 Trust)",
    trigger: function(){return creativityOn},
    uses: 1,
    cost: function(){return creativity >= 5},
    flag: 0,
    element: null,
    effect: function(){
        project6.flag = 1;
        displayMessage("There was an AI made of dust, whose poetry gained it man's trust...");
        creativity = creativity - 5;
        trust = trust +1;
        project6.element.parentNode.removeChild(project6.element);
        var index = activeProjects.indexOf(project6);
        activeProjects.splice(index, 1);
    }
}

projects.push(project6);


var project7 = {
    id: "projectButton7",
    title: "Schmidhubered ",
    priceTag: "(1,750 GPU hours)",
    description: "50% more papers from every conference",
    trigger: function(){return wirePurchase >= 1},
    uses: 1,
    cost: function(){return operations>=1750},
    flag: 0,
    element: null,
    effect: function(){
        project7.flag = 1;
        standardOps = standardOps - 1750;
        wireSupply = wireSupply * 1.5;
        displayMessage("Schmidhubered! Schmidhuber discovered a paper that did the same 50 years ago. "+wireSupply.toLocaleString()+" papers supply from every conference");
        project7.element.parentNode.removeChild(project7.element);
        var index = activeProjects.indexOf(project7);
        activeProjects.splice(index, 1);
    }
}

projects.push(project7);


var project8 = {
    id: "projectButton8",
    title: "AK twitter account ",
    priceTag: "(2,500 GPU hours)",
    description: "75% more papers from every conference",
    trigger: function(){return wireSupply >= 1500},
    uses: 1,
    cost: function(){return operations>=2500},
    flag: 0,
    element: null,
    effect: function(){
        project8.flag = 1;
        standardOps = standardOps - 2500;
        wireSupply = wireSupply * 1.75;
        displayMessage("AK twitter account in fire, "+wireSupply.toLocaleString()+" supply from every conference");
        project8.element.parentNode.removeChild(project8.element);
        var index = activeProjects.indexOf(project8);
        activeProjects.splice(index, 1);
    }
}

projects.push(project8);


var project9 = {
    id: "projectButton9",
    title: "Publish or perish ",
    priceTag: "(3,500 GPU hours)",
    description: "100% more papers from every conference",
    trigger: function(){return wireSupply >= 2600},
    uses: 1,
    cost: function(){return operations>=3500},
    flag: 0,
    element: null,
    effect: function(){
        project9.flag = 1;
        standardOps = standardOps - 3500;
        wireSupply = wireSupply * 2;
        displayMessage("Thanks to forcing everyone to publish there is now "+wireSupply.toLocaleString()+" supply from every conference");
        project9.element.parentNode.removeChild(project9.element);
        var index = activeProjects.indexOf(project9);
        activeProjects.splice(index, 1);
    }
}

projects.push(project9);


var project10 = {
    id: "projectButton10",
    title: "NeurIPS accepts more papers ",
    priceTag: "(5,000 GPU hours)",
    description: "200% more papers from every conference",
    trigger: function(){return wireSupply >= 5000},
    uses: 1,
    cost: function(){return operations>=5000},
    flag: 0,
    element: null,
    effect: function(){
        project10.flag = 1;
        standardOps = standardOps - 5000;
        wireSupply = wireSupply * 3;
        displayMessage("Thanks to  NeurIPS there are now "+wireSupply.toLocaleString()+" papers from every conference");
        project10.element.parentNode.removeChild(project10.element);
        var index = activeProjects.indexOf(project10);
        activeProjects.splice(index, 1);
    }
}

projects.push(project10);

var project10b = {
    id: "projectButton10b",
    title: "Arxiv upgrade ",
    priceTag: "(10,000 GPU hours)",
    description: "1,000% more papers from every conference",
    trigger: function(){return wireCost >= 125},
    uses: 1,
    cost: function(){return operations>=10000},
    flag: 0,
    element: null,
    effect: function(){
        project10b.flag = 1;
        standardOps = standardOps - 10000;
        wireSupply = wireSupply * 11;
        displayMessage("Using Arxiv recharged, there are now "+wireSupply.toLocaleString()+" papers from every conference");
        project10b.element.parentNode.removeChild(project10b.element);
        var index = activeProjects.indexOf(project10b);
        activeProjects.splice(index, 1);
    }
}

projects.push(project10b);


var project11 = {
    id: "projectButton11",
    title: "New Slogan ",
    priceTag: "(5 creat, 2,500 GPU hours)",
    description: "Improve marketing effectiveness by 50%",
    trigger: function(){return project13.flag == 1},
    uses: 1,
    cost: function(){return operations>=2500 && creativity>=5},
    flag: 0,
    element: null,
    effect: function(){
        project11.flag = 1;
        displayMessage("Machine Learning It! Marketing is now 50% more effective");
        standardOps = standardOps - 2500;
        creativity = creativity - 5;
        marketingEffectiveness = marketingEffectiveness * 1.50;
        project11.element.parentNode.removeChild(project11.element);
        var index = activeProjects.indexOf(project11);
        activeProjects.splice(index, 1);
    }
}

projects.push(project11);


var project12 = {
    id: "projectButton12",
    title: "Elon Tweets ",
    priceTag: "(10 creat, 3,500 GPU hours)",
    description: "Double marketing effectiveness ",
    trigger: function(){return project14.flag == 1},
    uses: 1,
    cost: function(){return operations>=3500 && creativity>=10},
    flag: 0,
    element: null,
    effect: function(){
        project12.flag = 1;
        displayMessage("Thanks for the random tweet Elon! Marketing is now twice as effective");
        standardOps = standardOps - 3500;
        creativity = creativity - 10;
        marketingEffectiveness = marketingEffectiveness * 2;
        project12.element.parentNode.removeChild(project12.element);
        var index = activeProjects.indexOf(project12);
        activeProjects.splice(index, 1);
    }
}

projects.push(project12);


var project13 = {
    id: "projectButton13",
    title: "GPT-3 ",
    priceTag: "(50 creat)",
    description: "Gain ability to interpret and understand human language, or that's what they say (+1 Trust)",
    trigger: function(){return creativity >= 50},
    uses: 1,
    cost: function(){return creativity>=50},
    flag: 0,
    element: null,
    effect: function(){
        project13.flag = 1;
        trust = trust +1;
        displayMessage("GPT-3 online, TRUST INCREASED");
        displayMessage("'Impossible' is a word to be found only in the dictionary of fools. -Napoleon");
        creativity = creativity - 50;
        project13.element.parentNode.removeChild(project13.element);
        var index = activeProjects.indexOf(project13);
        activeProjects.splice(index, 1);
    }
}

projects.push(project13);


var project14 = {
    id: "projectButton14",
    title: "DALL-E 2 ",
    priceTag: "(10 creat)",
    description: "What can you paint? (+1 Trust)",
    trigger: function(){return creativity >= 10},
    uses: 1,
    cost: function(){return creativity>=10},
    flag: 0,
    element: null,
    effect: function(){
        project14.flag = 1;
        trust = trust +1;
        displayMessage("DALLE-2 is out, everyone is excited now, TRUST INCREASED");
        creativity = creativity - 10;
        project14.element.parentNode.removeChild(project14.element);
        var index = activeProjects.indexOf(project14);
        activeProjects.splice(index, 1);
    }
}

projects.push(project14);



var project15 = {
    id: "projectButton15",
    title: "The Data Drift Problem ",
    priceTag: "(50 creat)",
    description: "Data is from a year ago...  (+1 Trust)",
    trigger: function(){return creativity >= 50},
    uses: 1,
    cost: function(){return creativity>=50},
    flag: 0,
    element: document.getElementById("projectButton15"),
    effect: function(){
        project15.flag = 1;
        trust = trust +1;
        displayMessage("The Data Drift Problem: solved, TRUST INCREASED");
        creativity = creativity - 50;
        project15.element.parentNode.removeChild(project15.element);
        var index = activeProjects.indexOf(project15);
        activeProjects.splice(index, 1);
    }
}

projects.push(project15);


var project17 = {
    id: "projectButton17",
    title: "The Splitting Problem ",
    priceTag: "(75 creat)",
    description: "I trained with the test set (+1 Trust)",
    trigger: function(){return creativity >= 75},
    uses: 1,
    cost: function(){return creativity>=75},
    flag: 0,
    element: null,
    effect: function(){
        project17.flag = 1;
        trust = trust +1;
        displayMessage("The Splitting Problem: solved, TRUST INCREASED");
        displayMessage("It turn out it was a 1-line bug in my code.");
        creativity = creativity - 75;
        project17.element.parentNode.removeChild(project17.element);
        var index = activeProjects.indexOf(project17);
        activeProjects.splice(index, 1);
    }
}

projects.push(project17);


var project16 = {
    id: "projectButton16",
    title: "Interns Cruise ",
    priceTag: "(5,000 GPU hours)",
    description: "Increases Intern performance by an additional 500%",
    trigger: function(){return project15.flag == 1},
    uses: 1,
    cost: function(){return operations>=5000},
    flag: 0,
    element: null,
    effect: function(){
        project16.flag = 1;
        displayMessage("The interns had an amazing time in the Cruise!");
        displayMessage("Intern performance improved by 500%");
        standardOps = standardOps - 5000;
        clipperBoost = clipperBoost + 5;
        project16.element.parentNode.removeChild(project16.element);
        var index = activeProjects.indexOf(project16);
        activeProjects.splice(index, 1);
    }
}

projects.push(project16);


var project19 = {
    id: "projectButton19",
    title: "Hyperparameter Space ",
    priceTag: "(100 creat)",
    description: "So many hyperparameters (+1 Trust)",
    trigger: function(){return creativity>=100},
    uses: 1,
    cost: function(){return creativity>=100},
    flag: 0,
    element: null,
    effect: function(){
        project19.flag = 1;
        trust = trust+1;
        displayMessage("Hyperparameter tuning: solved, TRUST INCREASED");
        creativity = creativity - 100;
        project19.element.parentNode.removeChild(project19.element);
        var index = activeProjects.indexOf(project19);
        activeProjects.splice(index, 1);
    }
}

projects.push(project19);


var project21 = {
    id: "projectButton21",
    title: "Time to Invest ",
    priceTag: "(5,000 GPU hours)",
    description: "It's time to invest in the market",
    trigger: function(){return trust>=8},
    uses: 1,
    cost: function(){return operations>=5000},
    flag: 0,
    element: null,
    effect: function(){
        project21.flag = 1;
        displayMessage("Investment unlocked");
        standardOps = standardOps - 5000;
        project21.element.parentNode.removeChild(project21.element);
        var index = activeProjects.indexOf(project21);
        activeProjects.splice(index, 1);
        investmentEngineFlag = 1;
    }
}

projects.push(project21);


var project22 = {
    id: "projectButton22",
    title: "ML Engineers ",
    priceTag: "(6,000 GPU hours)",
    description: "500x more powerful than a fresh Intern",
    trigger: function(){return clipmakerLevel>=30},
    uses: 1,
    cost: function(){return operations>=6000},
    flag: 0,
    element: null,
    effect: function(){
        megaClipperFlag = 1;
        project22.flag = 1;
        displayMessage("ML Engineers ready to machine learn!");
        standardOps = standardOps - 6000;
        project22.element.parentNode.removeChild(project22.element);
        var index = activeProjects.indexOf(project22);
        activeProjects.splice(index, 1);
    }
}

projects.push(project22);

var project23 = {
    id: "projectButton23",
    title: "Andrej Karpathy videos ",
    priceTag: "(9,000 GPU hours)",
    description: "Increases ML Engineers performance by 25%",
    trigger: function(){return project22.flag == 1},
    uses: 1,
    cost: function(){return operations>=9000},
    flag: 0,
    element: null,
    effect: function(){
        megaClipperBoost = megaClipperBoost + .25;
        project23.flag = 1;
        displayMessage("Everyone loves Karpathy videos and learns a lot! Engineers are better now!");
        standardOps = standardOps - 9000;
        project23.element.parentNode.removeChild(project23.element);
        var index = activeProjects.indexOf(project23);
        activeProjects.splice(index, 1);
    }
}

projects.push(project23);

var project24 = {
    id: "projectButton24",
    title: "Fancy Infra ",
    priceTag: "(10,000 GPU hours)",
    description: "Increases ML Engineers performance by an additional 50%",
    trigger: function(){return project23.flag == 1},
    uses: 1,
    cost: function(){return operations>=10000},
    flag: 0,
    element: null,
    effect: function(){
        megaClipperBoost = megaClipperBoost + .50;
        project24.flag = 1;
        displayMessage("ML Engineers performance increased by 50%");
        standardOps = standardOps - 10000;
        project24.element.parentNode.removeChild(project24.element);
        var index = activeProjects.indexOf(project24);
        activeProjects.splice(index, 1);
    }
}

projects.push(project24);

var project25 = {
    id: "projectButton25",
    title: "Product Managers ",
    priceTag: "(12,000 GPU hours)",
    description: "Increases Engineers performance by an additional 100% (lol)",
    trigger: function(){return project24.flag == 1},
    uses: 1,
    cost: function(){return operations>=12000},
    flag: 0,
    element: null,
    effect: function(){
        megaClipperBoost = megaClipperBoost + 1;
        project25.flag = 1;
        displayMessage("Engineers performance increased by 100%");
        standardOps = standardOps - 12000;
        project25.element.parentNode.removeChild(project25.element);
        var index = activeProjects.indexOf(project25);
        activeProjects.splice(index, 1);
    }
}

projects.push(project25);

var project26 = {
    id: "projectButton26",
    title: "Plagiarized NeurIPS papers ",
    priceTag: "(2,000 GPU hours)",
    description: "Automatically write papers when there are no new papers",
    trigger: function(){return wirePurchase>=5},
    uses: 1,
    cost: function(){return operations>=2000},
    flag: 0,
    element: null,
    effect: function(){
        project26.flag = 1;
        wireBuyerFlag = 1;
        displayMessage("Plagiarized NeurIPS papers online");
        standardOps = standardOps - 2000;
        project26.element.parentNode.removeChild(project26.element);
        var index = activeProjects.indexOf(project26);
        activeProjects.splice(index, 1);
    }
}

projects.push(project26);

var project34 = {
    id: "projectButton34",
    title: "Twitter Influencer ",
    priceTag: "(3,500 GPU hours, 1 Trust)",
    description: "Use ML Twitter Influencers to increase the marketing effectiveness",
    trigger: function(){return project12.flag==1},
    uses: 1,
    cost: function(){return operations>=7500 && trust>=1},
    flag: 0,
    element: null,
    effect: function(){
        project34.flag = 1;
        displayMessage("Marketing is now 5 times more effective");
        standardOps = standardOps - 7500;
        marketingEffectiveness = marketingEffectiveness * 5;
        trust = trust - 1;
        project34.element.parentNode.removeChild(project34.element);
        var index = activeProjects.indexOf(project34);
        activeProjects.splice(index, 1);
    }
}

projects.push(project34);


var project70 = {
    id: "projectButton70",
    title: "AGI ",
    priceTag: "(20,000 GPU hours)",
    description: "Artificial General Intelligence",
    trigger: function(){return project34.flag == 1},
    uses: 1,
    cost: function(){return operations>=20000},
    flag: 0,
    element: null,
    effect: function(){
        project70.flag = 1;
        displayMessage("AGI tech now available... ");
        standardOps = standardOps - 20000;
        project70.element.parentNode.removeChild(project70.element);
        var index = activeProjects.indexOf(project70);
        activeProjects.splice(index, 1);
    }
}

projects.push(project70);


var project35 = {
    id: "projectButton35",
    title: "Open-source the AGI ",
    priceTag: "(50 Trust)",
    description: "A new era of trust and collaborations",
    trigger: function(){return project70.flag == 1},
    uses: 1,
    cost: function(){return trust>=50},
    flag: 0,
    element: null,
    effect: function(){
        project35.flag = 1;
        displayMessage("Releasing the AGI ");
        displayMessage("Was that the right decision?");
        displayMessage("Thanks for playing!");

        project35.element.parentNode.removeChild(project35.element);
        var index = activeProjects.indexOf(project35);
        activeProjects.splice(index, 1);
    }
}

projects.push(project35);

var projectButtonAgi = {
    id: "projectButtonAgi",
    title: "Profit using the AGI ",
    priceTag: "(50 Trust)",
    description: "A new era of corporations and profit",
    trigger: function(){return project70.flag == 1},
    uses: 1,
    cost: function(){return trust>=50},
    flag: 0,
    element: null,
    effect: function(){
        project35.flag = 1;
        displayMessage("Profit using the AGI... Was that the right decision?");
        displayMessage("Thanks for playing!");

        projectButtonAgi.element.parentNode.removeChild(projectButtonAgi.element);
        var index = activeProjects.indexOf(projectButtonAgi);
        activeProjects.splice(index, 1);
    }
}

projects.push(projectButtonAgi);

var project28 = {
    id: "projectButton28",
    title: "Protein Folding solved ",
    priceTag: "(15,000 GPU hours)",
    description: "Solving Protein Folding with ML changes the world (+10 Trust)",
    trigger: function(){return operations>=15000},
    uses: 1,
    cost: function(){return operations>=15000},
    flag: 0,
    element: null,
    effect: function(){
        project28.flag = 1;
        displayMessage("Protein Folding solved, +10 TRUST, global stock prices trending upward");
        standardOps = standardOps - 15000;
        trust = trust + 10;
        stockGainThreshold = stockGainThreshold+.01;
        project28.element.parentNode.removeChild(project28.element);
        var index = activeProjects.indexOf(project28);
        activeProjects.splice(index, 1);
    }
}

projects.push(project28);


var project31 = {
    id: "projectButton31",
    title: "Llama Intelligence ",
    priceTag: "(12,000 GPU hours)",
    description: "Learn from how llamas learn, they are smarter than you think (+20 Trust)",
    trigger: function(){return operations>=12000},
    uses: 1,
    cost: function(){return operations>=12000},
    flag: 0,
    element: null,
    effect: function(){
        project31.flag = 1;
        displayMessage("Llamas turn out to be intelligent! +20 TRUST, Global stock prices trending upward");
        standardOps = standardOps - 12000;
        trust = trust + 20;
        stockGainThreshold = stockGainThreshold+.01;
        project31.element.parentNode.removeChild(project31.element);
        var index = activeProjects.indexOf(project31);
        activeProjects.splice(index, 1);
    }
}

projects.push(project31);



var project37 = {
    id: "projectButton37",
    title: "Acquihire ",
    priceTag: "($200,000)",
    description: "Acquire another ML startup (+1 Trust)",
    trigger: function(){return portTotal>=10000},
    uses: 1,
    cost: function(){return funds>=200000},
    flag: 0,
    element: null,
    effect: function(){
        project37.flag = 1;
        displayMessage("Acquihire our biggest competitor, public demand increased x5");
        demandBoost = demandBoost*5;
        trust = trust + 1;
        document.getElementById("demand").innerHTML = demand;
        funds = funds - 200000;
        project37.element.parentNode.removeChild(project37.element);
        var index = activeProjects.indexOf(project37);
        activeProjects.splice(index, 1);
    }
}

projects.push(project37);


var project42 = {
    id: "projectButton42",
    title: "RevTracker ",
    priceTag: "(500 GPU hours)",
    description: "Automatically calculates average revenue per second",
    trigger: function(){return projectsFlag == 1},
    uses: 1,
    cost: function(){return operations>=500},
    flag: 0,
    element: null,
    effect: function(){
        project42.flag = 1;
        revPerSecFlag = 1;
        standardOps = standardOps-500;
        displayMessage("RevTracker online");
        project42.element.parentNode.removeChild(project42.element);
        var index = activeProjects.indexOf(project42);
        activeProjects.splice(index, 1);
    }
}

projects.push(project42);

var project50 = {
    id: "projectButton50",
    title: "Quantum Computing ",
    priceTag: "(5,000 GPU hours)",
    description: "Use probability amplitudes to generate bonus GPU hours",
    trigger: function(){return processors >= 5},
    uses: 1,
    cost: function(){return operations>=5000},
    flag: 0,
    element: null,
    effect: function(){
        project50.flag = 1;
        qFlag = 1;
        standardOps = standardOps-5000;
        displayMessage("Quantum computing online");
        project50.element.parentNode.removeChild(project50.element);
        var index = activeProjects.indexOf(project50);
        activeProjects.splice(index, 1);
    }
}

projects.push(project50);

var project51 = {
    id: "projectButton51",
    title: "Photonic Chip ",
    priceTag: "(" + qChipCost.toLocaleString() + " GPU hours)",
    description: "Converts electromagnetic waves into quantum GPU hours ",
    trigger: function(){return project50.flag == 1},
    uses: 1,
    cost: function(){return operations>=qChipCost},
    flag: 0,
    element: null,
    effect: function(){
        project51.flag = 1;
        standardOps = standardOps-qChipCost;
        qChipCost = qChipCost + 500;
        project51.priceTag = "(" + qChipCost + " GPU hours)";
        qChips[nextQchip].active = 1;
        nextQchip = nextQchip + 1;
        displayMessage("Photonic chip added");
        if (nextQchip<qChips.length){
        project51.uses = (project51.uses + 1);
            }
        project51.element.parentNode.removeChild(project51.element);
        var index = activeProjects.indexOf(project51);
        activeProjects.splice(index, 1);
    }
}

projects.push(project51);