

(function($){
 $.fn.extend({
 
 	customStyle : function(options) {

	  if(!$.browser.msie || ($.browser.msie&&$.browser.version>6)){
	  return this.each(function() {

			var currentSelected = $(this).find(':selected');
			$(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner" id="'+$(this).attr('id')+'_label">'+currentSelected.text()+'</span></span>').css({opacity:0,fontSize:$(this).next().css('font-size')});
			var selectBoxSpan = $(this).next();
			var selectBoxWidth = 201;
			var selectBoxSpanInner = selectBoxSpan.find(':first-child');
			selectBoxSpan.css({display:'block'});
			selectBoxSpanInner.css({width:selectBoxWidth, display:'inline-block'});
			var selectBoxHeight = 23;
			
			
			/*if($(this).attr('id')=="make_buying")
			changeSpanElement('make_buying');
			else if($(this).attr('id')=="model_buying") 
			changeSpanElement('model_buying');
*/
$(this).height(selectBoxHeight).change(function(){

                                selectBoxSpanInner.disabled="";
				selectBoxSpanInner.text($('option:selected',this).text()).parent().addClass('changed');
                                selectBoxSpanInner.disabled="disabled";
			});
			
	  });
	  }
	}
 });
})(jQuery);


var $j = jQuery.noConflict();
    $j(document).ready(function($){

$('select.styled').customStyle();

});


