(function ($) {
	
	$.fn.addCorners = function (options) {
		options = $.extend({
			topRight: 'tr',
			bottomRight: 'br',
			bottomLeft: 'bl',
			topLeft: 'tl'
		}, options || {});
		return this.each(function () {
			var pos = $(this).css('position');
			if (pos == 'static' || pos == 'auto' || pos === '') {
				$(this).css('position', 'relative');
			}
			$(this).css('zoom', 1);
			// Create container
			var container = $('<div class="corners"></div>');
			$(this).append(container);
			if (options.topRight) {
				container.append('<div class="' + options.topRight + '"></div>');
			}
			if (options.bottomRight) {
				container.append('<div class="' + options.bottomRight + '"></div>');
			}
			if (options.bottomLeft) {
				container.append('<div class="' + options.bottomLeft + '"></div>');
			}
			if (options.topLeft) {
				container.append('<div class="' + options.topLeft + '"></div>');
			}
		});
	};
	
})(jQuery);