// Start jQuery

$(document).ready(function() {

// GLOBALS //

var g_oBrowserInfo = GetBrowserInfo();

/* Hover functionality site-wide **********************************************/
	
	$('.hover').hover(function() {
	  $(this).addClass('active');
	}, function() {
	  $(this).removeClass('active');
	});
	

/* Fade toggler ***************************************************************/

	$.fn.fadeToggle = function(speed) {
	   return this.animate({opacity: 'toggle'}, speed);
	};

/* Add a class to the last item in new members *********************************/
  $("div.new_members a:nth-child(6)").addClass('row_end');
  $("div.new_members a:nth-child(11)").addClass('row_end');
  $("div.new_members a:nth-child(16)").addClass('row_end');
  
/* Make chatter_block paragraph clickable *********************************/  
  $("div.chatter_block").click(function(){
    	window.location=$(this).find("a.arrow").attr("href");
	});

  

/* Network Bar ***************************************************************/
if (g_oBrowserInfo.browser == "ie" && g_oBrowserInfo.major_version <= 6)
{
	document.getElementById("dropdown").style.top = -1000;
}
else
{
	$('div#dropdown').hide();
}

$("li#elearning_blogs").hover(
function()
{
	$("div#dropdown").show();
	document.getElementById("dropdown").style.top = 36;
	$(this).addClass('open');
	return false;
});


$('li#create_screenr').hover(
function()
{
	if (g_oBrowserInfo.browser == "ie" && g_oBrowserInfo.major_version <= 6)
	{
		document.getElementById("dropdown").style.top = -1000;
	}
	else
	{
		$('div#dropdown').hide();
	}
	
	$("li#elearning_blogs").removeClass('open');
	return false;
});

$('li#articulate_last').hover(
function()
{
	if (g_oBrowserInfo.browser == "ie" && g_oBrowserInfo.major_version <= 6)
	{
		document.getElementById("dropdown").style.top = -1000;
	}
	else
	{
		$('div#dropdown').hide();
	}
	
	$("li#elearning_blogs").removeClass('open');
	return false;
});


$('div#networkbar').hover(
function()
{
	return false;
},
function()
{
	$("li#elearning_blogs").removeClass('open');
	
	if (g_oBrowserInfo.browser == "ie" && g_oBrowserInfo.major_version <= 6)
	{
		document.getElementById("dropdown").style.top = -1000;
	}
	else
	{
		$('div#dropdown').hide();
	}
	return false;
});

/********************************************************************************/

$("div#elearning").click(function(){
    	window.location=('http://www.articulate.com/rapid-elearning/');
    	return false;
	});
	
	$("div#wordofmouth").click(function(){
    	window.location=('http://www.articulate.com/blog/');
    	return false;
	});


}); // End jQuery