﻿var descriptions = {};

descriptions["Abrasive"] = "Removes materials from various body surfaces or aids mechanical tooth cleaning or improves gloss.";
descriptions["Absorbent"] = "Takes up water- and/or oil-soluble dissolved or finely dispersed substances.";
descriptions["AHA"] = "Alpha Hydroxy Acids (?)";
descriptions["Anti-acne"] = "Alleviating the symptoms of acne";
descriptions["Anti-irritant"] = "Substances that soothe the localized/superficial inflammation of the skin that is due directly to one or more external substances.";
descriptions["Anticaking"] = "Allows free flow of solid particles and thus avoids agglomeration of powdered cosmetics into lumps or hard masses.";
descriptions["Anticorrosive"] = "Prevents corrosion of the packaging.";
descriptions["Antidandruff"] = "Helps control dandruff.";
descriptions["Antifoaming"] = "Suppresses foam during manufacturing or reduces the tendency of finished products to generate foam.";
descriptions["Antimicrobial"] = "Helps control the growth of micro-organisms on the skin.";
descriptions["Antioxidant"] = "Inhibits reactions promoted by oxygen, thus avoiding oxidation and rancidity.";
descriptions["Antiperspirant"] = "Reduces perspiration.";
descriptions["Antiplaque"] = "Helps protect against plaque.";
descriptions["Antiseborrhoeic"] = "Helps control sebum production.";
descriptions["Antistatic"] = "Reduces static electricity by neutralising electrical charge on a surface.";
descriptions["Astringent"] = "Contracts the skin.";
descriptions["Binding"] = "Provides cohesion in cosmetics.";
descriptions["Bleaching"] = "Lightens the shade of hair or skin.";
descriptions["Buffering"] = "Stabilises the pH of cosmetics.";
descriptions["Bulking"] = "Reduces bulk density of cosmetics.";
descriptions["Chelating"] = "Reacts and forms complexes with metal ions which could affect the stability and/or appearance of cosmetics.";
descriptions["Cleansing"] = "Helps to keep the body surface clean.";
descriptions["Conditioning"] = "Improves the condition of the hair or skin, especially after washing";
descriptions["Cooling Agent"] = "Imparts a sense of freshness on skin";
descriptions["Cosmetic Colorant"] = "Colours cosmetics and/or imparts colour to the skin and/or its appendages. All colours listed are substances on the positive list of colorants (Annex IV of the Cosmetics Directive).";
descriptions["Denaturant"] = "Renders cosmetics unpalatable. Mostly added to cosmetics containing ethyl alcohol.";
descriptions["Deodorant"] = "Reduces or masks unpleasant body odours.";
descriptions["Depilatory"] = "Removes unwanted body hair.";
descriptions["Detangling"] = "Reduces or eliminates hair intertwining due to hair surface alteration or damage and, thus, helps combing.";
descriptions["Emollient"] = "Softens and smooths the skin.";
descriptions["Emulsifying"] = "Promotes the formation of intimate mixtures of non-miscible liquids by altering the interfacial tension.";
descriptions["Emulsion Stabilising"] = "Helps the process of emulsification and improves emulsion stability and shelf-life.";
descriptions["Film Forming"] = "Produces, upon application, a continuous film on skin, hair or nails.";
descriptions["Foam Boosting"] = "Improves the quality of the foam produced by a system by increasing one or more of the following properties: volume, texture and/or stability.";
descriptions["Foaming"] = "Traps numerous small bubbles of air or other gas within a small volume of liquid by modifying the surface tension of the liquid.";
descriptions["Fragrance"] = "An aroma compound, also known as odorant, aroma, fragrance or flavor, is a chemical compound that has a smell or odor";
descriptions["Gel Forming"] = "Gives the consistency of a gel (a semi-solid preparation with some elasticity) to a liquid preparation.";
descriptions["Hair Conditioning"] = "Leaves the hair easy to comb, supple, soft and shiny and/or imparts volume, lightness, gloss, etc.";
descriptions["Hair Dyeing"] = "Colours hair.";
descriptions["Hair Fixing"] = "Permits physical control of hair style.";
descriptions["Hair Waving Or Straightening"] = "Modifies the chemical structure of the hair, allowing it to be set in the style required.";
descriptions["Humectant"] = "Holds and retains moisture.";
descriptions["Hydrotrope"] = "Enhances the solubility of substance which is only slightly soluble in water.";
descriptions["Keratolytic"] = "Helps eliminate the dead cells of the stratum corneum.";
descriptions["Lubricant"] = "Ingredient that moistens and softens skin";
descriptions["Masking"] = "Reduces or inhibits the basic odour or taste of the product.";
descriptions["Moisturising"] = "Increases the water content of the skin and helps keep it soft and smooth.";
descriptions["Nail Conditioning"] = "Improves the cosmetic characteristics of the nail.";
descriptions["Opacifying"] = "Reduces transparency or translucency of cosmetics.";
descriptions["Oral Care"] = "Provides cosmetic effects to the oral cavity, e.g. cleansing, deodorising, protecting.";
descriptions["Oxidising"] = "Changes the chemical nature of another substance by adding oxygen or removing hydrogen.";
descriptions["Pearlescent"] = "Imparts a nacreous appearance to cosmetics.";
descriptions["pH Modifier"] = "";
descriptions["Plasticiser"] = "Softens and makes supple another substance that otherwise could not be easily deformed, spread or worked out.";
descriptions["Preservative"] = "Inhibits primarily the development of micro-organisms in cosmetics. All preservatives listed are substances on the positive list of preservatives (Annex VI of the Cosmetics Directive).";
descriptions["Preservative Aid"] = "Aids preservative ingredients";
descriptions["Propellant"] = "Generates pressure in an aerosol pack, expelling contents when the valve is opened. Some liquefied propellants can act as solvents.";
descriptions["Reducing"] = "Changes the chemical nature of another substance by adding hydrogen or removing oxygen.";
descriptions["Refatting"] = "Replenishes the lipids of the hair or of the top layers of the skin.";
descriptions["Refreshing"] = "Imparts a pleasant freshness to the skin.";
descriptions["Skin Conditioning"] = "Maintains the skin in good condition.";
descriptions["Skin Protecting"] = "Helps to avoid harmful effects to the skin from external factors.";
descriptions["Smoothing"] = "Seeks to achieve an even skin surface by decreasing roughness or irregularities.";
descriptions["Solubilizer"] = "To make (a substance such as a fat or lipid) soluble or more soluble, especially in water, by the action of a detergent or other agent.";
descriptions["Solvent"] = "Dissolves other substances.";
descriptions["Soothing"] = "Helps lightening discomfort of the skin or of the scalp.";
descriptions["Spreading Agent"] = "Eases product application to the skin or hair";
descriptions["Stabilising"] = "Improves ingredients or formulation stability and shelf-life.";
descriptions["Surfactant"] = "Lowers the surface tension of cosmetics as well as aids the even distribution of the product when used.";
descriptions["Sweetener"] = "A food additive that sweetens";
descriptions["Tanning"] = "Darkens the skin with or without exposure to UV.";
descriptions["Thickening"] = "Adds body or stabilises emulsions";
descriptions["Tonic"] = "Produces a feeling of well-being on skin and hair.";
descriptions["UV Absorber"] = "Protects the cosmetic product from the effects of UV-light.";
descriptions["UV Filter"] = "Filters certain UV rays in order to protect the skin or the hair from harmful effects of these rays. All UV filters listed are substances on the positive list of UV filters (Annex VII of the Cosmetics Directive).";
descriptions["Viscosity Controlling"] = "Increases or decreases the viscosity of cosmetics.";
descriptions["Vitamin"] = "A vitamin is an organic compound required as a nutrient in tiny amounts by an organism";
descriptions["Water Repellant"] = "Prevents the penetration of water";
descriptions["Whitening"] = "Changing to a lighter color";

descriptions["1"] = "Ingredients that have known or suspected safety concerns.";
descriptions["2"] = "Ingredients prone to impurities that have known or suspected safety concerns.";
descriptions["3"] = "Ingredients that are made from petroleum or other non-renewable resources (unless they are nature identical).";
descriptions["4"] = "Ingredients that are made by treating natural ingredients with petroleum derivatives or synthetics.";
descriptions["5"] = "Synthetic colors.";
descriptions["6"] = "Synthetic fragrances.";
descriptions["7"] = "Synthetic preservatives (unless they are nature identical).";
descriptions["8"] = "Synthetic polymers and other synthetic ingredients (do not exist in nature).";
descriptions["9"] = "Ingredients that are derived from harming animals.";
descriptions["10"] = "Ingredients that do not easily biodegrade.";
descriptions["11"] = "Ingredients that could react with other ingredients in a cosmetic product to form potentially harmful substances.";
descriptions["12"] = "Ingredients that are generally considered to be harsh on the skin.";

var verificationNote = "\"Yes\" in this column indicates that the ingredient's origin is investigated to ensure it is not derived from petroleum or animal sources.";

function initPage() {
    var tooltipDefaults = {
        className: "tooltip",
        orient: "above",
        width: 250,
        arrowHeight: 7,
        cornerRadius: 0,
        align: "right",
        arrowInset: 3
    };
    $("table span").hover(
        function() {
            $(this).callout($.extend({}, tooltipDefaults,
                { text: descriptions[$(this).html()] }
            ));
        },
        function() { $(this).closeCallout(); }
    );
    $("table img").hover(
        function() {
            $(this).callout($.extend({}, tooltipDefaults,
                { text: verificationNote }
            ));
        },
        function() { $(this).closeCallout(); }
    );
}
$(document).ready(initPage);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(initPage);