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 = ['.22 Ring 1" Fixed (Matte)','101 Alaska','101 Classic','101 Classic XT','101 Scandic','101 Select','20 Gauge Plug','202 Elegance (Mini & Medium)','2in1 Cleaner/Proofer 60ml','3-Ply Chest Waders APG Camouflage **Size 12 Only**','404 Classic','404 Classic XT','404 Elegance','404 Synchro XT','5 Piece Camo Set','Adjustable Boonie Hat.HWG or ADT Camo.','Adventurer Boot Socks','Air Rifle Accessory/Pellet Pouch','Air Rifle Stock Cover','Allen Key Set','Assault Rifle Slip 53','Assult Rifle Slip 45','Auritech Ear Protection','Bead White 12','Beaumont Brown Polar-Fleece','Bird Tote','Boot Laces','Brass Bead 18','Buddy Bottle Cover (Large)','Buddy Bottle Cover (Small)','Bug Suit','Bullet Pouch','Calypso Wellington Boot Jersey Lined (OUT OF STOCK)','Calypso Wellington Boot Neoprene Lined','Camo Bait Bucket 18ltr','Camo Bucket 10Ltr','Camo Bucket 5Ltr','Canvas & Leather Gun Slip 30"','Chambord Green Waterproof Jacket','Childs 4 Pocket Cotton Trousers','Childs Short Sleeved APG camouflage T Shirt.','Club Interchasse mila Tweed ladies Breeks.','Club Interchasse Anselme Bag.','Club interchasse Blaine Moleskin Shooting Waistcoat.','Club Interchasse Bradley Tweed Waistcoat.','Club Interchasse Celestine Ladies Shooting Jacket','Club Interchasse Fergus Shooting Jacket .','Club Interchasse Lenaic Tweed Breeks','Club Interchasse Moleskin Breeks.','Club Interchasse Tweed Ladies Feryal Shooting Jacket.','Country Braces(Multi bird on Green)','Country Braces(Olive) - (OUT OF STOCK)','Country Silk Ties','Crisip Marema Suede Boot Was £149.95 You Save £44.95','CRISPI Finland','Crispi Kanada Evo Leather Mid High Boot','Crispi Luberon Suede Boot WAS £126.95 YOU SAVE £37.95','Crispi Wild EVO GTX','Croots Byland 30" or 32" Leather Shotgun Slip.','Croots Byland Leather Cartridge Bag','Croots Byland Leather Cartridge Magazine','Croots Byland Leather Loaders Bag','Croots Byland Leather Panier bag','CROOTS HELMSLEY TWEED 30" AND 32" SHOTGUN SLIP WITH FLAP AND ZIP','Croots Helmsley Tweed Cartridge Bag','Croots Malton Bridle Leather Quick Release Cartridge Belt','Croots Malton Leather Cartridge Belts 12g and 20g','Croots Malton Leather Certificate Wallet','Croots Rosedale 30"Canvas Shotgun Slip in Fox Tan','Croots Rosedale Canvas Cartridge Bag','Croots Rosedale Canvas Game Bag','Croots Rosedale Canvas Roll-up Shotgun Slip','Crusher Hat. Apg or Adt Camouflage.','Deer Tray (Roe) 100cm X 55cm X 15cm','Deer Tray(Fallow) 100cm X 100cm X 12cm , due to the size of the trays extra shipping costs will apply, can be collected for our gun shop or contact us for price to ship to your postcode.','Delux Hunting Knife 9','Economy Fleece Jacket','Extra Long Burgundy Breek Socks Medium','Extra Long Breek Socks Burgundy Large','Extra Long Breek Socks Burnt Orange Large','Extra Long Breek Socks Large','Extra Long Breek Socks Large Grape','Extra Long Breek Socks Medium Grape','Extra Long Breek Socks Mustard Large','Extra Long Breek Socks Olive Ladies UK 7-8.5','Extra Long Breek Socks Rosewood Medium','Extra Long Breek Socks Tweed Large','Extra Long Breek Socks Tweed Medium','Fabsil Liquid Waterproofer 1ltr With UV Protection','Faulhaber Crow Call Set','Faulhaber Duck Call','Faulhaber Gift Set Large','Faulhaber Gift Set Small','Faulhaber Hen Call','Faulhaber Jay Call','Faulhaber Medium Roe Deer Call Set','Faulhaber Old Roe Call','Faulhaber Partridge Call','Fleece Glove','Fleece Leisure Jacket','Fleece Shoooting Jacket','Flex Form 3/4 Face Mask','Folding Ear Defenders','Folding Hunting Knife','Folding Lock knife','Foxpull Pullover','full Leafy Cut Headnet','Gambrel','Game Carrier','Game Carrier With 8 Straps','Garlands Deluxe Cartridge Belt 12G','Garlands Deluxe Cartridge Belt 20G','Garlands Economy Rifle Sling','Garlands Fast Load Cartridge Bag(100)','Garlands Fleece Shooting Waistcoat','Garlands Large Leather Cartridge Holder','Garlands Large Tin Gun Oil','Garlands Leather Cartridge Bag(100)','Garlands Leather Cartridge Bag(75)','Garlands Leather Shell Holder','Garlands Scottish Tweed Caps','Garlands Shotgun Slip 30','Garlands Single Leather Licence Holder','Garlands Sling Swivels(Pair)','Garlands Standard Cartridge Belt 12G','Garlands Standard Cartridge Belt 20G','Garlands Stud for barrel','Garlands Stud for Stock','Garlands Zipped Rifle Slip','Garlands Zipped Shotgun Slip 28/30"','Garlands Zipped Shotgun Slip 32"','G-Max Paste Wax 75ml','Grubs Field Boot(High)','Grubs Field Boot(Low)','Grubs Tayline 5.0 Wellington Boot','Gun Oil','G-Wax 80g Leather Conditioner.','Heavey Duty Solvent Cleaner','Hubertus Buttolo Blatter','Hubertus Buttolo Cherry Wood Call','Hubertus Universal Deer Call','Hunting knife','Jersey Gloves','Ladies Extra Long Breek Socks Burgundy Small.','Ladies Extra Long Breek Socks Lilac Small.','Ladies Extra Long Breek Socks Pink Small','Ladies Extra Long Breek Socks Rosewood Small','Le Chameau Chasseur Leather Lined Zipped Wellingtons','Le Chameau Chasseur Neoprene/Zipped Wellies','LE CHAMEAU VIERZONORD WELLINGTON BOOTS.','Long Sleaved T Shirt','MacWet Climatec Gloves Black Long','MacWet Climatec Gloves Black Short Cuff.','MacWet Climatec Gloves Brown Long','MacWet Climatec Gloves Green Long','MacWet Climatec Gloves Green Short','MacWet Climatec Gloves Navy Long Cuff','MacWet Climatec Gloves Navy Short','MacWet Mesh Gloves Green Long','MacWet Mesh Gloves Green Short','Mad Dog Growler Waterproof Dungarees XL','Maluniverselle Case','Maxima Steel Bases PA [Prices from]','Mid Bead Red 2','Mid Bead White 6','Middle Bead 20','Middle Bead Brass 15','Minox APO HG 8 x 43 Binoculars','Minox DTC 300 Trail Camera','Minox ZE-i 5-25x56 Scope','Neoprene Cartridge Belt','Neoprene Hip Waders Wetland Pattern Size 12','Neoprene Recoil Pad','Neoprene Rifle Sling','Official Team Fiocchi Cap.','Peachcloth Waterproof Jacket','Professional Hunter','Quick On/Off Neoprene Scope Cover','Quick On/Off Scope Cover','Rainblocker Waterproof Gloves with Lycra Trigger Finger','Realtree Camo Die cut Leaf Blind Size 56" x 30','Realtree Hip Waders','Rifle Barrel Cover','Rifle Plugs','Rifle Rest (Front)','Rifle Rest (Rear)','Rifle Sling Foam Backed 3cm','Rifle Sling Foam Backed 4cm','Rocky Childrens Jacket','Rocky Childrens Trousers','Rocky Grizzly Jacket','Rocky Lynx AP Camouflage Boot','Rocky Mountain Jacket','Rocky Mountain Trousers','Rocky Poncho','Rubber Recoil Pad','S 202 Classic XT (Mini & Medium)','S 202 Outback (Medium)','S 202 Wolverine (Varmint)','Sauer 202 Classic (Mini & Medium)','Shooting Experience 1 -- Full Day Clay Pigeon Shooting with Refreshments','Shooting Experience 2 - Half Day Shooting with Refreshments (minimum 8 people)','Shooting Experience 3 - Breakfast Shoot','Shooting Experience 4 -- 25 Clay Lesson (Approx 1 hour)','Shooting Experience 5 -- 50 Clay Lesson (Approx 2 hours)','Short Sleeved T Shirt','Shotgun Slip with Choke Pouch 32"','Slip-On Recoil Pad','Snap Caps 12G','Snap Caps 20G','Sportchief Aquatex Trousers APG','Sportchief Genuine Leather Lined Full Zip Wellington Boot.','Sportchief Saddlecloth Aquatex Jacket','Sportchief Saddlecloth Aquatex Jacket APG Camouflage.','Sportschief Aquatex All Year 3 Way Jacket','Sportschief Aquatex All Year 3 Way Trousers','SR21 Concorde','SR21 Montana','SR21 Monte Carlo','SR21 N Classic','SR21 NSS Classic','SR21 Precision','SR26 Schwarzkittel','Stanley Classic Green Flask 0.71 litre','Stanley Classic Green Flask 1 litre','Stanley Classic Green Flask 1.9 litre','Steddy Portable Gun Rack','Swarovski Bino Guard Pro','Swarovski Bino Suspender Pro','Swarovski DS 5-25 x 52 PL 40mm Tube L4A - Reticle','Swarovski Scope Guard','Swarovski Scope Lens Protector','Swarovski Winged Eyecup Set','Swarovski Z8i 2-16 x 50 P','Tikka Rings 1" Quick Detachable (Matte)','Unlined Sportsman Jacket','V80 VCI Cleaner/Degreaser 16oz','V80 VCI Gun Sheild','V80 VCI Super Plug','VCI Pro Chips(X 20)','VIYELLA 100% Cotton Mens Country Check Shirts.','Viyella 80/20 Gold Ground Mini Tattersall Check Classic Fit Shirt','Walking Boot Bag - (OUT OF STOCK)','Wellington Boot Bag ( out of stock)','Wellington boot Sock','Whitewater Fleece Waterproof Jacket','Whitewater Microfleece Waterproof Jacket','Whitewater Microfleece Waterproof Trousers','WILEY X DETECTION INTERCHANGEABLE SHOOTING KIT.','WILEY X SABER ADVANCED SHOOTING SUNGLASSES','Wool & Thinsulate Gloves','Zeiss Conquest V6','Zeiss Victory HT' ]; $('#our-products .typeahead').typeahead({ hint: true, highlight: true, minLength: 1 }, { name: 'products', limit: 10, source: substringMatcher(products) });