/*!
 * BMIR Simple Tabs Plugin
 * Copyright (c) 2011 Bryan Mills Iradesso
 * Version: 1.1 (9-SEPT-2011) 
 * Requires: jQuery v1.6.2 or later
 *
 *	This is a jquery plugin used to query the bmir stock quotes service. 
	CURRENT ASSUMPTIONS
	Tab format = ul.tabs
	Container format = .tab-container 
	Container content format = .tab-content
 */

(function ($) {

    $.fn.SimpleTabs = function (settings) {
	
		// ------	PLUGIN PARAMETERS   ------- 
        var _defaults = { };
		//plugin parameters end --- Don't edit anything below this line.
		// -------------------------------------------------------------
		
        if (settings) $.extend(_defaults, settings);

        this.each(function () {           
            var $object = jQuery(this);
			$object.find(".tab-content").hide(); //Hide all content
			$object.find("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$object.find(".tab-content:first").show(); //Show first tab content
			
			$object.find("ul.tabs li a").click(function(event) {
				event.preventDefault();
				$object.find("ul.tabs li").removeClass("active"); //Remove any "active" class
				$(this).parent().addClass("active"); //Add "active" class to selected tab
				$object.find(".tab-content").hide(); //Hide all tab content
				var activeTab = $(this).attr("href"); //Find the rel attribute value to identify the active tab + content
				$(activeTab).show(); //Fade in the active content
				return false;
			});	
			
        });

        return this;

    };

})(jQuery);

