jQuery(document).ready(function(){
   $('a.toptab').click(function(){
        var id = $(this).attr('id').replace(/-tab/, '');//id base (shared with tab)
        $('div#tabs').attr('class', id);//check out the css: the container div has class which indicates active tab and tabs change background based on this
        $('div#search-options > div').hide();//hide all of them
        $('div#' + id + '-options').show();
        $('input#search_category').val(id);//for our search
        $('#wdgt_keyword').focus();
        return false;
   }); 
});
