$(document).ready(function(){
	// Start the tooltip
	$('.tTip').betterTooltip({speed: 150, delay: 300});
	
	$(function() {
	//Set the default directory to find the images needed
	//by the plugin (closebtn.png, blank.gif, loading images ....)
	$.fn.fancyzoom.defaultsOptions.imgDir='http://gatorade.com.do/assets/images/ressources/'; //very important must finish with a /
	
	$("a.fancyzoom").fancyzoom();
	});
	
	$('tbody tr:even').addClass("alt-row"); // Add class "alt-row" to even table rows
	
	$("input.Expandir").mousedown(function () {
			$("#FormCompleto").slideToggle("slow");
	});	
	
	// Let's place a masked input to enter the birth date
	$("#nacimiento").mask("99/99/9999",{placeholder:" "});
	
	$("select.multiregistro").change(function () {
		// Variable definitions
		var a=0;
		var b=6;
		var cant = $("select.multiregistro").val();
		
		for(a=0; a<=b; a++)
		{
			if(a<=cant)
			{
				$(".Persona"+a).show();
			}
			else
			{
				$(".Persona"+a).hide();
			}
		}
	});	
});

function ShowVideo(num)
{	
	$(".ToHide").hide();
	$(".ShowVideo").show();
	$(".ShowVideo").load('/preview/loadvideo/'+num);
	//$("#Video"+num).show();
}
function HideVideo()
{	
	$(".ToHide").show();
	$(".ShowVideo").hide();
	$(".ShowVideo").load('/preview/loadvideo/5');
	//$("#Video"+num).show();
}