(function($){

	$.fn.extend({
		_hide : $.fn.hide,
		
		hide : function(speed,callback){
			return $(this).is("option") && $.browser.msie && ($.browser.version-0) < 7?
				this._hide4ie() :
				this._hide(speed,callback)
		},
		
		_hide4ie : function(){
			var tmp;
			if(!$.selects)
				$.selects = {};
			else tmp = $.selects[$(this).parent().attr("name")];
			/*alert("name:" + $(this).parent().attr("name"));*/
			//alert("option text:" + $(this).text());
			/*alert($.selects[$(this).parent().attr("name")]);
			alert($(this).parent().parent().html());*/
			if(!tmp)
				$.selects[$(this).parent().attr("name")] = $("option", $(this).parent()).clone();
			
				return $(this).remove();
		},
		
		_show : $.fn.show,
		
		show : function(speed,callback){
			return $(this).is("option") && $.browser.msie && ($.browser.version-0) < 7 ?
				this._show4ie() :
				this._show(speed,callback)
		},
		
		_show4ie : function(){
			if($.selects)
			{
				var tmp = $.selects[$(this).parent().attr("name")];
				if(tmp)
				{
					var parent = $(this).parent();
					parent.empty().append($(tmp).clone());
					return parent.children();
				}

			}
			return $(this);
		}
	});

})(jQuery);
