/** * selectCombo vychazi z jQuery v 1.2.6 *  * Celel je to predelano a prispusobeno pro PAF *  * autor Martin Hapl *  */(function($){    $.fn.selectCombo = function(url, target, settings){    var defaults = {hidetarget: true, indicator: false, pageload: false};    $.extend(defaults, settings);    return this.each(function(){        var qobj = this;        if(defaults.indicator != false) {            $(defaults.indicator).hide();        }        settargetlabel	= function(target){            var targetlabel = target.replace(/#/, '');            targetlabel = "label[for='" + targetlabel + "']";            return targetlabel;        }        hidetargetinfo = function(qobj, target){            if(qobj.id != $(target).attr('id')){var targetlabel = settargetlabel(target);$(targetlabel).hide();$(target).hide().html('').change();            }        }        if(defaults.hidetarget && ($(target).val() == '' || $(target).val() == null)){            hidetargetinfo(qobj, target);            $(target).html('').val('').change();        }        loadOptions = function(){            qval = $(qobj).val();            tval = $(target).val();            if(defaults.indicator != false) {$(defaults.indicator).show();            }                    $.get(url, {q: qval, t: tval}, function(data) {                    $(target).html(data);                                if (!$.browser.msie) {                    $("option:first", target).attr("selected","selected");                }            }        );    }    $(this).change(loadOptions);//end change fn    });//end return for each}})(jQuery);
