I am using a jQuery portfolio which filters the gallery when a drop down menu selection activates an onclick event.

http://www.generator.uk.com/test/our...-identity.html

It uses the following code to filter the selection:

Code:
$(document).ready(function() {

$('ul#filter a').click(function() {

$(this).css('outline','none');

$('ul#filter .current').removeClass('current');

$(this).parent().addClass('current');

var filterVal = $(this).text().toLowerCase().replace(/ /g,'-');

var itemsLength = $('ul#portfolio li:visible').length;

$('ul#portfolio li:visible').each(function(i) {

$(this).fadeOut('slow', function(){if(itemsLength == ++i){show(filterVal);}});

});

return false;

});

});

function show(filterVal){

if(filterVal == 'all') {

$('ul#portfolio li').fadeIn('slow');

} else {

$('ul#portfolio li').each(function() {

if($(this).hasClass(filterVal)) {

$(this).fadeIn('slow');

}

});

}

}
I want the page to, when opening, filter the gallery to the
Code:
<li class="current">
in the filter
Code:
<ul id="filter">
. Can this be done using window.onload?

I am an absolute beginner so any help would be appreciated!

:-)