/** rev1 **/
/** Created by DSI Ostrava **/
(function($) {
	$.fn.extend({
		DSItabs : function(options) {
			var defaults = {
				content : "content container",
				selected : "selected tab class"
			};

			var options = $.extend(defaults, options);

			return this.each(function() {
				var opt = options;
				var obj = $(this);
				var li = $(this).find('ul:first').find('li');
				var $selected = opt.selected.substring('1', opt.selected.length);
				$(opt.content, obj).not(":first").hide();

				$('a', li).click(function(e){					
					e.preventDefault();
					$(opt.content, obj).hide();
					$(opt.content, obj).eq($(this).parents('li').index()).show();
					$(opt.selected, obj).removeClass($selected);
					$(this).parents('li').addClass($selected);
				});
			});
		}
	});
})(jQuery);
