$(document).ready(function() {
	$('.addsText').each(function(){
		var urls = Array();
		urls[0] = 'http://www.lapeliculadeldia.com/sistemas-de-television-por-cable';
		urls[1] = 'http://www.elautodelpueblo.com.ar/anuncios-de-autos';
		urls[2] = 'http://www.floresyhojas.com.ar/video-juegos-descarga-gratuita';
		var i = Math.floor ( Math.random() * urls.length )
		$(this).html('<iframe scrolling="no" height="15" frameborder="0" align="top" width="230" src="'+urls[i]+'"></iframe>');

	});
	if($('#FlabellComponent').length > 0){
		// JAVASCRIPT VARS
		// cache buster
		var cacheBuster = "?t=" + Date.parse(new Date());		
		// stage dimensions
		var stageW = 300;//"100%";
		var stageH = 250;//"100%";        
	    
		// ATTRIBUTES
	  var attributes = {};
	  attributes.id = 'FlabellComponent';
	  attributes.name = attributes.id;        
		// PARAMS
		var params = {};
	  params.bgcolor = "#CCCCCC";
	  params.menu = "false";
	  params.scale = 'noScale';
	  params.wmode = "opaque";
	  params.allowfullscreen = "true";
	  params.allowScriptAccess = "always";
	  /* FLASH VARS */
	  var flashvars = {};
	  
		/// if commented / delete these lines, the component will take the stage dimensions defined 
		/// above in "JAVASCRIPT SECTIONS" section or those defined in the settings xml	
	  flashvars.componentWidth = stageW;
		flashvars.componentHeight = stageH;
		
		/// path to the content folder(where the xml files, images or video are nested)
		/// if you want to use absolute paths(like "http://domain.com/images/....") then leave it empty("")
		flashvars.pathToFiles = template_url;
		
		// path to content XML
		flashvars.xmlPath = template_url+"xml/featuresPics.xml.php"
		/** EMBED THE SWF**/
		swfobject.embedSWF(template_url+"js/preview.swf"+cacheBuster, attributes.id, stageW, stageH, "9.0.124", template_url+"js/expressInstall.swf", flashvars, params);
	}
});
