/**
 * external_links()
 * ---------------
 * This functions iteraters through links that are external (include the rel="external" tag)
 * and inserts atribute target="_blank" to make them open in new window.
 * Real reason? To keep our XHTML valid.
 *
 * @author     Miha Hribar <miha@hribar.info>
 */
function external_links() {
    $("a[@rel=external]").attr({ target: "_blank"});
    // find links inside content, that start with http and make them open in new window
    $('a[@href^="http://"]').attr({ target: "_blank"});
}

/* on document ready do the following */
$(document).ready(function(){
    external_links();
});