X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=jquery.openx.js;fp=jquery.openx.js;h=a9827af68845a1f94f5218512671b27dc7d4c047;hb=8a2862a2007c8b9abe63007ddd5611e5ebd20bea;hp=a2343bb139ec9f6467ef4696f32a3b5318fb80ea;hpb=b6ffa68d8d04fa594ea7b11f5e38fea2e89cb991;p=openx diff --git a/jquery.openx.js b/jquery.openx.js index a2343bb..a9827af 100644 --- a/jquery.openx.js +++ b/jquery.openx.js @@ -31,6 +31,7 @@ slots = {}, min_width = {}, max_width = {}, + width, queue = [], output = []; @@ -190,6 +191,9 @@ }); } + /** 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); @@ -202,8 +206,10 @@ /** 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] + "|"); + } } src += '&nz=1'; // << We want to fetch named zones!