var hashChange = function(){	var c = this;	var callbacks = new Array();	var location = '';	var timer;			var init = function(){		location = c.getCurrent();		timer = setInterval(function(){			if(c.getCurrent() != location){				catchNewLocation();			}		}, 50);	}			var catchNewLocation = function(){		var loc = c.getCurrent();		for(var i = 0;i<callbacks.length;i++){			callbacks[i](loc, location);		}		location = loc;	}		this.getCurrent = function(){		return new String(window.location).indexOf('#') != -1?new String(window.location).split('#')[1].split('?')[0]:new String('');	}		this.add = function(callback){	if(typeof callback == 'function')		callbacks.push(callback);	}		init();}var hc = new hashChange();$(function(){	$('.menu>li').css('position', 'relative');	// ie fix	$('.menu>li ul').each(function(){ $(this).show().css('width', $(this).width()+'px').hide(); });			$('.menu>li').mouseenter(function(){		$(this).find('ul').stop(false, true).slideDown(100);		$(this).addClass('active');	});	$('.menu>li').mouseleave(function(){		var e = $(this);		if($(this).find('ul').size() == 0) $(e).removeClass('active');		$(this).find('ul').stop(false, true).slideUp(100, function(){			$(e).removeClass('active');		});	});	$('.menu>li ul li a').mouseenter(function(){		$(this).addClass('active');	});	$('.menu>li ul li a').mouseleave(function(){		$(this).removeClass('active');	});	});
