Accordion: function as parameter

Accordion: function as parameter

I'm trying to pass a dynamic value for the option active: of the accordion.

Here is my code:
  1. $(document).ready(function() {
  2.     $( "#newsArticles" ).accordion({
  3.             autoHeight: false,
  4.             navigation: true,
  5.             collapsible: true,
  6.             active: function(){return parseInt($(document).getUrlParam("newsID"));}
  7.     });
  8. });
I'm calling the page with mywebsite.com/the-news-section/?newsID=4

parseInt($(document).getUrlParam("newsID")) is equal to 4, or "4" without the parseInt() as seen while debugging.
In both case, it doesn't seem to work to activate a part of the accordion, instead it expands everything.
If I simply write active: 4, it does what I want to achieve.

I'm definitely doing something wrong. Any help ?
Thanks

I am using jquery-1.4.4.min.js, jquery-ui-1.8.6.custom.min.js, jquery.geturlparam.min.js