$(document).ready(function() {

/****************************** LIGHTBOX ***********************************/
	$(".fancybox").fancybox({
		'width'				: '8',
		'height'			: '4',
		'hideOnContentClick': 'true',
		'titleShow'			: 'false',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});

	$("#ayuda_btn").fancybox({
		'width'				: '8',
		'height'			: '4',
		'hideOnContentClick': 'true',
		'titleShow'			: 'false',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});

	$("#video_btn").fancybox({
		'width'				: '720',
		'height'			: '374',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'swf',
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});
/*****************************************************************************/	

	//fullscreen bg
	var FullscreenrOptions = {  width: 800, height: 550, bgID: '#bgimg' };
	jQuery.fn.fullscreenr(FullscreenrOptions);

	//tool tips
	$("#video_btn").mouseover(function(){
    	$('#video_tool_tip').show('fast');
    }).mouseout(function(){
    	$('#video_tool_tip').hide('fast');
    });

    $("#ayuda_btn").mouseover(function(){
    	$('#ayuda_tool_tip').show('fast');
    }).mouseout(function(){
    	$('#ayuda_tool_tip').hide('fast');
    });
});

function submit_form_1(){
	document.form_1.submit();
}

function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
} 

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

function getDocWidth() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollWidth, D.documentElement.scrollWidth),
        Math.max(D.body.offsetWidth, D.documentElement.offsetWidth),
        Math.max(D.body.clientWidth, D.documentElement.clientWidth)
    );
}
