(function( $ )
{
	$.fn.boxShadow = function( var1, yOffset, blurRadius, shadowColor )
	{
		if( !$.browser.msie ) {
			return;
		}
		return this.each(function()
		{
			div = $(this);
			var shadow = div.data('shadow');
			var blurRadius = 7;
			var xOffset = 0, yOffset = 0;

			if( var1 == 'hide' && shadow !== null ) {
				shadow.hide();
				return;
			}

			if( shadow === null ) {
				shadow = $('<div class="ieShadow">');
				div.after(shadow);
				div.data('shadow', shadow);
			}

			shadow.show();

			var position = div.position();

			if( blurRadius != 0 ) {
				shadow.css("filter", "progid:DXImageTransform.Microsoft.Blur(pixelRadius=" + (blurRadius) + ", enabled='true')");
				_top = position.top - yOffset - blurRadius - 1;
				_left = position.left - xOffset - blurRadius - 1;
				_width = div.outerWidth() + 1;
				_height = div.outerHeight() + 1;
			}
			else {
				_top = position.top - yOffset;
				_left = position.left - xOffset;
				_width = div.outerWidth();
				_height = div.outerHeight();
			}
			shadow.css( {
				top : _top + 'px',
				left : _left + 'px',
				width : _width + 'px',
				height : _height + 'px',
				position : 'absolute',
				background : '#555555',
				"z-index" : div.css('z-index') - 1
			});

		});
	};
})(jQuery);
