// JavaScript Document

$(document).ready(function() {
		   
	$(".dropdown dt a").click(function() {
		$(".dropdown dd ul").slideDown(150);		
	});
				
	$(".dropdown dd ul li a").click(function() {
		var text = $(this).html();
		$(".dropdown dt a span").html(text);
		$(".dropdown dd ul").slideUp(150);
	});
	
	var myTimeout = null; 
	$(".dropdown").bind("mouseleave", function() { 
		myTimeout = window.setTimeout(function() { 
			 $(".dropdown dd ul").slideUp(150); 
		}, 1000);  // <-- 1000ms 
	}); 
	
	$(".dropdown dd ul").bind("mouseenter",function() { 
		window.clearTimeout(myTimeout); 
	}); 
	
		 // hides the slickbox as soon as the DOM is ready (a little sooner that page load)
	  $('#infobox').hide();
		 
	  $('#infoshow').click(function() {
		$('#infobox').animate({height:200},{"queue": false, "duration": 150});
		$('#infobox').animate({width:400},150);
		return false;
	  });
	  $('#infohide').click(function() {
		$('#infobox').animate({width:200},{"queue": false, "duration": 150});
		$('#infobox').animate({height:0},150);
		return false;
	  });
	


});
