// Anchor Fix var AnchorFix = Class.create(); AnchorFix.prototype = { AnchorLinks: [], initialize: function(triggers, items, swapper) { this.parent = triggers[0].up(); this.items = items; this.swapper = swapper; this.getAnchorLinks(); this.fixItemIds(); }, getAnchorLinks: function() { // get every link on the page and see if it's an anchor link var allLinks = $$('#main a'); for (var i=0; i