			function addPlayer(VidNum,start){
				var so = new SWFObject("/libc/player/liquid3.swf","mediaplayer","294","165","9");
				so.addVariable("allowscriptaccess","true");
				so.addParam("allowfullscreen","true");
				so.addVariable("autostart",start);
				so.addVariable("autoLoad","false");  
				so.addParam("wmode", "transparent");
				//so.addVariable("startButton","/tv-boa-forma/skin/video-play.png");
				so.addParam("base",".");
				so.addVariable("thumbnailPreview","true");
				so.addVariable("scaleMode","fit");
				so.addVariable("customizationFileURL","/tv-boa-forma/skin/tema-home.xml");
				so.addVariable("playerHash","ed0a5b84736c81424c0fd80f8373ca46");
				so.addVariable("idmedia",VidNum);
				so.write("quadrotv-exibicao");
				}

		$(function() {
			// run the code in the markup!

			$('#principal2').cycle({ 
				timeout: 10000, 
				speed:   500,
				before:  Light,
				fx:     'scrollLeft'
			});

			$('#goto1').click(function() { 
				$('#principal2').cycle(0); 
				before:  onBefore(1)
				return false; 
			}); 
 
			$('#goto2').click(function() {  
				$('#principal2').cycle(1); 
				before:  onBefore(2)
				return false;  
			}); 

			$('#goto3').click(function() {  
				$('#principal2').cycle(2); 
				before:  onBefore(3)
				return false;  
			});

			$('#goto4').click(function() {  
				$('#principal2').cycle(3);  
				before:  onBefore(4)
				return false;  
			});

	});

	function Light(){
	indice = this.id;

		for(x=1; x<=4 ; x++){
				controle = 'a'+x;
				if(controle == indice){
					document.getElementById('goto'+x).style.background ='#eed5ff';
				}
				else{
					document.getElementById('goto'+x).style.background ='#fff';
				}
			}
	}

	function onBefore(value) { 
			for(x=1; x<=4 ; x++){
				if(x == value){
					document.getElementById('goto'+x).style.background ='#eed5ff';
				}
				else{
					document.getElementById('goto'+x).style.background ='#fff';
				}
			}
	} 

