// JavaScript Document
//<![CDATA[

		
	window.addEvent('domready',function(){


		//SAMPLE 5 (mode: vertical, using "onWalk" )
		
		var sampleObjectItems =[
			{title:'Marcio Local', autor:'Lorem', date:'5 Jun 2007', link:'entrevistas.php'},
			{title:'O insepar&aacute;vel', autor:'Ipsum', date:'6 Dic 2007', link:'entrevistas.php'},
			{title:'Nas ladeiras da lapa', autor:'Dolor', date:'9 Feb 2007', link:'entrevistas.php'},
			{title:'Don Day Don Dree Don Don', autor:'Sit', date:'22 Jul 2007', link:'entrevistas.php'},
			{title:'Mixes', autor:'Amet', date:'30 Set 2007', link:'entrevistas.php'},
			{title:'Arte Local', autor:'Consecteur', date:'5 Nov 2007', link:'entrevistas.php'},
			{title:'Rei &eacute; o que existe em voc&ecirc;', autor:'Adipsim', date:'12 Mar 2007', link:'entrevistas.php'},
			{title:'Confira a entrevista', autor:'Colom', date:'10 Abr 2007', link:'entrevistas.php'}
		];


		//SAMPLE 6 (on "mouseenter" walk)
		var info6 = $('box6').getNext().set('opacity',0.5);
		var nS6 = new noobSlide({
			mode: 'vertical',
			box: $('box6'),
			items: sampleObjectItems,
			size: 260,
			handles: $$('#handles6_1 div').extend($$('#handles6_2 div')),
			handle_event: 'mouseenter',
			addButtons: {
				previous: $('prev6'),
				play: $('play6'),
				stop: $('stop6'),
				playback: $('playback6'),
				next: $('next6')
			},
			button_event: 'click',
			fxOptions: {
				duration: 1000,
				transition: Fx.Transitions.Back.easeOut,
				wait: false
			},
			onWalk: function(currentItem,currentHandle){
				info6.empty();
				new Element('h4').set('html','<a href='+currentItem.link+'>acessar</a>'+currentItem.title).inject(info6);
				//new Element('p').set('html','Autor: '+currentItem.autor+' &nbsp; &nbsp; Data: '+currentItem.date).inject(info6);
				this.handles.set('opacity',0.3);
				currentHandle.set('opacity',1);
			}
		});
		
		
		


		//more "previous" and "next" buttons
		nS8.addActionButtons('previous',$$('#box8 .prev'));
		nS8.addActionButtons('next',$$('#box8 .next'));
		//more handle buttons
		nS8.addHandleButtons(handles8_more);
		//walk to item 3 witouth fx
		nS8.walk(3,false,true);

	});
	//]]>


function setaDj(id){
		document.getElementById('mostraDj').innerHTML = '<img src="layout/ajaxLoader.gif" height="23" /> Carregando...';
		x = carregaAjax();
		
		if(x==null){
			alert("Não foi possivel completar sua requisição");
			return;
		}
		url = "action.php?dj_id="+id;
		x.onreadystatechange = stateChanged;
		x.open("GET",url,true);
		x.send(null);
		
		function stateChanged(){
			if(x.readyState == 4){
				document.getElementById('mostraDj').innerHTML = x.responseText;	
			}	
		}
		
		function carregaAjax(){
			if(window.XMLHttpRequest){
				return new XMLHttpRequest();	
			}
			if(window.ActiveXObject){
				return new ActiveXObject('Microsoft.XMLHTTP');	
			}
			return null;
		}
	}
function abrirPlayer(){
	window.open('player/radio.php','','width=345,height=170');	
}
