$(function() {

    $('#staff_bios').cycle({
        speed:  'slow',
        timeout: 2500,
        pager:  '#staff_thumbs',
        fx: 'fade',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#staff_thumbs li:eq(' + (idx) + ') a';
        }
        
    });
    
    $('#staff_bios').cycle('pause');

	$("#staff_thumbs img[title]").tooltip({tip: '#tooltip'});
	
	$.easing.slideUpFix = 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; 
	} 

	$.tools.tooltip.addEffect("slideUpFix", 
		
		// opening animation 
	    function(done) { 
	        this.getTip().animate({top: '+=15', opacity: 1}, 0, done);
	        this.getTip().animate({top: '-=10'}, 150).show(); 
	    }, 
	 
	    // closing animation 
	    function(done) { 
	        this.getTip().animate({top: '-=15', opacity: 0}, 50, function()  { 
	            $(this).hide(); 
	            done.call(); 
	        }); 
	    }
	    
	);

});
