if(typeof console=="undefined"){var console={};console.log=alert;}(function(f){var e=["210","435","500x","600","DST4","DST6","HSP"],b=["180","210 Dustless","300","350","FHD","600 Dustless"],g=f("#dates option").clone();function h(m,k){var l=f("option",this).get(this.selectedIndex).value;if(f.inArray(l,e)!=-1){f("#oldModels").hide();f("#schoolInfo").show(1,function(){i(l);if(k==null){location.href="#schoolInfo";}});}else{if(f.inArray(l,b)!=-1){if(k==null){location.href="register-old-models.htm?model="+l;}}}}function i(k){var l=[];f("#dates").empty().append(g);g=g.clone();f("#dates option").each(function(p){if(this.value.indexOf(k)<8){l.push(p);return;}var o=this.value.split(" ")[0].split("/"),n=new Date(),m=new Date();m.setDate(o[1]);m.setMonth(o[0]-1);m.setFullYear(o[2]);if(n>m){l.push(p);return;}});while(l.length>0){f("#dates option:eq("+l.pop()+")").remove();}f("#datesChooser").hide().fadeIn("slow");}f("#schoolButton").click(function(k){f("#contactInfo").show(1,function(){location.href="#contactInfo";});f(this).hide();});f("#contactButton").click(function(k){f("#registerAttendees").show(1,function(){location.href="#registerAttendees";});f(this).hide();});f("#registerButton").click(function(k){f("#commentSection").show(1,function(){location.href="#commentSection";});f(this).hide();});function c(){if(this.checked==true){f("#modelChooser").hide();f("#newSweeper").slideDown();}}function j(){if(this.checked==true){f("#newSweeper").hide();f("#modelChooser").slideDown();}}function d(){if(this.checked){f("#otherAttendees").slideDown();}}function a(){if(this.checked){f("#otherAttendees").slideUp();}}f(window).load(function(q){var l=f("#checkAvailability"),n=f("#school"),o=f("#new_sweeper_yes"),m=f("#new_sweeper_no"),p=f("#register_yes"),k=f("#register_no");f("#newSweeper, #modelChooser, #otherAttendees").hide();f(".continue").show();h.apply(n.get(0),[null,true]);c.apply(o.get(0));j.apply(m.get(0));d.apply(p.get(0));a.apply(k.get(0));switch(window.location.hash){case"#schoolInfo":f("#contactInfo").hide();case"#contactInfo":f("#registerAttendees").hide();case"#registerAttendees":f("#commentSection").hide();break;case"#commentSection":f(".continue").hide();break;default:f("#schoolInfo").hide();f("#contactInfo").hide();f("#registerAttendees").hide();f("#commentSection").hide();}l.click(function(){h.apply(n.get(0));});o.click(c);m.click(j);p.click(d);k.click(a);});})(jQuery);