/* -------------------------------- */
function parpadear() {
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}
function empezar() {
  if (document.all)
    setInterval("parpadear()",1000)
}
window.onload = empezar;
/* -------------------------------- */
var max_size = 150;
var min_size = 80;
var tamagnoLetras = 100;
/* -------------------------------- */
function dzIncreaseFontSize(idElemento) 
{ // Abre la FUNCION
if (document.all || document.getElementById) 
{  // Primer IF  
var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
if (elemento) 
{  // Segundo IF    
// el valor est&aacute; indicado en porcentaje:
if(tamagnoLetras >= max_size)
{  // Tercer IF
null;// alert("No es posible aumentar más el texto") -->
}  // Cierre Tercer IF
else
{  // Primer ELSE
tamagnoLetras += 10;
if (elemento.length) 
for (i=0; i<elemento.length; i++) 
	elemento[i].style.fontSize = (tamagnoLetras+'%');
else
elemento.style.fontSize = (tamagnoLetras+'%');    
} // Cierre Primer ELSE
} // Cierre Segundo IF
} // Cierre Primer IF
} // Cierre Funncion 
/* -------------------------------- */
function dzDecreaseFontSize(idElemento) 
{ // Abre la FUNCION
if (document.all || document.getElementById) 
{  // Primer IF   
var elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
if (elemento) 
{  // Segundo IF      
// el valor est&aacute; indicado en porcentaje:
if(tamagnoLetras <= min_size)
{  // Tercer IF
null;//-- alert("No es posible disminuir más el texto") -->
}  // Cierre Tercer IF
else
{  // Primer ELSE
tamagnoLetras -= 10;
if (elemento.length) 
for (i=0; i<elemento.length; i++) 
	elemento[i].style.fontSize = (tamagnoLetras+'%');
else
	elemento.style.fontSize = (tamagnoLetras+'%');    
} // Cierre Primer ELSE
} // Cierre Segundo IF
} // Cierre Primer IF
} // Cierre Funcion 
/* -------------------------------- */
function dzResetFontSize(idElemento) 
{ // Abre la FUNCION
var elemento = document.all[idElemento];
elemento.body.style.fontSize = '100%';
} // Cierre Funncion 
/* -------------------------------- */
/* -------------------------------- */
function jsPlay(soundobj) {
 var thissound= eval("document."+soundobj);
 try {
     thissound.Play();
 }
 catch (e) {
     thissound.DoPlay();
 }
}
/* -------------------------------- */
/* ------intermitente 1------------ */ 
var estado1=true;
setTimeout("ver1()",500);
function ver1(){
estado1=!estado1;
if(estado1==true)
texto1.style.visibility="visible";
else
texto1.style.visibility="hidden";
setTimeout("ver1()",500);
}
/* ------intermitente 2------------ */ 
var estado2=true;
setTimeout("ver2()",500);
function ver2(){
estado2=!estado2;
if(estado2==true)
texto2.style.visibility="visible";
else
texto2.style.visibility="hidden";
setTimeout("ver2()",500);
}
/* -------------------------------- */
function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
 
function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
/* -------------------------------- */
/* -------------------------------- */
$(document).ready(function() {
$('a.zoom').fancybox({
'titleShow'		: 'true',
'showNavArrows' : 'true',
'autoDimensions': 'true',
'transitionIn'	: 'elastic',
'transitionOut'	: 'elastic',
'scrolling'     : 'no',
'autoScale'     : 'true',
'padding'       : 0,
'speedIn'		: 600, 
'speedOut'		: 200, 
'wmode'	: 'transparent'
});
});
/* -------------------------------- */
/* -------------------------------- */
$("a.tube").click(function() {
$.fancybox({
'padding'		 : 0,
'autoScale'		 : false,
'transitionIn'	 : 'none',
'transitionOut'	 : 'none',
'title'			 : this.title,
'width'		     : 680,
'height'	     : 495,
'href'			 : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
'type'			 : 'swf',
'swf'			 : {
'wmode'		     : 'transparent',
'allowfullscreen': 'true'
}
});
return false;
});
/* -------------------------------- */
/* -------------------------------- */
$(document).ready(function() {
/* -------------------------------- */
$("#correo").fancybox({
'scrolling'		: 'no',
'titleShow'		: false,
'onClosed'		: true
});
$("#contacto").bind("submit", function() {
if ($("#nombre").val().length < 1 || 
$("#email").val().length < 1 || 
$("#medio").val().length < 1 || 
$("#comentario").val().length < 1) 
{
$("#error").show();
$.fancybox.resize();
return false;
} 
$.fancybox.showActivity();
$.ajax({
type	: "POST",
cache	: false,
url		: "./acpi/theme/formulario_enviar.php",
data	: $(this).serializeArray(),
success: function(data) {
$.fancybox(data);
}
});
return false;
});
/* -------------------------------- */
});
/* -------------------------------- */
function pause(milisegundos)
{
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < milidegundos);
}
/* -------------------------------- */
$(document).ready(function() {	
$('a.ventana').click(function(){ 
//$.fancybox.showActivity();
$.fancybox({
'width'			: '75%',				
'height'		: '97%',		        
'autoScale'		: false,		        
'transitionIn'	: 'none',				
'transitionOut'	: 'none',							
'href'			: $(this).attr('href'),
'type'			: 'iframe'
});	
return false;
});

});
/* -------------------------------- */
/* -------------------------------- */
$(document).ready(function() {	
$('a.casa').click(function(){ 
//$.fancybox.showActivity();
$.fancybox({
'width'			: '65%',				
'height'		: '97%',		        
'autoScale'		: false,		        
'transitionIn'	: 'none',				
'transitionOut'	: 'none',							
'href'			: $(this).attr('href'),
'type'			: 'iframe'
});	
return false;
});

});
/* -------------------------------- */
/* -------------------------------- */
$(document).ready(function() {	
$('a.tripti').click(function(){ 
//$.fancybox.showActivity();
$.fancybox({
'width'			: '65%',				
'height'		: '97%',		        
'autoScale'		: false,		        
'transitionIn'	: 'none',				
'transitionOut'	: 'none',							
'href'			: $(this).attr('href'),
'type'			: 'iframe'
});	
return false;
});

});
/* -------------------------------- */
$(document).ready(function() { 
$('a[href$=".pdf"]').addClass('pdf');

// setup FB for PDF using type iframe
$('a.pdf').fancybox({
'type' : 'iframe',
'titleShow' : false,
'autoScale' : false,
'width' : '80%',
'height' : '90%'
});
}); 
/* -------------------------------- */

$(document).ready(function(){ 
$(".user").hover(function(){
$(this).next("img").show();
},
function(){
$(this).next("img").hide();
});
});
