/**
* JQuery for Tab activation on the AudioLink Home Page
*/

	var config = {sensitivity:3,interval:300,over:drops_show,timeout: 300,out:drops_hide};	
	function drops_show(){ 
	   $(this).addClass('tutu');
		 $('select.dropdownbox, select.dropdownbox1, select.dropdownbox2').hide();
	}		
	function drops_hide(){
	   $(this).removeClass('tutu');
		 $('select.dropdownbox, select.dropdownbox1, select.dropdownbox2').show();
	}
	
	function onTabSelect() {
		$('ul#lists li').removeClass('cats').hoverIntent(config);		
		$('#menu ul li:nth-child(1) a').addClass('f');
		
		$('#sections ul#outer div').removeAttr('style').removeAttr('class');
		$("a", this).removeAttr('style');				
		var listItem = $(this);
		var hovnum = $("#menu ul li").index(listItem);
		hovnum = hovnum+1;
		$('#c' + hovnum + ' div').addClass('default');
		$('#menu>ul>li>a').removeClass('f');
		$('#menu>ul>li.page_item:nth-child('+hovnum+')>a').addClass('f');
		var hovnum2 = $("#sections ul#outer div").index(listItem);
		hovnum2 = hovnum2+1;
		$('#menu>ul>li.page_item:nth-child('+hovnum2+')>a').addClass('f');
	}
	
	$(document).ready(function(){
		    $('ul#lists li').removeClass('cats').hoverIntent(config);		
		    $('#menu ul li:nth-child(1) a').addClass('f');
			$('#menu ul li').click(function(){
				return false;
			}).focus(function(){
				onTabSelect();
			});
			
			$('#sections ul#outer div, #menu ul li').hover(function(){ 
					$('#sections ul#outer div').removeAttr('style').removeAttr('class');
					//$("a", this).removeAttr('style');				
					var listItem = $(this);
					var hovnum = $("#menu ul li").index(listItem);
					hovnum = hovnum+1;
					$('#c' + hovnum + ' div').addClass('default');
					$('#menu>ul>li>a').removeClass('f');
					$('#menu>ul>li.page_item:nth-child('+hovnum+')>a').addClass('f');
					var hovnum2 = $("#sections ul#outer div").index(listItem);
					hovnum2 = hovnum2+1;
					$('#menu>ul>li.page_item:nth-child('+hovnum2+')>a').addClass('f');
				},
				function(){ 
					var listItem = $(this);
					var hovnum2 = $("#sections ul#outer div").index(listItem);
					hovnum2 = hovnum2+1;
					$('#c' + hovnum2 + ' div').addClass('default');
				});
});	

