var categories = {};categories['makeup'] = {eyeshadow: 'Eyeshadow',eyeliner: 'Eyeliner',blushes: 'Blushes',lips: 'Lips',eyecolors: 'Eye Colors',eyebags: 'Eyebags',freckles: 'Freckles',custommakeup: 'Custom Makeup',tattoos: 'Tattoos',};categories['clothing'] = {tops: 'Tops',dresses: 'Dresses/Outfits',bottoms: 'Bottoms',swimsuit: 'Swimsuit',underwear: 'Underwear',};categories['shoes'] = {};categories['accessories'] = {hats: 'Hats',earrings: 'Earrings',glasses: 'Glasses',necklaces: 'Necklaces',bracelets: 'Bracelets',watch: 'Watch',gloves: 'Gloves',rings: 'Rings',socks: 'Socks',nails: 'Nails',bags: 'Bags',miscellaneous: 'Miscellaneous',};categories['skintones'] = {replacement: 'Replacement',nonereplacement: 'None Replacement',};categories['genetics'] = {eyebrows: 'Eyebrows',eyes: 'Eyes Default Replacement',bodyhair: 'Body Hair',facialhair: 'Facial Hair',mole: 'Mole',};categories['hair'] = {newmesh: 'New Mesh',recolor: 'Recolor/Edit',};categories['lots'] = {residential: 'Residential',community: 'Community',};categories['pose'] = {};categories['sims'] = {};categories['furnishing'] = {plants: 'Plants/Potted',paintings: 'Paintings',rugs: 'Rugs',curtains: 'Curtains',mirrors: 'Mirrors',animal: 'Animal',decor: 'Decor',lighting: 'Lighting',surfaces: 'Surfaces',plumbing: 'Plumbing',appliances: 'Appliances',comfort: 'Comfort',electronics: 'Electronics',storage: 'Storage',kids: 'Kids',mailbox: 'Mailbox',miscellaneous: 'Miscellaneous',};categories['buildmode'] = {doors: 'Doors',windows: 'Windows',fences: 'Fences',plants: 'Plants/Trees',columns: 'Columns',arches: 'Arches',fireplaces: 'Fireplaces',roofs: 'Roofs',stairs: 'Stairs',wall: 'Wall',floor: 'Floor',};categories['sets'] = {livingroom: 'Living room',bedroom: 'Bedroom',kitchen: 'Kitchen',diningroom: 'Dining room',bathroom: 'Bathroom',study: 'Study',outdoor: 'Outdoor',};categories['mods'] = {}; $(function() { $('body').on('change', '.category-select', function() { var subs = categories[$(this).val()]; var $select = $(this).next('.subcategory-select'); if ( ! $.isEmptyObject(subs)) { var html = ''; html += ''; $.each(subs, function(index, val) { html += ''; }); $select.html(html).prop('disabled', false).show(); } else { $select.html('').prop('disabled', true).hide(); } }); $('.category-select').trigger('change'); $('.subcategory-select').each(function(index, el) { if ($(this).data('value') != '') { $(this).val($(this).data('value')); } }); });