var scrollT = $('#scroll-box');
var mouseover_tid = [];
var mouseout_tid = [];

$(function(){

	$('a[rel="external"]').attr('target', '_blank');
	
	$('#nav ul.l1').lavaLamp({
		fx: "backout",
		speed: 700
	});
	
	var navT1 = $('#nav ul.l1 > li');
	navT1.each(function(index){
		jQuery(this).hover(function(){
			var _self = this;
			clearTimeout(mouseout_tid[index]);
			mouseover_tid[index] = setTimeout(function(){
				jQuery(_self).children('dl.l2').slideDown(300);
			}, 100);
		}, function(){
			var _self = this;
			clearTimeout(mouseover_tid[index]);
			mouseout_tid[index] = setTimeout(function(){
				jQuery(_self).children('dl.l2').slideUp(200);
			}, 100);
		});
	});
	
	if (scrollT.width()) {
		scrollT.jScrollPane({
			dragMinHeight: 27,
			dragMaxHeight: 27,
			scrollbarWidth: 3,
			scrollbarMargin: 12
		});
	}
	
});

