function gotoFirstLink()
{
    $(".gotoFirstLink")
        .click(
    		function ()
            { 
                url         =   $(this).find("a:first").attr("href");
                if (url != "undefined" && url != null)
                {
                    document.location   =   url;
                }
            }
    	)
        .addClass("gotoFirstLinkActive");
}

$(document).ready(gotoFirstLink);