﻿

/*  Chicken Caesar Salad  */
function caesar() {
    this.type = "caesar";
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 8.99;
        return p.toFixed(2);
    }
}

/*  Classic Sandwich  */
function classic() {
    this.type = "classic";
    this.full = true;
    this.meat = "No Meat";                // 'None'  Roast Beef'  'Pastrami'  'Turkey'  'Ham'
    this.bread = "No Bread";               // 'Sliced Wheat Bread'  'Sliced White Bread' 'Sliced Black Marble Rye' 'Sliced Sourdough' 'White Ciabatta Roll' 'Whole Grain Ciabatta Roll'
    this.cheese = "No";              // 'Cheddar'  'Monterey Jack'  'Provolone'  'Pepper Jack'  'Swiss'
    this.mayonnaise = false;
    this.mustard = false;
    this.lettuce = false;
    this.tomato = false;
    this.onions = false;
    this.sprouts = false;
    this.pickles = false;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";

    this.clone = function(dest) {
        dest.meat = this.meat;
        dest.bread = this.bread;
        dest.cheese = this.cheese;
        dest.mayonnaise = this.mayonnaise;
        dest.mustard = this.mustard;
        dest.lettuce = this.lettuce;
        dest.tomato = this.tomato;
        dest.onions = this.onions;
        dest.sprouts = this.sprouts;
        dest.pickles = this.pickles;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }

    this.price = function() {
    var p;

        if (this.full)
            p = 6.99;
        else
            p = 4.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00;
        return p.toFixed(2);
    }
}

/*  Crab and Shrimp Salad  */
function crab() {
    this.type = "crab";
    this.instructions = "";
    this.source = "index";
    this.source = "index";
    this.clone = function(dest) {
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 10.99;
        return p.toFixed(2);
    }
}

/* Desserts  */

function dessert() {
    this.type = "dessert";
    this.berryCrumbleQty = 0;
    this.iceCreamQty = 0;
    this.toffeeCookieQty = 0;
    this.chocolateCookieQty = 0;
    this.peanutCookieQty = 0; 
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.choice = this.choice;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 0;
        p += (this.berryCrumbleQty * 1.95);
        p += (this.iceCreamQty * 2.75);
        p += (this.toffeeCookieQty * 0.85);
        p += (this.chocolateCookieQty * 0.85);
        p += (this.peanutCookieQty * 0.85);

        return p.toFixed(2);
    }
}
function drinks() {
    this.type = "drinks";      // never change
    this.milkQty = 0;
    this.chocMilkQty = 0;
    this.appleJuiceQty = 0;

    this.smallCokeQty = 0;
    this.largeCokeQty = 0;

    this.smallDietCokeQty = 0;
    this.largeDietCokeQty = 0;

    this.smallSpriteQty = 0;
    this.largeSpriteQty = 0;

    this.smallRootBeerQty = 0;
    this.largeRootBeerQty = 0;

    this.smallLemonadeQty = 0;
    this.largeLemonadeQty = 0;

    this.smallBlackIceTeaQty = 0;
    this.largeBlackIceTeaQty = 0;

    this.smallBlackIceTeaSweetenedQty = 0;
    this.largeBlackIceTeaSweetenedQty = 0;

    this.smallPassionIceTeaQty = 0;
    this.largePassionIceTeaQty = 0;

    this.smallPassionIceTeaSweetenedQty = 0;
    this.largePassionIceTeaSweetenedQty = 0;


    this.smallGreenIceTeaQty = 0;
    this.largeGreenIceTeaQty = 0;

    this.smallGreenIceTeaSweetenedQty = 0;
    this.largeGreenIceTeaSweetenedQty = 0;


    this.smallBlackTeaLemonadeQty = 0;
    this.largeBlackTeaLemonadeQty = 0;
    
    this.smallBlackTeaLemonadeSweetenedQty = 0;
    this.largeBlackTeaLemonadeSweetenedQty = 0;


    this.smallPassionTeaLemonadeQty = 0;
    this.largePassionTeaLemonadeQty = 0;

    this.smallPassionTeaLemonadeSweetenedQty = 0;
    this.largePassionTeaLemonadeSweetenedQty = 0;


    this.smallGreenTeaLemonadeQty = 0;
    this.largeGreenTeaLemonadeQty = 0;

    this.smallGreenTeaLemonadeSweetenedQty = 0;
    this.largeGreenTeaLemonadeSweetenedQty = 0;


    this.smallCoffeeQty = 0;
    this.largeCoffeeQty = 0;

    this.smallHotTeaQty = 0;
    this.largeHotTeaQty = 0;

    this.smallHotTeaSweetenedQty = 0;
    this.largeHotTeaSweetenedQty = 0;

    
    this.source = "index";
    this.clone = function(dest) {
        dest.milkQty = this.milkQty;
        dest.chocMilkQty = this.chocMilkQty;
        dest.appleJuiceQty = this.appleJuiceQty;

        dest.smallCokeQty = this.smallCokeQty;
        dest.largeCokeQty = this.largeCokeQty;

        dest.smallDietCokeQty = this.smallDietCokeQty;
        dest.largeDietCokeQty = this.largeDietCokeQty;

        dest.smallSpriteQty = this.smallSpriteQty;
        dest.largeSpriteQty = this.largeSpriteQty;

        dest.smallRootBeerQty = this.smallRootBeerQty;
        dest.largeRootBeerQty = this.largeRootBeerQty;

        dest.smallLemonadeQty = this.smallLemonadeQty;
        dest.largeLemonadeQty = this.largeLemonadeQty;

        dest.smallBlackIceTeaQty = this.smallBlackIceTeaQty;
        dest.largeBlackIceTeaQty = this.largeBlackIceTeaQty;
        dest.smallBlackIceTeaSweetenedQty = this.smallBlackIceTeaSweetenedQty;
        dest.largeBlackIceTeaSweetenedQty = this.largeBlackIceTeaSweetenedQty;


        dest.smallPassionIceTeaQty = this.smallPassionIceTeaQty;
        dest.largePassionIceTeaQty = this.largePassionIceTeaQty;
        dest.smallPassionIceTeaSweetenedQty = this.smallPassionIceTeaSweetenedQty;
        dest.largePassionIceTeaSweetenedQty = this.largePassionIceTeaSweetenedQty;


        dest.smallGreenIceTeaQty = this.smallGreenIceTeaQty;
        dest.largeGreenIceTeaQty = this.largeGreenIceTeaQty;
        dest.smallGreenIceTeaSweetenedQty = this.smallGreenIceTeaSweetenedQty;
        dest.largeGreenIceTeaSweetenedQty = this.largeGreenIceTeaSweetenedQty;


        dest.smallBlackTeaLemonadeQty = this.smallBlackTeaLemonadeQty;
        dest.largeBlackTeaLemonadeQty = this.largeBlackTeaLemonadeQty;
        dest.smallBlackTeaLemonadeSweetenedQty = this.smallBlackTeaLemonadeSweetenedQty;
        dest.largeBlackTeaLemonadeSweetenedQty = this.largeBlackTeaLemonadeSweetenedQty;


        dest.smallPassionTeaLemonadeQty = this.smallPassionTeaLemonadeQty;
        dest.largePassionTeaLemonadeQty = this.largePassionTeaLemonadeQty;
        dest.smallPassionTeaLemonadeSweetenedQty = this.smallPassionTeaLemonadeSweetenedQty;
        dest.largePassionTeaLemonadeSweetenedQty = this.largePassionTeaLemonadeSweetenedQty;


        dest.smallGreenTeaLemonadeQty = this.smallGreenTeaLemonadeQty;
        dest.largeGreenTeaLemonadeQty = this.largeGreenTeaLemonadeQty;
        dest.smallGreenTeaLemonadeSweetenedQty = this.smallGreenTeaLemonadeSweetenedQty;
        dest.largeGreenTeaLemonadeSweetenedQty = this.largeGreenTeaLemonadeSweetenedQty;


        dest.smallCoffeeQty = this.smallCoffeeQty;
        dest.largeCoffeeQty = this.largeCoffeeQty;

        dest.smallHotTeaQty = this.smallHotTeaQty;
        dest.largeHotTeaQty = this.largeHotTeaQty;
        dest.smallHotTeaQty = this.smallHotTeaSweetenedQty;
        dest.largeHotTeaQty = this.largeHotTeaSweetenedQty;

    }

    this.price = function() {
        var p;
        p = (this.milkQty * 1.50);
        p += (this.chocMilkQty * 1.50);
        p += (this.appleJuiceQty * 1.50);
        
        p += (this.smallCokeQty * 1.99);
        p += (this.largeCokeQty * 2.29);
        
        p += (this.smallRootBeerQty * 1.99);
        p += (this.largeRootBeerQty * 2.29);
        
        p += (this.smallDietCokeQty * 1.99);
        p += (this.largeDietCokeQty * 2.29);
        
        p += (this.smallSpriteQty * 1.99);
        p += (this.largeSpriteQty * 2.29);
        
        p += (this.smallLemonadeQty * 1.99);
        p += (this.largeLemonadeQty * 2.29);

        /*************** Shaken Ice Tazo Tea ********************/ 

        p += (this.smallBlackIceTeaQty * 1.99);
        p += (this.smallBlackIceTeaSweetenedQty * 1.99);

        p += (this.largeBlackIceTeaQty * 2.29);
        p += (this.largeBlackIceTeaSweetenedQty * 2.29);
        
        p += (this.smallPassionIceTeaQty * 1.99);
        p += (this.smallPassionIceTeaSweetenedQty * 1.99);
        
        p += (this.largePassionIceTeaQty * 2.29);
        p += (this.largePassionIceTeaSweetenedQty * 2.29);
        
        p += (this.smallGreenIceTeaQty * 1.99);
        p += (this.smallGreenIceTeaSweetenedQty * 1.99);
        
        p += (this.largeGreenIceTeaQty * 2.29);
        p += (this.largeGreenIceTeaSweetenedQty * 2.29);
        
        /*************** Tazo Tea Lemonades ********************/ 
        
        p += (this.smallBlackTeaLemonadeQty * 2.79);
        p += (this.smallBlackTeaLemonadeSweetenedQty * 2.79);

        p += (this.largeBlackTeaLemonadeQty * 3.29);
        p += (this.largeBlackTeaLemonadeSweetenedQty * 3.29);

        p += (this.smallPassionTeaLemonadeQty * 2.79);
        p += (this.smallPassionTeaLemonadeSweetenedQty * 2.79);


        p += (this.largePassionTeaLemonadeQty * 3.29);
        p += (this.largePassionTeaLemonadeSweetenedQty * 3.29);

        p += (this.smallGreenTeaLemonadeQty * 2.79);
        p += (this.smallGreenTeaLemonadeSweetenedQty * 2.79);

        p += (this.largeGreenTeaLemonadeQty * 3.29);
        p += (this.largeGreenTeaLemonadeSweetenedQty * 3.29);

        /*************** Torrefazione Italia Coffee ********************/ 

        
        p += (this.smallCoffeeQty * 1.79);
        p += (this.largeCoffeeQty * 1.99);

        /*************** Hot Tazo Tea ********************/ 

        p += (this.smallHotTeaQty * 1.79);
        p += (this.largeHotTeaQty * 1.99);

        return p.toFixed(2);
    }
}

function greek() {
    this.type = "greek";
    this.chicken = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.chicken = this.chicken;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 8.99;

        if (this.chicken) {
            p = 8.99;
        }
        else {
            p = 6.99;
        }
        return p.toFixed(2);
    }
}

/* Greens from the Garden  */
function greens() {
    this.type = "greens";
    this.chicken = false;
    this.dressingType = "";
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.chicken = this.chicken;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 7.99;
        if (this.chicken) {
            p = 7.99;
        }
        else {
            p = 5.99;
        }
        return p.toFixed(2);
    }
}



/* Jerk Chicken Mango Salad  */
function jerk() {
    this.type = "jerk";
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 8.99;
        return p.toFixed(2);
    }
}

/*  Side Salad  */
function side() {
    this.type = "side";
    this.salad = "";
    this.dressingType = "";
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.salad = this.salad;
        dest.dressingType = this.dressingType;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 3.25;
        return p.toFixed(2);
    }
}

function smallAppetite() {
    this.type = "smallAppetite";
    this.choice = "";
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.choice = this.choice;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 9.99;
        if (this.choice == "Peanut Butter & Jelly") {
            p = 5.00;
        }
        if (this.choice == "Half Turkey Sandwich") {
            p = 6.00;
        }
        if (this.choice == "Half Ham Sandwich") {
            p = 6.00;
        }
        return p.toFixed(2);
    }
}

function soupnchili() {
    this.type = "soupnchili";
    this.choice = "Red Soup";  
    this.soupType = "";
    this.size = "Small ";   // 'Small '  'Large '  'Quart of '
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.choice = this.choice;
        dest.size = this.size;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p = 9.99;
        if (this.size == "Small ") {
            p = 4.99;
        }
        if (this.size == "Large ") {
            p = 6.99;
        }
        if (this.size == "Quart of ") {
            p = 13.99;
        }
        return p.toFixed(2);
    }
}

/* Stockyard Angus Roast Beef - SW1  */
function sw1() {
    this.type = 'sw1';
    this.bread="No Bread";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.bread = this.bread;
        dest.full = this.full;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
        var p;
        if (this.full)
            p = 7.99;
        else
            p = 6.49;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00;
        return p.toFixed(2);
    }
}

/* Stockyard Angus Pastrami   - SW2 */
function sw2() {
    this.type = "sw2";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.full = this.full;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        if (this.full)
            p = 6.99;
        else
            p = 4.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00;

        return p.toFixed(2);
    }
}

/* Pan Roasted Turkey  - SW3  */
function sw3() {
    this.type = "sw3";
    this.bread = "No Bread";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.bread = this.bread;
        dest.full = this.full;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        if (this.full)
            p = 6.99;
        else
            p = 4.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00;
        return p.toFixed(2);
    }
}

/*  Turkey Cranberry Pesto - SW4  */
function sw4() {
    this.type = "sw4";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.full = this.full;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        if (this.full)
            p = 6.99;
        else
            p = 4.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00;
        return p.toFixed(2);
    }
}

/* Fisherman's Wharf Crab - SW5  */
function sw5() {
    this.type = "sw5";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        p = 7.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00; 
        return p.toFixed(2);
    }
}

/* Albacore Tuna - SW6  */
function sw6() {
    this.type = "sw6";
    this.bread = "No Bread";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.bread = this.bread;
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        p = 6.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00; 
        return p.toFixed(2);
    }
}

/*  Veggie - SW7  */
function sw7() {
    this.type = "sw7";
    this.full = true;
    this.avocado = false;
    this.bacon = false;
    this.broccoli = false;
    this.potato = false;
    this.soup = false;
    this.soupType = "";
    this.dressingType = "";
    this.salad = false;
    this.split = false;
    this.instructions = "";
    this.source = "index";
    this.clone = function(dest) {
        dest.avocado = this.avocado;
        dest.bacon = this.bacon;
        dest.broccoli = this.broccoli;
        dest.potato = this.potato;
        dest.soup = this.soup;
        dest.soupType = this.soupType;
        dest.dressingType = this.dressingType;
        dest.salad = this.salad;
        dest.split = this.split;
        dest.instructions = this.instructions;
    }
    this.price = function() {
    var p;

        p = 6.99;
        if (this.avocado)
            p += 1.50;
        if (this.bacon)
            p += 1.50;
        if (this.split)
            p += 1.50;
        if (this.potato || this.broccoli || this.soup || this.salad)
            p += 3.00; 
        return p.toFixed(2);
    }
}

function blank() {
    this.type = "blank";
}
