var PaidFreeSwap=Class.create();Object.extend(PaidFreeSwap.prototype,{initialize:function(a){this.setValueForKey(a,"appsToggles");
this.setEvents(a)},setValueForKey:function(b,a){this[a]=b},setEvents:function(a){a.each(function(b,c){Event.observe(b,"click",this.swapSections.bindAsEventListener(this))
}.bind(this))},setSections:function(a){this.setValueForKey(a,"appsSections")},swapSections:function(a){var b;
if(a){Event.stop(a);b=Event.element(a)}this.selectToggle(b);this.selectSection(b)
},selectToggle:function(a){this.appsToggles.each(function(b){if(a===b){b.addClassName("active")
}else{b.removeClassName("active")}})},selectSection:function(b){var a=b.href.split("#")[1];
this.appsSections.each(function(c){if(c.id==a){c.addClassName("active")}else{c.removeClassName("active")
}}.bind(this))}});Event.onDOMReady(function(){var b=$$(".apps-section"),a=new PaidFreeSwap($$(".apps-toggle"));
a.setSections($$(".apps-section"))});
