First up you'll need a javascript function similar to the one posted here, this will allow you grab the style variable from the querystring.
Once you have that try something like:
var style = getParameterByName('style');
$('li.' + style).addClass('active');