// JavaScript Document


// custom easing called "custom"
$.easing.custom = function (x, t, b, c, d) {
	var s = 1.70158; 
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}



// use the custom easing
$("div.scrollable").scrollable({easing: 'custom', speed: 700});

$.tools.addTipEffect("slidedown",  
	// opening animation
	function() { 
		var opacity = this.getConf().opacity;
		this.getTip().css({opacity:0}).animate({right: '+=15', opacity:opacity}, 300).show();
	}, 
	// closing animation
	function() {
		this.getTip().animate({left: '+=15', opacity:0}, 300, function() { 
				$(this).hide().animate({left: '+=30'}, 0);
		});
	});


$(".trigger").tooltip({effect: 'slidedown', position: ['center', 'right'],offset: [-30, -15]});
$(".triggerleft").tooltip({effect: 'slidedown', position: ['center', 'left'],offset: [-30, 20]});
