- $(popup).each(function (i) {
- var width = parseInt(this.attr("popup_width") || "800");
- var height = parseInt(this.attr("popup_height") || "600");
- var autoOpen = parseInt(this.attr("popup_autoOpen") || "0");
+ // more than one widget on a page are possible
+ popup_window.each(function(i) {
+ var that = $(this);
+
+ // all atributes are strings, convert them to integers here
+ var width = parseInt(that.attr("popup_width") || "800");
+ var height = parseInt(that.attr("popup_height") || "600");
+ var autoOpen = parseInt(that.attr("popup_autoOpen") || "0");
+ var modal = parseInt(that.attr("popup_modal") || "0");