
$(document).ready(function(){
    // hide all but the first six textboxes
    $('.thingalyzer_text').slice(5).each(function(){
        // hide empty ones
        if ( !$(this).attr('value') ){
            $(this).addClass('invisible');
            $(this).hide();
        }
    });
    
    $('.add_textbox_button').bind('click', function(){
        // find the next closed textbox and show it slowly
        if($('.invisible').length){
            $('.invisible:first')
                    .show('slow')
                    .removeClass('invisible');
     
        }else{
            $('.add_textbox_button')
                .text('maximum number of items reached')
                .unbind('click');
        }
    });
});