
	var menudelay;
	
	$(document).ready(function(){
		activelink();
		
		$('li.dropmenu').mouseover(function(){
			$('ul.dropmenu:visible').hide();
		});
		
		$('.dropmenu').mouseover(function(){
			clearTimeout(menudelay);
			$(this).children('ul.dropmenu').show();
		}).mouseout(function(){
			var xx = this;
			menudelay = setTimeout(function(){
				$(xx).children('ul.dropmenu').hide();
			},500);
		});
	});
	
	function uri()
	{
		var host = window.location.host;
		var path = window.location.pathname;
		var match = "http://"+host+path;
		var ie = match;//internet explorer
		var moz = match.split("/").reverse();//mozilla
		moz = moz[0];
		return [ie,moz];
	}
	
	function activelink()
	{
		$("a").each(function(){
			var url = uri();
			if ($(this).attr("href") == url[0] || $(this).attr("href") == url[1]) {
				$(this).addClass("active");
			}
		});
	}
