var blnEnabled = true;

var Glossary = new Array();
Glossary[0] = Array("Bamboo", "Lovely and soft, this is one of the most absorbant fabrics available for use in real nappies. Because of this, less is needed than with other fabrics, meaning you get a lovely slim fit - especially good with one-size nappies, which can otherwise be bulky on younger babies. Naturally antibacterial and antifungal, it is made from quick-growing bamboo - so easily and quickly replenished, which means it is kinder to the planet, although the manufacturing process is fairly energy-intense. As it is such a thirsty fabric, it is slower to dry than the others. However with new nappies, intelligent design means that fabric can often be dried separately to wrap, helping drying times.");
Glossary[1] = Array("Cotton", "The original real nappy fabric. Good absorbancy and faster-drying than bamboo, you can choose from a range of cotton fabrics, including organic cotton and a cotton-hemp mix. Generally slightly cheaper than bamboo, but as it is less absorbant, more fabric is used, meaning it is slightly bulkier.");
Glossary[2] = Array("Microfibre", "AKA micrometry, teddy and fluffle. A great, absorbant, fast-drying fabric. Really lovely and soft against your baby's skin - for an idea of how it feels, think about your baby's softest teddy bear. As it wicks moisture away from its source, it will keep your baby's skin cool and dry. Man-made, however as materials are usually recycled, these can actually end up being better for the environment. Generally the bulkiest real nappy fabric.");
Glossary[3] = Array("One-piece", "The easiest real nappy to put on and take off - nappy and wrap element combined means just one piece to change. Traditionally don't perform quite as well as two-piece systems, although with modern innovations that has changed.");
Glossary[4] = Array("Two-piece", "Separate nappy and waterproof outer. Although they take slightly longer to change, these have added flexibility in the fit and are therefore generally the top performing nappies in terms of their leak-proofness.");
Glossary[5] = Array("All-in-one", "A nappy and wrap combined into a single piece. Available in a variety of fabrics and designs, these nappies are making changing time easier than ever, but can take longer to dry, and be slightly less leakproof. However, with modern innovations this is fast changing, and the All-in-One is becoming the most popular real nappy.");
Glossary[6] = Array("Pocket nappy", "AKA stuffable. A wrap element which has a layer of thin fabric sewn across the whole of the inside. This has an opening at the inside back of the nappy, which means it forms a 'pocket' with the wrap element, into which boosting can be stuffed to increase the absorbancy. Highly versatile (you can boost with almost anything!), as they are one-size, they will fit from birth to potty and you will only have to buy one set of nappies.");
Glossary[7] = Array("Unshaped", "The original cloth nappy squares! The most economical real nappy option. Although a little more fiddly to use, modern fasteners and fabrics, make them both easier and more absorbant than ever. If you are using mainly shaped nappies, it's also a great idea to purchase a pack of these to top up your collection - and have some on hand for those days when you just can't get through all the laundry on time!");
Glossary[8] = Array("Shaped", "Probably the most leak-proof of all real nappies, these are made from several layers of fabric. Designed to fit without any need for folding - they are shaped and operate in a similar fashion to a disposable. With a range of fabrics, size and fastening options, there is a nappy to suit every parent and baby. Simply fasten, add wrap, and go.");
Glossary[9] = Array("One-size", "Birth-to-potty nappies. These large nappies generally have fastening systems which allow them to fold down to fit from birth. Economical because you only have to buy one set of nappies, but may be a little bulky on younger babies.");
Glossary[10] = Array("Sized", "Available in more than one-size, you need to buy the correct one as your baby grows. This makes them a little more expensive - as you buy a set of nappies for each size, but you get a great fit throughout. Also, if you are passing the nappies on from child to child, the nappies will be less worn out than one-size nappies (used and washed fewer times) and will service more children - meaning over time they can be just as cost effective.");
Glossary[11] = Array("Terry", "Terry nappies like your mum used to use. (And your grandma, for that matter.) The cloth squares fold in a variety of styles which you can adjust depending on your baby, ensuring that the thickest area of padding is placed where it is needed most. The nappi-nippa fastener is easy to use and ensures a great range of fit. Modern wraps are easy to put on and take off, and enclose the terry in a great-fitting, leakproof outer.");
Glossary[12] = Array("Prefold", "Prefold nappies are smaller squares of fabric with a thicker strip of fabric down the middle. This gives a great deal of flexibility - allowing you to choose a fold which suits your baby's age, weight, gender and wetting habits best! Can be fastened with nippas - mainly on smaller babies - but generally just get folded, popped into a compatible wrap (which has a small pocket at the top and bottom) and put on like a one-piece.");
Glossary[13] = Array("Popper", "Nappies generally have a row of poppers on the front, which the side tabs fasten to. One size popper fastening nappies have one or more rows of poppers inside or outside the nappy, allowing you to fold the nappy down and fasten it, making the nappy smaller and creating the younger fit. Boosters fasten into poppers on the inside front of the nappy. Hold up well with use, and are generally easy to use, although can be slightly fiddly. Poppers are robust fasteners, clicking together to make it difficult for babies to pull their nappies off during that exhibitionist phase they all seem to go through!");
Glossary[14] = Array("Nippa", "A Nappi Nippa is a separate fastener - a t-shaped gripper that is easy to attach and holds the nappy snugly and firmly in place. They are incredibly easy to use, simply stretch and grip. Great for the best range of fits - fasten the nappy as slim or loose as you like. The nippa is purchased separately, but nippa fastening nappies are generally cheaper than their aplix or popper counterparts, and the nippas themselves are very cheap at under &pound;4.00 for three. One size nippa fastening nappies, have a front panel which can be folded down, making the nappy smaller and creating the younger fit.");
Glossary[15] = Array("Aplix", "Aplix fasteners are hook and loop pads which stick together - better known under the trade name velcro. These are the easiest to put on and take off - simply layer together to fasten. There is usually a block of aplix along the front of the nappy, and the side tabs fasten anywhere along this to ensure a great range of fits. However they are sometimes removed by cheeky tots, and do degrade over time - losing their stickiness slightly especially when washed; although modern innovations allow for closing the tabs during the wash cycle.");
Glossary[16] = Array("Hemp", "Requires no chemicals to grow, and requires less water to grow than cotton, so it is friendlier to our environment. Hemp fabric has antibacterial and antifungal properties, which inhibits the growth of mould or mildew and helps to keep your baby’s skin rash free, making it a great fabric for babies with sensitive skin. Your nappies will also last and last as hemp is incredibly durable, an important consideration given the constant washing, drying and wearing routine. Good absorbancy and a quicker drying time than bamboo.");
Glossary[17] = Array("Multisized", "This refers to nappies which are sold both as a sized and a one-size nappy. So you can buy both size 1 and 2 versions of the nappy, but the size 2 usually has an adjustment feature which allows you to fasten it down to fit from birth, and is therefore also a one-size. One-size nappies can be bulky on new-borns, so using this classification means that parents can choose the sized version if the fitting is the most important factor, or the one-size if they are trying to keep costs down. ");
Glossary[18] = Array("Anti-wicking fabric", "A fabric usually seen in sportswear (think 'Airtex' runners vests) this material is completely breathable, and is used as an added layer on wraps or nappies to help repel moisture. In a nappy it helps push moisture back into the absorbant fabric core, and on wraps it is usually used at leg and waist fastenings to keep these areas (most prone to irritation ) free of wetness.");
Glossary[19] = Array("Polyester", "When used within nappies, polyester is placed alongside the main fabric (usually cotton) to wick moisture through into the main bulk of the nappy, keeping baby's bottom dry and cool. Good on sensitive skin.");
Glossary[20] = Array("Fleece", "A fabric often made entirely from recycled materials, fleece is supremely breathable, which means that when used as a wrap, moisture evaporates into the surrounding air, keeping the nappy inside cool and dry. Very quick drying and resistant to staining, it is a lightweight and comfortable fabric for your baby to wear. Disadvantages are that it is a man-made fabric, made from 100% polyester.");
Glossary[21] = Array("Wool", "A unique fabric which is naturally water resistant when used in conjunction with lanolin - (the oil found on sheep wool). When treated with lanolin it will both keep moisture from leaking out, as well as allowing evaporation through the fabric into the air. Cool and comfortable to use, it is antibacterial and a great natural choice for your wraps.");
Glossary[22] = Array("PUL", "Polyurethane Laminate is the most common fabric used to make outer wraps, and the outer elements of all-in-one and stuffable nappies. More breathable than the old-style plastic pants, it is water resistant and the most effective wrap fabric in keeping moisture in. Wraps do not need to be washed with every change - simply wipe clean and hand up to dry (in seconds) before re-use. Wash very few changes or when soiling becomes apparent");
Glossary[23] = Array("Spunlace", "Spunlace is made from 100% biodegradable cellulose fibres and is softer than a standard paper liner. Completely flushable, it is a biodegradeable fibre, and is really soft and comfortable next to your baby's skin. These liners have been hydro spun (spun with water jets) without the use of the chemical bonding agents associated with standard paper liners.");
Glossary[24] = Array("Cellulose", "Cellulose is the most abundant and renewable biopolymer on Earth. Unlike synthetic fibres, man-made cellulosic fibres are completely biodegradable and can be recycled, incinerated, landfilled or digested in sewage.");
Glossary[25] = Array("Wood pulp and mixed fibres", "85% wood pulp, this fibre is biodegradeable, flushable (one sheet at a time) compostable and non-chlorine bleached. It is conveniently flushed away (one sheet at a time), and is even live septic tank friendly.");
Glossary[26] = Array("Large liner", "35x22 cm, these liners fit inside a largely folded terry, and are much bigger than the fit needed for prefolds, shaped or all-in-one nappies. If using for these nappies, simply cut in two, doubling the number of liners per roll, and halving the cost per 100.");
Glossary[27] = Array("Regular liner", "Typically 30cm x 12cm, these liners are specially designed to fit inside a shaped, one-size or pocket nappy.");
Glossary[28] = Array("Microfleece", "A fabric often made entirely from recycled materials, fleece doesn't absorb moisture, but wicks it away from its source, keeping baby's bum nice and dry. Very quick drying and resistant to staining, it is a lightweight and comfortable fabric for your baby to wear. Disadvantages are that it is a man-made fabric, made from 100% polyester.");
Glossary[29] = Array("Silk", "Lovely and soft, raw silk has natural antibacterial healing properties, meaning it helps clear up and even prevent bouts of nappy rash. It needs to be handwashed at a maximum of 30 degrees otherwise it will quickly lose these properties.");
Glossary[30] = Array("Muslin", "Muslin is a kind of cotton fabric, woven very finely, but very light weight. This makes it very strong and absorbant, but without too much bulk.");
Glossary[31] = Array("Pocket", "Pocket or stuffable nappies are all-in-ones with a slight difference. Instead of the absorbant inner being attached or sewn in to the inside of a wrap, the entire inside of the wrap element is covered with a thin fabric which has an opening (think pillowcase) which allows you to add in your fabric elements. This means you control the amount of fabric, and therefore the absorbancy and bulk of the nappy.");

strNewTag = '<span class="Glossary" onmouseover="GlossaryShow(this)" onmouseout="GlossaryHide()">%1</span>';

if (document.getElementById("Glossary") && blnEnabled) {
   for (var i in Glossary) {
      strFind = RegExp(Glossary[i][0], "g");
      strReplace = strNewTag.replace("%1", Glossary[i][0]);
      document.getElementById("Glossary").innerHTML = document.getElementById("Glossary").innerHTML.replace(strFind, strReplace);
   }
}

function GlossaryShow(objObject) {
   objPos = findPos(objObject);
   for (var i in Glossary) if (Glossary[i][0] == objObject.innerHTML) strBody = Glossary[i][1];
   document.getElementById("GlossaryPopup").style.width = "auto";
   document.getElementById("GlossaryPopup_Title").innerHTML = objObject.innerHTML;
   document.getElementById("GlossaryPopup_Body").innerHTML = strBody;
   document.getElementById("GlossaryPopup").style.display = "block";
   if (document.getElementById("GlossaryPopup").offsetWidth > 300) document.getElementById("GlossaryPopup").style.width = "300px"; 
   document.getElementById("GlossaryPopup").style.left = (objPos[0] + (objObject.offsetWidth / 2)) - (document.getElementById("GlossaryPopup").offsetWidth / 2) + "px";
   document.getElementById("GlossaryPopup").style.top = objPos[1] + objObject.offsetHeight + "px";
}

function GlossaryHide() {
   document.getElementById("GlossaryPopup").style.display = "none";
}

function findPos(obj) {
   var curleft = curtop = 0;
   if (obj.offsetParent)
      do {
         curleft += obj.offsetLeft;
         curtop += obj.offsetTop;
      } while (obj = obj.offsetParent);
   return [curleft,curtop];
}
