$(function() {
    $('#oficinas dt.desplegable').click(function() {
        $('#oficinas dl.actiu').removeClass('actiu');
        $(this).parent('dl').addClass('actiu');
    });
});

$(function() {
    $('#content').append('<img src="./css/ombra_tl.jpg" id="tl" />');
    $('#content').append('<img src="./css/ombra_tr.jpg" id="tr" />');
    $('#content').append('<img src="./css/ombra_bl.jpg" id="bl" />');
    $('#content').append('<img src="./css/ombra_br.jpg" id="br" />');
});

$(function() {
        /*
    var col1 = $('#col1').height();
    if (alt < 427) {
        $('#content').height(427);
	alt = 427;
    }
    */
    var alt = $('#content').height();
    $('#col2equ').height(alt - 50);
    $('#col2neq').height(alt - 50);
});

function hora() { 
    var h = new Date;
    var hora = h.getHours();
    if (hora > 12) {
        hora = hora - 12;
        var p = 'P.M.';
    } else {
        var p = 'A.M.';
    }
    var s = hora + ':' + h.getMinutes() + ' ' + p;
    $('#hora').text(s);
}

$(function() {
    $('#reloj dd.reloj_img').append('<div id="hora></div>');
    if ($('#hora').length > 0) {
        hora();
        setInterval(hora, 30000);
    }
});

$(function() {
    var txt = $('div.gt a.actiu').text();
    $('div.gt a.actiu').text('> ' + txt);
});

$(function() {
    $('a.new-window, area.new-window').click(function() {
        window.open(this.href);
        return false;
    });
});


