jQuery.extend( jQuery.easing,
{
	w2dDesignFlowMenu: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	}
});

var flowmenu={
	build:function(ulid) {

	jQuery(document).ready(function($) {
		$("ul#"+ulid).find("li").each(function(i) {
			if ($(this).children("ul").length>0) {
				$(this).addClass("more");
			}
			$(this).hover( function() {
				$(this).addClass("over");
				$(this).children("ul:eq(0)").children("li").children("a").css("padding-top","0").css("padding-bottom","0");
				$(this).children("ul:eq(0)").css("display","block");
				$(this).children("ul:eq(0)").children("li").children("a").stop(true,true).animate({paddingTop:13,paddingBottom:13},{duration:250, easing:'w2dDesignFlowMenu'});
			}, function() {
				$(this).removeClass("over");
				$(this).children("ul:eq(0)").children("li:eq(0)").children("a:eq(0)").stop(true,true).animate({paddingTop:0,paddingBottom:0},{duration:50, easing:'w2dDesignFlowMenu', complete: function() {
					$(this).parent().parent().css("display","none");
				}});
			});
		});
	});
	}
}
