//Function to close the slideshow
function closeSlideshow() {
	$('#slideshow-nav').hide();
	$('.close-slideshow').hide();
	$('.slidetabs').hide();
	
	$('#open-slideshow-nav').show();
	
	$('#main-section').removeClass("with-tabs");
	
	$('#top').css("overflow","hidden");
	
	$('#top').animate({
		height: 110
	}, 1000, function() {
    	// Animation complete.
	});
}

//Function to open the slideshow
function openSlideshow() {
	$('#slideshow-nav').show();
	$('.close-slideshow').show();
	$('.slidetabs').show("slow");
	
	$('#open-slideshow-nav').hide();
	
	$('#main-section').addClass("with-tabs");
	
	$('#top').css("overflow","visible");
	
	$('#top').animate({
		height: 541
	}, 1000, function() {
    	// Animation complete.
	});
}

// GOOGLE ANALYTICS
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-6302271-6']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);
 
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
// FOOTER FORM
$().ready(function() {
	$("#form_subscribirse").validate({
		rules: {
			subscribirse_email: {
				required: true,
				email: true
			}
		},
		messages: {
			subscribirse_email: "Por favor ingrese una direccion de e-mail valida."
		}
	});
	$("#form_contacto").validate({
		rules: {
			email: {
				required: true,
				email: true
			},
			nombre: "required"
		},
		messages: {
			email: "Por favor ingrese una direccion de e-mail valida.",
			nombre: "Por favor ingrese su nombre."
		}
	});
	$("#form_tarifas").validate({
		rules: {
			email: {
				required: true,
				email: true
			},
			nombre: "required"
		},
		messages: {
			email: "Por favor ingrese una direccion de e-mail valida.",
			nombre: "Por favor ingrese su nombre."
		}
	});
});
function enviar_subscribirse(){
	$('#form_subscribirse').submit();
}
function enviar_contacto(){
	$('#form_contacto').submit();
}
function enviar_tarifas(){
	$('#form_tarifas').submit();
}


