function switchTabs(p_id) {
	jQuery('#tabMenu ul li a').removeClass('act');
	jQuery('#nav_'+p_id).addClass('act');
	
	jQuery('#tc1').hide();
	jQuery('#tc2').hide();
	jQuery('#tc3').hide();
	jQuery('#tc4').hide();
	jQuery('#'+p_id).show();
	
}

function buildSubNav(){
	var subItem;	
	for (i = 3; i < 16; i++){
		//move each item of symptoms (index = 2) to the respective ul
		subItem = jQuery('#item_' + i);
		jQuery(subItem).removeAttr('onmouseover');
		jQuery('#sub_2').append(subItem);
	}
	for (i = 17; i < 26; i++){
		//move each item of products (index = 16) to the respective ul
		subItem = jQuery('#item_' + i);
		jQuery(subItem).removeAttr('onmouseover');
		jQuery('#sub_11').append(subItem);
	}
}

window.onload = buildSubNav;

//ready the show and hide functions for the dropdown
//mouseover and mouseout produced strange results due to absolute positioning
//and I had to apply the mouseleave to the mainNav item, because of the padding of the subNav,
//which is why I had to add the mouseenter to the subNav so that it doesn't disappear
jQuery(document).ready(function(){
	jQuery('#item_2').mouseenter(function() {
		jQuery('#sub_2').show();
		jQuery('#item_2 a').css({'color':'#666','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_act.png") right 5px no-repeat scroll'});
	});
	jQuery('#item_2').mouseleave(function() {
		jQuery('#sub_2').hide();
		jQuery('#item_2 a').css({'color':'#006A46','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_inact.png") right 5px no-repeat scroll'});
	});
	jQuery('#sub_2').mouseleave(function() {
		jQuery('#sub_2').hide();
		jQuery('#item_2 a').css({'color':'#006A46','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_inact.png") right 5px no-repeat scroll'});
	});
	jQuery('#sub_2').mouseenter(function() {
		jQuery('#sub_2').show();
		jQuery('#item_2 a').css({'color':'#666','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_act.png") right 5px no-repeat scroll'});
	});
	jQuery('#item_16').mouseenter(function() {
		jQuery('#sub_11').show();
		jQuery('#item_16 a').css({'color':'#666','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_act.png") right 5px no-repeat scroll'});
	});
	jQuery('#sub_11').mouseleave(function() {
		jQuery('#sub_11').hide();
		jQuery('#item_16 a').css({'color':'#006A46','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_inact.png") right 5px no-repeat scroll'});
	});
	jQuery('#item_16').mouseleave(function() {
		jQuery('#sub_11').hide();
		jQuery('#item_16 a').css({'color':'#006A46','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_inact.png") right 5px no-repeat scroll'});
	});
	jQuery('#sub_11').mouseenter(function() {
		jQuery('#sub_11').show();
		jQuery('#item_16 a').css({'color':'#666','background':'transparent url("/Portals/_default/Skins/Anadin/img/arrow_main_act.png") right 5px no-repeat scroll'});
	});
	
	
});

