//<![CDATA[





	window.addEvent('domready',function(){

//OUTDOOR

		var V9 = new viewer($$('#pubsmeio img)'),{
			mode: 'alpha',
			interval: 4000
		});
		
		V9.play(true);
	
//NOVIDADES

		var V5 = new viewer($('box5').getChildren(),{
		
		mode: 'alpha',
		interval: 2000,


			onWalk: function(current_index){
				handles5.removeClass('active');
				handles5[current_index].addClass('active');
			}
		});

	   	V5.play(true);
		var handles5 = $$('#handles5 span');
		handles5.each(function(el,i){el.addEvent(V5.walk.bind(V5,[i,true]));});
		handles5.each(function(el,i){el.addEvent('click',V5.walk.bind(V5,[i,true]));});





//VIDEOS

		var V6 = new viewer($('box6').getChildren(),{

		mode: 'alpha',
		interval: 2000,

			onWalk: function(current_index){
				handles6.removeClass('active');
				handles6[current_index].addClass('active');
			}
		});
	 
		var handles6 = $$('#handles6 span');
		handles6.each(function(el,i){el.addEvent(V6.walk.bind(V6,[i,true]));});
		handles6.each(function(el,i){el.addEvent('click',V6.walk.bind(V6,[i,true]));});
		$('prev6').addEvent('click',V6.previous.bind(V6));
		$('next6').addEvent('click',V6.next.bind(V6));




//COMÉRCIO

		var V7 = new viewer($('box7').getChildren(),{

		mode: 'alpha',
		interval: 2000,

			onWalk: function(current_index){
				handles7.removeClass('active');
				//handles7[current_index].addClass('active');
			}
		});
	 

 		V7.play(true);
		var handles7 = $$('#handles7 span');
		handles7.each(function(el,i){el.addEvent(V7.walk.bind(V7,[i,true]));});
		handles7.each(function(el,i){el.addEvent('click',V7.walk.bind(V7,[i,true]));});
		$('prev7').addEvent('click',V7.previous.bind(V7));
		$('next7').addEvent('click',V7.next.bind(V7));


	});
	//]]>
	
	
	
// NEWSLETTER
	
	
	window.addEvent('domready', function(){
	var box = $('box');
	var fx = new Fx.Morph(box, {duration:400}).start({'opacity':1});
	$('save_button').addEvent('click', function() {
		box.style.display="block";
		var request = new Request({url:'paginas/cad_novidades.php',method: 'post',
		onRequest: function() {	},onComplete: function(response) {},onSuccess: function() {},onFailure: function() {}}
		).send('nome='+document.novidades.nome.value+'&email='+document.novidades.email.value);


		fx.start({	
			}).chain(function() {
				
				this.start.delay(1, this, {'opacity': 0});
			}).chain(function() {
				box.set('html','&nbsp;&nbsp;&nbsp;&nbsp;<img src=images/sucesso.gif><b>&nbsp;<span style="color:#555555; font-family:tahoma;"> Cadastrado Efetuado com Sucesso!</b><br></span>');
				this.start.delay(100, this, {'opacity': 1});
			});
				
		
		});
	}); 

    
