$(document).ready(function(){
//EFECTO PAGE FLIP PARA MOSTRAR A CONASITO
        $("#pageflip").hover(function() {
                $("#pageflip img , .msg_block").stop()
                        .animate({
                                width: '307px', 
                                height: '319px'
                        }, 500); 
                } , function() {
                $("#pageflip img").stop() 
                        .animate({
                                width: '50px', 
                                height: '52px'
                        }, 220);
                $(".msg_block").stop() 
                        .animate({
                                width: '50px', 
                                height: '50px'
                        }, 200);
        });
});

//EFECTO DE CARROUSEL PARA LAS NOTICIAS
$(document).ready(function(){
        $('#slider1').bxSlider({
            pager: true,
                        auto: true,
                        pause: 6800,
                        speed: 500

        });
});

//EFECTO ROLLOVER PARA ALGUNOS BANNERS CENTRALES
$(document).ready( function() {
   peps.rollover.init();
});
peps = {};
peps.rollover = {
   init: function() {
      this.preload();
      $(".roll").hover(
         function () { $(this).attr( 'src', peps.rollover.newimage($(this).attr('src')) ); },
         function () { $(this).attr( 'src', peps.rollover.oldimage($(this).attr('src')) ); }
      );
   },
preload: function(){
      $(window).bind('load', function() {
         $('.roll').each( function( key, elm ) { $('<img />').attr( 'src', peps.rollover.newimage( $(this).attr('src') ) ); });
      });
   },
   newimage: function( src ) {
      return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_hover' + src.match(/(\.[a-z]+)$/)[0];
   },
   oldimage: function( src ){
      return src.replace(/_hover\./, '.');
   }
};

//EFECTO FADE IN PARA LOS BANNERS INFERIORES
$(document).ready(function(){
						   $("#banners").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
						   $("#banners").hover(function(){
						   $(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
						   },function(){
						   $(this).fadeTo("slow", 0.5); // This should set the opacity back to 30% on mouseout
							   	});
						   });
