var obj = null;
	function checkHover() {
		if (obj) {
			obj.find('ul').fadeOut('fast');	
		}
	}
	
	/* ---------- CUSTOM ONLOAD ---------- */
	$(function(){
	
		$("#menu li ul").hide(0);
		if( $.browser.msie ){ var tOff = 20; }else{ var tOff = 12; }
		
		$('#menu > li').hover(function() {
			if (obj) {
				obj.find('ul').fadeOut('fast');
				obj = null;
			}			   						   
			var offsetMenu = $(this).offset();
			$(this).find('ul').css({ top: offsetMenu.top +tOff, left: offsetMenu.left -5 }).fadeIn('fast');
		}, function() {
			obj = $(this);
			setTimeout(
				"checkHover()",
				500);
		});
		

	    $('#menu > li').each(function(i){
			   if( $(this).attr('id') == $('body').attr('class') ){
					   $(this).children(":first").css('background','#003399');
			   }
	   });




			
		if( $("body").attr('id') == 'careers' ){	
			
					
			$.getJSON('../job_edit.js', function(data) {							
												
			  $('#jobs_dade').empty();
				  


			  $.each(data, function(entryIndex, entry) {
												
					 if( entry['county'] == 'dade' ){				  
							
							var html = '<div class="entry">';
							html += '<span class="anchor">' + entry['title'] + '</span>';
							if (entry['description']) {
							  html += '<div class="description">';
							  $.each(entry['description'], function(lineIndex, line) {
								html += '<p>' + line + '</p>';
							  });
							  html += '</div>';
							}
							html += '</div>';
		
						}else{
							var other = '<div class="entry">';
								other += '<span class="anchor">' + entry['title'] + '</span>';
								if (entry['description']) {
								  other += '<div class="description">';
								  $.each(entry['description'], function(lineIndex, line) {
									other += '<p>' + line + '</p>';
								  });
								  other += '</div>';
								}
								other += '</div>';				
						}
				
				
						$('#jobs_dade').append(html);
						$('#jobs_broward').append(other);
				  });
				  
				  
				$('.description').hide(0);
				

				$('.anchor').click(function() {
					$('.description').hide('fast'); // makes only one open at a time
					$(this).next().toggle(400);
					return false;
				
				});
				  
				  
			});	
			
			
			
	
		}		
		
		
  });