- if (link.hasClassName("minzoom[0-9]+")) {
- $w(link.className).each(function (classname) {
- if (match = classname.match(/^minzoom([0-9]+)$/)) {
- var minzoom = match[1];
- var name = link.id.replace(/anchor$/, "");
-
- if (zoom >= minzoom) {
- link.onclick = null;
- link.title = i18n("javascripts.site." + name + "_tooltip");
- link.removeClassName("disabled");
- } else {
- link.onclick = function () { alert(i18n("javascripts.site." + name + "_zoom_alert")); return false; };
- link.title = i18n("javascripts.site." + name + "_disabled_tooltip");
- link.addClassName("disabled");
- }
+ var classes = $(link).attr("class").split(" ");
+
+ $(classes).each(function (index, classname) {
+ if (match = classname.match(/^minzoom([0-9]+)$/)) {
+ var minzoom = match[1];
+ var name = link.id.replace(/anchor$/, "");
+
+ if (zoom >= minzoom) {
+ $(link).off("click");
+ $(link).attr("title", i18n("javascripts.site." + name + "_tooltip"));
+ $(link).removeClass("disabled");
+ } else {
+ $(link).click(function () { alert(i18n("javascripts.site." + name + "_zoom_alert")); return false; });
+ $(link).attr("title", i18n("javascripts.site." + name + "_disabled_tooltip"));
+ $(link).addClass("disabled");