slots = {},
min_width = {},
max_width = {},
+ width,
+ rendered = {},
queue = [],
output = [];
'selector': '.oa',
'min_prefix': 'min_',
'max_prefix': 'max_',
- 'cache': true
},
options
);
if (match)
max_width[id] = match[1];
}
+ rendered[id] = false;
}
});
}
+ /** Set initial window-width */
+ width = $(document).width();
+
/** Fetch the JavaScript for Flash and schedule the initial fetch */
$.getScript(domain + settings.delivery + '/' + settings.fl, fetch_ads);
/** Order banners for all zones that were found on the page */
src += '?zones=';
for(id in slots) {
- queue.push(id);
- src += escape(id + '=' + OA_zones[slots[id].id] + "|");
+ if (width >= min_width[id] && width <= max_width[id]) {
+ queue.push(id);
+ src += escape(id + '=' + OA_zones[slots[id].id] + "|");
+ rendered[id] = true;
+ }
}
src += '&nz=1'; // << We want to fetch named zones!