/* initialize banners */
function initBanners(feedUrl) {
	
	/* NOTE TO SELF: !!!!!NEVER EVER RE-USE AN ATTRIBUTES OBJECT FOR EMBEDDING AN SWF OBJECT!!!!!!!
	   swfobject somehow contains code which checks wether the attributes object is new or reused
	   if it is reused the last embedded flash file with the given attributes object
	   will overwrite all previous embeddde flash files, even if the flash files or other parameters
	   differ!
	*/
	
	var banners = new Array();
	banners.push({location: 0, id: 'bannerAFlash'});
	banners.push({location: 1, id: 'bannerBFlash'});
	banners.push({location: 2, id: 'bannerCFlash'});
	banners.push({location: 3, id: 'bannerDFlash'});
	
	banners.each(function (banner) {
		//skip if element id does not exists
		if ($(banner.id) != null) {
			var flashvars = {feedUrl: feedUrl +"%26location="+banner.location, duration: 30};
			var params = {wmode: "transparent", allowScriptAccess: "sameDomain", align: "t", salign: "tl"};
			var attributes = false; 
			swfobject.embedSWF("/site_assets/swf/banner.swf", banner.id, "85", "85", "9.0.0", false, flashvars, params, attributes);
		}
	});	

}
