$(document).ready(function(){

    $(".new .h3h").each(function(){
        cont = $(this).html();
        $(this).html(cont + '<div class="arrow"><img src="/images/down.jpg" /></div>');
    });

    $(".new .h3h").click(function () {
      $(this).nextAll(".cite").slideToggle();
      $(this).children(".arrow").children("img").swapArrows();
    });

    $(".new .h3h").hover(
        function(){$(this).children(".title").toggleClass('underlined')},
        function(){$(this).children(".title").toggleClass('underlined')}
    );

    $(".cite").hide();

    if($.jqURL.get("id")){
        var id = $.jqURL.get("id");
    }

    if(id === undefined){
        $('.new:first .cite').toggle();
        $('.new:first .arrow').children("img").swapArrows();
    }else{
        $('#'+id+' .cite').toggle();
        $('#'+id+' .arrow').children("img").swapArrows();
    }

    // Formulario de la derecha
    yf = $('#yearForm')
    $('input[type=radio]',yf).click(function(){yf.submit()});

});
