$(document).ready(function() {
  $('select.skinable').wrap(document.createElement('div')).parent().addClass('my-skinnable-select');

  $('.my-skinnable-select').each(function(i) {
    $(this).removeClass('my-skinnable-select').addClass('skinned-select'); // Remove the class for non JS browsers and Add the class for JS Browers

    $(this).children().before('<div class="select-text"></div>').each(function() { // Find the select box
      $(this).prev().text(this.options[this.selectedIndex].innerHTML);
    });

    $(this).children().bind('click change keyup', function() { // As we click on the options
      $(this).prev().text(this.options[this.selectedIndex].innerHTML) // Set the value of the html to the div.select-text
    })
  });
});

