$(document).ready(
  function() {
    $('.skinnable-select').each(
      function(i) {
        // Remove the class for non JS browsers
        $(this).removeClass('skinnable-select');
        // Add the class for JS Browers
        $(this).addClass('skinned-select');
        // Find the select box
        $(this).find('select').before('<div class="select-text">a</div>').each(
          function() {
            $(this).prev().text($('option:selected',this).text())
          }
        );
        // Store the parent object
        var parentTextObj = $(this).children().prev();
        // As we click on the options
        $(this).find('select').change(function() {
          // Set the value of the html
          parentTextObj.text(this.options[this.selectedIndex].innerHTML);
        })        
      }
    );
  }
);

