(function($){
 $.fn.extend({
 
 	customSelect : function(options) {
	  if(!$.browser.msie || ($.browser.msie&&$.browser.version>6)){
	  return this.each(function() {
			$(this).wrap('<div class="customStyleSelectBoxWrapper" />');
			var currentSelected = $(this).find(':selected');
			$(this).addClass("customStyleSelect");
			$(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner">'+currentSelected.text()+'</span></span>').css({position:'absolute', opacity:0});
			var selectBoxSpan = $(this).next();
			var selectBoxSpanInner = selectBoxSpan.find(':first-child');
			var selectBoxHeight = parseInt(selectBoxSpan.height()) + parseInt(selectBoxSpan.css('padding-top')) + parseInt(selectBoxSpan.css('padding-bottom'));
			$(this).height(selectBoxHeight).change(function(){
				selectBoxSpanInner.text($(this).find(':selected').text()).parent().addClass('changed');
			});
	  });
	  }
	}
 });
})(jQuery);
