$.oSettings = {}; function setAriaInvalid(){ $('input, select, textarea').attr('aria-invalid','false'); $('.form-control.is-invalid, .was-validated .form-control:invalid').attr('aria-invalid','true'); } (function() { 'use strict'; window.addEventListener('load', function() { var forms = document.getElementsByClassName('needs-validation'); var validation = Array.prototype.filter.call(forms, function(form) { form.addEventListener('submit', function(event) { if (form.checkValidity() === false) { event.preventDefault(); event.stopPropagation(); form.classList.add('was-validated'); setAriaInvalid(); $('input, textarea').on('focusout, blur, keyup', function(){ setAriaInvalid(); }); $("select").change(function(){ setAriaInvalid(); }); $('input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true]').filter(':first').focus(); } }, false); }); }, false); })(); $(document).ready(function(){ function checkMinYrs(type,minyears,joint) { if (type == 'residence') { if (joint) { fieldsetID = "joint_previous_residence"; years = 'jointyearsatresidence'; months = 'jointmonthsatresidence'; } else { fieldsetID = "previous_residence"; years = 'yearsatresidence'; months = 'monthsatresidence'; } } else if (type == 'employer') { if (joint) { fieldsetID = "joint_previous_employer_information"; years = 'jointemployeryears'; months = 'jointemployermonths'; } else { fieldsetID = "previous_employer_information"; years = 'employeryears'; months = 'employermonths'; } } $('[name=' + years + '],' + '[name=' + months + ']').unbind("change").bind("change", function(event) { checkMinYrs(type,minyears,joint); }); if (fieldsetID) { var currentyears = ($('[name=' + years + ']').val()+'').replace(/\D/g,''); var currentmonths = ($('[name=' + months + ']').val()+'').replace(/\D/g,''); if (!currentyears || isNaN(currentyears)) currentyears = 0; if (!currentmonths || isNaN(currentmonths)) currentmonths = 0; var selector = '#' + fieldsetID + ' input, #' + fieldsetID + ' select, #' + fieldsetID + ' textarea'; $(selector).removeAttr("required").parent("div").siblings("label").removeClass("asterisk"); if (currentyears < minyears) { $(selector).each(function() { if ($(this).is(':visible')) { $(this).prop("required",true).parent("div").siblings("label").addClass("asterisk"); } }); } } } function spouseinfo(){ $("#spousename, #spouseincome").removeAttr("required").parent("div").siblings("label").removeClass("asterisk"); $('#field-spousename,#field-spouseincome').hide(); } spouseinfo(); $.oSettings.Category = { "dealerid":6253 ,"vehTypes":[" Motorhome"," Park Model","Trailer"," Tilt"] ,"categoryData":{"Trailer":{"2006":["Dutchmen"],"2008":["Okanagan RV"],"2010":["Gulf Stream"],"2011":["Gulf Stream","Outdoors RV"],"2012":["Alp","Chalet","Excel RV","Outdoors RV"],"2013":["Alp","Augusta RV","Chalet","Excel RV","Fairmont Homes Inc.","Forest River","Heartland","Holiday Rambler","Lance","Motor Trike","Open Range RV","Outdoors RV","Palomino","Prime Time","Shasta","Starcraft","T@B","Wells Cargo"],"2014":["Aliner","Alp","Augusta RV","Chalet","Coachmen","Coleman RV","CrossRoads RV","Cruiser RV","Dutchmen","Excel RV","Fairmont Homes Inc.","Forest River","Gulf Stream","Heartland","Holiday Rambler","Jayco","Keystone RV","Lance","Lifestyle","Little Guy","LivinLite","Northstar","Northwood","Open Range RV","Outdoors RV","Pacific Coachworks","Palomino","Prime Time","R-Vision","Shasta","Skyline","Starcraft","SunnyBrook RV","T@B","Winnebago"],"2015":["Aliner","Alp","Augusta RV","Chalet","Coachmen","Coleman RV","CrossRoads RV","Cruiser RV","DRV","Dutchmen","EverGreen","Excel RV","Fairmont Homes Inc.","Forest River","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","Jayco","Keystone RV","KZ RV","Lance","Lifestyle","Little Guy","LivinLite","Mirage Trailers","Motor Trike","Northstar","Northwood","Open Range RV","Outdoors RV","Pacific Coachworks","Palomino","Prime Time","ProLite","Redwood RV","Riverside Trailers","R-Vision","Shasta","Skyline","Starcraft","SunnyBrook RV","T@B","Venture RV","Westland RV","Winnebago","Yetti Fish Houses"],"2016":["Adventurer Truck Campers","Aliner","Alp","Augusta RV","Bigfoot RV","Chalet","Coachmen","Coleman RV","CrossRoads RV","Cruiser RV","DRV","Dutchmen","Dynamax","EverGreen","Excel RV","Forest River","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","Host Campers","Ice Castle Fish Houses","Jayco","Keystone RV","KZ RV","Lance","Lifestyle","Little Guy","LivinLite","Mirage Trailers","Motor Trike","Northern Lite","Northstar","Northwood","Open Range RV","Outdoors RV","Pacific Coachworks","Palomino","Pastime Camper","Prime Time","ProLite","Redwood RV","Riverside RV","Riverside Trailers","R-Vision","Shasta","Skyline","Starcraft","SunnyBrook RV","T@B","Travel Lite","Venture RV","Westland RV","Winnebago","Winnebago - DUP","Yetti Fish Houses"],"2017":["Adventurer Truck Campers","Airstream","Aliner","Allen Camper MFG.","Allen Camper MFG.","Alp","Augusta RV","Bigfoot RV","Chalet","Cirrus","Coachmen","Coleman RV","CrossRoads RV","Cruiser RV","DRV","Dutchmen","Dutchmen","Excel RV","Forest River","Freespirit Recreation","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","Host Campers","Hyline Trailers","Ice Castle Fish Houses","InTech RV","Jayco","Keystone RV","KZ RV","Lance","Little Guy","LivinLite","Mirage Trailers","Motor Trike","Northern Lite","Northstar","Northwood","nuCamp","Okanagan RV","Open Range RV","Outdoors RV","Outfitter","Pacific Coachworks","Palomino","Pastime Camper","Prime Time","ProLite","Redwood RV","Riverside RV","Riverside Trailers","R-Vision","Shasta","Skyline","Starcraft","T@B","Taxa Outdoors","Time Out Trailers","Travel Lite","Venture RV","Westland RV","Winnebago","Yetti Fish Houses"],"2018":["Adventurer Truck Campers","Airstream","Airstream-French","Aliner","Allen Camper MFG.","Allen Camper MFG.","Alp","Augusta RV","Big Bite","Bigfoot RV","Bunkhouse","Casita Travel Trailers","Chalet","Cirrus","Coachmen","Coleman RV","Cricket Trailer","CrossRoads RV","Cruiser RV","DRV","Dutchmen","Eclipse","Extreme Warrior","Firebrand","Forest River","Freespirit Recreation","Genesis Supreme RV","Grand Design","Grand River RV","Gulf Stream","Heartland","Highland Ridge RV","Hi-Lo","HL Enterprise","Host Campers","Hyline Trailers","Ice Castle Fish Houses","Jayco","Keystone RV","KZ RV","Lance","Little Guy","LivinLite","Look Trailers","Mirage Trailers","Motor Trike","MVP RV","Northern Lite","Northstar","Northwood","nuCamp","NuWa","Okanagan RV","Omega RV","Open Range RV","Outdoors RV","Outfitter","Pacific Coachworks","Palomino","Pastime Camper","Prime Time","ProLite","Redwood RV","Riverside RV","Riverside Trailers","Rugged Mountain RV","R-Vision","Shasta","Skyline","Starcraft","Sunset Park RV","SylvanSport","T@B","Taxa Outdoors","Time Out Trailers","Travel Lite","Trillium","Vanleigh RV","Venture RV","Weekend Warrior","Westland RV","Winnebago","Winnebago","Yetti Fish Houses"],"2019":["Adventurer Truck Campers","Airstream","Aliner","Allen Camper MFG.","Allen Camper MFG.","Alp","ATC Trailers","Augusta RV","Big Bite","Bigfoot RV","Bunkhouse","Casita Travel Trailers","Chalet","Cirrus","Coachmen","Coleman RV","Cricket Trailer","CrossRoads RV","Cruiser RV","DRV","Dutchmen","East to West, INC.","Eclipse","Firebrand","Forest River","Freespirit Recreation","Genesis Supreme RV","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","Hi-Lo","HL Enterprise","Host Campers","Ice Castle Fish Houses","InTech RV","Jayco","Jumping Jack\u00ae Trailers","Keystone RV","KZ RV","Lance","Little Guy","LivinLite","Look Trailers","Mirage Trailers","Motor Trike","Northern Lite","Northstar","Northwood","nuCamp","Open Range RV","Outdoors RV","Outfitter","Pacific Coachworks","Palomino","Prime Time","ProLite","Redwood RV","Riverside RV","Riverside Trailers","Rugged Mountain RV","Shasta","Starcraft","Sunset Park RV","SylvanSport","T@B","Taxa Outdoors","Time Out Trailers","Travel Lite","Vanleigh RV","Venture RV","Weekend Warrior","Westland RV","Winnebago","Yetti Fish Houses"],"2020":["Airstream","Aliner","Alliance RV","Bigfoot RV","Case IH","Chinook RV","Coachmen","CrossRoads RV","Cruiser RV","DRV","Dutchmen","East to West, INC.","Eclipse","Forest River","Grand Design","Gulf Stream","Heartland","Helio RV","Highland Ridge RV","HL Enterprise","Host Campers","Hyline Trailers","InTech RV","Jayco","Jumping Jack\u00ae Trailers","Keystone RV","KZ RV","Lance","Lee-Sure Lite","Little Guy","Look Trailers","Mirage Trailers","Northern Lite","Northwood","nuCamp","Outdoors RV","Pacific Coachworks","Palomino","Prime Time","ProLite","Riverside RV","Shasta","Starcraft","Sunset Park RV","SylvanSport","Taxa Outdoors","Travel Lite","Vanleigh RV","Venture RV","Westland RV","Winnebago"],"2021":["Airstream","Aliner","Alliance RV","Bigfoot RV","Black Series Camper","Chinook RV","Coachmen","CrossRoads RV","Cruiser RV","DRV","Dutchmen","East to West, INC.","Eclipse","Forest River","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","Host Campers","Hyline Trailers","InTech RV","Jayco","Jumping Jack\u00ae Trailers","Keystone RV","KZ RV","Lance","Little Guy","Mirage Trailers","Northern Lite","nuCamp","Outdoors RV","Palomino","Prime Time","ProLite","Recreation By Design","Riverside RV","Shasta","Starcraft","Sundowner Trailers","Sunset Park RV","Taxa Outdoors","Trails West\u00ae","Travel Lite","Vanleigh RV","Venture RV","Winnebago"],"2022":["Airstream","Aliner","Alliance RV","Black Series Camper","Coachmen","Cortes Campers","CrossRoads RV","Cruiser RV","Dutchmen","East to West, INC.","Forest River","Grand Design","Gulf Stream","Heartland","Highland Ridge RV","InTech RV","Jayco","Keystone RV","KZ RV","Lance","Northern Lite","Outdoors RV","Palomino","Prime Time","ProLite","Riverside RV","Shasta","Starcraft","Sunset Park RV","Travel Lite","Venture RV","Winnebago"],"2023":["Airstream","Alliance RV","Coachmen","Cortes Campers","CrossRoads RV","Dragon Products, LTD","Dutchmen","East to West, INC.","Forest River","Grand Design","Gulf Stream","Heartland","Jayco","Keystone RV","KZ RV","Lance","Northern Lite","Northwood","nuCamp","Outdoors RV","Palomino","Prime Time","Riverside RV","Shasta","Stealth Trailers","Sundowner Trailers","Sunset Park RV","Travel Lite","Venture RV","Winnebago"],"2024":["Airstream","Alliance RV","Brinkley","Coachmen","CrossRoads RV","Cruiser RV","Dutchmen","East to West, INC.","Forest River","Grand Design","Heartland","Jayco","Keystone RV","Northern Lite","Northwood","Outdoors RV","Palomino","Prime Time","Sunset Park RV","Travel Lite","Venture RV","Winnebago"]}} ,"categoryList":{"Trailer":[{"id":376,"bodySubType":"A-Frames"},{"id":3166,"bodySubType":"Agriculture Equipment Transport Trailers"},{"id":8878,"bodySubType":"Aluminum"},{"id":8118,"bodySubType":"Aluminum Carhauler"},{"id":8120,"bodySubType":"Aluminum Dump"},{"id":8116,"bodySubType":"Aluminum Single Axle"},{"id":8117,"bodySubType":"Aluminum Tandem Axle"},{"id":8119,"bodySubType":"Aluminum Tilt"},{"id":8880,"bodySubType":"Aluminum Utility"},{"id":5841,"bodySubType":"Bale Trailer"},{"id":5485,"bodySubType":"Belly Dump"},{"id":3167,"bodySubType":"Belt Trailers"},{"id":3168,"bodySubType":"Beverage Trailers"},{"id":3169,"bodySubType":"Blade / Tower Trailers"},{"id":403,"bodySubType":"Boat Trailer"},{"id":4420,"bodySubType":"Booster"},{"id":4419,"bodySubType":"Bottom Dump"},{"id":2534,"bodySubType":"Bumper Pull"},{"id":8098,"bodySubType":"Bunk Bed"},{"id":3051,"bodySubType":"Bunkhouse"},{"id":2932,"bodySubType":"Camper"},{"id":5283,"bodySubType":"Camping Trailer"},{"id":3170,"bodySubType":"Car Carrier Trailers (Enclosed)"},{"id":3171,"bodySubType":"Car Carrier Trailers (Open)"},{"id":2526,"bodySubType":"Car Hauler"},{"id":8712,"bodySubType":"Car hauler / Equipment trailer"},{"id":2929,"bodySubType":"Car Trailer"},{"id":7193,"bodySubType":"Cargo Hauler"},{"id":2524,"bodySubType":"Cargo Trailer"},{"id":8430,"bodySubType":"Cattle Trailer"},{"id":2877,"bodySubType":"Cement Mixer"},{"id":5139,"bodySubType":"Chip Van"},{"id":3172,"bodySubType":"Chipper Trailers"},{"id":2878,"bodySubType":"Chippers and Grinders"},{"id":5132,"bodySubType":"CHIPVAN"},{"id":4072,"bodySubType":"Class A"},{"id":4073,"bodySubType":"Class B"},{"id":4074,"bodySubType":"Class C"},{"id":7132,"bodySubType":"Comb HDR Trailer"},{"id":4241,"bodySubType":"Concession"},{"id":5484,"bodySubType":"Conv Gear"},{"id":2539,"bodySubType":"Cooling Trailer"},{"id":8668,"bodySubType":"Couples Trailer"},{"id":3173,"bodySubType":"Curtain Side Trailers"},{"id":4763,"bodySubType":"Custom"},{"id":6905,"bodySubType":"Deck Between"},{"id":6895,"bodySubType":"Deckover"},{"id":4613,"bodySubType":"Destination"},{"id":420,"bodySubType":"Destination Trailer"},{"id":2879,"bodySubType":"Detach"},{"id":3174,"bodySubType":"Dolly Trailers"},{"id":2880,"bodySubType":"Double Drop Deck"},{"id":3175,"bodySubType":"Double Drop Trailers"},{"id":2674,"bodySubType":"Drop Deck"},{"id":3176,"bodySubType":"Drop Frame Van Trailers (Electronics)"},{"id":3177,"bodySubType":"Drop Frame Van Trailers (Moving)"},{"id":2881,"bodySubType":"Dry Box"},{"id":2882,"bodySubType":"Dry Cargo / Delivery"},{"id":2675,"bodySubType":"Dry Van"},{"id":2540,"bodySubType":"Dump"},{"id":5479,"bodySubType":"Dump Bed"},{"id":5644,"bodySubType":"Dump Trailer"},{"id":3178,"bodySubType":"Dump Trailers (Bottom)"},{"id":3179,"bodySubType":"Dump Trailers (End)"},{"id":3180,"bodySubType":"Dump Trailers (Side)"},{"id":2538,"bodySubType":"Enclosed"},{"id":2926,"bodySubType":"Enclosed Car"},{"id":8881,"bodySubType":"Enclosed Cargo"},{"id":4416,"bodySubType":"End Dump Aluminum"},{"id":4417,"bodySubType":"End Dump Half Round"},{"id":4418,"bodySubType":"End Dump Steel"},{"id":2923,"bodySubType":"Equipment"},{"id":2712,"bodySubType":"Equipment & Dump"},{"id":8192,"bodySubType":"Equipment Trailer"},{"id":13,"bodySubType":"Expandable Trailer"},{"id":2883,"bodySubType":"EZ Pour"},{"id":10,"bodySubType":"Fifth Wheel"},{"id":6099,"bodySubType":"Fifth Wheel - Bunkhouse"},{"id":8810,"bodySubType":"Fifth Wheel - Couples"},{"id":365,"bodySubType":"Fifth Wheel - Lite"},{"id":2527,"bodySubType":"Flatbed"},{"id":8882,"bodySubType":"Flatbed Equipment"},{"id":4421,"bodySubType":"Flip"},{"id":5305,"bodySubType":"Floats"},{"id":4075,"bodySubType":"Fold Down"},{"id":333,"bodySubType":"Fold Down Camper"},{"id":2657,"bodySubType":"Folding Trailer"},{"id":2884,"bodySubType":"Food & Beverage"},{"id":2519,"bodySubType":"General"},{"id":7605,"bodySubType":"General Duty (Utility/Flatbed)"},{"id":4076,"bodySubType":"Generator"},{"id":2532,"bodySubType":"Gooseneck"},{"id":8113,"bodySubType":"Gooseneck Carhaulers"},{"id":8112,"bodySubType":"Gooseneck Dump"},{"id":8114,"bodySubType":"Gooseneck Equipment & Auto"},{"id":8883,"bodySubType":"Gooseneck Flatbed"},{"id":8115,"bodySubType":"Gooseneck Tilt"},{"id":2885,"bodySubType":"Grain / Farm"},{"id":5206,"bodySubType":"Grain Cart"},{"id":5205,"bodySubType":"Gravel Trailer"},{"id":8598,"bodySubType":"Gravity Tilt"},{"id":4116,"bodySubType":"Hauling"},{"id":4804,"bodySubType":"Hay Hauler"},{"id":7344,"bodySubType":"Head Hauler"},{"id":9062,"bodySubType":"Header Carts"},{"id":4513,"bodySubType":"Header Trailer"},{"id":2533,"bodySubType":"Heavy Duty"},{"id":7608,"bodySubType":"Heavy Duty (Utility/Flatbed)"},{"id":3181,"bodySubType":"Hopper / Grain Trailers"},{"id":2521,"bodySubType":"Horse Trailer"},{"id":2535,"bodySubType":"Horse Trailer with Living Quarter"},{"id":4121,"bodySubType":"Horse Trailer with Living Quarters"},{"id":8597,"bodySubType":"House Trailer"},{"id":4077,"bodySubType":"Hybrid Trailer"},{"id":8599,"bodySubType":"Hydraulic Tilt"},{"id":354,"bodySubType":"Ice House"},{"id":3182,"bodySubType":"Intermodal / Container (Chassis Only)"},{"id":3183,"bodySubType":"Intermodal / Container Trailers"},{"id":5635,"bodySubType":"Jeep"},{"id":2886,"bodySubType":"Jet Ski"},{"id":407,"bodySubType":"Kayak Trailer"},{"id":5169,"bodySubType":"Landscape"},{"id":7606,"bodySubType":"Light Duty (Utility/Flatbed)"},{"id":4436,"bodySubType":"Light Duty Trailers"},{"id":5138,"bodySubType":"Live Bottom"},{"id":3184,"bodySubType":"Live Floor Trailers"},{"id":5131,"bodySubType":"LIVEBOTTOM"},{"id":2928,"bodySubType":"Livestock"},{"id":3052,"bodySubType":"Living Quarters"},{"id":2676,"bodySubType":"Log Trailer"},{"id":5140,"bodySubType":"Low Bed"},{"id":2528,"bodySubType":"Low Boy"},{"id":5133,"bodySubType":"LOWBED"},{"id":3185,"bodySubType":"Lowboy Trailers"},{"id":6444,"bodySubType":"Marine"},{"id":7607,"bodySubType":"Medium Duty (Utility/Flatbed)"},{"id":5340,"bodySubType":"Misc"},{"id":2887,"bodySubType":"Misc. Specialty"},{"id":2888,"bodySubType":"Miscellaneous Construction"},{"id":2889,"bodySubType":"Miscellaneous Forestry"},{"id":2890,"bodySubType":"Mixer"},{"id":8991,"bodySubType":"Mobile Trailer"},{"id":2924,"bodySubType":"Motorcycle"},{"id":7194,"bodySubType":"Motorcycle/ATV"},{"id":2891,"bodySubType":"Moving / Storage"},{"id":2677,"bodySubType":"Moving Trailer"},{"id":2892,"bodySubType":"Narrow Neck"},{"id":797,"bodySubType":"Office Trailer"},{"id":2678,"bodySubType":"Oil Field"},{"id":2925,"bodySubType":"Open Car"},{"id":5431,"bodySubType":"Open Car Haulers"},{"id":3186,"bodySubType":"Open Top Trailers"},{"id":8195,"bodySubType":"Open Trailer"},{"id":51,"bodySubType":"Other"},{"id":14,"bodySubType":"Park Trailer"},{"id":5636,"bodySubType":"Paving & Recovery"},{"id":8429,"bodySubType":"Pen Trailer"},{"id":8523,"bodySubType":"Personal Watercraft"},{"id":8432,"bodySubType":"Pig Trailer"},{"id":8111,"bodySubType":"Pintle Deckover"},{"id":8853,"bodySubType":"Pintle Hitch"},{"id":4422,"bodySubType":"Platform Aluminum"},{"id":4423,"bodySubType":"Platform Combo"},{"id":4424,"bodySubType":"Platform Extendable"},{"id":4425,"bodySubType":"Platform Steel"},{"id":3187,"bodySubType":"Pole Trailers"},{"id":339,"bodySubType":"Pontoon"},{"id":404,"bodySubType":"Pontoon Trailer"},{"id":4312,"bodySubType":"Pop Up"},{"id":12,"bodySubType":"Pop Up Camper"},{"id":2893,"bodySubType":"Portable Restroom"},{"id":5542,"bodySubType":"PRT"},{"id":3188,"bodySubType":"Pup Trailers"},{"id":4824,"bodySubType":"Race Trailer"},{"id":2711,"bodySubType":"Raft"},{"id":2894,"bodySubType":"Reefer"},{"id":3189,"bodySubType":"Reefer (Unit Only)"},{"id":3190,"bodySubType":"Reel / Cable Trailers"},{"id":4242,"bodySubType":"Refrigerated"},{"id":3191,"bodySubType":"Refuse Trailers"},{"id":3192,"bodySubType":"Roll Off Trailers"},{"id":2895,"bodySubType":"Rolloff"},{"id":7945,"bodySubType":"Roof Top Tent"},{"id":5013,"bodySubType":"RV-5th Wheel"},{"id":5014,"bodySubType":"RV-Toy hauler"},{"id":5012,"bodySubType":"RV-Travel Trailer"},{"id":406,"bodySubType":"Sailboat Trailer"},{"id":5634,"bodySubType":"Scissorneck"},{"id":3056,"bodySubType":"Semi Trailer"},{"id":7203,"bodySubType":"Semi-Trailers - Drop Deck Trailers"},{"id":7200,"bodySubType":"Semi-Trailers - Dry Van Trailers"},{"id":7199,"bodySubType":"Semi-Trailers - Dump Trailers - Bottom"},{"id":7198,"bodySubType":"Semi-Trailers - Dump Trailers - End"},{"id":7202,"bodySubType":"Semi-Trailers - Flatbed Trailers"},{"id":7206,"bodySubType":"Semi-Trailers - Lowboy Trailers"},{"id":7201,"bodySubType":"Semi-Trailers - Reefer Trailers"},{"id":7205,"bodySubType":"Semi-Trailers - Tank Trailers - Crude Oil"},{"id":7204,"bodySubType":"Semi-Trailers - Tank Trailers - Vacuum"},{"id":5543,"bodySubType":"Septic-Grease"},{"id":2896,"bodySubType":"Service / Utility"},{"id":2897,"bodySubType":"Sewer Cleaner"},{"id":5137,"bodySubType":"Shuttle Floor"},{"id":5130,"bodySubType":"SHUTTLEFLOOR"},{"id":6446,"bodySubType":"Single Axle"},{"id":8109,"bodySubType":"Single Axle Landscape"},{"id":5544,"bodySubType":"Slide-ins"},{"id":340,"bodySubType":"Snowmobile"},{"id":2930,"bodySubType":"Specialty"},{"id":4802,"bodySubType":"Sport Trailer"},{"id":7362,"bodySubType":"Sport Utility Trailers"},{"id":2927,"bodySubType":"Stacker"},{"id":2898,"bodySubType":"Steam Cleaner"},{"id":8879,"bodySubType":"Steel Frame Utility"},{"id":5486,"bodySubType":"Step Deck"},{"id":8431,"bodySubType":"Stock Box"},{"id":2522,"bodySubType":"Stock Trailer"},{"id":2529,"bodySubType":"Stock trailer - with living quarter"},{"id":3193,"bodySubType":"Storage Trailers"},{"id":2679,"bodySubType":"Tag Trailer"},{"id":3194,"bodySubType":"Tag Trailers"},{"id":8110,"bodySubType":"Tandem Axle Landscape"},{"id":3195,"bodySubType":"Tank Trailers (Asphalt / Hot Oil)"},{"id":3196,"bodySubType":"Tank Trailers (Chemical / Acid)"},{"id":3197,"bodySubType":"Tank Trailers (Crude Oil)"},{"id":3203,"bodySubType":"Tank Trailers (Frac)"},{"id":3198,"bodySubType":"Tank Trailers (Gasoline / Fuel)"},{"id":3199,"bodySubType":"Tank Trailers (Industrial Gas)"},{"id":3200,"bodySubType":"Tank Trailers (Non Code)"},{"id":3204,"bodySubType":"Tank Trailers (Other)"},{"id":3201,"bodySubType":"Tank Trailers (Pneumatic / Dry Bulk)"},{"id":3205,"bodySubType":"Tank Trailers (Sanitary)"},{"id":3206,"bodySubType":"Tank Trailers (Vacuum)"},{"id":3202,"bodySubType":"Tank Trailers (Waste / Sludge)"},{"id":3207,"bodySubType":"Tank Trailers (Water)"},{"id":2899,"bodySubType":"Tanker"},{"id":5545,"bodySubType":"Tanks"},{"id":2029,"bodySubType":"Teardrop"},{"id":4349,"bodySubType":"Tent Camper"},{"id":932,"bodySubType":"Tent Trailer"},{"id":6577,"bodySubType":"Tilt"},{"id":4348,"bodySubType":"Tiny Home"},{"id":7105,"bodySubType":"Tow Dolly"},{"id":2531,"bodySubType":"Towable RV"},{"id":2555,"bodySubType":"Toy Hauler"},{"id":4237,"bodySubType":"Toy Hauler - Crossover"},{"id":43,"bodySubType":"Toy Hauler - Fifth Wheel"},{"id":44,"bodySubType":"Toy Hauler - Travel Trailer"},{"id":4759,"bodySubType":"Trailer"},{"id":7593,"bodySubType":"Trailers - Drop Deck"},{"id":7594,"bodySubType":"Trailers - Dry Van"},{"id":7595,"bodySubType":"Trailers - Dump"},{"id":7596,"bodySubType":"Trailers - Flat Bed"},{"id":7597,"bodySubType":"Trailers - Fuel Tanker"},{"id":7598,"bodySubType":"Trailers - Other"},{"id":7599,"bodySubType":"Trailers - Trailers - Pneumatic"},{"id":9,"bodySubType":"Travel Trailer"},{"id":6098,"bodySubType":"Travel Trailer - Bunkhouse"},{"id":8811,"bodySubType":"Travel Trailer - Couples"},{"id":5202,"bodySubType":"Travel Trailer - Hybrid"},{"id":364,"bodySubType":"Travel Trailer - Lite"},{"id":6923,"bodySubType":"Travel Trailer - Teardrop"},{"id":3208,"bodySubType":"Traveling Axle Trailers"},{"id":2900,"bodySubType":"Trenchers and Boring"},{"id":405,"bodySubType":"Tritoon Trailer"},{"id":8884,"bodySubType":"Truck Bed"},{"id":11,"bodySubType":"Truck Camper"},{"id":4232,"bodySubType":"Truck Conversion"},{"id":8682,"bodySubType":"Truck Mount"},{"id":4307,"bodySubType":"Tube Top - ATV"},{"id":65,"bodySubType":"Ultralite"},{"id":2525,"bodySubType":"Utility"},{"id":2713,"bodySubType":"Utility & ATV"},{"id":3209,"bodySubType":"Utility / Light Duty Trailers (Cargo)"},{"id":3210,"bodySubType":"Utility / Light Duty Trailers (Dump)"},{"id":3211,"bodySubType":"Utility / Light Duty Trailers (Flat)"},{"id":3212,"bodySubType":"Utility / Light Duty Trailers (Landscape)"},{"id":3213,"bodySubType":"Utility / Light Duty Trailers (Other)"},{"id":2536,"bodySubType":"Utility Flatbed"},{"id":7327,"bodySubType":"Utility Trailer"},{"id":7195,"bodySubType":"Utility/Landscape"},{"id":5432,"bodySubType":"UTV/ATV Trailers Open"},{"id":2680,"bodySubType":"Vacuum Trailer"},{"id":2901,"bodySubType":"Van"},{"id":4426,"bodySubType":"Van Plate"},{"id":2922,"bodySubType":"Vending"},{"id":5487,"bodySubType":"Walking Floor"},{"id":2902,"bodySubType":"Water Tank"},{"id":7115,"bodySubType":"Watercraft"}]} }; $.oSettings.dealershipurl = "http://www.workandplay.ca/"; $("#previous_employer_information, #joint_previous_employer_information").prop("disabled", true).hide(); $.oSettings.SelectVehTypeOpt = $('#category').not('.customoptions').html(); $.oSettings.SelectMakeOpt = $('#make').not('.customoptions').html(); $.oSettings.SelectModelOpt = $('#model').not('.customoptions').html(); // Populate Vehicle Types $.oSettings.vehtypeOptions = ""; var vTypesArray = new Array(); $.oSettings.Category.vehTypes.sort(); $.each($.oSettings.Category.vehTypes, function(key, vehtype){ if(vehtype != '' && $.inArray(vehtype, vTypesArray) == -1){ $.oSettings.vehtypeOptions += ''; vTypesArray.push(vehtype); } }); $.each($.oSettings.Category.categoryData, function(vehtype,value){ $.oSettings.Category.categoryData[vehtype] = null; $.oSettings.Category.categoryData[vehtype.toLowerCase()] = value; }); if($.oSettings.vehtypeOptions) $('#category').not('.customoptions').html($.oSettings.SelectVehTypeOpt+$.oSettings.vehtypeOptions); switchIndividualJoint($('#applicationtype').val()); $('select.select-applicationtype').change(function(){ switchIndividualJoint($(this).val()); }); function switchIndividualJoint(this_val){ if(this_val != 'Joint'){ this_val = 'Individual'; } $('select.select-applicationtype').val(this_val); if($('#applicationtype').val() == 'Joint'){ $('.joint-app-element').not('#joint_previous_employer_information').show(); $('.joint-app-element input, .joint-app-element select, .joint-app-element textarea').prop('disabled', false); }else{ $('.joint-app-element').hide(); $('.joint-app-element input, .joint-app-element select, .joint-app-element textarea').prop('disabled', true); } } $('#switch-make-field').click(function(){ switchSelectText('make'); }); $('#switch-model-field').click(function(){ switchSelectText('model'); }); $('#category,#makeyear,#make').change(function(){ loadMakesModels(); }); function switchSelectText(fieldname){ $('#model,#modeltxt').val(''); if(fieldname == 'make') $('#make,#maketxt').val(''); var field = $('#field-' + fieldname); if(field.hasClass('display-select')){ field.removeClass('display-select'); if(fieldname == 'make') $('#field-model').removeClass('display-select'); }else if($('#' + fieldname).find('option').length > 1){ field.addClass('display-select'); } switchSelectTextDisable(); } function switchSelectTextDisable(){ $('#make:not([readonly]),#maketxt:not([readonly]),#model:not([readonly]),#modeltxt:not([readonly])').prop('disabled', false); if($('#field-make').hasClass('display-select')){ $('#maketxt:not([readonly])').prop('disabled', true); $('label#makelabel').attr('for','make'); }else{ $('#make:not([readonly])').prop('disabled', true); $('label#makelabel').attr('for','maketxt'); } if($('#field-model').hasClass('display-select')){ $('#modeltxt:not([readonly])').prop('disabled', true); $('label#modellabel').attr('for','model'); }else{ $('#model:not([readonly])').prop('disabled', true); $('label#modellabel').attr('for','modeltxt'); } } function cleankey(str){ var output = ((str === undefined || str === null || str == '') ? '' : str) + ""; output = output.toLowerCase(); output = $("
").html(output).text(); output = output.replace(/\W+/g,""); return output; } function loadMakesModels(){ $.oSettings.selectedYear = $('#makeyear').val(); $.oSettings.selectedMake = $('#make:visible').val() || ''; $.oSettings.selectedModel = $('#model:visible').val() || ''; $("#make").not('.customoptions').html($.oSettings.SelectMakeOpt); $("#model").not('.customoptions').html($.oSettings.SelectModelOpt); $.oSettings.selectedVehType = ($('#category').val() + '').toLowerCase(); // Populate Makes if($("select#make.customoptions").length <= 0){ $.oSettings.makeOptions = ''; $('#field-make').removeClass('display-select'); if($.oSettings.Category.categoryData[$.oSettings.selectedVehType] && $.oSettings.Category.categoryData[$.oSettings.selectedVehType][$.oSettings.selectedYear]){ if(($.oSettings.selectedVehType.length > 0) && ($.oSettings.selectedYear.length > 0)){ $.each($.oSettings.Category.categoryData[$.oSettings.selectedVehType][$.oSettings.selectedYear],function(key,make){ if(make) $.oSettings.makeOptions += ''; }); } }else{ $('#field-make, #field-model').removeClass('display-select'); } if($.oSettings.makeOptions){ $("#make").not('.customoptions').html($.oSettings.SelectMakeOpt + $.oSettings.makeOptions); $('#field-make').addClass('display-select'); }else{ $('#field-make').removeClass('display-select'); } } // Populate Models if($("select#model.customoptions").length <= 0){ $('#field-model').removeClass('display-select'); $.getJSON("incfiles/GetMakesModels.php",{ "dealershipurl":$.oSettings.dealershipurl ,"type":($('#category').val() ? encodeURIComponent($('#category').val()) : "") ,"year":($('#makeyear').val() ? encodeURIComponent($('#makeyear').val()) : "") ,"make":($('#make').val() ? encodeURIComponent($('#make').val()) : "") },function(j){ $.oSettings.modelOptions = ''; if (j && j.length > 0){ for (var i = 0; i < j.length; i++) { var model = j[i].modeltrim.replace(/ Base$/,""); $.oSettings.modelOptions += ''; } } if($.oSettings.modelOptions){ $('#model').not('.customoptions').html($.oSettings.SelectModelOpt + $.oSettings.modelOptions); $('#field-model').addClass('display-select'); }else{ $('#field-model').removeClass('display-select'); } switchSelectTextDisable(); }); } switchSelectTextDisable(); } loadMakesModels(); });