text: !function(s){s.uniform={options:{selectClass:"selector",radioClass:"radio",checkboxClass:"checker",checkedClass:"checked",focusClass:"focus",disabledClass:"disabled",buttonClass:"button",activeClass:"active",hoverClass:"hover",useID:!0,idPrefix:"uniform",resetSelector:!1,autoHide:!0},elements:[]},s.support.selectOpacity=s.browser.msie&&s.browser.version<7?!1:!0,s.fn.uniform=function(e){function i(i){var n=s(i),o=s("<div />"),a=s("<span />");"none"==!n.css("display")&&e.autoHide&&o.hide(),o.addClass(e.selectClass),e.useID&&""!=i.attr("id")&&o.attr("id",e.idPrefix+"-"+i.attr("id"));var r=i.find(":selected:first");0==r.length&&(r=i.find("option:first")),a.html(r.html()),i.css("opacity",0),i.wrap(o),i.before(a),o=i.parent("div"),a=i.siblings("span"),i.bind({"change.uniform":function(){a.text(i.find(":selected").html()),o.removeClass(e.activeClass)},"focus.uniform":function(){o.addClass(e.focusClass)},"blur.uniform":function(){o.removeClass(e.focusClass),o.removeClass(e.activeClass)},"mousedown.uniform touchbegin.uniform":function(){o.addClass(e.activeClass)},"mouseup.uniform touchend.uniform":function(){o.removeClass(e.activeClass)},"click.uniform touchend.uniform":function(){o.removeClass(e.activeClass)},"mouseenter.uniform":function(){o.addClass(e.hoverClass)},"mouseleave.uniform":function(){o.removeClass(e.hoverClass),o.removeClass(e.activeClass)},"keyup.uniform":function(){a.text(i.find(":selected").html())}}),s(i).attr("disabled")&&o.addClass(e.disabledClass),s.uniform.noSelect(a),t(i)}function t(e){e=s(e).get(),e.length>1?s.each(e,function(e,i){s.uniform.elements.push(i)}):s.uniform.elements.push(e)}e=s.extend(s.uniform.options,e);var n=this;return 0!=e.resetSelector&&s(e.resetSelector).mouseup(function(){function e(){s.uniform.update(n)}setTimeout(e,10)}),s.uniform.restore=function(e){void 0==e&&(e=s(s.uniform.elements)),s(e).each(function(){s(this).is("select")&&(s(this).siblings("span").remove(),s(this).unwrap()),s(this).unbind(".uniform"),s(this).css("opacity","1");var i=s.inArray(s(e),s.uniform.elements);s.uniform.elements.splice(i,1)})},s.uniform.noSelect=function(e){function i(){return!1}s(e).each(function(){this.onselectstart=this.ondragstart=i,s(this).mousedown(i).css({MozUserSelect:"none"})})},s.uniform.update=function(i){void 0==i&&(i=s(s.uniform.elements)),i=s(i),i.each(function(){var i=s(this);if(i.is("select")){var t=i.siblings("span"),n=i.parent("div");n.removeClass(e.hoverClass+" "+e.focusClass+" "+e.activeClass),t.html(i.find(":selected").html()),i.is(":disabled")?n.addClass(e.disabledClass):n.removeClass(e.disabledClass)}})},this.each(function(){if(s.support.selectOpacity){var e=s(this);e.is("select")&&1!=e.attr("multiple")&&(void 0==e.attr("size")||e.attr("size")<=1)&&i(e)}})}}(jQuery);