function mainmenu(){
// Oculto los submenus
$("ul.children").css({display: "none"});
// Defino que submenus deben estar visibles cuando se pasa el mouse por encima
$(" #nav li").hover(function(){
    $(this).find('ul:first:hidden').css({visibility: "none",display: "none"}).slideDown(400);
    },function(){
        $(this).find('ul:first').slideUp(400);
    });
}
$(document).ready(function(){
    mainmenu();
});

		


<!-- css comentarios -->
$(function(){
	$("#ComentariosTit").click(function(event) {
	event.preventDefault();
	$("#ComentariosList").slideToggle();
});
$("#ComentariosList a").click(function(event) {
	event.preventDefault();
	$("#ComentariosList").slideUp();
});
});

<!-- -->

$(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 loaded="true">').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\./, '.');
   }
};

function masinfo(x){
$(x).show();
}
function noinfo(x){
$(x).hide();
}



 //PRELOADER
function getImg(obj)
{
    url = $(obj).css({"display":"block", "visibility":"visible"}).html();           //get the image url from the div block
    loaded = false;                                     //check whether image has been loaded
    if(url.search(/<.*/) != -1)                          //search for opening tag, doing /'<img.*/>'/ doesn't work in IE7 and Opera somehow.
    {
        loaded=true;                                    //found opening tag, assume its loaded
        tmp = $(obj).children();                        //get the img tag obj
        url = $(tmp[0]).attr("src");                        //retrieve the url
        if(tmp[1] != undefined)                         //check whether there is a second block in the children of the div block (this is added in loadImg when it fail)
            loaded = false;                             //there is an error message, we try to load again
    }
    if(!loaded)
        loadImg(url,obj, "#loading", "there seems to be an issue, try again later");
}

function loadImg(url, obj, loading, msg)
{
    $(loading).css({"display":"block"}).animate({opacity:1},1000);                  //display the loading in progress image
    $(obj).html("<img src='"+url+"' width='500px' height='350px'/>").css({opacity: 0});   //throw in the image into the div block
    var tmp = $(obj).children();                                                    //gets the image obj we just thrown in
        tmp[0].onload = function(){                                                 //when the image has complete loaded
            $(obj).animate({opacity:1},1000);                                       //display the image
            $(loading).animate({opacity:0},1000).css({"display":"none"});               //hide the loading in progress image
        }
        tmp[0].onerror = function(){                                                //when the image fail to load for various reason
            $(this).css({"display":"none"});                                            //we hide the image that fail
            $(obj).html($(obj).html()+"<div>"+msg+"</div>").animate({opacity:1},1000);//provides a message to the user instead
            $(loading).animate({opacity:0},1000).css({"display":"none"});               //hide the loading in progress image
        }
}
 //PRELOADER
