Implementing a piece of JQuery/Javascript code to a block in concrete

Permalink
I am trying to set a piece of javascript to override absolute positioned radio buttons disguised as a nav bar on a page (in its own block with #wrapper being the div the code is relevant too). The reason being is that as you alternate between the radio buttons the text shown beneath changes in size, and as it is absolute positioned it does not move the footer to reflect the height of the content.

I have tried using <script type="text/javascript"> code below </script> within the html of the block but to no avail. My next thought is to add it to the templates .php file for the page but I want to make sure there isn't an obvious solution I am missing before I do this.

Anyway here's the code I need to add.

jQuery(document).ready(function(){
    setHeight();
    jQuery('input[type="radio"]').on('click', function(){
        setHeight();
    });
});
function setHeight(){
    jQuery('#wrapper').height('#wrapper > div > div').is(':visible').height());
}


Thanks