$(document).ready(function(){
	$('HTML').addClass('JS');
	
	$("#tabs").tabs({ fx: { opacity: 'toggle', duration: 'fast' } });
	
	//used to give all tabs the same height
	var maxHeight=0;
	$("#tabs div").each(function(){
		var myDiv=$(this);
		var isHidden=false;
		if(myDiv.hasClass("ui-tabs-hide")){
			isHidden=true;
			myDiv.removeClass("ui-tabs-hide");
		}
		if((myHeight=myDiv.height())>maxHeight){
			maxHeight=myHeight;	
		}else{
			myDiv.height(maxHeight);	
		}
		if(isHidden){
			myDiv.addClass("ui-tabs-hide");
		}
	});
	
	$("#slide").cycle({
		fx: 		'fade',
		next:   '.slidenumero',
		timeout: 	'4000'
	});

	
		//esconder todos los elementos con class = beginhidden
	$(".beginhidden").hide();
  
/* no corre aun
	$(".linkpweb").click(function() {
		$("#pinicio").hide();
		$(".beginhidden").hide();
		$("#pweb").fadeIn("slow");
	});

	$(".linkpadnet").click(function() {
		$("#pinicio").hide();
		$(".beginhidden").hide();
		$("#padnet").fadeIn("slow");
	});
	
	$(".linkpinteractiva").click(function() {
		$("#pinicio").hide();
		$(".beginhidden").hide();
		$("#pinteractiva").fadeIn("slow");
	});

	$(".linkpmedios").click(function() {
		$("#pinicio").hide();
		$(".beginhidden").hide();
		$("#pmedios").fadeIn("slow");
	});

	$(".linkpconsultoria").click(function() {
		$("#pinicio").hide();
		$(".beginhidden").hide();
		$("#pconsultoria").fadeIn("slow");
	});*/
	
// iniciar scrollable
	$("div.scrollable").scrollable({
		size: 3,
		items: '#thumbs',
		interval: 3000,
		loop: true,
		easing: 'linear',
		hoverClass: 'hover'
	});	
	
});


var RecaptchaOptions = {
   theme : 'white',
   lang : 'es',
   tabindex : 5
};