(function($) {
$.fn.lavaLamp = function(o) {
	o = $.extend({ fx: 'linear', speed: 500, click: function(){return true}, linum: 'no' }, o || {});
	return this.each(function() {
		var path = location.pathname + location.search + location.hash;
		var $current = new Object;
		var $li = $('li.level1', this);
		if ($current.length == 0 && o.linum == 'no')
			$current = $('li a[href$="' + location.hash + '"]', this).parent('li');

		// no default current element matches worked, or the user specified an index via linum
		if ($current.length == 0 || o.linum != 'no') {
			if (o.linum == 'no') o.linum = 0;
			$current = $($li[o.linum]);
		}

		if($('li.active', this).hasClass('active')) $current = $('li.active', this); else $current = $('li.item1');

		var $back = $('<li class="back"><div class="left"></div><div class="bottom"></div><div class="corner"></div></li>').appendTo(this);
		var curr = $('li.lavacurrent', this)[0] || $($current).addClass('lavacurrent')[0];

		$li.not('.back').hover(function() {
			move(this);
		}, function(){});

		$(this).hover(function(){}, function() {
			move(curr);
		});

		$li.click(function(e) {
			setCurr(this);
			return o.click.apply(this, [e, this]);
		});

        setCurr(curr);

        function setCurr(el) {
            $back.css({ 'left': el.offsetLeft-25+'px',
						'width': el.offsetWidth-50+'px',
						'height': el.offsetHeight+'px',
						'top': el.offsetTop-4+'px' });
            curr = el;
		};

		function move(el) {

			$back.stop()
			.animate({
					width: el.offsetWidth-50,
					left: el.offsetLeft-25,
					height: el.offsetHeight,
					top: el.offsetTop-4
			}, o.speed, o.fx);
		};
	});
};
})(jQuery);

jQuery.noConflict();
jQuery(document).ready(function(){
jQuery('#catmenu').lavaLamp({
fx: "easeOutSine",
speed: 300
});
});

