$.fn.toonelOut=function(d,e,c){
	var th=this,
		w,h,l,t,k,
		toonel=th.data('toonel')
	if(toonel)
		w=toonel.w,
		h=toonel.h,
		l=toonel.l,
		t=toonel.t,
		k=toonel.k
	else
		toonel={
			l:l=th.prop('offsetLeft'),
			t:t=th.prop('offsetTop'),
			w:w=th.prop('offsetWidth'),
			h:h=th.prop('offsetHeight'),
			k:k=h/w
		}
		
	if(th.is(':hidden'))
		return th
		
	th
		.data({toonel:toonel})
		.stop()
		.animate({
			width:1
		},{
			step:function(now){
				th
					.css({
						height:now*k,
						left:(w-now)/2+l,
						top:(h-now*k)/2+t
					})
			},
			duration:d,
			easing:e,
			complete:function(){
				th.hide()
				if(c)
					c.call(th)
			}
		})
	return th
}
$.fn.toonelIn=function(d,e,c){
	var th=this,
		toonel=th.data('toonel'),
		l=toonel.l,
		t=toonel.t,
		w=toonel.w,
		h=toonel.h,
		k=toonel.k
	th
		.stop()
		.show()
		.animate({
			width:w
		},{
			step:function(now){
				th
					.css({
						height:now*k,
						left:(w-now)/2+l,
						top:(h-now*k)/2+t
					})
			},
			duration:d,
			easing:e,
			complete:function(){
				if(c)
					c.call(th)
			}
		})
	return th
}
