var substringMatcher = function(strs) { return function findMatches(q, cb) { var matches, substringRegex; // an array that will be populated with substring matches matches = []; // regex used to determine if a string contains the substring `q` substrRegex = new RegExp(q, 'i'); // iterate through the pool of strings and for any string that // contains the substring `q`, add it to the `matches` array $.each(strs, function(i, str) { if (substrRegex.test(str)) { matches.push(str); } }); cb(matches); }; }; var products = ['(A size) Mini Bitfitter Bits 10 day–3 wks','(B size) Bit-fitter Bits for 3 – 7 weeks','(C size) Maxi Bitfitter Bits','1/4” SOFT GRADE PVC TUBING RUBBER','11 Game Bird Netting 38mm (1½")','110 Game Bird Netting 38mm (1½")','14 Game Bird Netting 38mm (1½")','14mm Staples','1lb Furry Dummy','20 Gauge Plug','20mm Blue Alkathene Pipe (MDPE)','22 Game Bird Netting 38mm (1½")','32 Game Bird Netting 38mm (1½")','4 Compartment Stackable Chick Tray & Lid','40kg Feeders','42 Game Bird Netting 38mm (1½")','55 Game Bird Netting 38mm (1½")','64 Game Bird Netting 38mm (1½")','7 Strand Galv. Electric fence wire 200m & 400m','7" Tray Feeder Attachment','7AH Battery for Lightforce Lamps','82 Game Bird Netting 38mm (1½")','Acme Black Plastic Dog Whistle','Acme Thunderer Brass N.P.Whistle (58)','Adjustable Regulator 50/150mb outlet for S type Brooders','Air Filter Metal or Heavy Duty for Brooders','Alarm Mine-(Henry Krank)','Amber filter for Blitz (240mm)','Amber filter for Lance (140mm)','Amber filter for Striker (170mm)','Ambush Millet mixture 10kg','American Great Owl Decoy (Large)','Animal spike for spiral feeder Attachment','Antec HD3 Heavy Duty Detergent - 5ltr','Antec Virkon S','Auto Changeover Valve','Avalon Leafy Turnip 10-25kg','Basket Feeder - Wright Feeder','Bellows Double Capsule','BEWARE OF DOG SIGN','BIO LINK EGGWASH POWDER LOW FOAM 10kg','BioLink BioCyst 5ltrs','BioLink BioShield P','BioLink Egg Wash Liquid','BioLink VX','Bitfitter Tool','Boonie Hat - Realtree Advaqntage Timber / Hardwoods Green','Bostitch Hog Rings Pliers & Clips (P7 - R8)','Brinsea Mini II Egg Incubators','Brinsea OvaView Candler','Bulb for Lance','Bulb for Striker or Blitz, 12v Zenon','Bumpa Bits','Burner Gauze for S Type Brooders','BUTTOLO BLATTER','BUTTOLO CHERRY WOOD CALL','Canary Grass - Aquatica 2.5kg','Catching Nets','Ceramic Element','Ceramic for S Type Brooders','Chick Box 50 & 100 Chicks (25 Pack)','Chick Starter Feeders','Chick Starter Tray 400 mm','Chudleys Classic 15kg','Chudleys Salmon with Rice & Vegetables 15kg','Chudleys Working Crunch 15kg','Clip on Specs','Combo Drinkers','CONSERVATION AREA SIGN','Corkscrew Dog Tether','Corrugated Card','Crow Decoy (with legs)','D3 Pheasant Crate & Spares','Decoy Game Mixture 10kg','Detoxerol Plus 1ltr','Disinfectant Dip','Dome Drinker','Dome Drinker Spares','Drill Attachment For Screw In Insulator','Drinker Nipples','DRIVE WITH CARE (TRIANGULAR) SIGN','Duck Tape - Realtree Hardwoods Green','Dwarf Sorghum - PEN110 10kg','Dwarf Type Sunflower 5kg','Ear Defenders','Eco bale cardboard bedding.','Economy Electric Fence Tester','Electric Fence Gate Hook','Electric Fence Nail On Insulator (Per 50)','ELECTRIC FENCE STAKE','Electric Fence Warning Sign','Electric Hen Element Wire','ENDOSAN SANITISER','Entice/Holding Spice (Sufficient to treat 1 tonne)','Fenceman 155AH 9v Dry Battery','Fenceman 6 Strand Poly Electric Fence Wire 250m & 500m','Fenceman CP450 Battery Energiser','FENCEMAN CP900 Battery and Mains Energiser','Fenceman DP350B 6v & 12v Energiser','Fenceman Electric Fence Line Tester with Lights','Fenceman Electric Fence Post Corner Insulators (Pack 4)','Fenceman Screw In Insulators','Flame Failure Safety Device for S Type Brooders','Flexicoy Pigeon','FOOTPATH SIGN','Forage Rape Emerald 10-25kg','Fox Grid Pop Hole Plain & With Flaps','Fox Snare (Free Run)-with stop fitted','G89 Automatic Drinker','G89 Drinker Spares','Game Cover Boost 5kg','Game Cover Broadshot 10kg','Game Cover Fodder Radish 10-25kg','Game Cover Four Ten Mix 14kg','Game Cover Kwick Fix 5kg','Game cover Overdrive (Quinoa/Kale) 2.5kg','Game Cover Quinoa 2kg','Game Cover Sundown Mix 13kg','Game Cover White Mustard 10-25kg','Game Cover Yellow Blossom Clover 2kg','Game Maize Rapid Fire 14kg','Gamecover Straights Texsel Greens (Brassica Carinata) 2kg','Gamecover Zoom Brassica Mixture 5kg','Gameflex Release Pen Netting','Gamekeepa Game Liquivits','Gamekeepa Wax Leggings','Garlands Adventurer Full Length Wellington Socks','Garlands Adventurer Walking Boot Socks','Garlands Ladies Long Breek Socks','Garlands Long Breek Socks','Garlands Wellington Boot Bag - Green','Gas Hose High Pressure 8mm','Gas Match 12"','Gasket Set for S Type Brooders','Gasolec Brooder Game Type','Gasolec Gas Brooder S Type','Giant Sorghum - Rox Orange 10kg','Glenmuick Brass Game Hook - per 10','Gold of Pleasure Camelina 5kg','Goldeneye Kale 1kg','Granger’s Footwear Proofer','Granger’s Wax Spray','Grey Squirel Poison Hopper','Grit 25kg','Gun Cabinets and Ammo Boxes','Gun Oil (all purpose lubricant)','Gundog Rope Slip Lead','Hand Held Blitz 240mm Lamp (800m beam)','Hand Held Lance 140mm Lamp (400 beam)','Hand Held Striker 170m Lamp 600m beam','Hand Tally Counter (1 – 9999)','Hand Throwing Dummy','Hand Throwing Dummy (1lb) Green','Hand Throwing Dummy (1lb) Orange','Hand Throwing Dummy (puppy)','Heavy Duty Solvent Cleaner','Hog Ring Clips & Pliers CL22','Humane Dispatcher and Leather holster','In Line Water Filter','Inhibitor VCI V80 Gun Shield','Intelec Traditional Overhead Heat Lamp','Intermediate Sorghum - Sprint 11 10kg','Jade Bromadiolone Bait','Japanese Reed Millet 10kg','Jet for Game Brooders','Jet for S type Brooders','Jet Holder for S Type and Game Brooders','Jubilee Clips for Gas Hose','Jumbo Release Pen Netting','KALE GRÜNER ANGELITER 1kg','Keepa Ground Feed Seed Mixture 20kg : Bulk prices per tonne available on request','Kestrel Decoy','Kingfeeder 25kg','Kingfeeder Spares','Lanyard for Dog Whistle','Larsen Trap Springs (Pair)','Late Cover Mix 5kg','Le Chameau Chasseur','Le Chameau Chasseurnord - Ladies','Le Chameau Chasseurnord - Mens','Le Chameau Vierzonord - Ladies','Le Chameau Vierzonord - Mens','Leather Bullet Pouch','Leather Cartridge Bag 75 & 100','Leather Fast Load Cartridge Bag','Leather Game Carrier – Double V type loops','Leather Shoe Protector','Leather Slip-On Recoil Pad','Leather Zipped Pellet Pouch','Leg Rings','Live Catch Feral Cat Trap/Spring Door','Live Catch Fox Trap (Hook Type)','Live catch Rabbit Trap/Drop Door','Longbow Fox Call','Loose Bits Sizes A & C','Mac Feeder Attachment','MacWet Long Climatec Sports Gloves','MacWet Short Mesh Sports Gloves','Magpie Decoy','Maize 20kg : Bulk prices per tonne available on request.','Maize Blend 14kg','Mallard Drake Decoy','Mallard Duck Decoy','Manola Feeder','Manola Feeder Spares','Midget Squirrel/Rat Live Catch Trap','Millgame Millet Mixture 10kg','Mini Master Spares','Minimaster Chick Drinkers','Minipipe Connectors 6mm 1/4"','Mink – Single Entry Live Catch','Mink-Double Entry Live Catch - 2 door','MK 4 Rat Trap','MK 6 Mink Trap','Mustard Brown 5kg','NATURE CONSERVATION NO PUBLIC RIGHT OF WAY SIGN','Neoprene Rifle 6-cart Stock Cover - APG','Neoprene Shotgun 4-cart Stock Cover','NO BIKING ALLOWED SIGN','Northern Star Game mix 20kg','NOT FOR PUBLIC USE SIGN','OvaEasy 190 Advance EX Series II Incubator','OvaEasy 380 Advance EX Series II Incubator','Over n Under Sorghum Mix 10kg','OWL EYE RAPTOR DETERRENT – rigid Sign','Partridge laying box feeder','Partridge Netting 19mm (¾")','Peregrine Falcon Decoy','Picca Chick Feeder','Plasson End Plug MDPE 20mm (Inc liner)','Plastic Clips for Top Netting (per 1000)','Plastic Disko Perforated Plate for Drinkers','Plastic Drinkers','Plastic Electric Hen Cover','Plastic Letter Box Feeder','PLEASE CLOSE GATE SIGN','PLEASE KEEP DOGS ON LEAD SIGN','PLEASE KEEP OFF THE GRASS SIGN','Position Finders 1 – 10 (leather pouch)','Poultry Transport Crate','Power Pack with dimmer for Lightforce Lamps','PRIVATE NO FISHING SIGN','PRIVATE NO PUBLIC RIGHT OF WAY SIGN','PRIVATE PLEASE KEEP OUT SIGN','Rabbit Snares (8 strand)','Rat – Monarch Multiple Live Catch','Rat Bait Box','Rateyre Poison Hopper','Red Filter for Blitz (240mm)','Red filter for Lance (140mm)','Red filter for Striker (170mm)','Red Millet 10kg','Reed Canary Grass - Arundinacea 2.5kg','Reed Horn 6" or 11"','Regulator 20 - 310mb for Game Brooders','Remote control Handle Roof Mount (RC150)','Remote Handle for Roof Mounting (RC220)','Rifle Plug','RIFLE SHOOTING IN PROGRESS SIGN','Ring Brails','ROAMING GUARD DOG SIGN','Rocky Grizzly Jacket','Roof Mounted Blitz 240mm Lamp (800m beam)','Roof Mounted Lance 140mm Lamp (400m beam)','Roof Mounted Striker 170mm Lamp (600m beam)','Ruby Difenacoum Bait','Saddle Connectors','Safety - Beaters Flag','Saphire Brodifaccum Bait','Scope Mounted Lance 140mm Lamp (400m beam)','Scope Mounted Striker 170mm Lamp (600m beam)','Shelterflex 2m x 45m Full Roll','Shelterflex 3m x 45m Full Roll','Shelterflex Waterproof Sheeting','SHOOTING IN PROGRESS SIGN','Silk Shooting Ties','Single Leather Shooting Certificate Holder','Sling Swivels','Snap Caps','Solulyte Liquid Electrolytes','Sovereign Kale 1kg','Spiral Spring Feeder Attachment','Spitfire Hybrid 5-25kg','Sportchief Allyear 3-Way Coat','Springer MK 4 Rat Trap - British Made','Springer MK 6 Mink Trap - British Made','STALDREN DISENFECTANT 25KG','Stand Markers 1 – 10 (white)','Standard Pan Feeder Attachment','Standard Type Sunflower 10kg','STANLEY CLASSIC GREEN FLASK - 1 litre','STANLEY CLASSIC GREEN FLASK - 1.9 litre','Staple Gun','Stayput (Sufficient to treat 1 tonne)','Steddy Eddie Portable Gun Rack','Stop Valve MDPE 20mm (Inc liners)','Straining Wire Mild Steel & High Tensile 25kg (640m) 2.5mm','Super Plug','Surefire Kale Blend 2kg','Suspension Hook for S Type Brooders','SWC Hatching Egg Solution/Fogging Solution 5ltrs','Termoswed Light Crew Neck Top','Termoswed Light Long Trousers (Gents)','Termoswed Membrane Socks','Termoswed Plus Balaclava','Termoswed Plus Hunting Shirt','The Deluxe Eco Feeder 12kg','Thermo Couple (250mm-short) for S Type Brooder','Thermo Couple 320mm-long for Game Brooders','Thermostat for Game Brooders','Thermostat for S Type Brooders','Top Entry Metal Larsen Trap','Traditional Game Cover 10kg','Trent Drinkers','TRESPASSER WILL BE PROSECUTED SIGN','Tunnel Mole Trap','VCI Pro Chips','Water Pipe Joiner Elbow MDPE 20mm (Inc liners)','Water Pipe Joiner Tee MDPE 20mm (Inc liners)','Water Pipe Joiner/coupling MDPE 20mm (Inc liners)','Watermaster Adapter (1/4")','Watermaster Complete Neck','Watermaster Complete Neck Spares','Watermaster hanging Drinkers','Watermaster Plastic Coated Hanging Cord 100’','Watermaster Side Outlet','WaterPipe Liners MDPE 20mm','WCS Collarum Trap','WCS Tube Trap','White Millet 10kg','Whole Pigeon Decoy (upright)','Wire Netting 1050mm (3½) 50m','Wire Netting 1200mm (4ft) 50m','Wire Netting 1800mm (6ft) 50m','Wire Netting 900mm (3ft) 50m','Wire Netting Clips & Pliers','Wire ties 18','Wire Twisting Tool','Wool & Thinsulate Gloves - Green','Zippo Handwarmer' ]; $('#our-products .typeahead').typeahead({ hint: true, highlight: true, minLength: 1 }, { name: 'products', limit: 20, source: substringMatcher(products) });