$.fn.sortCheckbox = function(option)
{	
    /* option */
    option = jQuery.extend({
        name : 'all' // checkbox vše
    }, option);
    
    $(this).each(function(){
        var el = $(this);
        $(':checkbox', this).click(function(){
            if($(this).attr('class') == option.name){
                el.find(":checkbox[class="+ option.name +"]").attr('checked', true);
                el.find(":checkbox[class!="+ option.name +"]").attr('checked', false);
            }
            else if( el.find(":checkbox[class!="+ option.name +"]").filter(':checked').size() > 0 ){
                el.find(":checkbox[class="+ option.name +"]").attr('checked', false);           
            }
            else{
                el.find(":checkbox[class="+ option.name +"]").attr('checked', true);
            } 
        });
    });
};
