$(document).ready(function(){


	/*
	 * Sidebar title effect 
	 *
	 */
	 
	if ($(".list_of_sidebar_elements .elements").length) {  	 
	 	 
		$(".list_of_sidebar_elements .elements").hover(function(){ // on rollover		
			
			$(this).children("h3").children("p").stop().animate({"left":"12px"},100);	
			
			$(this).children("h3").children("p").children("a").children(".arrow").stop().fadeIn(100);						
					
		},function(){ // on rollout
			$(this).children("h3").children("p").stop().animate({"left":"0px"},200);	
			
			$(this).children("h3").children("p").children("a").children(".arrow").stop().fadeOut(200);
		});
	}

	/*
	 * Comp table
	 *
	 */
	if ($("ul.comparative-table li").length) {  	 
		$('ul.comparative-table li').click(function() {	
			if(!$(this).hasClass("nolink"))
			window.location.href = $(this).children('p').children('a.link-more').attr('href');
		});		 
	}
	
	/* 
		handle the global nativation tab state 
		first match against file name, then try to match path.
		this solves the sub-directory issues.
	*/
	if(location.href.indexOf('news-and-events-archive')>-1) {
		$('#newsEventAnchor').parent().addClass('menu_current'); 
	}
	else if(location.href.indexOf('glossary')==-1) {
		if ( $('#menu') ) { 
			$('#menu ul li a:path').parent().addClass('menu_current'); 
		}
		if ( $('.menu_current').length == 0 ) { 
			$('#menu ul li a:current').parent().addClass('menu_current'); 
		}
	}
	
});





