if('jQuery' in this){

  jQuery.fn.dropdown = function( opts ){
    this.each( function(){
      if( !(/^select$/i).test(this.nodeName) ){
	throw Error('Unable to convert object '+ this );
	return;
      }
      var t = $(this);

      var divElem = $('<div class="dropdown"></div>');
      t.css('opacity',0).wrap(divElem);
      var current = t.parent().prepend('<span class="current"></span>').find('.current:first');

      var selected = t.find(":selected:first");
      if(selected.length == 0){
	selected = t.find("option:first");
      }
      current.html(selected.text());

      t.change(function() {
		 current.text(t.find(":selected").text());
	       });
      });
    return this;
  };
}
