(function($) {

	$.fn.vcxround = function(data) {
		
		if($.browser.msie) {
			
			$(this).wrap('<div style="position: relative; height: '+ $(this).outerHeight() +'px; width: '+ $(this).outerWidth() +'px;"></div>');
			
			if(data.dark) {
				if(data.tl) $(this).after('<img src="/img/tv/corner_top_left.jpg" style="position: absolute; top: 0px; left: 0px;" />');
				if(data.tr) $(this).after('<img src="/img/tv/corner_top_right.jpg" style="position: absolute; top: 0px; right: 0px;"/>');
				if(data.bl) $(this).after('<img src="/img/tv/corner_bottom_left.jpg" style="position: absolute; bottom: 0px; left: 0px;"/>');
				if(data.br) $(this).after('<img src="/img/tv/corner_bottom_right.jpg" style="position: absolute; bottom: 0px; right: 0px;"/>');
			} else {
				if(data.tl) $(this).after('<img src="/img/tv/corner_top_left_white.jpg" style="position: absolute; top: 0px; left: 0px;" />');
				if(data.tr) $(this).after('<img src="/img/tv/corner_top_right_white.jpg" style="position: absolute; top: 0px; right: 0px;"/>');
				if(data.bl) $(this).after('<img src="/img/tv/corner_bottom_left_white.jpg" style="position: absolute; bottom: 0px; left: 0px;"/>');
				if(data.br) $(this).after('<img src="/img/tv/corner_bottom_right_white.jpg" style="position: absolute; bottom: 0px; right: 0px;"/>');
			}
			
			$(this).parent().css('margin-top', $(this).css('margin-top'));
			$(this).parent().css('margin-left', $(this).css('margin-left'));
			$(this).parent().css('margin-right', $(this).css('margin-right'));
			$(this).parent().css('margin-bottom', $(this).css('margin-bottom'));
			
			return this;
		}
		return this;
	};

})(jQuery);
