/* ufd 0.6 : Unobtrusive Fast-filter Drop-down jQuery plugin. Authors: thetoolman@gmail.com Kadalashvili.Vladimir@gmail.com Version: 0.6 Website: http://code.google.com/p/ufd/ */ (function($) { var widgetName = "ui.ufd"; $.widget(widgetName, { // options: provided by framework // element: provided by framework _init: function() { //1.7 init // in 1.8 this method is "default functionality" which we dont have; here for 1.7 support if(!this.created) this._create(); }, _create: function() { //1.8 init if(this.created) return; this.created = true; if (this.element[0].tagName.toLowerCase() != "select") { this.destroy(); return false; } // this._timingMeasure(true, "init"); this.options = $.extend(true, {}, this.options); //deep copy: http://dev.jqueryui.com/ticket/4366 this.visibleCount = 0; this.selectbox = this.element; this.logNode = $(this.options.logSelector); this.overflowCSS = this.options.allowLR ? "overflow" : "overflowY"; var selectName = this.selectbox.attr("name"); var prefixName = this.options.prefix + selectName; var inputName = this.options.submitFreeText ? selectName : prefixName; var inputId = ""; // none unless master select has one var sbId = this.selectbox.attr("id"); if(sbId) { inputId = this.options.prefix + sbId ; this.labels = $("label[for='" + sbId + "']").attr("for", inputId); } if(this.options.submitFreeText) this.selectbox.attr("name", prefixName); if(this.options.calculateZIndex) this.options.zIndexPopup = this._calculateZIndex(); var css = this.options.css; this.css = this.options.css; if(this.options.useUiCss) $.extend(this.css, this.options.uiCss); if(!css.skin) css.skin = this.options.skin; // use option skin if not specified in CSS this.wrapper = $([ '', '', '', //