﻿
(function($) {
    $.fn.tinyTabs = function(options) {
        // Set the options.
        options = $.extend({}, $.fn.tinyTabs.defaults, options);

        var elements = this.each(function() {
            var tabs = $(this).find(".tab");
            tabs.hide().filter(":first").show();
            var tabAnchors = $(this).find(" > ul.tabNavigation a");
            tabAnchors.click(function() {
                tabs.hide();
                tabs.filter(this.hash).show();
                tabAnchors.removeClass("selected");
                $(this).addClass("selected");
                return false;
            });
            $(tabAnchors.get(2)).click();
        });

        // Go through the matched elements and return the jQuery object.
        return elements;
    };
    // Public defaults.
    $.fn.tinyTabs.defaults = {

};
})(jQuery);