﻿$(function(){

 jQuery("#ctl00_Contenido_imagennoticia1").mousemove(function(){
   document.getElementById('lnkbotoneranoticia').href = document.getElementById('linkrotativanoticia1').value;
   });
jQuery("#ctl00_Contenido_imagennoticia2").mousemove(function(){
   document.getElementById('lnkbotoneranoticia').href = document.getElementById('linkrotativanoticia2').value;
   });
   jQuery("#ctl00_Contenido_imagennoticia3").mousemove(function(){
   document.getElementById('lnkbotoneranoticia').href = document.getElementById('linkrotativanoticia3').value;
   });
   jQuery("#ctl00_Contenido_imagennoticia4").mousemove(function(){
   document.getElementById('lnkbotoneranoticia').href = document.getElementById('linkrotativanoticia4').value;
   });
   jQuery("#ctl00_Contenido_imagennoticia5").mousemove(function(){
   document.getElementById('lnkbotoneranoticia').href = document.getElementById('linkrotativanoticia5').value;
   });
   
   /*#######para certifica*/
   jQuery("#ctl00_Contenido_imgnoticia1").click(function(){
    var r = "/home/botonera_noticias/preview_1";  
    cert_registerHit(25559, r);
   });
   
    jQuery("#ctl00_Contenido_imgnoticia2").click(function(){
     var r = "/home/botonera_noticias/preview_2";  
    cert_registerHit(25559, r);
   });
   
    jQuery("#ctl00_Contenido_imgnoticia3").click(function(){
   var r = "/home/botonera_noticias/preview_3";  
    cert_registerHit(25559, r);
   });
   
    jQuery("#ctl00_Contenido_imgnoticia4").click(function(){
    var r = "/home/botonera_noticias/preview_4";  
    cert_registerHit(25559, r);
   });
   
    jQuery("#ctl00_Contenido_imgnoticia5").click(function(){
    var r = "/home/botonera_noticias/preview_5";  
    cert_registerHit(25559, r);
   });
   
 

jQuery("#pausaNoticia").mouseover( function() {

    jQuery("#pausaNoticia img").css({display:'block'});
    jQuery("#ContenedorNoticia").css({opacity:"1"  });

  } );
jQuery("#pausaNoticia").mouseout( function() {$("#pausaNoticia img").css({display:'none'}); 
 jQuery("#ContenedorNoticia").css({opacity:"1"  });
  } ); 
  
  jQuery("#pausaNoticia").click( function() {
   var r = "/home/botonera_noticias/link_flecha";  
    cert_registerHit(25559, r);
  });


    
    

    jQuery("#ContenedorNoticia").cycle({
        fx:'fade',
        timeout:5000,
        pager:"ul.nav",
        
        pagerAnchorBuilder: function(idx, slide){
            return 'ul.nav li:eq(' + (idx) + ') a';
        }
    });

    jQuery("#descripcionNoticias").cycle({
        fx:'dvThNails',
        timeout:5000,
        pager:"ul.nav",      
       
        pagerAnchorBuilder: function(idx, slide){
            return 'ul.nav li:eq(' + (idx) + ') a';
        }
    });

    jQuery("#preview").cycle({
        fx:'fade',
        timeout:5000,        
        pager:"ul.nav",
        
        pagerAnchorBuilder: function(idx, slide){
            return 'ul.nav li:eq(' + (idx) + ') a';
        }
    });

    jQuery("div.webnoticia, #descripcionNoticias div.webnoticia").cycle({
        fx:'fade',        
        timeout:10000,
        pager:"#preview ul.webnoticia",
       
       
       
        pagerAnchorBuilder: function(idx, slide) {
            return '#preview ul.webnoticia li:eq(' + (idx) + ') a'; 
          
             
        }
    });

    jQuery('#preview ul li a').not("a.activeSlide").css({ opacity:0.7});
    jQuery('#preview ul li a').click(function(){
        $(this).each(function(i){
            $('#preview ul li a:not(".activeSlide")').css({ opacity:0.7 });            
            
            
            
            
        });
    });
    
    jQuery('#preview ul li a').hover(
        function(){
            $(this).animate({ opacity:1 }, {
                queue:false,
                duration:350
            });
        },
        function(){
            $(this).not("a.activeSlide").animate({ opacity:0.7 }, {
                queue:false,
                duration:350
            });
           }
         );
});