$(document).ready(function() {
if (document.f1.videos){

	if (document.f1.videos.length){
  		for (i=0; i<document.f1.videos.length; i++){
		$("div.videos_"+document.f1.videos[i].value).playlist("#player_"+document.f1.videos[i].value,$("#path_site").val()+"libs/flowplayer/flash/FlowPlayerDark.swf", {initialScale:'scale'}, {loop:false});
	}
}
else{
	$("div.videos_"+document.f1.videos.value).playlist("#player_"+document.f1.videos.value,$("#path_site").val()+"libs/flowplayer/flash/FlowPlayerDark.swf", {initialScale:'scale'}, {loop:false});

}
}
});
if (document.f1.news_fotos){
if (document.f1.news_fotos.length){
for (ii=0; ii<document.f1.news_fotos.length; ii++){
NoticiaId=document.f1.news_fotos[ii].value;
news_fotos =$("#news_rotator_count_"+NoticiaId).val();
var jaNewsHL = new JA_NewsHeadline({
autoroll: 0,
total: news_fotos,
delaytime: 5		});
eval("var jaNewsHL"+NoticiaId+"=jaNewsHL;");
}
window.addEvent('domready', function() {
for (ii=0; ii<document.f1.news_fotos.length; ii++){
NoticiaId=document.f1.news_fotos[ii].value;
news_fotos =$("#news_rotator_count_"+NoticiaId).val();
if (news_fotos>1){
eval("jaNewsHL"+NoticiaId+".start(NoticiaId)");
}
}
});
}
else{
	NoticiaId=document.f1.news_fotos.value;
	var jaNewsHL = new JA_NewsHeadline({
	autoroll: 0,
	total: $("#news_rotator_count_"+NoticiaId).val(),
	delaytime: 5		});
	window.addEvent('domready', function() {
	if ($("#news_rotator_count_"+NoticiaId).val()>1){
		jaNewsHL.start(NoticiaId);
	}
});
eval("var jaNewsHL"+NoticiaId+"=jaNewsHL;");
}
}
