$(document).ready(function(){
	/* Menu */
	$('.menu').children('li').bind('mouseover',function(){
		$(this).siblings().each(function(){
			$(this).css('z-index','997');
			hidedropdown.apply(this);
		});
	});
	$('.menu').children('li.parent').bind('mouseover',function(){
		$(this).css('z-index','998');
		$(this).siblings().each(function(){
			hidedropdown.apply(this);
		});
		clearInterval(this.timer);
		this.timer = setInterval(showdropdown.bind(this), 50);
	}).bind('mouseout',function(){
		clearInterval(this.timer);
		this.timer = setInterval(hidedropdown.bind(this), 400);
	});
});
function showdropdown(){
	$(this).addClass('over');
	$(this).children('a').addClass('over');
	clearInterval(this.timer);
}
function hidedropdown(){
	$(this).removeClass('over');
	$(this).children('a').removeClass('over');
	clearInterval(this.timer);
}
Function.prototype.bind = function(object) {
	var method = this;
	return function() {
		method.apply(object, arguments);
	}
}
