require([ "modules/jquery-mozu", "hyprlive", "modules/backbone-mozu", "modules/api"], function ($, Hypr, Backbone, api) { var flavour_Guides1 = [{ "name" : "Jelly Belly Officiella Smaker", "shopName" : "Officiella Smaker", "guide" : "original50", "description" : "Den mest fantastiska, goda och härliga kollektion av gourmet gelébänor är ett smakäventyr. De bästa och mest populära smakerna som vi gjort är samlade i 50 Smaker Mix, din guide till att upptäcka varenda böna. Vilka dina prefenser än är, så är vi absolut säkra på att det finns en smak för dig här. Ät-instruktioner: Njut av en smak åt gången för att uppleva den sanna och disktinkta smaken av varje enskild Jelly Belly® geléböna. Eller, experimentera genom att kombinera smaker i ett Jelly Belly® recept för att skapa en helt ny och original smakupplevelse.", "childcategories" : [{ "name": "Äppelpaj", "slug": "Apple Pie Ice Cream", "image": "af_ApplePie.png" }, { "name": "Bärmix", "slug": "Berry Blue", "image": "af_BerryBlue.png" }, { "name": "Tårta", "slug": "Birthday Cake", "image": "af_BirthdayCake.png" },{ "name": "Blåbär", "slug": "Blueberry", "image": "af_Blueberry.png" }, { "name" : "Bubbelgum", "slug" : "Bubble Gum", "image" : "af_BubbleGum.png" }, { "name": "Smörade Popcorn", "slug": "Buttered Popcorn", "image": "af_ButteredPopcorn.png" }, { "name": "Nätmelon", "slug": "Cantaloupe", "image": "af_Cantaloupe.png" }, { "name": "Cappuccino", "slug": "Cappuccino", "image": "Cappuccino.jpg" }, { "name": "Kanderat Popcorn", "slug": "Caramel Corn", "image": "af_CaramelPopcorn.png" }, { "name": "Körsbärscola", "slug": "Cherry Cola", "image": "af_CherryCola.png" }, { "name": "Körsbär och Passionsfrukt", "slug": "Cherry Passion Fruit Smoothie", "image": "af_CherryPassionFruitSmoothie.png" }, { "name": "Chokladpudding", "slug": "Chocolate Pudding", "image": "af_ChocolatePudding.png" }, { "name": "Kokos", "slug": "Coconut", "image": "Coconut.jpg" }, { "name": "Sockervadd", "slug": "Cotton Candy", "image": "af_CottonCandy.png" }, { "name": "Ananas", "slug": "Crushed Pineapple", "image": "af_CrushedPineapple.png" }, { "name": "Vindruva", "slug": "Grape", "image": "af_Grape.png" }, { "name": "Grönt Äpple", "slug": "Green Apple", "image": "af_GreenApple.png" }, { "name": "Grönt Te", "slug": "Green Tea", "image": "af_GreenTea.png" }, { "name": "Het Kanel", "slug": "Sizzling Cinnamon", "image": "af_HotCinnamon.png" }, { "name": "Fruktbål", "slug": "Island Punch", "image": "af_IslandPunch.png" }, { "name": "Saftigt Päron", "slug": "Juicy Pear", "image": "af_JuicyPear.png" }, { "name": "Kiwi", "slug": "Kiwi", "image": "af_Kiwi.png" }, { "name": "Lemon", "slug": "Lemon", "image": "af_Lemon.png" }, { "name": "Citronlime", "slug": "Lemon Lime", "image": "af_LemonLime.png" }, { "name": "Lime", "slug": "Lime", "image": "af_Lime.png" }, { "name": "Lakrits", "slug": "Liquorice", "image": "af_Liquorice.png" }, { "name": "Litchi", "slug": "Lychee", "image": "af_Lychee.png" }, { "name": "Mango", "slug": "Mango", "image": "af_Mango.png" }, { "name": "Margarita", "slug": "Margarita", "image": "af_Margarita.png" }, { "name": "Chokladmint", "slug": "Chocolate Mint", "image": "af_MintChip.png" }, { "name": "Mixed Berry Smoothie", "slug": "Mixed Berry Smoothie", "image": "af_MixedBerrySmoothie.png" }, { "name": "Apelsin", "slug": "Orange", "image": "af_Orange.png" }, { "name": "Apelsinsorbet", "slug": "Orange Sherbet", "image": "af_OrangeSherbet.png" }, { "name": "Persika", "slug": "Peach", "image": "af_Peach.png" }, { "name": "Persika Bellini", "slug": "Peach Bellini", "image": "af_PeachBellini.png" }, { "name": "Piña Colada", "slug": "Pina Colada", "image": "af_PinaColada.png" }, { "name": "Ananas och Päron", "slug": "Pineapple Pear Smoothie", "image": "af_PineapplePearSmoothie.png" },{ "name": "Blod Grapefrukt", "slug": "Pink Grapefruit", "image": "af_PinkGrapefruit.png" }, { "name": "Granatäpple", "slug": "Pomegranate", "image": "af_Pomegranate.png" }, { "name": "Hallon", "slug": "Raspberry", "image": "af_Raspberry.png" }, { "name": "Rött Äpple", "slug": "Red Apple", "image": "af_RedApple.png" }, { "name": "Jordgubbe och Banan", "slug": "Strawberry Banana Smoothie", "image": "af_StrawberryBananaSmoothie.png" }{ "name": "Jordgubbar Cheesecake", "slug": "Strawberry Cheesecake", "image": "af_StrawberryCheesecake.png" }, { "name": "Jordgubbs Daiquiri", "slug": "Strawberry Daiquiri", "image": "af_StrawberryDaiquiri.png" }, { "name": "Jordgubbsglass", "slug": "Strawberry Sundae", "image": "af_StrawberrySundaeIceCream.png" } { "name": "Mandarin", "slug": "Tangerine", "image": "af_Tangerine.png" }, { "name" : "Grillad Marshmallow", "slug" : "Toasted Marshmallow", "image" : "Marshmallow.jpg" }, { "name" : "Mogen Banan", "slug" : "Top Banana", "image" : "af_TopBanana.png" }, { "name" : "Tutti-frutti", "slug" : "Tutti-Fruitti", "image" : "af_TuttiFruitti.png" }, { "name" : "Vanilj", "slug" : "Vanilla", "image" : "vanilla.jpg" }, { "name" : "Körsbär", "slug" : "Very Cherry", "image" : "af_VeryCherry.png" }, { "name" : "Vattenmelon", "slug" : "Watermelon", "image" : "af_Watermelon.png" }, { "name" : "Vilda Björnbär", "slug" : "Wild Blackberry", "image" : "af_WildBlackberry.png" } ] }, { "name" : "Sura", "shopName" : "Sours", "guide" : "sours", "description" : "Få dina smaklökar att rysa av läppryckande Jelly Belly® Sura Smaker.", "childcategories" : [{ "name": "Surt Äpple", "slug": "Sour Apple", "image": "sour_apple.jpg" }, { "name": "Surt Körsbär", "slug": "Sour Cherry", "image": "sour_cherry.jpg" }, { "name": "Sur Vindruva", "slug": "Sour Grape", "image": "sour_grape.jpg" }, { "name": "Sur Citron", "slug": "Sour Lemon", "image": "sour_lemon.jpg" }, { "name": "Sur Apelsin", "slug": "Sour Peach", "image": "sour_orange.jpg" } ] }, { "name" : "Fruktskål", "shopName" : "Fruit Mix", "guide" : "fruitBowl", "description" : "Vibrerande, saftig och så rätt att du inte kommer förstå dina smaklökar. Varje smak är verklig och speciell, så upptäck en åt gången för det fullständiga smakäventyret. Inga vilda smaker här inte, utan bara det bästa av vår fruktinspirerade kollektion, många av dem är tillverkade på riktig juice, puré och smakextrakt. I den här samlingen kommer du njuta av Blåbär, Kokos, Vindruva, Grönt Äpple, Saftigt Päron, Citron, Citron-Lime, Persika, Rosa Grapefrukt, Hallon, Rött Äpple, Mandarin, Färsk banan, Körsbär och Vattenmelon.", "childcategories" : [{ "name": "Blåbär", "slug": "Blueberry", "image": "af_Blueberry.png" }, { "name": "Kokos", "slug": "Coconut", "image": "Coconut.jpg" }, { "name": "Vindruva", "slug": "Grape", "image": "af_Grape.png" }, { "name": "Grönt Äpple", "slug": "Green Apple", "image": "af_GreenApple.png" }, { "name" : "Saftigt Päron", "slug" : "Juicy Pear", "image" : "af_JuicyPear.png" }, { "name": "Citron", "slug": "Lemon", "image": "af_Lemon.png" }, { "name": "Citronlime", "slug": "Lemon Lime", "image": "af_LemonLime.png" }, { "name": "Persika", "slug": "Peach", "image": "af_Peach.png" }, { "name": "Blod Grapefrukt", "slug": "Sunkist Pink Grapefruit", "image": "af_PinkGrapefruit.png" }, { "name": "Granatäpple", "slug": "Pomegranate", "image": "af_Pomegranate.png" }, { "name": "Hallon", "slug": "Raspberry", "image": "af_Raspberry.png" }, { "name": "Rött Äpple", "slug": "Red Apple", "image": "af_RedApple.png" }, { "name": "Mandarin", "slug": "Tangerine", "image": "af_Tangerine.png" }, { "name": "Mogen Banan", "slug": "Top Banana", "image": "af_TopBanana.png" }, { "name": "Körsbär", "slug": "Very Cherry", "image": "af_VeryCherry.png" }, { "name": "Vattenmelon", "slug": "Watermelon", "image": "af_Watermelon.png" } ] }, { "name": "Tropisk Blandning", "shopName": "Tropical Mix", "category": "335", "guide": "tropical-mix", "description": "Varma sandstränder, svala öbrisar och doften av exotiska frukter i luften är inspirationen till den här kollektionen. Din alldeles egna resa till paradiset! Kollektionen innehåller Blåa bär, Cantaloupe, Kokos, Krossad Ananas, Grönt äpple, Fruktbål, Kiwi, Citron, Jordgubbs Daiquiri, Mandarin och Färsk Banan.", "childcategories": [{ "name": "Bärmix", "slug": "Berry Blue", "image": "af_BerryBlue.png" }, { "name": "Nätmelon", "slug": "Cantaloupe", "image": "af_Cantaloupe.png" }, { "name": "Körsbär och Passionsfrukt", "slug": "Cherry Passion Fruit", "image": "af_CherryPassionFruitSmoothie.png" }, { "name": "Kokos", "slug": "Coconut", "image": "coconut.jpg" }, { "name": "Ananas", "slug": "Crushed Pineapple", "image": "af_CrushedPineapple.png" }, { "name": "Grönt Äpple", "slug": "Green Apple", "image": "af_GreenApple.png" }, { "name": "Fruktbål", "slug": "Island Punch", "image": "af_IslandPunch.png" }, { "name": "Kiwi", "slug": "Kiwi", "image": "af_Kiwi.png" }, { "name": "Citron", "slug": "Lemon", "image": "af_Lemon.png" }, { "name": "Citronlime", "slug": "Lemon Lime", "image": "af_LemonLime.png" }, { "name": "Mango", "slug": "Mango", "image": "af_Mango.png" }, { "name": "Persika", "slug": "Peach", "image": "af_Peach.png" }, { "name": "Piña Colada", "slug": "Pina Colada", "image": "af_PinaColada.png" }, { "name": "Jordgubbs Daiquiri", "slug": "Strawberry Daiquiri", "image": "af_StrawberryDaiquiri.png" }, { "name": "Mandarin", "slug": "Tangerine", "image": "af_Tangerine.png" }, { "name": "Mogen Banan", "slug": "Top Banana", "image": "af_TopBanana.png" } ] }, { "name": "Smoothie Blandning", "shopName": "Smoothie Blend", "category": "335", "guide": "smoothie-blend", "description": "Blandade fruktfrinkar är det nya heta, och dessa uppfriskande smakkombinationer tar sin inspiration från fantastiskt läckra hopkok. Söt och syrlig med bara en antydan till en krämig smoothie. Kollektionen är tillgänglig med Körsbä/Passionsfrukt, Mandarin/Apelsin/Mango, Ananas/Päron, och Jordgubb/Banan.", "childcategories": [{ "name": "Körsbär och Passionsfrukt", "slug": "Cherry Passion Fruit Smoothie", "image": "af_CherryPassionFruitSmoothie.png" }, { "name": "Bärblandning", "slug": "Mixed Berry Smoothie", "image": "af_MixedBerrySmoothie.png" }, { "name": "Apelsin", "slug": "Orange Smoothie", "image": "af_OrangeSherbet.png" }, { "name": "Ananas och Päron", "slug": "Pineapple Pear Smoothie", "image": "af_PineapplePearSmoothie.png" }, { "name": "Jordgubbe och Banan", "slug": "Strawberry Banana Smoothie", "image": "af_StrawberryBananaSmoothie.png" } ] }, { "name": "Glassmix", "shopName": "Ice Cream Mix", "category": "157", "guide": "cold-stone-jelly-beans", "description": "Den klassiska glassmixen är en tripp till glassdisken. Krämig och söt - en riktig smakfest i munnen. Mixen innehåller Äppelpaj, Födelsedagstårta, Chokladbit, Chokladmint och Jordgubbstårta.", "childcategories": [{ "name": "Äppelpaj", "slug": "Apple Pie", "image": "af_ApplePie.png" }, { "name": "Tårta", "slug": "Birthday Cake", "image": "af_BirthdayCake.png" }, { "name": "Chokladglass", "slug": "Chocolate Chunk", "image": "af_ChocolatePudding.png" }, { "name": "Chokladmint", "slug": "Chocolate Mint", "image": "af_MintChip.png" }, { "name": "Apelsinsorbet", "slug": "Orange Sherbet", "image": "af_OrangeSherbet.png" }, { "name": "Jordgubbsglass", "slug": "Strawberry Sundae", "image": "af_StrawberrySundaeIceCream.png" } ] }, { "name" : "Sunkist® Citrusblandning", "shopName" : "Citrus Mix", "guide" : "citrus", "description" : "Vår favoriter av citrussmakerna är tillsammans i en muntörstande mix. En litten tårta, en liten bit sött och alltid uppfriskande och solig. Inkluderar Sunkist Apelsin, Sunkist Blod Grapefrukt, Sunkist Citron, Sunkist Mandarin och Sunkist Lime som kommer fräscha upp dina smaklökar.", "childcategories" : [{ "name" : "Sunkist Citron", "slug" : "Sunkist Lemon", "image" : "af_Lemon.png" }, { "name" : "Sunkist Lime", "slug" : "Sunkist Lime", "image" : "af_Lime.png" }, { "name" : "Sunkist Apelsin", "slug" : "Sunkist Orange", "image" : "af_Orange.png" }, { "name" : "Sunkist Blod Grapefrukt", "slug" : "Sunkist Pink Grapefruit", "image" : "af_PinkGrapefruit.png" }, { "name" : "Sunkist Mandarin", "slug" : "Sunkist Tangerine", "image" : "af_Tangerine.png" } ] }, { "name" : "Cocktail Klassiker®", "shopName" : "Cocktail Classics®", "guide" : "cocktail", "description" : "Inget skakande eller omrörande är nödvändigt i denna moderna twist på våra klassiska cocktails. Alla smaker innehåller ingen alkohol, kollektionen är perfekt vid firanden av båda små och stora. Mixen innehåller Margarita, Mojito, Persika Bellini, Piña Colada, Granatäpple Cosmo och Jordgubbs Daiquiri.", "childcategories" : [{ "name" : "Margarita", "slug" : "Margarita", "image" : "af_Margarita.png" }, { "name" : "Persika Bellini", "slug" : "Peach Bellini", "image" : "af_PeachBellini.png" }, { "name" : "Piña Colada", "slug" : "Pina Colada", "image" : "af_PinaColada.png" }, { "name" : "Granatäpple Cosmo", "slug" : "Pomegranate Cosmo", "image" : "af_Pomegranate.png" }, { "name" : "Jordgubbs Daiquiri", "slug" : "Strawberry Daiquiri", "image" : "af_StrawberryDaiquiri.png" } ] }, { "name": "BeanBoozled®", "shopName": "BeanBoozled®", "category": "1", "guide": "beanboozled", "description": "Jelly Belly's vildaste kollektion utmanar dig att jämföra några av våra mest välsmakande och populära smaker med de våra knasigaste. Men det finns en hake - du vet inte vilken som är vilken. Tutti-Frutti-bönan ser exakt likadan ut som Stinkande Strumpor-bönan! Söta, ljuvliga Chokladpudding kan också vara Hundmat på Burk. Du kanske tror att du smakar vår världskända Smörade Popcorn-böna, men det du sätter tänderna i är faktisk Ruttet Ägg. Det enda sättet att ta reda på vilken böna du får är att äta den!", "childcategories": [{ "name": "Stinkande Strumpor", "slug": "1", "image": "tuttiFruitti.jpg" }, { "name": "Tutti-frutti", "slug": "1", "image": "tuttiFruitti.jpg" }, { "name": "Nyklippt Gräs", "slug": "1", "image": "lime.jpg" }, { "name": "Lime", "slug": "1", "image": "lime.jpg" }, { "name": "Ruttet Ägg", "slug": "1", "image": "popcorn.jpg" }, { "name": "Smörade Popcorn", "slug": "1", "image": "popcorn.jpg" }, { "name": "Tandkräm", "slug": "1", "image": "berryBlue.jpg" }, { "name": "Bärmix", "slug": "1", "image": "berryBlue.jpg" }, { "name": "Spya", "slug": "1", "image": "peach.jpg" }, { "name": "Persika", "slug": "1", "image": "peach.jpg" }, { "name": "Snorkråka", "slug": "1", "image": "pear.jpg" }, { "name": "Saftigt Päron", "slug": "1", "image": "pear.jpg" }, { "name": "Våtservett", "slug": "1", "image": "coconut.jpg" }, { "name": "Kokos", "slug": "1", "image": "coconut.jpg" }, { "name": "Konserverad Hundmat", "slug": "1", "image": "chocolatePudding.jpg" }, { "name": "Chokladpudding", "slug": "1", "image": "chocolatePudding.jpg" } ] }, { "name" : "Juvelbönkollektion", "shopName" : "Jewel Collection", "guide" : "jewelBeans", "description" : "Populära Jelly Belly gelébönesmaker har en yta med vacker och pärlemorliknande glans!", "childcategories" : [{ "name" : "Jewel Blåbär", "slug" : "Jewel Blueberry", "image" : "BlueberryJewelBean.png" }, { "name" : "Jewel Bubbelgum", "slug" : "Jewel Bubble Gum", "image" : "bubblegumJewelBean.png" }, { "name" : "Jewel Syrligt Äpple", "slug" : "Jewel Sour Apple", "image" : "sourAppleJewelBean.png" }, { "name" : "Jewel Vaniljsoda", "slug" : "Jewel Cream Soda", "image" : "CreamSodaJewelBean.png" }, { "name" : "Jewel Bärmix", "slug" : "Jewel Berry Blue", "image" : "BerryBlueJewelBean.png" }, { "name" : "Jewel Apelsin", "slug" : "Jewel Orange", "image" : "OrangeJewelBean.png" }, { "name" : "Jewel Körsbär", "slug" : "Jewel Very Cherry", "image" : "verCherryJewelBean.png" } ] }, { "name" : "Harry Potter™ Bertie Bott’s Alla smaker bönor", "shopName" : "Harry Potter™", "guide" : "bertieBotts", "description" : "Harry Potter’s favoritgodis är tillbaka! Skaffa en ask med goda och välsmakande gelébönor blandat med knasiga och galna bönor!", "childcategories" : [{ "name" : "Banan", "slug" : "Banana", "image" : "bb_banana.jpg" }, { "name" : "Svartpeppar", "slug" : "Black Pepper", "image" : "bb_blackPepper.jpg" }, { "name" : "Blåbär", "slug" : "Blueberry", "image" : "bb_blueberry.jpg" }, { "name" : "Snorkråka", "slug" : "Booger", "image" : "bb_booger.jpg" }, { "name" : "Sockervadd", "slug" : "Candyfloss", "image" : "bb_candyFloss.jpg" }, { "name" : "Körsbär", "slug" : "Cherry", "image" : "bb_cherry.jpg" }, { "name" : "Kanel", "slug" : "Cinnamon", "image" : "bb_cinnamon.jpg" }, { "name" : "Smuts", "slug" : "Dirt", "image" : "bb_dirt.jpg" }, { "name" : "Daggmask", "slug" : "Earthworm", "image" : "bb_earthworm.jpg" }, { "name" : "Öronvax", "slug" : "Earwax", "image" : "bb_earwax.jpg" }, { "name" : "Gräs", "slug" : "Grass", "image" : "bb_grass.jpg" }, { "name" : "Grönt Äpple", "slug" : "Green Apple", "image" : "bb_greenApple.jpg" }, { "name" : "Citron", "slug" : "Lemon", "image" : "bb_lemon.jpg" }, { "name" : "Marshmallow", "slug" : "Marshmallow", "image" : "bb_marshmallow.jpg" }, { "name" : "Ruttet Ägg", "slug" : "Rotten Egg", "image" : "bb_rottenEgg.jpg" }, { "name" : "Korv", "slug" : "Sausage", "image" : "bb_sausage.jpg" }, { "name" : "Soppa", "slug" : "Soap", "image" : "bb_soap.jpg" }, { "name" : "Tutti-frutti", "slug" : "Tutti-Fruitti", "image" : "bb_tuttiFrutti.jpg" }, { "name" : "Spya", "slug" : "Vomit", "image" : "bb_vomit.jpg" }, { "name" : "Vattenmelon", "slug" : "Watermelon", "image" : "bb_watermelon.jpg" } ] } ]; /** * Render model. * Rearange category. **/ $(document).ready(function () { $('#jb-childcategory-container').empty(); var category = jQuery.parseJSON(flavour_Guides1); $(category).each(function(index,data){ $('#jb-childcategory-container').append(Hypr.getTemplate('pages/flavor-guides-item').render({model: data})); }); /** * Add click handler **/ $(".jb-colapsing-title").bind("click", function(e){ $(this).parent().find(".jb_contentfolder").slideToggle(); if($(this).find(".mz-mobile").css("display")=="block"){ var temphtml=$(this).find(".mz-mobile").text(); if(temphtml=="+"){ $(this).find(".mz-mobile").text("-"); }else{ $(this).find(".mz-mobile").text("+"); } } }); /** * 1. Re-arange the order of items if URL has value of 'guide' * 1.1. currentItem = Get the first child. * 1.2. newItem = Get the URL referenced item * 1.3. newItem.insertBefore(currentItem); * 1.4. Open the new Item div. * 2. Else open the default first child item. **/ var guide = GetURLParameter('guide'); if(guide){ var currentFirstItem = $('#jb-childcategory-container').children()[0]; if($('[data-mz-category-guide='+guide+']').length>0){ $('[data-mz-category-guide='+guide+']').insertBefore(currentFirstItem); $('[data-mz-category-guide='+guide+']').find(".jb_contentfolder").slideToggle(); $('[data-mz-category-guide='+guide+']').find(".mz-mobile").text('-'); }else{ $(currentFirstItem).find(".jb_contentfolder").slideToggle(); } } }); function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } return ''; } });