$(document).ready(function(){
	//to set up career > news accordion
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	$('.acc_trigger:first').addClass('active').next().show(); //Add 'active' class to first trigger, then show/open the immediate next container
	//On Click
	$('.acc_trigger').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all 'active' state and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add 'active' state to clicked trigger and slide down the immediate next container
		}
		return false; //Prevent the browser jump to the link anchor
	});
	$('#featured').tabs({fx:{opacity: 'toggle'}}).tabs('rotate', 5000, true); 
	$('#featured').hover(function(){$('#featured').tabs('rotate',0,true);},function(){$('#featured').tabs('rotate',5000,true);}); 
	$('#loginform').hide();
	$('#loginhd').mouseover(function(){$('#loginform').show(); $('#tb_username').focus();});
	$('#loginhd').click(function(){$('#loginform').hide();});
});
