jQuery(document).ready(function()
{



// - - - - - primary navigation drop panels
	jQuery('.primNavItem',this).mouseenter(function()
	{
		jQuery(this).children('.dropPanel').show();
	});
	jQuery('.primNavItem',this).mouseleave(function()
	{
		jQuery(this).children('.dropPanel').hide();
	});


// - - - - - index page callouts
	jQuery('.calloutBox').each(function()
	{
	
		var calloutId = jQuery(this).attr('id');
		var calloutIdNum = (calloutId.substring(10));
		jQuery('#calloutBox'+calloutIdNum).mouseenter(function()
		{
			jQuery('#calloutPopWrapper'+calloutIdNum).show(100);
		});
		jQuery('#calloutBox'+calloutIdNum).mouseleave(function()
		{
			jQuery('#calloutPopWrapper'+calloutIdNum).hide();
		});
	
	});
	
	
// - - - - - tabbed box
	jQuery('.tabbed-box').each(function()
	{
		var slideId = jQuery(this).attr('id');
		var slideIdNum = (slideId.substring(10));
		var currentTab = 0; // Set to a different number to start on a different tab.
		function openTab(clickedTab)
		{
			var thisTab = jQuery('#tabbed-box'+slideIdNum+' .tabs a').index(clickedTab);
			jQuery('#tabbed-box'+slideIdNum+' .tabs li a').removeClass('active');
			jQuery('#tabbed-box'+slideIdNum+' .tabs li a:eq('+thisTab+')').addClass('active');
			jQuery('#tabbed-box'+slideIdNum+' .tabbed-content').hide();
			jQuery('#tabbed-box'+slideIdNum+' .tabbed-content:eq('+thisTab+')').show();
			currentTab = thisTab;
		}
		jQuery('#tabbed-box'+slideIdNum+' .tabs li a').click(function()
		{ 
			openTab(jQuery(this)); return false; 
		});
		
		jQuery('#tabbed-box'+slideIdNum+' .tabs li a:eq('+currentTab+')').click()
	});

	
// - - - - - show/hide article
	jQuery('.viewFullArticle',this).click(function()
	{
		jQuery(this).css({'display':'none'});
		jQuery(this).parent().css({'overflow':'visible','height':'100%'});
	});
	
	jQuery('.hideFullArticle',this).click(function()
	{
		jQuery(this).parent().css({'overflow':'hidden','height':'20px'});
		jQuery(this).siblings('.viewFullArticle').css({'display':'block'});
	});
	
// browser detection
	var a=navigator.userAgent.toLowerCase();
	jQuery.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());
	// Internet Explorer
	if(jQuery.browser.msie)
	{
		jQuery('body').addClass('browserIE');
		jQuery('body').addClass('browserIE'+jQuery.browser.version.substring(0,1))
	}
	// Chrome
	if(jQuery.browser.chrome)
	{
		jQuery('body').addClass('browserChrome');
		a=a.substring(a.indexOf('chrome/')+7);a=a.substring(0,1);
		jQuery('body').addClass('browserChrome'+a);
		jQuery.browser.safari=false
	}
	// Safari
	if(jQuery.browser.safari)
	{
		jQuery('body').addClass('browserSafari');
		a=a.substring(a.indexOf('version/')+8);
		a=a.substring(0,1);jQuery('body').addClass('browserSafari'+a)
	}
	// Firefox
	if(jQuery.browser.mozilla)
	{

		if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1)
		{
			jQuery('body').addClass('browserFirefox');
			a=a.substring(a.indexOf('firefox/')+8);
			a=a.substring(0,1);
			jQuery('body').addClass('browserFirefox'+a)
		}else{
			jQuery('body').addClass('browserMozilla')
		}
	}
	// Opera
	if(jQuery.browser.opera)
	{
		jQuery('body').addClass('browserOpera')
	}


// png fix for IE6
	jQuery(document).pngFix();






});

