/**
*   Spotlight Tabs Module (as seen on Business landing page)
*/
(function($) {
    /**
    * Initializes Tab Modules having CSS classes:
    * - tab-wrapper
    * - subtab-wrapper (can be nested within the above class)
    */
    Intel.mod.tabsResourcelib = function() {
       /* if ($.browser.msie && $.browser.version == "6.0") {
            $('.mod-resource-lib-tabs .tab-wrapper .tab-contents').css('height', '80px');
        } else {
            $('.mod-resource-lib-tabs .tab-wrapper .tab-contents').css('min-height', '80px');
        }*/
        $('.mod-resource-lib-tabs .tab-wrapper').each(function() {
            $(this).tabs();
            if (!$.support.opacity) {
                var navTabs = $(this).find('li a').not('.tab-contents li a');
                navTabs.bind('click', function() {
                    navTabs.each(function() {
                        $(this).css('filter', $(this).css('filter').replace(/-on./, '-off.'));
                        $(this).next().css('filter', $(this).next().css('filter').replace(/-on./, '-off.'));
                    });
                    $(this).css('filter', $(this).css('filter').replace(/-off./, '-on.'));
                    $(this).next().css('filter', $(this).next().css('filter').replace(/-off./, '-on.'));
                });
            }
            $(this).find('.subtab-wrapper').each(function() {
                $(this).tabs();
                if (!$.support.opacity) {
                    var navSubTabs = $(this).find('li a');
                    navSubTabs.bind('click', function() {
                        navSubTabs.each(function() {
                            $(this).css('filter', $(this).css('filter').replace(/-on./, '-off.'));
                        });
                        $(this).css('filter', $(this).css('filter').replace(/-off.|-hover./, '-on.'));
                    });
                    navSubTabs.hover(
						function() {
						    $(this).css('filter', $(this).css('filter').replace(/-off./, '-hover.'));
						},
						function() {
						    $(this).css('filter', $(this).css('filter').replace(/-hover./, '-off.'));
						}
					);
                }
            });
        });
        $('.mod-resource-lib-tabs').css('visibility', 'visible');
    };
})(jQuery);
/**
* Append to Global JS Initializations using jQuery
*/
jQuery(document).ready(function() {
    Intel.mod.tabsResourcelib();
});

