﻿(function ($) {
    $.fn.simpleTabs = function (selectfilter) {
        return this.each(function () {

            var $tabs = $(this).find('.tabNavigation span');
            var $tabContentBox = $(this).find('.tabContentBox');
            var $tabContent = $(this).find('.tabContent');
            $tabContent.outerHeight($tabContentBox.height());
            $tabContentBox.hide().filter(':first').show();
            var selectedTabContentBox;
            $tabs.unbind("click");
            $tabs.click(function () {
                $tabContentBox.hide();
                selectedTabContentBox = $tabContentBox.filter('.' + this.id);
                selectedTabContentBox.show();
                $tabs.removeClass('selected');
                $(this).addClass('selected');
                return false;
            }).filter(selectfilter).click();
        });
    };
})(jQuery);
